Blog Plugin

blog plugin by Gina Häußge, Michael Klier
Use DokuWiki as blogging tool. (previous authors: Esther Brunner)

Last updated on 2008-07-18. Provides Syntax, Helper, Action.
Compatible with DokuWiki 2008-05-05.

Requires feed, include, pagelist.
Similar to bliki, content.

Tagged with blog, blogging, news.

Download plugin-blog.tgz
BundleHub Configure your own DokuWiki blogsuite install package, consisting of all mandatory plugins plus any optional features you want to include:
BlogSuite BundleHub
Tips If you intend to use this plugin be sure to take a look at the blogging tips page

Description

The Blog Plugin makes blogs in your wiki easily possible. The blog component shows the latest entries (pages) from a namespace in reverse chronological order. In this new version, the creation date is the sort key – no longer the date of the last non-minor modification as in previous versions. The archive component lists all entries that were written (created) in the given month.

This plugin is the successor of the blog and archive components of the old Blog Plugin. It's therefore incompatible with it.

If you use this plugin for blogging you might want to join Planet DokuWiki.

Configuration

The blog plugin can be configured using the DokuWiki configuration manager available in the admin menu.

namespace The default namespace which is used if no namespace was given in the syntax
formposition You can choose to display the new entry form either above or below the blog entries
dateprefix A date prefix that automatically gets added to pages created with the new entry form. You can use the options from the strftime php function, namespace separators work as well ie. %Y:%m%d
sortkey Defines how the blog entries are sorted. Available options are creation date, modification date, page name, page ID and page title (first headline)
sortorder Sort the blog entries ascending/descending

Components

Blog

{{blog>[namespace]?[number]&[flags]}}
[namespace] namespace for the blog; subspaces will be searched as well; * is the whole wiki, . is the same namespace as the page lies in optional; default is the blog namespace set in the configuration
[number] number of entries to show per page optional; default is 5
[flags] include flags delimited by &, see flags optional

This includes a specified number of most recent blog entries from the given namespace into the current page. Below the entries a link to the page (permalink), the author, the creation date and the number of comments are shown. Link, author, date and comments info can be hidden. At the end of the blog a link to older entries lets you navigate in the history of the blog. At the very end, if you have enough rights to create new pages, a form for new blog entries is displayed.

Archive

{{archive>[namespace]?[month]&[flags]}}
[namespace] the namespace for which you want an archive list; * is the whole wiki, . is the same namespace as the page lies in optional; default is the namespace specified in the configuration
[month] the month for the archive list in YYYY-MM format; * for all pages required
[flags] pagelist flags delimited by &, see flags optional

Shows a table with all pages of the given namespace that were created in the specified month.

Demo

You can try this plugin here.

Bugs

Please report bugs at the Bug tracker.

Recent development progress

Further Resources

wantedpages.php bug fix

If you get

ornellas@pound:~/ornellas.apanela.com/dokuwiki$ php bin/wantedpages.php

Fatal error: Call to undefined function  auth_quickaclcheck() in /home/.karamazov/ornellas/ornellas.apanela.com/dokuwiki/lib/plugins/blog/helper.php on line 84
ornellas@pound:~/ornellas.apanela.com/dokuwiki$

Edit lib/plugins/blog/helper.php and after if (!defined('DOKU_INC')) die(); add the line:

require_once(DOKU_INC.'inc/auth.php');

This should solve the issue.

