Recent Changes - Search:

Cookbook

PmWiki

pmwiki.org

BlogIt

Summary: Provides a complete blogging system, using in-built PmWiki features -- additional features are supported through existing cookbooks.
Version: 1.5.1 (10-Jul-2010)
Prerequisites: PmWiki 2.2.1 or later, PmForm, Javascript enabled on browser for Admin and Blog entry functions.
Status: Active
Maintainer: DaveG

Project Blog: http://solidgone.org/Tags/Blogit

Categories: Blog
Download: ZIP or TAR
License: Dual licensed under the MIT and GPL licenses.
Users: +19 (View / Edit)

Update Summary 1.5.1 (10-Jul-2010)

If you downloaded version 1.5.1 before 18-Jul-2010, please re-download. Due to an error in uploading the new version, you actually downloaded version 1.5.0.

This release is primarily a bug fix release, with a few minor functionality enhancements and tweaks.

  • If you use non-US format dates, then you should upgrade to this release, as there was a bug which prevents correct display of dates for non-US formats (ie, dd/mm/yyyy).
  • Added tabindex attribute to input forms, so now tabbing through form fields is a little more intelligent, avoiding all the GUI icons. (For PmWiki 2.2.17+)
  • Allow override of UTF-8 character decode function (when iconv is not available, or fails). Set $bi_CharsetFn.
  • Add unapproved comments to DOM, so poster knows comment is submitted, and awaiting approval. Also include Ajax message to indicate approval pending.
  • Alter behavior of $bi_CommentsEnabled from true/false to open/readonly/none.

For more information refer to the full release details.

Description

BlogIt provides the core features demanded of a blogging system, including blog entry, blog management, comment entry and approval, and comment management, and comes with pagelists providing most features provided in other blog systems. Additional features like ping-backs, notifications, RSS feeds, and tag-clouds, can be added using existing cookbooks. The system is written using only existing PmWiki features, and requires no additional cookbooks. Code has been kept to a bare minimum to ensure survivability.

BlogIt works with all existing skins. Some skins provide an additional features when used with BlogIt, like Blix, Equilibrium, DropShadow, GlossyHue, and others. Simply install and activate the skin and BlogIt will put blog entry elements like Title, date, author, tags in the right locations for the skin design. All other skins will work with BlogIt -- but you won't get the automatic styling of some blog elements, unless the skin accommodates that.

Feature Summary

BlogIt provides an easy to setup blogging system, based on PmWiki, providing similar functionality to other major blogging platforms.

Writing

  • Ajax enabled entry creation and editing -- means it's quicker to update your blog.
  • Author friendly blog entry.
  • Blog entries can have a status of Published, Draft, or Sticky.
  • Provide blog introductions with a "Read more..." link.
  • Full blog entry tagging, including links to view all blog entries with specific tag.
  • Blog entries can be dated, indepently of actual save date, including future dates.

Commenting

  • Ajax enabled comment creation and editing -- means it's quicker to administer your blog.
  • Blog readers can add comments to blog entries.
  • Comments can be automatically approved, or can be manually approved by an administrator after review.
  • Comment approval and captcha reduce coment spam.
  • Admins can quick-add commenters to the Blocklist, or simply delete the comment, all via quick ajax clicks.
  • Comments can be Open, Read Only, or None for each blog entry, and also disabled for the entire blog.
  • Easy access to all unapproved comments.

Administration

  • All admin operations can be performed via ajax, making the admin job much easier.
  • Control panel provides quick access to blogs and comments, with links for editing and deleting.
  • Quick link to add new blog entries.
  • List all recent blog entries, or view entries in published, draft, and stickies status.

Other Features

  • SEO friendly url support.
  • Pre-created pagelists give easy access to recent blog entries, recent comments, and tags.
  • Pagination support: Include a user-definable maximum number of entries per page, with next/prev links.
  • Ability to have more than one blog.
  • Blogs entries can exist in any group, with no naming restrictions.
  • BlogIt works with any PmWiki skin. But some skins provide an additional layout layer that provides additional styling of page-level attributes.
  • Conversion utility to convert existing pages to/from BlogIt.
  • All the power offered by PmWiki, including file based data storage (so no database), cross-site deployment, and easy extensibility.

Demo

A demo sandbox is available at solidgone.org. Admin password is "blogadmin", and the Edit password is "blogedit" -- no user name is needed. Feel free to add new blog entries, add comments, login as admin and approve a few comments.

You can also see BlogIt in action at my personal journal and my tech journal. BlogIt has now replaced my use of Drupal.

Comments

Show your support and leave a comment, or help out and let me know if you have a suggestion or a problem. Love it or hate it, I'd like to know!

Download and Install

  1. Prep: Ensure PmForm is available in your cookbook directory (usually pmwiki/cookbook/). There are two files in the PmForm ZIP file. You need to put pmforms.php direct into your cookbook/ directory. Site.PmFormTemplates is not needed for BlogIt, but should be put into your wikilib.d directory. You do not need to add an include_once pmforms.php from config.php -- BlogIt will automatically do the include for you.
  2. Download (Attach:blogit.zip Δ).
    1. Unzip the contents of the cookbook folder into your cookbook directory, usually pmwiki/cookbook/. This will create a 'blogit' directory inside cookbook: pmwiki/cookbook/blogit/.
    2. Unzip the contents of the pub folder into your pub directory, usually pmwiki/pub. This will create a 'blogit' directory inside pub: pmwiki/pub/blogit/.
  3. Security:
    1. Make sure you assign Edit and Admin passwords. If you don't anyone will be able to create blog entries, and to post comments.
      $DefaultPasswords['admin'] = crypt('your_admin_password');
      $DefaultPasswords['edit'] = crypt('your_edit_password');
      
    2. Set $bi_AuthPage Permissions: If you are using the standard PmWiki security (not AuthUser, etc), then ensure Edit permissions are set on the page "Blog.Main".
  4. Config:
    1. Ensure that $EnableRelativePageVars = 1; is set. This is normally set by default.
    2. Add the following to your local configuration file, usually pmwiki/local/config.php. You need to put this towards the end of config.php, after password definitions, and also after any of the optional configuration steps:
      $HandleAuth['source'] = 'edit';  #Prevents non authorized users from viewing comment source email address
      $HandleAuth['diff'] = 'edit';  #Prevents non authorized users from viewing comment source email address
      $MaxIncludes=500;  #BlogIt makes heavy use of includes, so this needs to be increased.
      include_once("$FarmD/cookbook/blogit/blogit.php");
      

Optional Setup

These steps need to come before the BlogIt include statement.

  1. Captcha: (optional) If you want to use captcha to prevent comment spam, then refer to the Stop Spam section.
  2. Caching: (optional) Caching speeds up PmWiki generally, and therefore BlogIt. But it can delay the appearance of new comments and blog entries in pagelists.
    1. Create a work.d directory at the same level as your wiki.d directory, usually pmwiki/work.d/.
    2. These settings enable caching:
      $WorkDir = dirname(__FILE__).'/../work.d';
      $PageListCacheDir = $WorkDir .'/';
      $EnablePageIndex=1;
      
  3. Skins: (optional) If the skin you use does not provide support for BlogIt, it will still work. However, the elements on the page generated by BlogIt will have a default styling. If the skin does not provide explicit BlogIt support, check the skinning section to see if there is a stylesheet, which will improve the appearance of your blog. If the skin you use does not provide styling let me know on the comment page.
  4. Define a default group for blog entries -- used as the default in the "Page URL" field when creating a new blog entry (purely for convenience, not required):
    $bi_DefaultGroup='Blog';
  5. Specify which groups to look for blog entries (may make things quicker on large sites). If you want blog entries to exist in any group, then set this parameter to an empty string. If you require blog entries to exist in specific groups use a pipe separated list of group names.
    $bi_BlogGroups='JoesBlog|ZaksBlog|SusansBlog';

Also refer to site-wide modifications that can be made to BlogIt.

Setup Sequencing in config.php

It's important to get the sequencing of the config.php configuration correct. Problems will occur if you don't, particularly if you put password config settings after icluding authuser. Here's the recommended ordering:

  1. Define passwords, password groups, and authuser configs.
  2. Include authuser
  3. BlogIt configs
  4. Include blogit

Setting up your Blog

Main Blog Summary Page

Your main page (in this example Blog.Main) is going to be a basic page list, which will include blog summaries, the part upto the "Read more..." link. By default you'll want to include all blog entries in the blog1 blog, of status Publish. For example, create a page Blog.Main:

(:notitle:)
(:includesection "#blog-summary-pagelist blogid=blog1 status=publish":)

If you want to display Sticky entries before Published entries then add another pagelist:

