MikeyP.com MikeyP.com

smilefie Plugin Mod for Writeback

I made some slight modifications to Jason Silver's smilefie plugin to support emoticons in writebacks. ozean asked me to post my mods, so here they are.


You can get the modified smilefie by clicking here. (I left credit to Jason, as my mods aren't really that significant.)


I've hacked on Rael's writeback plugin too much to provide a download at this point. I promise that I'll clean it up and provide it some day. In the mean time, to use the new smilefie plugin with writeback, open writeback in your favorite text editor, look for the function sub story, and add this line directly after the line that reads my $writeback = &$blosxom::template...

if ($blosxom::plugins{smilefie} ) {$param{comment} = &smilefie::smilefie_this($param{comment})};

The whole code block should look like this:

      if ( $line =~ /^-----$/ ) {

        my $writeback = &$blosxom::template($path,'writeback',$blosxom::flavour)
           || '<p>... BUNCHA HTML IN HERE...</p>';

        if ($blosxom::plugins{smilefie} ) {$param{comment} = &smilefie::smilefie_this($param{comment})};
        $writeback =~ s/\$writeback::(\w+)/$param{$1}/ge;

        $writebacks .= $writeback;


That's all there is to it. Note that I force smilefie to run 'late' and writeback to run 'early' by renaming the plugin files to 99smilefie and 00writeback.

Good luck!

Read more stories like this one...


comments powered by Disqus