Here's the complete text for the download you were just reading about. For those that hate to read documentation, here's a link to DOWNLOAD wazzup 0.5.

To return to the Downloads page, click the Downloads button at left.

wazzup 0.5

The wazzup plugin creates links to the most-recent entries added to the blog; users configure the number of new entries to list. The form of the links (lines, paragraphs, list items, etc.) and the link contents ($url, $path, $fn, $yr/$mo_num/$da, $title, etc.) can be set with a flavour file, or left for the built-in templates. The links can be displayed in either the head or foot section of the blog (or both) by calling the $wazzup::recent_entries variable.

wazzup is very CPU-friendly — it lets blosxom do all the sorting and file-reading work by running in the story() and foot() subs, and then magically makes its links available to head (or foot, or both).

Configuring & Installing wazzup

Enter configuration values for the options described below; add a call to $wazzup::wazzup in your head or foot template(s); drop this file into your blosxom plugins folder; blog on.

Number of Links : the integer you enter into $num_titles sets the number of most-recent entries that wazzup processes. If you set $num_titles to zero (or leave it empty), wazzup will process all the entries blosxom comes up with. $num_titles is available to config files as $wazzup::num_titles.

Pre- and Post- links markup : wazzup flavours (templates) do not enclose the returned set of links in any kind of "block" markup (<ul>...</ul>, <p>...</p>, etc.). If needed, you can add enclosing tags to your head or foot templates, or you can provide them here in the $pre_links_markup and $post_links_markup variables, where they will be added to $wazzup::recent_entries. Both variables are available to config files.

To install wazzup, just drop the configured file into your Blosxom plugins folder. That's it. Add a call to $wazzup::recent_entries in your head or foot flavour files, and away you go. To customize the content and appearance of your links, see the Flavours section, below.


WYSIWITF — what you see is what's in the flavour ;-) To get wazzup to display anything at all, there must be a template (flavour) file telling it what to display. There are two flavours built-in to wazzup: one for rss 0.91 (blosxom's built-in rss), and one for everything else. You can give wazzup the content and appaerance you want by adding to the defaults, or by creating independent flavour files (just like with blosxom).

Let's take a look at a wazzup flavour; here's the default for "everything else":

<a class="wazzup" href="$url$path#$fn">$title</a><br />

With this flavour, wazzup will be returning links (<a...</a>) assigned to the wazzup class for easy css styling (class="wazzup"). Each link's target is this entry's category (href="$url$path#$fn"), and its link text is the entry title ($title). A break tag (<br />) puts one link per line. When interpolated, the link code will look something like this:
<a class="wazzup" href="">Digital Rover</a>

The template is told where to insert its results by adding the $wazzup::recent_entries variable to a head or foot template of the same flavour.

Now let's make a flavour file. Create a text file named "wazzup.recent_entries.flav", where flav is the blosxom flavour you're making this for. Now enter the markup, variables, and text you want displayed. This is just like building any other template — date, story, etc. — and should only take a minute or two. Here's a flavour file that produces date-based links as list items:

<li><a class="wazzup" href="$url/$yr/$mo_num#$fn">$title</a></li>

(There's two lines in the file; the second is blank [empty])

With this flavour, wazzup will be returning list items of links of css class links. Each link's target is the date-based slice of the entry's year and month (href="$url/$yr/$mo_num#$fn"), and its link text is the entry title ($title). The blank line at the end of the flavour file ensures that each list item will appear on its own line in the interpolated html code. When interpolated, the link code will look something like this:
<li><a class="links" href="">Lost Again!</a></li>

The template is told where to insert its results by adding the $wazzup::recent_entries variable to a head or foot template of the same flavour. To make these list items appear in a list, they need to be enclosed in list markup (<ul> or <ol>); this can be done in the target flavour file, or from wazzup. In the target flavour file (i.e. head or foot), you could do this:


To declare a list from within wazzup, you could set the $pre_links_markup and $post_links_markup variables to <ul> and </ul>, and the target flavour file simply needs:


(The $wazzup::pre_links_markup and $wazzup::post_links_markup variables are also available to configuration files.)

One last bit — if you want to include the number of recent stories in your $recent_entries display, you can use the $wazzup::count variable. However, this var can only be used from within the $pre_links_markup and $post_links_markup variables, and must be "escaped" with a leading \. Here's an example that shows the count while enclosing wazzup's links in a blue box: $pre_links_markup = qq {<div id="wazzup" style="margin:8px 60% 8px 8px; padding:8px; border:2px solid #0000bb; background:#0000cc none;">
<b class="wazzup"><center>\$wazzup::count  Most-Recent:</b></center><br>}
     unless defined $pre_links_markup;
$post_links_markup = qq {</div>}
     unless defined $post_links_markup;

And here's how that comes out:

Using wazzup

It's pretty much all been said; here's a quick review:

  1. Configure the number of recent entries to list, and set $pre_links_markup and $post_links_markup, if desired;
  2. Live with the default templates, or build your own by creating a text file named wazzup.recent_entries.flav and filling it with the bits you want displayed;
  3. Make sure all files are saved with unix line ends; upload the wazzup plugin file to your plugins directory; upload wazzup flavour files to your datadir; blog on.


DOWNLOAD wazzup 0.5