Discussion

  • Namespaces deeper than one does not appear in the blog as it used to. I have a namespace named cars (:cars) and a sub-namespace named blog (i.e. :cars:blog) for storing blog entries for the :car namespace. I used to specify it as:
    {{blog>cars:blog:?5}}

    but that does not appear to work with the latest version, no blog entries show up. I can get the entries visible by using:

    {{blog>cars?5}}

    but then other pages in the :cars namespace show up, for example :cars:vw and so on. Is this intentionally or is it a bug or am I doing something wrong here? — K-J 2008/07/09 21:11

    • I encountered the same bug.blog component as well as archive seem not to support subnamespace now.—2008/07/11
      • Hmmm, strange, I'll look into it (IIRC I couldn't reproduce this) — Michael Klier 2008/07/11 10:51
    • How many people are suffering from the bug?We could tell Michael more about the problem here.— Jianjun Guo 2008/07/15 14:06
      • I'm seeing the same thing in 2008-05-05 wiki.
      • Added to my todo list, I'll look into it tomorrow! — Michael Klier 2008/07/15 14:47
    • It seems that “search($pages, $conf['datadir'], 'search_pagename', array('query' ⇒ $ns));” returns nothing,instead of pages in specific subnamespace.— 2008/07/16 15:21
      • Ok, for the life of me, I cannot reproduce this behaviour. Do you have the latest version of the include plugin installed? If yes, can you tell me something about your setup? — Michael Klier 2008/07/17 21:47
      • :!: Fixed! (Use the first download link, the link at the bundle hub isn't up to date yet! Please update to the latest version, and report back if your problem is solved! — Michael Klier 2008/07/18 14:23
      • It got fixed.Perfect!Thanks Michael.—Douglas 2008/07/18
  • Is there any way to exclude pages from blog/archive view, like the start page?
  • Does this plugin still require other plugins? (include, pagelist). I think the answer is yes. Yes, confirmed.
  • After I upgraded dokuwiki version all of the blog dates are set to today. Can this be fixed?
    • Try to upgrade the dependent plugins as well (notably include and pagelist). Does this help?
  • I read on tag page, that plugin:blog contains its functionality, but I do not see any instructions how to use tags here. The way as it is described on the tag page it does not work for me.
  • This is not the fact, I removed the line from the blog tag plugin page. You have to install the tag plugin to be able to use it.
  • Is there any way to make links in the tittle of every post (something similar to “Read more”)?.
  • Are scheduled entries possible? I would like to have something like “Publish this entry in 3 days”. Is there a way to have this function with the blog plugin?
  • The Demo link is currently broken FIXME 110508
  • I have a user whose blogs appear in more-or-less random order (not reverse-chronological, as one would expect). Has anyone else seen this, or have I done something wrong?
  • All of my dates show up as “Y/m/d H:i” (litterally, it's the letters Y, m, d, H and i, it's not a date).
    • Which version of the plugin and which version of DokuWiki are you using? DokuWiki changed from date() to strftime() so your $conf['dformat'] setting might be wrong. — Michael Klier 2008/05/28 10:24
  • The demo page is not working
    • I'll set one up soon. — Michael Klier 2008/06/11 16:30
      • Thanks ;-)
  • I set the default namespace for blog into the special blog namespace personal:bloc. The blog appears to be in personal:bloc correctly but the entries created have an id like this id=blog:13_06_2008erfqwer. It seems the plug-in still write the blogentries in the default blog namespace and not the one I set. I tried to change something in the syntax files but I don't know what to change to make the plug-in work as I want.
  • Which syntax are you using?
     {{blog>?5}} 

    if that doesn't work try

     {{blog>personal:bloc?5}} 

    . If that fixes it please report a bug report at the bug tracker mentioned on this page! — Michael Klier 2008/06/13 23:49

  • Is it possible to alter the displayed date of an entry ? – Nicolas Dumoulin
    • It uses DokuWikis date format option see dformat. — Michael Klier 2008/06/28 13:51
      • Thanks for this answer, but I haven't correctly precised my question. I would know how modify the date of an entry. Because I would import entries of an other blog, but when I create an entry to copy-paste the entry to import, the date setted is the current date. I would set the date of my imported post. I hope I am more clear :-) – Nicolas Dumoulin
        • Well that's something completely different then ;-). You can use the meta plugin to manually set the creation date (and modification date) in the page source, then select the modification date in the blog plugins order setting. That should do the trick. An alternative solution would be to alter the timestamps of the created files, and remove the <dokuwiki>/data/index/cdate.idx (make backups if you intent to do that!!). Hope that helps. — Michael Klier 2008/07/01 10:59
          • Thank you very much ! I will try this :-) – Nicolas Dumoulin
          • It works by using the meta plugin. It isn't quite perfect because I should use the modification time, and not the creation date even though I have also altered the metadata “date created”. Maybe I will try the other method that you have proposed. [10 minutes later] In fact, the creation date given with metadata plugin is well taken in account after to have remove data/index/cdate.idx. I hope all will works fine. Thanks again a lot :-) – Nicolas Dumoulin
 
plugin/blog.txt · Last modified: 2008/07/18 18:01 by 61.217.197.97
 
Imprint Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
WikiForumIRCBugsTranslate