[pmwiki-users] setting up some blogs

Hans design at softflow.co.uk
Sat Feb 11 05:26:45 CST 2006


Friday, February 10, 2006, 9:58:19 PM, Bronwyn wrote:
> Article lists: Thanks to the amazing new capabilities of pagelist,
> article lists (for front page, archives and categories) can be at
> least semi-automated.  I am mildly discouraged that Hans has not found
> a way to fully automate them. OTOH, I might be able to set up a
> simpler, fully automated mechanism until someone clever figures out
> something better.

The lists are displayed automatically. It only needs manual creation
of any new blog category or blog archive page. The last will change
with pm's proposed blog tools which will add links to blog trailpages
automatically.

> Feeds: Hans' pages say something about not being able to do feeds, but
> Pm said (Jan 11) that you can make feeds out of any pagelist source.
> Unfortunately, there's not much documentation on *how* to make feeds
> from pagelists.

Pm wrote (Jan 11):
Note that PmWiki can now create feeds from any pagelist source,
including trails.  Thus to get a feed pages in a category, sorted
by last modification date:

    .../pmwiki.php?action=rss&link=Category.Name&count=100&order=-time

So for a blog with all blog pages in a group BlogPages the rss output
would be achieved with this:
.../pmwiki.php?action=rss&group=BlogPages&list=blog&order=-ctime&count=50

If you want to add a blog feed link to the html headers of blog pages,
which will be picked up by browsers like Firefox when a user clicks
their rss link symbol, you can add this to config.php:

## add blog feed links to header
$group = FmtPageName('$Group', $pagename);
if ($group=='Blog' || $group=='BlogPages' || $group=='BlogComments') {
  $HTMLHeaderFmt['blogrsslink'] =
    "\n <link rel='alternate' title='\$WikiTitle Blog RSS Feed'
      href='\$ScriptUrl?action=rss&group=BlogPages&list=blog&order=-ctime&count=50'
      type='application/rss+xml' />\n  ";
  $HTMLHeaderFmt['blogatomlink'] =
    "<link rel='alternate' title='\$WikiTitle Blog Atom Feed'
      href='\$ScriptUrl?action=atom&group=BlogPages&list=blog&order=-ctime&count=50'
      type='application/atom+xml' />\n  ";
}

This adds the html link reference to pages in groups Blog, BlogPages and
BlogComments (these are the groups I use with blogsimple).
It will display as rss feed the last 50 blog entries in order of
creation time.

It would also need to have pmwiki's rss feed enabled with:

# add rss feed supply capability
if ($action == 'rss' || $action == 'atom') {
     @include_once("$FarmD/scripts/feeds.php"); }

Best, 
~Hans                           





More information about the pmwiki-users mailing list