blosxom :: the zen of blogging

about

  • home/about
  • features
  • colophon
  • news
  • mailing list



  • documentation for users

  • overview
  • install
  • configure
  • blog
  • view
  • flavour
  • syndicate
  • plugins
  • plugin registry
  • static
  • faq
  • use cases*
  • documentation for developers

  • overview
  • plugins
  • downloads

  • mac
  • windows*
  • everyone

  • license
  • contributed*
  • powered by

    Plugins

    Blosxom sports a plugin architecture, allowing the core of Blosxom to remain small, sleek, and simpler-than-pie while providing room for extension and integration into different environments and uses.

    The Blosxom Plugin Registry...

    Browse the Blosxom Plugin Registry for all your plugin needs.

    There is an ever-growing list of plugins developed by Blosxom users just like you. There are display plugins, fiddling with blog posts on the fly and providing additional template elements. Image plugins provide everything from convenient image references to resizing and creating an image gallery. Input plugins provide writebacks (comments and trackbacks), karma tracking, and email-to-blog gateways.

    Activate plugin support...

    Activating plugin support in Blosxom is just a matter of creating a plugin directory in which to keep them and telling Blosxom where to find it.
    1. Create a plugin folder/directory just about anywhere. About the only rule is that your plugins should not be viewable by the public; plugins are bits of programmatic code and often contain configuration options and passwords you wouldn't want any Tom, Dick, and Harry to read. So keep it out of your Web server's document root.

      You'll also need a state directory as many plugins maintain some files of their own and need a place to keep them.

      Here are few reasonable suggestions for where to put your plugins:

      • ISP
        A data/blosxom/plugins directory in your home directory is as good a place as any. If you have command-line access, these commands should create the plugins and plugins/state directories, along with all the intermediate directories on the path:
        mkdir -p ~/data/blosxom/plugins/state
        chmod -R 755 ~/data/blosxom/plugins/state
        If you only have FTP access, you should be able to create the data/blosxom/plugins/state hierarchy from the comfort of your favourite FTP application.
      • Mac OS X
        I suggest /Library/WebServer/Data/Blosxom/Plugins. If you used the Blosxom for Mac OS X installer, all this has been taken care of for you; otherwise, launch the Terminal application (Applications > Utilities > Terminal) and type:
        sudo mkdir -p /Library/WebServer/Data/Blosxom/Plugins
        sudo chmod -R 755 /Library/WebServer/Data/Blosxom/Plugins
        (You'll be prompted for your password, if any.)
      • Windows 2000/XP
        Create a new set of folders: c:\Inetpub\Data\Blosxom\Plugins\state from the Explorer.
    2. Tell Blosxom where to find your plugins by altering the $plugin_dir configuration option in the blosxom.cgi script itself. Open up the Blosxom cgi script in your favourite text editor and find the following configuration section:
      # --- Plugins (Optional) -----
      
      # Where are my plugins kept?
      $plugin_dir = "";
      
      # Where should my modules keep their state information?
      $plugin_state_dir = "$plugin_dir/state";
      
      Change the value of $plugin_dir to reflect the location of the plugin directory you just created in step 1. Assuming you followed the advice above, here are the appropriate settings:

      • ISP
        You'll need to ask for the full-path to your home directory, prepending it to the data/blosxom/plugins/state. For instance, if your home directory were /home/sam, your plugin configuration would read:
        # Where are my plugins kept?
        $plugin_dir = "/home/sam/data/blosxom/plugins";
      • Mac OS X
        If you used the Blosxom for Mac OS X installer, you'll not need to do this--it's taken care of for you.
        # Where are my plugins kept?
        $plugin_dir = "/Library/WebServer/Data/Blosxom/Plugins";
      • Windows 2000/XP
        While the Windows filesystem uses backslashes to separate elements of a path, Perl uses forward-slashes, like so:
        # Where are my plugins kept?
        $plugin_dir = "c:/Inetpub/Data/Blosxom/Plugins";
    Blosxom's plugin system is now activated and ready for plugins--that is if you had any...

    Install a plugin...

    To install a plugin, simply copy it to your plugins directory. Some plugins require minimal configuration; follow the author's instructions (usually at the bottom of the plugin file itself) if more appropriate.

    Blosxom will automatically find and load your new plugin the next time you visit your blog.

    Put your plugins in order...

    Blosxom will automatically find, load, and call all plugins in the plugins it finds at appropriate junctures in its execution. It does so in alphanumeric order--config is loaded before sort_by_path which, in turn, loads before writeback.

    If you'd like to control the order in which plugins load, prepend the filenames with numbers like: 00loadfirst, 50loadsometime, 99loadlast, and so forth.

    Disable a plugin...

    You can obviously disable a plugin by removing it from your plugin directory at any time. The preferred method, however, is to postfix it with an underscore, like so: someplugin becomes someplugin_ . This turns off the plugin yet while still being kept safe and sound in your plugin directory.



    SourceForge.net Logo