(:notitle:)
(:includesection "#blog-summary-pagelist blogid=blog1 status=sticky":)
(:includesection "#blog-summary-pagelist blogid=blog1 status=publish":)

Blog SideBar

The BlogIt sidebar includes a admin control panel (visible to administrators), the list of recent articles, and comments, and the tag-list, ensure your Site.SideBar includes BlogIt-SideBar. Basically wrap the original sidebar in an if condition. (Don't forget the closing (:if:) at the end.)

(:if equal {$bi_BlogIt_Enabled} 1:)(:include Site.BlogIt-SideBar:)
(:else:)
<<original sidebar text>>
(:if:)

If you are using multiple blogs, then pass the blogid as a parameter (replacing MY_BLOG_ID):

(:if equal {$bi_BlogIt_Enabled} 1:)(:include Site.BlogIt-SideBar blogid=MY_BLOG_ID:)
(:else:)
<<original sidebar text>>
(:if:)

In order to view the control panel on the sidebar, users need to have 'sidebar' action assigned. Refer to security setup for more details.

Start using your Blog

Create New Blog Entries

Now you're ready to create a new blog entry -- simply click on the "New Entry" link in the sidebar. If you're not using the BlogIt sidebar, then simply visit the page Site.BlogIt-NewEntry. If you see a blank page, then make sure you have appropriate privileges.

Complete the blog entry form. Typically you will enter a Blog Title, Tags, select a Status, and then enter the blog entry text -- you usually don't need to touch the other fields.

Click to Enlarge

  • Blog Title: The name of the blog entry. The name will hyphenated, and use to name the pmwiki page (refer to the Pagename field), and will thus become part of the url. Usually you want this to be as descriptive of the blog-entry as possible.
  • Tags: One or more comma separated tags. These are the same as PmWiki Categories, and may be used to group entries by topics. The tags are shown to readers as links which when clicked list other similarly tagged blog entries. The tags are also shown in the sidebar tag list.
  • Status: Blog entries can be either Draft, Publish, or Sticky (additional statuses can be added if required). Statuses are usually used within pagelists to differentiate between groups of blog entries. Sticky entries are usually displayed on the front-page, before the Published entries.
    Draft entries are the only status where unique processing takes place. Draft entries will not appear in the sidebar Recent Entries list, and will not appear in tag lists. They will also not be accessible to non-authenticated users.
  • Comments: Defines whether readers can leave comments for this blog entry. The value selected here applies only to this entry, and can be over-ridden site wide with the $bi_CommentsEnabled setting.
    • Open: Allows readers to leave comments.
    • Read Only: Readers cannot leave new comments, but can read comments that have already been made.
    • None: Readers cannot leave new comments, and existing comments are not displayed. Note that existing comments still exist, and are not deleted, they just are not shown.
  • Blog Entry: This is the large unlabelled textarea. Use any PmWiki markups and text formatting.
    The [[#break]] anchor can be used to break longer blog entries into an introduction, and a 'body'. When the blog-summary pagelist is used (usually on the main page), blog-entries will be displayed up to the [[#break]] tag, where a "Read more..." link will be displayed. Readers can click the link to read the rest of the entry. You can change the tag used to break entries, or change the text displayed to readers when the break tag is used.
  • Pagename (Group.Name): Usually you'll leave this field as it is -- just don't enter a value here. This field is pre-populated with the default blog group. If you leave this field with only the blog group, the blog entry will be saved in a PmWiki page named by hyphenating the title field.
    If you want the page to be saved in a different PmWiki group, or you want the page to have a different name to the value in the Title field, then enter a value. Make sure the name you provide here is a valid PmWiki pagename (ie, no spaces), and doesn't already exist. BlogIt will return an error if you specify an invalid pagename.
  • Author: Defaults to the value you previosuly entered. You can enter any name you like here, no validation is performed.
  • Date: This field will be pre-populated with the current date and time. You can change this to any valid date/time combination. The default format for entering a date (which can be changed) is 15-03-2009 23:34.
    If you set a date/time which is in the future, the entry will not appear in pagelists until that date/time arrives. More information on this behavior is in the FAQ.

Comment Administration

Whenever you see a comment, and if you are logged in with the appropriate privileges, you will see a set of admin links, allowing you to either Approve/Unapprove, Delete, Edit, and Block a comment. Some actions require appropriate privileges.

  • Comment Approval: By default, if you have Captcha enabled, reader comments do not need to be reviewed and approved before being publicly visible. You can change this behavior, and manually approve comments before making them visible. If you are logged in with comment-approve or blogit-admin privileges, then your comments will automatically be approved.
    If you are manually approving comments, use the "Unapproved comments" link in the sidebar -- this link will also show a count of how many unapproved comments there are. (If you don't use the BlogIt sidebar, then add this to your blog url ?n=Site.BlogIt-Admin?action=blogitadmin&s=unapproved-comments&blogid=blog1.) The "Unapproved comments" page will show a list of all comments awaiting approval, for each blog-entries. Simply click the Approve, or Unapprove. As you approve comments they will be automatically removed from the list. Needs 'comment-approve' privilege.
  • Deleting Comments: When you click the Delete link on a comment you will be asked to confirm the delete. BlogIt uses PmWiki's delete mechanism, so if you do delete a comment in error, the deleted page still exists on the server (with a timestamp) and can be restored to the former page by the wiki administrator. Needs 'comment-edit' privilege.
  • Editing Comments: Comment editing allows you to use a form to edit any element of the comment, or manually change the comment status. Needs 'comment-edit' privilege.
  • Blocking Comments: You can view the commenters IP address, and then choose to add that IP address to the standard PmWiki blocklist page, usually SiteAdmin.Blocklist. When clicking the Block link, you will be presented with the IP address of the comenter. Either accept this, or change it, perhaps to include a '*' wildcard. Needs 'comment-approve' privilege.
    Note: You need to enable Blocklist? with $EnableBlocklist=1; and the SiteAdmin.Blocklist needs to exist, otherwise BlogIt will be unable to write to the page.

By default comments will automatically be approved if you have captcha enabled. You can change this behavior by setting $bi_DefaultCommentStatus.

Security

Most blogs are not public, so at the very least you probably want to lock things down, by adding edit and admin passwords to config.php:

$DefaultPasswords['admin'] = crypt('secret');
$DefaultPasswords['edit'] = crypt('secret');

BlogIt Roles and Actions

By default BlogIt defines a single 'role' with all 'actions' assigned to the role. Currently valid actions are:

  • 'comment-edit': Ability to edit all user comments, and to view Unapproved Comments.
  • 'comment-approve': Ability to approve comments, and view Unapproved Comments.
  • 'blog-new': Allows the user to create new blog-entries.
  • 'blog-edit': Permit editing of existing blog-entries, including changing the blog-status from Draft to Published.
  • 'sidebar': View the BlogIt sidebar, which provides quick access to Draft, Published, Sticky, Statistics, etc.
  • 'blogit-admin': Access to the blogit-admin page which displays drafts/published, etc.

Using Standard PmWiki Security (not using AuthUser)

By default anyone with Edit permissions is able to perform all actions. You can change this behavior by over-riding $bi_Auth. The array takes this format:

  • a single string with the name of the role. If you're not using AuthUser role names should be "edit" or "admin". If you are using AuthUser role names can be anything you like.
  • an array of actions.

By default the array is:

$bi_Auth = array(
   'edit'=>array('comment-edit', 'comment-approve', 'blog-edit', 'blog-new', 'sidebar', 'blogit-admin')
);

You might want to change that so only Admins can edit and approve comments:

$bi_Auth = array(
   'edit'=>array('blog-edit', 'blog-new', 'sidebar', 'blogit-admin'),
   'admin'=>array('comment-edit', 'comment-approve')
);
  • If you are not using AuthUser, then roles are heirarchical. So 'admin' will inherit 'edit' actions.
  • By default BlogIt requires edit permissions to be set on a page defined in $bi_AuthPage, initially to $bi_DefaultGroup.$DefaultName (usually Blog.Main). You can change this page to any page whith edit permissions set -- BlogIt simply uses this to determine that the user has Edit permissions, and does not change this page.

Using AuthUser

You can use AuthUser to provide fine grained access to the blog and it's features.

Here's an example where we use two BlogIt roles, one for blogs and one for comments. We then setup two users, 'step' who can create/edit blog-entries, and 'daveg' who can approve comments.

# [1] Define BlogIt roles, and associated actions
# Actions: 'comment-edit', 'comment-approve', 'blog-edit', 'blog-new', 'sidebar', 'blogit-admin'
$bi_Auth = array(
	'blogs'=>array('comment-edit','blog-edit', 'blog-new', 'sidebar','blogit-admin'),
	'comments'=>array('comment-approve', 'sidebar','blogit-admin')
);

# [2] Define users passwords
$AuthUser['daveg'] = crypt('daveg');  #set daveg password
$AuthUser['step'] = crypt('step');  #set daveg password

# [3] Add users to the roles
$AuthUser['@blogs'] = array('step');
$AuthUser['@comments'] = array('daveg');

# [4] Assign roles to security groups
$DefaultPasswords['blogs'] = array('@blogs');
$DefaultPasswords['comments'] = array('@comments');

# [5] Assign roles to pmwiki actions
$DefaultPasswords['edit'] = array('@blogs', '@comments');

include_once("$FarmD/scripts/authuser.php");

Alternately you can simply store passwords [2] and users/role assignments [3] in Site.AuthUser or SiteAdmin.AuthUser, in the normal way. In this case simply assign some users to a group (for example @blogs):

@blogs: user1, user2

Then in config.php:

# [1] Define BlogIt roles, and associated actions
# Actions: 'comment-edit', 'comment-approve', 'blog-edit', 'blog-new', 'sidebar', 'blogit-admin'
$bi_Auth['blogs'] = array('comment-edit', 'comment-approve', 'blog-edit', 'blog-new', 'sidebar', 'blogit-admin');

# [5] Assign roles to pmwiki actions
$DefaultPasswords['blogs'] = array('@blogs');

Internationalization

If you create a new translation, please post it for others to use!

Language Translations

BlogIt utilizes PmWikis built in internationalization mechanism. All text strings are stored in Site.XLPage-BlogIt.

  1. Either create a new language translation page, or use an existing one. To create a new page, copy the content of Site.XLPage-BlogIt to a new page, ie, Site.XLPage-BlogIt-LANGUAGE, and enter the translations within the empty quotes. For example, replace the empty quotes below:
    'more' => ''
    
    
    With the language translation:
    'more' => 'plus'
    
    
  2. Load the page in config.php:
    XLPage('ABBR','Site.XLPage-BlogIt-LANGUAGE');
    
    

You can also use this method to rename any of the labels that BlogIt uses. So if you prefer to have the "more" link in the sidebar read "archive" just create a new XLPage and load it in config.php, using the preferred term rather than a 'true' translation. For example:

English XLPage:           'more' => 'archive'
Other Language XLPage:    'more' => 'more-translated'

Changing Date Display and Entry Formats

These date formats are defined by BlogIt. Note that a skin may define additional formats, so check in Site.XLPage-skinname.

  • long date: %B %d, %Y, at %I:%M %p
  • short date: %B %d, %Y
  • date entry: %d-%m-%Y %H:%M

You typically want to change date formats when you use PmWiki in a non-English language. BlogIt date formats are stored in Site.XLPage-BlogIt -- so simply make a copy of that page, and load it as you would when adding internationalization support.

Alternately, if you want to change the date formats and not make any other language alterations, add this to config.php, using the original format in the list above as the string used in the array. In this case the 'long-date' is being redefined to %d %B, %y, at or around %H:%M:

$XLLangs[]='blogit';
$XL['blogit']['%B %d, %Y, at %I:%M %p'] = '%d %B, %y, at or around %H:%M';

If you want to use European date entry formats like 'dd/mm/yyyy' which might be confussed with 'mm/dd/yyyy' set $bi_DateZone.

Changing the Character Set

BlogIt automatically uses UTF-8 character set for page names. You can change this behavior in the using the basic PmWiki configuration, by changing $MakePageNamePatterns, for example Cookbook.ISO8859PageNameConversionPatterns. For example to use ISO-8859:

$Charset='ISO-8859-1';
# additonal character conversion patterns for ISO 8859-1 character set
SDV($PageNameChars, '-[:alnum:]');
SDV($MakePageNamePatterns, array(
    "/'/" => '',
    "/[^$PageNameChars]+/" => ' ',
    '/((^|[^-\\w])\\w)/e' => "strtoupper('$1')",
    '/ /' => ''
));
# additonal character conversion patterns for ISO 8859-1 character set
SDV($ISO88591MakePageNamePatterns, array(
	'/Á/' => 'A',	'/Â/' => 'A',	'/&#258;/' => 'A',	'/Ä/' => 'Ae',	'/&#313;/' => 'Ao',	'/&#262;/' => 'Ae',	'/Ç/' => 'C',
	'/&#268;/' => 'E',	'/É/' => 'E',	'/&#280;/' => 'E',	'/Ë/' => 'E',	'/&#282;/' => 'I',	'/Í/' => 'I',	'/Î/' => 'I',
	'/&#270;/' => 'I',	'/&#272;/' => 'D',	'/&#323;/' => 'N',	'/Ú/' => 'U',	'/Ó/' => 'O',	'/Ô/' => 'O',	'/&#336;/' => 'O',
	'/Ö/' => 'Oe',	'/&#344;/' => 'Oe',	'/&#366;/' => 'U',	'/Ú/' => 'U',	'/&#368;/' => 'U',	'/Ü/' => 'Ue',	'/Ý/' => 'Y',
	'/&#354;/' => 'Th',	'/ß/' => 'ss',	'/&#341;/' => 'a',	'/á/' => 'a',	'/â/' => 'a',	'/&#259;/' => 'a',	'/ä/' => 'ae',
	'/&#314;/' => 'ao',	'/&#263;/' => 'ae',	'/ç/' => 'c',	'/&#269;/' => 'e',	'/é/' => 'e',	'/&#281;/' => 'e',	'/ë/' => 'e',
	'/&#283;/' => 'i',	'/í/' => 'i',	'/î/' => 'i',	'/&#271;/' => 'i',	'/&#273;/' => 'd',	'/&#324;/' => 'n',	'/&#328;/' => 'o',
	'/ó/' => 'o',	'/ô/' => 'o',	'/&#337;/' => 'o',	'/ö/' => 'oe',	'/&#345;/' => 'oe',	'/&#367;/' => 'u',	'/ú/' => 'u',
	'/&#369;/' => 'u',	'/ü/' => 'ue',	'/ý/' => 'y',	'/&#355;/' => 'th',	'/&#729;/' => 'y'
));
# join to standard patterns
$MakePageNamePatterns = array_merge($ISO88591MakePageNamePatterns, $MakePageNamePatterns);

Charset Conversion Routines

BlogIt will use which ever Charset you defined within PmWiki, except when using Ajax functionality, which must use UTF8. By default BlogIt will transparently convert from UTF8, back into the Charset you have specified in $Charset, using a PHP routine 'iconv'. In some cases, web-hosts do not provide access to this routine. In these cases you can override the routing BlogIt uses by setting $bi_CharsetFn to the name of a function that converts from UTF8 to a specified charset. The function must take the form ($val, $src='', $tgt='UTF-8') where:

  • $val: String value to be converted
  • $src: Source charset, which by default will be $Charset
  • $tgt: The target charset, which for BlogIt use only need to support UTF8, which is the default.

Skin Support

Some skins provide additional support for BlogIt, allowing page elements to be repositioned and syled specifically for that skin. In cases where the skin does not provide this built-in support you have a few options for improving the standard appearance. The standard PmWiki skin is an example of a skin that will work with BlogIt, but whose appearance can be improved by using an additional stylesheet.

Skin Settings

  • $bi_SkinSettings (array): Allows control over skin level elements.
    • ajax_textarea_rows: Defines the number of rows to be displayed in the main textarea on ajax edit. Typically there is less space for ajax editing than there is for 'normal' editing.
  • $bi_SkinClasses (array): Defines the names of CSS container classes for blogit DOM objects. Ajax operations will work even without these classes, but you may not see the result of the action updated on the page until you manually reload the page. The classes are used to determine where to load or remove content without having to reload the entire page. The classes can generally be applied to any kind of DOM object (tables, rows, divs, ul, ol, etc.).
    • 'blog-entry' => '.blogit-post', #container for entry in single-entry view, which should include the ajax edit-link.
    • 'blog-entry-summary' => '.blogit-post-summary', #surrounds a blog entry in multi-entry view (in #multi-entry-view); cannot be the same CSS path used for blog-entry
    • 'blog-list-row' => '.blogit-blog-list-row', #used in the grid displaying draft/approved blog entries. Usually applied to the row for each entry (in #blog-list-view)
    • 'approved-comment-count' => '.blogit-comment-count a', #count of comments for an entry
    • 'unapproved-comment-count' => '.blogit-unapproved-comment-count a', #count of unapproved comments for an entry
    • 'comment' => '.comment', #MUST be a single css class NOT a css-path. applied to each block containing a single comment, usually LI elements (in #comment-view-all and #comment-view-admin)
    • 'comment-admin-list' => '.blogit-comment-admin-list', #surrounds the unapproved-comment list section (in #comment-view-admin)
    • 'comment-list' => '.blogit-comment-list', #pointer to the entire comment list, excluding headers, and comment form. Contained in #comments-pagelist, usually not changed.
    • 'comment-list-wrapper' => '#blogit-comment-list', #pointer to a wrapper around the comment-list; used for the first comment, where 'comment-list' may not exist. Should not include headers or form.
    • 'blog-form' => '#wikiedit.blogit-blog-form', #pointer to the wrapper containing the blog-entry FORM object
    • 'comment-form' => '#wikitext .blogit-comment-form' #pointer to the wrapper containing the comment-entry FORM object (both ajax and normal entry)
  • $bi_AjaxMsgTimer (integer): The amount of time that the ajax confirmation message stays on the screen, in milli-seconds. Default is 3000 (3 seconds).

Skin Stylesheets

Listed below are some CSS stylesheets for skins that don't natively support BlogIt. These skins can still be used with BlogIt, with or without the stylesheets -- the stylesheets simply improve the styling for the page elements that BlogIt adds.

If the skin you use is not listed below, try using the PmWiki stylesheet -- it provides some basic styling to BlogIt elements that should work on most skins.

Feel free to add your own stylesheets for your favorite skins.

  • PmWikiΔ: Ships with BlogIt, and is automatically applied when PmWiki skin is active.
  • TriadΔ: Provides basic styling for the popular Triad skin. Also load the PmWiki stylesheet for more complete styling. Note that this stylesheet is setup for Triad using the 'choc' color theme. If you use another color theme, then update the two colors for the classes 'h2 a' and '.blogit-meta-data-footer'.
  1. Save the stylesheet in a publicly accessible directory, usually pmwiki\pub\css\.
  2. Add this to config.php, replacing 'blogit-SKINNAME.css' with the name of the skin file you saved.
$PageCSSListFmt['pub/css/blogit-pmwiki.css'] = '$PubDirUrl/css/blogit-SKINNAME.css';  #Replace SKINNAME with the name of the skin

You can use the blogit-pmwiki.css file as a starting point for providing BlogIt support to other skins.

Validate XHTML Strict

In order to ensure strich XHTML validation with skins which are written to that specification add this to config.php:

## For strict validation
SDV($InputTags['end'][':html'], '</fieldset></form>');
SDVA($InputTags['pmform'][':html'], "<form action='{\$PageUrl}' \$InputFormArgs><fieldset><input type='hidden' name='n' value='{\$FullName}' /><input type='hidden' name='action' value='pmform' />");

Adding More Features to your Blog

BlogIt provides basic blog support, but relies on other cookbooks to add functionality. Below are some cookbooks that work well with BlogIt, and some suggested settings. Of course, there are always options -- you don't have to use these cookbooks, others will likely work with no issues.

Stop Comment Spam

Comment captcha will only work if you assign Edit and Admin passwords.

Three days after I posted the link to the demo site on the PmWiki mailing list I was getting comment spam. Stop it dead, with Captcha. Add this before including blogit.php.

$EnableCaptchaImage=1;
if (!CondAuth($pagename,'edit')) $EnablePostCaptchaRequired = 1;
include_once("$FarmD/cookbook/captcha.php");

Captcha will now be active for comments. Captcha is automatically deactivated when creating or editing blog entries, since you need to be logged in under the Edit or Admin password in order to edit.

If you don't see the captcha enabled for comments, make sure you have assigned edit and admin passwords on your wiki. If you don't assign passwords, then everyone has Edit and Admin access, which causes BlogIt to disable the captcha. The implication of this is that you can't currently use BlogIt in a completely open wiki (no edit or admin passwords), and also enable Captcha -- if there is strong demand for this type of blog then let me know.

Improved Edit Toolbar Icons

Use EditToolbar for an improved toolbar while you edit. You need to enable buttons BEFORE you include blogit.php, otherwise the buttons will not be displayed correctly.

$EnableGUIButtons = 1;
include_once("$FarmD/cookbook/edittoolbar.php");

Page Counters

Note: Full integration with TotalCounter is not currently implemented, as TotalCounter does not display page counts correctly within pagelists. BlogIt will display page counts set by cookbooks using the {$PageCount} variable, like TotalCounter.

include_once("$FarmD/cookbook/totalcounter.php");

Show YouTube and other videos

Use flash.php.

include_once("$FarmD/cookbook/flash.php");

Now include links to YouTube, and other flash videos by:

(:flash FULL_LINK_TO_VIDEO width=400 height=312:)

Google Sitemaps

One way to make sure your site is found by search engines is to submit a sitemap to the search engine. Use Google Sitemaps. In order to prevent search engines seeing pages they don't have access to, include some additional search patterns to exclude SiteAdmin, and the comment group.

if ($action=='sitemap'){
   $EnablePageListProtect = 1;
   $SitemapSearchPatterns[] = '!^SiteAdmin\.!';
   $SitemapSearchPatterns[] = '!^Comments\.!';
   include_once("$FarmD/cookbook/sitemap.php");
}

Page Conversion (to BlogIt, and away from BlogIt)

BlogIt uses Page Text Variables to store blog entry attributes. BlogIt pages look like regular PmWiki pages when viewed with BlogIt disabled -- because they are regular PmWiki pages. If you do a 'normal' PmWiki edit on a blog entry you'll see the variables BlogIt uses.

In order to either add or remove the attributes, simply use the converter utility. The utility can only be run by an Admin. All actions are controlled using URL parameters. Available parameters are:

  • action: blogitupgrade -- initiates the upgrade/conversion utility.
  • pattern: If this is not specified, then the upgrade will operate on the current page only. Multiple comma separated patterns can be provided. The pattern follows a regular expression format. By default the pattern is inclusive, and will match partial names, so 'Blog\.Page1' will also match 'Blog.Page12'; use a '$' at the end of each pattern to ensure a direct match 'Blog\.Page1$'. (Note: Even if you are using clean URLs, specify page names with a 'dot' separator.) The pattern will automatically include/exclude patterns specified by $SearchPatterns['default']. So if you want to exclude Site/PmWiki group pages, either setup your $SearchPatterns['default'] or specify the exclusion in the pattern.
    • Group\.*
    • Group\.Page
  • writetofile (true|false): only writes to the PmWiki file if this is "true" -- otherwise outputs results to browser. So leave this parameter off and verify output in the browser, before updating your PmWiki files.
  • mode (upgrade|convert|revert): If not specified, then BlogIt will attempt an upgrade. If you want to convert a vanilla PmWiki page into a BlogIt entry, then use the "convert". If you want to remove the PTV attributes from the page then use "revert".
  • blogid: Defaults to "blog1". Only use this if you are running a mutliple blogs from within the same wiki.

Conversion Process

This process will add PTV values to the PmWiki page. When you run the utility leave out the writetofile parameter until you've checked the results in the browser.

  1. Make a backup of wiki.d. This process has been rigorously tested -- but caution should prevail.
  2. Append ?action=blogitupgrade&pattern=Blog\. to your URL (for instance the homepage). This step makes no changes -- it outputs all changes that will be made. The pattern 'Blog\.' will process all pages in the Blog group. If you have a huge number of pages (more than a few hundred for instance) you might want to use a different pattern. Verify that the correct pages are being converted, and that things look right.
  3. Append ?action=blogitupgrade&mode=convert&pattern=Blog\.&writetofile=true to your URL (for instance the homepage). This step will write the changes to all matched pages, updating to the new format.

When you run without the writetofile parameter you should see something like:

Main.Main
[[#blogit_pmmarkup]](:title 12341:)[[#blogit_pmmarkupend]]
(:blogid:blog1:)
(:entrytype:blog:)
(:entrydate:1239246060:)
(:entryauthor:DaveG:)
(:entrytitle:12341:)
(:entrystatus:draft:)
(:entrycomments:open:)
(:entrytags::)
[[#blogit_entrybody]]2131[[#blogit_entrybodyend]]

Pattern Samples

Converting a Single Page

Convert the page "Blog.Main":

?action=blogitupgrade&mode=convert&pattern=Blog\.Main$

Converting All Pages in a Group

Convert all blog entries in the "Blog" group:

?action=blogitupgrade&mode=convert&pattern=Blog\.

Converting a number of pages

In this case we match all entries in groups Blog, and Main, the page MyGroup.MyPage, and all pages in the group MyGroup starting with 'A'. Patterns are inclusive by default, which is why the final pattern matches all pages starting with 'A'. Also note that the dot delimiter is prefixed with a '\' -- otherwise it means 'any character'.

?action=blogitupgrade&mode=convert&pattern=Blog\.,Main\.,MyGroup\.MyPage,MyGroup\.A

Use a '$' at the end of each pattern to ensure a direct match.

?action=blogitupgrade&mode=convert&pattern=Blog\.,Main\.,MyGroup\.MyPage$,MyGroup\.A$

Converting all pages

You can convert all pages at once, using the '.' wildcard. Use this with extreme caution, as it will convert all PmWiki documentation pages, and possibly other system related pages:

?action=blogitupgrade&mode=convert&pattern=.

Converting from BlogIt format to normal PmWiki pages

This function removes the PTV fields added by BlogIt, leaving basic PmWiki pages. You can do the same thing manually, by using the normal PmWiki 'edit' function, and removing the PTV fields.

?action=blogitupgrade&mode=revert

If everything looks okay, then commit the changes:

?action=blogitupgrade&mode=revert&writetopage=true

Advanced Changes to BlogIt

The following setting are also available, and can be made in a config file:

  • $bi_Ajax (array): Defines which actions are Ajax oriented, and which should be handled in the normal page-reload way. Specify the action as the key, and either 'ajax', 'normal', 'normal-ajax', 'ajax-normal'. The last two options allow the user to select ajax/normal actions by showing a normal link, and a small icon link for the alternate action.

SDVA($bi_Ajax, array('bi_ce'=>'ajax', 'bi_ca'=>'ajax', 'bi_cua'=>'ajax', 'bi_be'=>'normal-ajax', 'bi_ne'=>'normal-ajax', 'bi_del'=>'ajax')); #key: action; value: ajax style

  • $bi_DateZone (default 'US'): Set to 'EU' if you are using a date format like 'dd/mm/yyyy'.
  • $bi_DefaultGroup (default 'Blog'): Pre-populates the Pagename field; blogs can exist in *any* group, not simply the default defined here.
  • $bi_CommentGroup (default 'Comments'): Default group where comments are stored.
  • $bi_DefaultCommentStatus (default 'true' if captcha enabled): Sets the default approved status for comments. Determines whether an admin need to approve each comment before it is displayed.
  • $bi_CommentsEnabled (default 'open'): Global setting to enable or disable comments. If comments are disabled, no new comments can be entered. Can be 'open', 'readonly', 'none'.
  • $bi_BlogGroups (default $bi_DefaultGroup): Pipe separated list of Blog groups. This is purely to speed up pagelists. Defining this list does not mean all pages in the group are 'blog-pages', but it does mean that blog pages will only be searched for in this group. Define as an empty string to search all groups for blog-entries.
  • $CategoryGroup (default 'Tags'): Group to be used for blog tags. Tag pages are automatically created in this group as tags are used within blogs.
  • $bi_AuthorGroup (default 'Profiles'): The group to be used for blog and comment author profiles, if used.
  • $bi_EntriesPerPage (default 15): Restrict the number of entries per page (default is 15). You can also set this within the pagelist itself if you want to over-ride the global setting.
  • $bi_LinkToCommentSite ('true'): Users may enter a "Website" when leaving a comment. This setting determine whether or not to display the "Website" as a link. Even when displayed as a link it will have the "nofollow" attribute.
  • $bi_BlogList (default array('blog1')): Used if you want to manage more than one blog on a single PmWiki installation. Adding additional blogs will automatically create a select list on the blog entry form so you can choose which blog the post belongs to. Ensure 'blog1' key remains.
  • bi_Paths: BlogIt automatically loads three cookbooks as needed. This array defines the paths to those cookbooks. Default:

array('pmform'=>"$FarmD/cookbook/pmform.php", 'guiedit'=>"$FarmD/scripts/guiedit.php", 'convert'=>"$FarmD/cookbook/blogit/blogit_upgrade.php")

  • $bi_UnstyleFn: Pointer to a function that strips PmWiki markup from user comments, to ensure comment display in sidebar does not become 'infested' with user styling.
  • $bi_CharsetFn: Pointer to a function that converts from the PmWiki $Charset to UTF-8, which is required for Ajax handling. By default BlogIt uses iconv for this conversion, but some web hosts do not provide this function.

Changing Blog Status

You can add new status values to the pull-down list available on the new entry form. You might do this if you want additional groups of blog-entries.

$bi_StatusType['new status']='new status';

FAQ

Also refer to the Talk pages -- someone may have had a similar problem or question.

Blog entries are not shown

If you're readers (usually non-authenticated) cannot see the content of your blog entries, and only see the title, make sure you have set the status of the entry to something other than Draft. Draft entries are not shown unless you are logged in with Edit or Admin privs.

Changing Tag Used for Breaking Entry

You can change both the tag used to determine the end of the entry introduction (by default [[#break]], and also the text used to display the link to the full entry (by default Read more...). As with date formats you can either change the entries in the XLPage, or make a change in config.php:

$XLLangs[]='blogit';
$XL['blogit']['break']='split';
$XL['blogit']['Read more...']='Continue reading...';

Note: If you change the break tag, then entries using the old break tag will no longer break. You'll need to manually update entries which use the older break tag.

How to hide the standard Action menu

You can hide the action menu (containing View, Edit, History, Backlinks) on an individual page by adding this markup to the page:

(:noaction:)

Or for the whole wiki with:

SetTmplDisplay('PageActionFmt',0);

The notitle directive does not remove title from blog summary list

This is really down to how the summary list was designed to work -- without the title there would be no deliniation between blog entries. However, you can override this functionality by overriding the blog summary pagelist, or creating a new pagelist. To override the default pagelist, which is in Site.BlogIt-CoreTemplate:

  1. Create a PmWiki page called Site.BlogIt-SkinTemplate-SKINNAME, or edit the page if it already exists -- replace the word SKINNAME with the name of the skin you are using.
  2. The exact markup you see will depend on the skin you are using. Use this sample as a template for creating the list as you want to see it. For instance remove the heading line (2nd line) to remove the page title:
!!! #common-blog-head %h3%
Parameters: title, listformat (show header or not), entrydate, entrytags, fullname, entryauthor, showcount
[==[==]@
(:if false:)[[#common-blog-head]](:if:)
(:if equal "{$$listformat}" "true":)!! [[{$$fullname} | {$$title}]](:if:)
(:div9999 class="blogit-meta-data-head":)
(:blogit-skin author pre_text='!!!!!$[By] ' post_text=', $[on] ':){$$entryauthor}(:blogit-skinend:)\
%blogit-date%(:blogit-skin date fmt='long':){$$entrydate}(:blogit-skinend:)%%(:if:) \
(:blogit-skin edit pre_text='%blogit-edit-link%%item accesskey="$[ak_edit]"%' post_text='%%' page='{$$fullname}':)$[edit](:blogit-skinend:)
(:div9999end:)
[[#common-blog-headend]]
@[==]==]

How can I create a list of only the last (newest) n entries?

Simply add count=n (replace the 'n' with a number) to the includesection statement or for a global setting set $bi_EntriesPerPage in config.php.

bi_EntriesPerPage = 10; #default is 15

How to Display Future Dated Entries?

BlogIt will not display entries which are dated beyond the current date. This way you can future date an entry, and it will automatically be displayed once that date is reached, if it is in "Publish" status.

If you want to always display future dated entries:

$bi_DisplayFuture = 'false';

Does BlogIt use cookies?

If you login as a user with BlogIt privs, BlogIt will use cookies to keep track of the page history trail (last two pages). It does this to make the Admin workflow smoother. So when you cancel a blog edit, or when you approve a comment, BlogIt will return to the page you were on previously. The cookie is only maintained for the current session, and is removed when you close the browser.

Cookies are not used for blog readers.

Admin is Redirected to Incorrect Page [#faq-incorrect-redirect]]

If you are consistently being redirected to the same wrong page after performing an Admin function (comment edit, comment delete, comment approve, cancel from a blog edit, etc), and you were using BlogIt prior to version 1.2.0 delete all cookies associated with blogit:

  • Site: Should be the domain name of your site.
  • Cookie Name: blogit-back-1 and blogit-back-2

If you see multiple cookies with the same cookie name (blogit-back-1 and blogit-back-2), delete them all.

Change the default BlogIt styling

You can change the styling of BlogIt elements by using a stylesheet. Some skins come packaged with styling for BlogIt-specific elements. For skins that don't include specific styling for BlogIt you the PmWiki BlogIt stylesheet might work, or might be a good basis to create a new stylesheet for your skin.

Prevent Formatting in Comment when displayed in sidebar

BlogIt displays the first sentence (or until the first newline) of each comment in the Sidebar. Sometimes user use basic PmWiki formatting within comment, and this can adversely affect the look of the sidebar. For instance, if the comment text starts with %red% then the comment in the sidebar will be red. You have a couple of options in these cases:

  1. Edit comments either removing the offending formatting, or add a summary first sentence with no formatting.
  2. Use a recipe like MarkupToUnstyled to strip sidebar comments of formatting, and then tell BlogIt to use the function with $bi_UnstyleFn:
    include_once("$FarmD/cookbook/markuptounstyled.php");
    $bi_UnstyleFn = 'MarkupToUnstyled';
    
  3. Define a style to override the most common comment sidebar styling:
    $HTMLStylesFmt['bi-pmwiki'] .= '.blogit-comment-summary-list li span {font-size: 100% !important;} ';
    
  4. Define a style to override the most common comment sidebar styling, and then apply the style to the offending sentence in the comment, Thus, when the first line of a comment needs sanitizing, the reviewer can simply surround the offending sentence with the new class %sidebaronly%sanitized title%%.
    $HTMLStylesFmt['bi-pmwiki'] .= '.sidebaronly { display:none; } #sidebar .sidebaronly { display:inline; }';
    

Problems with Passwords

BlogIt needs to be able to access text within pages -- that means it needs to be able to access pages. Thus BlogIt has to be included:

  • AFTER passwords are defined in config.php
  • AFTER the inclusion of the authuser script (if you're using it)

Automatically Approve all Comments

By default comments DO NOT need to be approved by an admin. If you have a captcha enabled, then that's usually enough to stop spam. However, if you need a level of admin approval set this in config.php:

$bi_DefaultCommentStatus = 'false';

Unapproved comments don't show in control panel

If you override $bi_DefaultCommentStatus make sure you provide a string value, not a 'boolean' value:

$bi_DefaultCommentStatus='false';

The browser title bar title shows the title from a blog-entry

You have manually included a (:title TBD:) markup in the body of one of your blog entries. Currently PmWiki gives precedence to titles that occur last in a page. Since the blog list page includes the first part of the blog entry, which includes the title markup, it overrides any prior title markups on the blog list page. You can work around this by setting a (:title TBD:) at the very bottom of the blog list page, after all the pagelists. Alternately refer to the one line fix on PITS 00779.

No entries listed in Recent Entries section

If you see no entries listed under the sidebar "Recent Entries" heading, and you do have entries that you would expect to see listed, ensure you have set the following in config.php. More info is on the Talk Page:

$EnableRelativePageVars = 1;

Setting up an RSS feed

An easy way for setting up an RSS feed for BlogIt is using BlogItRSS.

Alternately, Trevor has provided a detailed tutorial describing one way to setup an RSS feed on top of BlogIt.

Using the Drafts and BlogIt

If you are logged in as an Edit user, and have enabled both Drafts and BlogIt, and try to perform an ?action=edit on a non-BlogIt page, then the Publish button will not be enabled. In this scenario you will need to ensure that you include the Drafts recipe from config.php, rather than relying on PmWiki to automatically include Drafts.

$EnableDrafts=1;
include_once("$FarmD/scripts/draft.php");
include_once("$FarmD/cookbook/blogit/blogit.php");

Some background: Drafts are enabled in PmWiki using $EnableDrafts=1, which provides a mechanism for saving pages a separate draft pages, with a "-Draft" suffix, and then later publishing the draft to the final page, basically changing the page name removing the "-Draft" suffix. This workflow doesn't really align with the way in which typical blogs operate, and so BlogIt implements it's own draft mechanism. In addition even if you were to enable Drafts, BlogIt doesn't use the normal PmWiki edit action, and so you would not see the Publish/Draft buttons.

Roadmap

The roadmap outlines the likely areas of focus for future releases of BlogIt, and provides guidance on how known issues will be addressed.

  1. Stability: Remove known bugs. Ensure coding approaches leverage the PmWiki framework appropriately. Security shake-down.
  2. Functionality Alignment: Verify co-existance with existing blog-related recipes. Bring the blog features up to par with traditional blogging platforms.
  3. User Interface: Create templates for existing skins, ajax ui, control panel.
  4. Scale Up: Ensure performance scales to blogs with thousands of pages, and comments.
  5. Importing: Provide a means of importing pages from existing systems (Blogger, WordPress, etc).

Known Issues

List is grouped by issue type, and within that group is in approximate level of urgency, so items near the top of each issue type are likely to get implemented first.

  • Green highlighted items will be worked on for the next release.
  • Green items in italic have been implemented, and are usually available in the development release, but not in the production release. If you want to see development features in action, they are usually in action on the demo site.
  • Items in red italics are low priority, and are unlikely to be addressed.

Bugs

  • bug: Site.BlogIt-CoreTemplate#multi-entry-view has an extraneous . (Reported by SteP)
  • bug: $bi_BlogGroups is used in the contexts of both regex, and PmWiki globs, and so may not work consistently (ie, if 'Home-.*' is desired). (Reported by SteP)
  • bug: cleantext does not always break comments on a word boundary. (Reported by SteP)
  • bug: $bi_Pagename is not available within "includesection" markup on all systems. (Reported by SteP)
  • bug: Entry date changes at each edit. (Reported by Timo)
    Awaiting feedback from Timo.
  • bug: Tags containing accented characters are displayed as unencoded characters on viewing, but correctly in Ajax edit mode. Only affects Admin users.
  • bug: GUI Edit tool bar not displayed in Ajax dialog. (Due to execution of javascript embedded in json.)
  • bug: jquery.validity does not decode HTML entities. (Reported by SteP)
  • bug: Sidebar tag/category list assumes all pages in $CategoryGroup are tag pages. Also assumes that they are BlogIt tag pages (no differentiation is made between BlogIt tags and non-BlogIt tags).
  • bug: Dash in blog group name causes problems when un-approving and deleting comments. (Reported by SteP) (Make separator/pagenaming scheme used in pagename user-configurable.)
  • bug: After adding new tags to a blog entry via ajax, tag links (on viewing entry) are shown as links to ?action=edit, although tag page is created. Problem exists because creating the tag page is slower than the Markup function. So the tag page gets created after the ajax call returns the new page content.
  • bug: Ajax message box is not displayed in IE6; screen jumps to bottom of dialog overlay. Workaround: Don't use Ajax modes with IE6.
  • bug: Unsaved data warning is inconsistent across browsers: Opera and IE6 do not implement the event onbeforeunload; Chrome prompts even if Save button is pressed.

New

  • new: Allow configuration of Status default value (currently hard-coded to 'draft').
  • new: Mechanism to run a user function to alter the entry title before being saved. (Request by yD, SteP, cee-pop)
  • new: Incorporate RSS feed config to make setup easier. (Requested by Marcus)
  • new: Allow commenters to Subscribe to receive notification of new comments or changes to the entry. (Requested by Marcus) Needs mechanism to subscribe to comment/entry updates; manage subscriptions; validate email address.
  • new: Combine javascript and css files to reduce server load. (Automate at deployment of master version.)
  • new: Create a pagelist which shows other pages with the same tags as current page, grouped=by tag.
  • new: Add view all comments, group by blog entry.
  • new: BlogIt-SideBar tags list should only show tags for a specific blog (not all blogs). (Need to add PTV to the auto-generated tag page, containing the blogid; this ptv can then be used on pagelists.)
  • new: When deleting comment/blog entry remove from sidebar. (Add class to links, using ID; create blogit-skin blog/comment to automate this.)
  • new: Add a mechanism to incorporate EditTemplates, to prepopulate the blog entry. (Requested by Luigi)
  • new: Control panel/dashboard for blog settings, improve look of admin links.
  • new: Add an option to "don't show this dialog box anymore" on delete dialog (how to allow user to turn dialog back on?). (Requested by SteP)
  • new: Allow blog entry authors to edit their own posts, not posts by other authors. (Requested by Marcus)
  • new: Add user/skin-configurable ajax colors (un/approve comments; highlight section).
  • new: Option to use consolidated javascript/css files, to reduce round-trip web-server pings.
  • new: Provide support for displaying externally hosted gravatar based on name entered for comments. (Suggested by Luigi)
  • new: Show 'preview' of comment before post. (Requested by Luigi) ''Note: May not be possible, as PmForm seems to have no way to process but not save.
  • new: Provide an Ajax preview mechanism for blog entries. ($_REQUEST['preview'] = 1;) ''Note: May not be possible, as PmForm seems to have no way to process but not save.
  • new: Admin by email for comment approve, delete, and block.
  • new: Add mechanism for readers to 'flag' comments for admin review.
  • new: Ajax enable captcha failure. (Perhaps making the page reload is better to slow down spammers?)
  • new: Post by email.
  • new: Provide support for displaying twitter link based on name entered for comments. http://img.tweetimag.es/i/kirpi(approve links) (Suggested by Luigi)
  • new: Provide a means of approving comment url's when used with UrlApprovals (Ajaxify). (Requested by Step)
  • new: Retain commenter name/website/email in cookie for auto-fill.
  • new: List comments by person. (Provide a pagelist that can be manually included as part of Profile group-header.)
  • new: Add a mechanism to hide PmWiki edit link on blog entries (prevent confusion as to which edit link to use).
    • At times plain wiki edit (?action=edit) is useful also on blog pages. While preventing confusion is essential, straight hiding the link would be deceiving to many people, perhaps. -- Luigi
  • new: Store intro-text (upto [[#break]] tag, as (:Summary :...:). Might make processing faster? Will provide functionality if BlogIt is not being used.
  • new: Import from Google Blogger.

Changes

  • chg: Ensure javascript files are not block-loading each other. (Move javascript files to page footer for extra speed boost.)
  • chg: Replace flash() with http://www.bitstorm.org/jquery/color-animation/(approve links). Ensure works on LI, DIV, etc.
  • CHG: Use Site.EditForm ($PageEditForm), rather than CoreTemplates to store form layout; provides compatibility with other cookbooks (like Autosave).
  • chg: Use $AuthUserFunctions instead of $AuthFunction?
  • CHG: Rename blog and comment fields, prefix with "blogit_" identifier, to prevent conflicts with other recipes (update bi_decodeUTF8() decode blogit vars only).
  • chg: Is step 4 of security setup actually needed? ([4] Assign roles to security groups)
  • chg: Insert new non-draft entries into DOM. Possibly prepend to first 'blog-entry-summary'. (What to do when there are multiple blog lists on a page -- how to identify which one to insert into?)
  • chg: Rename Site.XLPage-BlogIt to Site.BlogIt-XLPage for consitency with PmWiki XL.
  • chg: Make bi_strtotime() more robust, actually parsing d/m/y, and re-ordering to a format that strtotime() can handle.
  • chg: Ensure comment names are unique. (MakeSerialNumber(), uniqid())
  • chg: Make blogit-skin markup parameters consistent (use page= for pagename, etc.)
  • chg: Simplify BlogIt security. There is not a clear deliniation between various actions. Basically there are too many actions. (ie, remove blogit-admin and sidebar and simply check for other actions; combine blog edit/new; combine comment-approve/edit.)
  • chg: Investigate switch from jQueryUI/Validity (dialog (31k + 21k-css), and validation (14k)) to much smaller jQueryTools (16k, for Overlay, Date, and Validation), including client-side date selector. NB: Need replacement for animate colors in flash(); also for auto-complete.
    Currently not worth doing. jQueryTools doesn't have 'suggest' code, so switching would save ~30k, excluding css.

Documentation

  • doc: Add advanced skinning documentation, including templates and template ordering. and a list of vanilla stylesheet with all classes and ids that BlogIt-CoreTemplate uses. (Requested by SteP)
  • doc: Update developer documentation.
  • doc: Comment page naming scheme.

Development Release

These issues are only found in the current development release.

  • chg: Ensure RSS feed is specific to a blogid. (How to determine which blogid to use, for header-rss-tag?)

Issues that need additional verification

If you are able to repeat any of these issues, please let me know how you did it!

  • new: Verify support with Cookbook/ListCategories (may work -- not yet tested).
  • new: Verify support with Cookbook/AutoSave (may work -- not yet tested).
  • new: Verify support with Cookbook/XMLRPC (may work -- not yet tested).

Change Log

The most recent changes are listed below. A full archive can be found in the BlogIt release history.

1.5.1 (10-Jul-2010)

Contributors: DaveG, SteP

Release Summary

This release is primarily a bug fix release, with a few minor functionality enhancements and tweaks.

  • If you use non-US format dates, then you should upgrade to this release, as there was a bug which prevents correct display of dates for non-US formats (ie, dd/mm/yyyy).
  • Added tabindex attribute to input forms, so now tabbing through form fields is a little more intelligent, avoiding all the GUI icons. (For PmWiki 2.2.17+)
  • Allow override of UTF-8 character decode function (when iconv is not available, or fails). Set $bi_CharsetFn.
  • Add unapproved comments to DOM, so poster knows comment is submitted, and awaiting approval. Also include Ajax message to indicate approval pending.
  • Alter behavior of $bi_CommentsEnabled from true/false to open/readonly/none.

Release Details

  • new: Mechanism of identifying whether BlogIt is active on a page. Can be used to alter tag category group, etc. Not possible, since page is only processed by action handlers.
  • new: Add tabindex attribute to input forms. (For PmWiki 2.2.17+)
  • new: Allow override of UTF-8 character decode function (when iconv is not available, or fails).
  • bug: US/EU date formats are not processed correctly, with EU formats not being recognized when $bi_DateZone is set. (Ref bi_strtotime() code, and SDV code for $bi_DateZone) (Reported by SteP)
  • bug: Comment form is displayed when a validation error occurs entering a new blog entry (ie, when entering an invalid date).
  • bug: bi_decodeUTF8 converts characters if NOT (not ajax mode and charset is not UTF8); should only convert when ajax and charset is not UTF8.
  • bug: If comment contains non-latin UTF8 characters, they are removed when displayed in sidebar. Possibly due to use of preg_match with multi-byte characters. (Reported by Dalek)
  • bug: Approved comments attached to a non-approved blog entry are displayed in the sidebar. (#comment-summary-list-pagelist does not seem to filter out approved comments). (Reported by SteP)
  • bug: Titles with embedded-markup expressions are evaluated, when displayed from pagelists (main blog list); "this is (substr "PmWiki" 2 3) substring" is displayed as "this is Wik substring" on default skin.
  • bug: Accented characters in the body of an entry are always displayed correctly, while accented characters in the entry title are only correctly displayed in the side bar and on the page itself, but not in the aggregation of #blog-summary-pagelist. Unable to reproduce. Accented characters work in blog list, sidebar, and single entry mode, across all skins.
  • bug: If in a blog entry an author sets a language-specific title using Cookbook.MultiLanguageViews markup, i.e., (:title-en English title:), the page attribute mltitle-en= remains stored in the page store, even after its corresponding markup has been deleted from the blog entry page. (Reported by SteP) Looks like this is a MultiLanguageViews issue, and this seems to happen regardless of whether BlogIt is active.
  • bug: Performing a second ajax comment add as a non-authenticated user causes JSON Parsing error in IE8 (not in FF).
  • bug: Cannot Cancel comment entry from normal mode (always sets to Ajax mode).
  • bug: bi_BlogItAuth uses $src, not $bi_Pagename.
  • bug: Blog entry that includes $: markup is altered on Save/Edit inserting a space between $: and {. (Reported by SteP)

Mini4:KiTTY-full.png"{Blogxen.Desert-color-scheme-for-KiTTY$:{$Lang}Caption2}"|{Blogxen.Desert-color-scheme-for-KiTTY$:{$Lang}Caption}

  • chg: Use groups in pagelists for comments (always), and entries if $bi_BlogGroups is a single group. Already restricted by $SearchPatterns, but may improve speed.
  • chg: Add unapproved comments to DOM, so poster knows comment is submitted, and awaiting approval. Also include Ajax message to indicate approval pending.
  • chg: Move cookie code to event handlers, so not using PageTextVar in main body.
  • chg: Remove hardcoding of divid commentblock in CoreTemplate.
  • chg: Alter behavior of $bi_CommentsEnabled from true/false to open/readonly/none.
  • chg: Automatically include blogit-pmwiki.css if using the PmWiki skin.

1.5.0 (12-Jun-2010)

Contributors: DaveG, SteP, HansB

Release Summary

  • All actions can now be selectively performed via Ajax, which speeds up admin workflow, and makes quick posting much more accessible.
  • Tags now have auto-suggest feature as you type.
  • If upgrading add these steps to config.php, as they are no longer performed automatically:
    • Ensure actions ?action=source and ?action=diff require at least edit permissions to prevent non-authenticated viewers reading comment email addresses.
    $HandleAuth['source'] = 'edit';
    $HandleAuth['diff'] = 'edit';
    
    • Install the new version of PmForm.php, included in the BlogIt download (ref http://www.pmwiki.org/wiki/PITS/01179).
    • If you are using a character encoding other than the PmWiki default ISO-8859-1, make sure you have correctly set $Charset to the encoding you're using.
    • If you're using a BlogIt aware skin, then upgrade the skin, and add $bi_SkinClasses into config.php if required by the skin.

Release Details

  • new: Add auto-complete for tags field.
  • new: Ajax quick edit blog entry.
  • new: Ajax comment submit.
  • new: Added ability to specify whether actions are handled by ajax, or normal processing. ($bi_Ajax)
  • new: Means of using existing skin css classes as blogit object wrappers. ie, allow use of .entry as blog-entry wrapper for ajax calls.
  • new: Links for ajax Quick Reply to comment for admins.
  • new: Link for ajax Quick Edit comment.
  • new: Link for ajax Quick Blog entry.
  • new: Allow authors to use (:includesection "#tag-pagelist count=3 tag='Test'":) within pages to generate a list of pages containing a tag. (Added count and tag parameters.)
  • new: Add meta-tags to idenfity blogit, and version number.
  • new: Update unapproved comment count when approving/unapproving/editing comments, and when deleting unapproved comments.
  • new: Added $bi_AjaxMsgTimer, allows user setting of the time that the ajax message stays on the screen.
  • new: Put cursor focus on Blog Tile when form is first loaded.
  • bug: Recently Written and Categories pagelists fail, and produce empty lists. Due to a change in 2.2.14 where empty parameters are now displayed as empty. This causes instances on BlogIt pagelists where we have more= and not more=, causing list to fail.
  • bug: Update Site.BlogList to reference literal 'publish' and 'sticky', not translated values $[publish] and $[sticky]. When multiple languages are used in a single unstance of BlogIt, and if user has set transaltions for $[publish] or $[sticky], then blog entries may not be displayed in pagelists correctly. (Reported by SteP)
  • bug: Unable to override $bi_StatusType with user specified values (default list values remain in the list). (Reported by Marcus)
  • bug: Enabling BlogIt prevents non-BlogIt pagelists from searching other cookbook page stores, thus returning incorrect results. (Reported by Hans)
  • bug: Tags displayed on blog page do not respect (:title...:) markup on Tag. page. Tags in sidebar do respect the markup. Should be consistent. (Reported by Dalek)
  • bug: Changing the date format to use forward-slashes '/' causes date validation error. (Reported by SteP) Added $bi_DateZone to specify non-US format.
  • bug: Use of double quotes inside includesection; no user impact. (Reported by SteP)
  • bug: Internal use of date formats is inconsistent, sometimes '%d-%m-%Y %H:%M' and sometimes '%d-%m-%Y (%H:%M)'. Only use date expressions, not regular expressions.
  • bug: Setup fails when called from a local/group.php. (Reported by SteP)
  • bug: HTML character entities are not applied in translated ajax dialog messages, ie, BlogIt-XLPage: 'Yes' => 'ì' (Reported by SteP)
  • bug: bug: XLPage incorrectly uses 'Title or pagename already exists, or is invalid/blank.', rather than 'Pagename already exists, or is invalid/blank.' in CoreTemplate. (Reported by SteP)
  • bug: After creating a new entry with no title, you correctly get an error message, "Title/page exists or blank...". When the New Entry page reloads, page title field has changed from "Blog." to "Blog.Blog". (Reported by SteP)
  • bug: flash() causes OL numbering to be lost in IE8.
  • chg: ".blogit-title" does not get ".inputbox" class aplied by PmWiki (PmWiki applies class=inputbox to form inputs, only when there are no existing classes on the object). (Reported by SteP)
  • chg: Values for $HandleAuth 'source' and 'diff' are overriden, if values are already set by user in config. (Reported by RyanVarick)
  • chg: Upgrade external libraries: jQuery UI 1.8.2, jQuery 1.4.2, showMessage 1.4.
  • chg: Renamed action=blogedit to action=bi_be.
  • chg: Rename url parameters to "bi_" to prevent possible conflicts (include bi_upgrade parameters).
  • chg: New blog entries now use action "bi_ne" rather than Site.BlogIt-NewEntry page. Site.BlogIt-NewEntry is no longer required. (For ajax blog entry creation.)
  • chg: In order to pass HTML validation, replace use of & with &amp; in function bi_link. (Reported by SteP)
  • chg: Ensure tags in tag-list are unique.
  • chg: Defined an action for entering new entries "bi_ne". Removed Site.BlogIt-NewEntry.
  • chg: Comment count link uses #blogit-comment-list anchor, not #commentblock which is sometimes omitted.
  • chg: Ensure javascript files are not block-loading each other. (Move javascript files to page footer for extra speed boost.) ''Not implemented. Decided to keep js in header to ensure consistent user experience in situations where javascript has not loaded, but UI has.
  • chg: Added new XL strings:
'reply'=>''
'Yes' => '',
'No' => '',
'Successfully added blog entry.' => '',
'Successfully updated blog entry.' => '',
'Successfully updated comment.' => '',
'Successfully added new comment.' => ''
'Unable to approve comment.' => '',
'Unable to unapprove comment.' => '',
'Approve comment successful.' => '',
'Unapprove comment successful.' => ''
'Parsing JSON request failed.' => '',
'Request timeout.' => '',
'Error: ' => ''

1.4.0 (14-Mar-2010)

Contributors: DaveG, Luigi

Release Summary

  • Many Admin functions are now 'ajax' based, and are much quicker, being performed without reloading the page (ajax). (Currently comment un/approve, comment delete, comment block, entry delete, comment and blog entry form validation.)
  • Added link to block commenter IP address if BlockList is being used ($EnableBlocklist).
  • Field validation is now done in the browser, so error messages are seen immediately.

Release Details

  • new: Perform client side error checking for comments, providing immediate feedback to user. (Requested by Luigi)
  • new: Link to delete blog entries, rather than going through PmWiki edit link. (Requested by valeh?)
  • new: Add option to add commenter IP to Site.BlockList.
  • new: Display IP address on user comments, possibly in same way as PmWiki History page, on hover over user name. (Requested by Luigi)
  • new: Add a confirmation on comment delete.
  • new: Ajax comment approve/unapprove.
  • new: Ajax comment delete.
  • new: When posting comments, errors and messages are not immediately visible, the page sits at the top and do not jump back to the form. (Reported by Luigi)
  • new: Provide message feedback on comment approval. (Make bi_Redirect a pmwiki action? Problem is due to loosing $MessageFmt during redirect.)
  • new: Add client side date validation check for blog entry.
  • new: Added class "blogit-blog-form" to blog entry form, and "blogit-comment-form" to comment form.
  • new: Display warning if there are unsaved changes on the blog entry page, when navigating away from page with changed content.
  • new: There should be some "filter" on blogitupgrade to not change special pages like "RecentChanges" and the like. (Possibly restrict to $SearchPatterns.) (Suggested by Luigi)
  • bug: Trailing URL's in comments have %% appended. Solution is to use bracket [[http:...]] markup. (Reported by Luigi)
  • bug: Date on blog-grid (for Published, Draft, Sticky) is displayed incorrectly '07-02-2010( 20:29)?'.
  • bug: Do not display comment count if comments are off for the blog-entry or globally (occurs on default PmWiki skin, and DropShadow, Skittlish). (Reported by Luigi)
  • bug: If $Skin is set after BlogIt include then skin template is not loaded. (Reported by Luigi)
  • bug: Approve/unapprove doesn't add to the revision history, it changes the prior revision history.
  • bug: Comments and entries with newlines are stored in multiple lines in page["text"], rather than on a single line.
  • bug: Entries with no author have a non-bold entry date tagline on PmWiki skin.
  • bug: On blog entry, if date is null, then error is thrown. Should default to current date/time.
  • bug: If using $bi_EnablePostDirectives, then don't reset $PmFormPostPatterns, only remove (:..:...:) pattern.
  • bug: Editing a 2nd comment causes redirect fail. First comment edit redirect works; 2nd comment edit redirect fails.
  • bug: notitle markup is not obeyed in blog summary list. (Reported by Luigi) notitle operates correctly on the single entry view, which is how notitle should work. Refer to the FAQ in order to remove it from the blog summary list.
  • chg: On comment submit if you omit the email you get *three* error messages. (Reported by Luigi)
  • chg: Email is only validated client side, not on server.
  • chg: Turn off captcha if user has any form of bi_Auth ($EnablePostCaptchaRequired)
  • chg: Added new XL strings:
### ajax messages
  'Yes' => '',
  'No' => '',
  'Are you sure you want to delete?' => '',
  'Unable to perform delete operation.' => '',
  'Delete successful.' => '',
  'approve comment' => '',
  'unapprove comment' => '',
  'Unable to ' => '',
  'Unable to block IP address.' => '',
  'Blocked IP address: ' => '',
  'IP address is already being blocked: ' => '',
  'Unable to determine IP address.' => ''
  'Commenter IP: ' => '',
  'Enter the IP to block:' => '',
  'Submit' => '',
  'Cancel' => '',
  'Either enter a Blog Title or a Pagename' => '',
  'You have unsaved changes.' => '',

### validity messages
  'This field is required.' => '',
  'This field must be formatted as a date.' => '',
  'This field must be formatted as an email.' => '',
  'This field must be formatted as a URL.' => ''

The most recent changes are listed above. A full archive can be found in the BlogIt release history.

User notes +19: If you use, used or reviewed this recipe, you can add your name. The following format is recognized:
* (+) Optional positive comment. Name, date
* (-) Optional negative comment. Name, date

These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.

Edit - History - Print - Recent Changes - Search
Page last modified on July 20, 2010, at 09:26 PM