BlogParser

Summary: A simple parser for RSS feeds from content blocks based on kind-of-blog
Version: 6-15-2007
Prerequisites: fox (for easier entry input)
Status: Works
Maintainer: Ausimage
Discussion: BlogParser-Talk
Categories: Blog RSS

Description

A simple blog parser based on kind-of blog. It locates specific directive markup on pages with names that are in 20070615 date format. It uses page variables located within the block to create the full RSS item markup and creates a new action.

Installation

1. Download the Blog Parser fileΔ and place it in your cookbook directory.

2. Add the following to your config.php file:

 
 $ParseBlogHeadValues['title']="My Blog"
 $ParseBlogHeadValues['link']=$ScriptUrl."/Blog/HomePage?action=blogrss",
 $ParseBlogHeadValues['description']="My blog about things.",
 $ParseBlogHeadValues['copyright']="My blog license",
 $ParseBlogHeadValues['managingeditor']="myname@myemailaddress.com",
 $ParseBlogHeadValues['webmaster']="myname@myemailaddress.com",
 $ParseBlogHeadValues['language']="en-US"
 include_once('cookbook/parseblog.php');

3. Create a fox template at Site.FoxBlogTemplate with at least the following:

 
 !!{$$subject}
 (:blogentry :)
 (:Title {$$subject}:)
 (:TimeStamp: {$$(date Y-m-d H:i)} :)
 (:PermaLink: Blog.{$$entrydate} :)
 {$$text}
 (:blogentryend:)

You may adjust the template to your needs. The (:blogentry :) block must be present and the page variables need to be located within each block.

4. Create a fox form in your blog group and set the target page to be like 20070615 date format:

 
 (:fox entryform #top template=Site.FoxBlogTemplate redirect=1:)
 (:input hidden target "{$$(date YmdHi)}":)
 '''Title:''' (:input text subject size=30:)

 '''Content:'''

 (:input textarea text cols=45 rows=15:)

 (:input submit post Post:)
 (:foxend entryform:)
 

5. Visit your blog group after adding entries and append action=blogrss to the url.

Release Notes

If the recipe has multiple releases, then release notes can be placed here. Note that it's often easier for people to work with "release dates" instead of "version numbers".

See Also

Contributors

Ausimage

Comments

See discussion at BlogParser-Talk

User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.