dasblog Macros

Update: April 4th, 2009

Here are few useful macros of dasBlog developed by me. The idea of development of these macros comes as and when I required additional functionality in my blog. dasBlog allow you to create macros, known as “custom macros” and have given instructions on it’s website to do so. However you won’t need to look elsewhere for the installation of these dasblog macros. I have given the step by step information about how to install them.

downloadThis package contains a dll (aakashjain.dll) that is required to use all macros listed below. (also contains images and style information in a separate CSS file.)

AakashJain.dll.zip

List of Last.Fm Recent Tracksrecent_tracks_screenshot

This macro will show the list of recent tracks that was listened by you and scrobbled by Last.fm. This macro is for only who have signed up at last.fm.

Syntax: <%LastFmRecentTracks(user_name, no_of_tracks)|AJmacros%>

Here, user_name is your last.fm username. Enter a numeric value for no_of_tracks, it will figure out How many recent tracks to be displayed in the output. Please note username should be surrounded with double quotes as shown in example below.

Example: <%LastFmRecentTracks(“akajain”,5)|AJmacros%>

You can customize the output of this macro using CSS. You can found CSS Information in the zip file (aakashjain.dll.zip).


List of Last.Fm Top Artist

recent_artists_screenshot

This macro will show the list of Top Artist that you listened to this week. Again, this macro is for only who have signed up at last.fm.

Syntax:

<%LastFmWeeklyTopArtist(user_name, count,Show_URL, Show_Count, Show_Rank)|AJmacros%>

Here, user_name is your last.fm username.

count – (Enter numeric value.) – No. of artist data to show in list.

Show_URL – (true/false) – If true it will Artist name will be pointing to the artist page on Last.fm

Show_Count – (true/false) – If true it will show the number of times you have listened to this artist.

Show_Rank – (true/false) – Wheather to show Rank of each Artist or not.

Example: <%LastFmWeeklyTopArtist(“akajain”, 5,true,true,true)|AJmacros%>

You can customize the output of this macro using CSS. You can found CSS Information in the zip file (aakashjain.dll.zip).


Show a Shoutbox

This macro will add a shoutbox to dasBlog. Features included-shouts_screenshot

XML Database (All entries are stored in XML File. It can be kept under the content directory of blog)

Ajax Enabled – No Iframe or refreshing of whole page. Update shoutbox silently and regularly after specified interval.

Customizable CSS – I tried to make it very customizable. It can gel with any theme perfectly.

Syntax: <%AjShoutBox(max_char, refreshInterval, maxShouts)|AJmacros%>

max_char – (numeric value) – maximum number of characters to be allowed in the message textbox of shoutbox.

refreshInterval – (milliseconds) – enter the interval in milliseconds for which shoutbox will be updated automatically. (1 second = 1 000 milliseconds). If you want to disable automatic refresh of shoutbox enter any thing less than 5000 for refreshInterval.

maxShouts – (numeric) – maximum number of last shouts to be shown.

Example: <%AjShoutBox(200,30000,30)|AJmacros%>

You can customize the output of this macro using CSS. You can found CSS Information in the zip file (aakashjain.dll.zip).

(view this macro live on my blog)

Extra Settings: This macro require extra settings/configuration to be made (given below) to work sucessfully.

Add  the following line under the <httpHandlers> section of web.config.

<add verb=”*” path=”aakashjain/shoutBoxHandler.aspx” type=”AakashJain.ShoutBoxHandler,AakashJain”/>

Create a key under <configuration> section of web.config

<appSettings>

<add key=”AakashJainShouts” value=”~/content/aakashjainshouts.xml”/>

</appSettings>

The installation of this macro is bit tricky, please read my blog post for the installation of this macro.



How to Install these macros

  1. Start with downloading the zip file on your hard-drive.
  2. Extract the content of zip file and upload/copy aakashjain.dll into the bin directory of your blog. Upload/Copy ajshouts.css in the images folder of your blog.
  3. Add following line in the <head> section of your homeTemplate.blogtemplate file.<link media=”all” rel=”stylesheet” type=”text/css” href=”images/ajmacros.css”></link>
  4. Now, edit the web.config file of your dasBlog application to make the following changes.a) Uncomment or Add the following code in the <configuration>/<configSections> of web.config file.<section name=”newtelligence.DasBlog.Macros” type=”newtelligence.DasBlog.Web.Core.MacroSectionHandler, newtelligence.DasBlog.Web.Core” />b) Add or uncomment the following lines under the <configuration>.�<newtelligence.DasBlog.Macros> <add macro=”AJmacros” type=”AakashJain.AakashJainMacros,AakashJain”/></newtelligence.DasBlog.Macros>

Please note that few macros may need extra settings to work. These settings are listed with the description of macro under “Extra Settings” heading.





Share and Enjoy:
  • Twitter
  • Digg
  • del.icio.us
  • StumbleUpon
  • Google Bookmarks
  • Technorati
  • Facebook
  • DotNetKicks
  • email
  • Print
  • NewsVine
  • Reddit
  • RSS
  1. March 4th, 2009 at 04:47
    Reply | Quote | #1

    update: I am ready to share the source code of these macros. Let me know if anyone interested.

TOP