8.2. Installing the comments plugin

Requirements:

After making sure you have the requirements, do the following:

  1. Copy contrib/plugins/comments/plugins/comments.py to your plugins directory. Then add "comments" to the load_plugins property in your config.py file.

  2. Comments are stored in a directory which will parallel the data directory. The comments themselves are stored as XML files named entryname-datetime.suffix. The comment system allows you to specify the directory where the comment directory tree will stored, and the suffix used for comment files. You need to make sure that this directory is writable by the pyblosxom CGI scripts.

    Set comment_dir to the directory (in your data directory) where you want the comments to be stored. The default value is a directory named comments in your data directory.

    Set comment_ext to the change comment file extension. The default file extension is cmt.

  3. Copy the flavour files from the contrib/plugins/comments/flavours directory. There are flavours for html and rss. You should copy all the files to your data directory.

    The "comment-story" template is used to format a single entry that has comments.

    The "comment" template is used to format a single comment/trackback/pingback.

    The "comment-form" template provides the form used to enter new comments.

  4. Edit the "comment-story", "comment", and "comment-form" templates. Variables that are available are:

    Available in the "story" and "comment-story" templates:

    $num_comments - Contains an integer count of the number of comments
                    associated with this entry
    

    Available in the "comment" template:

    $cmt_title - the title of the comment
    $cmt_description - the content of the comment or excerpt of the 
                       trackback/pingback
    $cmt_link - the pingback link referring to this entry
    $cmt_author - the author of the comment or trackback
    $cmt_pubDate - the date and time of the comment/trackback/pingback
    $cmt_source - the source of the trackback