FAQ

« Return to BlogIt

FAQ

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]](:ifend:)
(:if equal "{$$listformat}" "true":)!! [[{$$fullname} | {$$title}]](:ifend:)
(: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 = 15; #default is 10

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

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;

Cookbook Compatibility

Some extensions may adversly onteract with BlogIt settings, such as MultiLanguage. You have to edit multilanguage.php, and change the "$title" variable to something else.

Setting up an RSS feed

By default BlogIt will display an RSS feed icon in the browser bar. You can turn this feature off by:

$bi_RSSEnabled='false';

You can add an RSS link to a page with this markup:

[[{$SiteGroup}.BlogIt-Admin?action=rss | RSS Feed]]

You can change the page through which the RSS feed is accessed; the page does not need to exist. For example through the page Blog.RSS:

$bi_Pages['rss']='Blog.RSS';

BlogIt will display 10 entries on your RSS feed. Change this by setting:

$bi_RSSPerPage='15';

Using the Drafts Recipe and BlogIt

If you are logged in as an Edit user, and have enabled both the Drafts recipe 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.

How (:includesection ...:) works

Blog-it makes extensive use of pagelists and other markup, but this markup is rarely found in the source of the page you are viewing. Usually the markup is included ("brought into the page") via the (:includesection ...:) markup. Includesection simply goes to a defined set of pages and searches for the specified section -- the first section it finds (as named in the includesection markup) as it goes through the pages is then placed in the current page. The pages which are searched by default are these:

  • Site.BlogIt-SkinTemplate-SKINNAME
  • Site.BlogIt-CoreTemplate

This bit of code defines the precedence of the pages as blogit looks for the relevant section:

SDV($bi_TemplateList, (isset($bi_Skin)?$SiteGroup.'.BlogIt-SkinTemplate-'.$bi_Skin.' ' : '') .$SiteGroup .'.BlogIt-CoreTemplate');