Projects > blog2phpCMS > Documentation >
Feike Open Source

Open Source & GPL Projects

my contribution to the freedom of programing



Documentation of class MIMEMailxPHP4_V2

plugin commands

+ B2P_Config
+ B2P_FetchBlogPosts
+ B2P_FetchBlogComments
+ B2P_FetchBlogCategories
+ B2P_FetchBlogUsers
+ B2P_ForEach
+ B2P_EndForEach
+ B2P_Data

The blog2phpCMS plugin software allows you to use weblog systems content (currently only wordpress 2.x) in your phpCMS content files.

Quickstart for fasttrackers

  • copy the blog2phpcms directory with it's content to your phpCMS plugins directory (parser/plugs)
  • add the plugin include command (PLUGIN FILE=...) to your phpCMS content file
  • add the B2P commands to your content file
  • ... have fun ...

Plugin Syntax

The plugin commands are to be written inside html comments. The parameters are seperated by semi-colons, the values of parameters are specified by an equal sign. Parameter values sustain over the complete processing process. That means, if you have specified i.e. maxrows=2 in a B2P_Fetch... command, it will also be valid for all following fetch commands!

Coding example

<!-- B2P_FetchBlogPosts ; maxrows=3 ; category=blog2phpCMS -->

This tells the plugin to fetch the three latest posts in category blog2phpCMS from wordpress.
Well, it is as simple as it seams. To print all this three posts in your page you need the B2P_ForEach and B2P_EndForEach const2P_EndForEach constuct. All lines between these two commands are evaluated for each post. Inside the foreach use the B2P_Data to access the real blog content.

Command reference


Availible since: Version 0.1.0
Description: Configure the plugin for later use inside the template file


since version 0.1.0
specify the weblog system to use
wordpress2 blog system is wordpress version 2


since version 0.1.0
specify the absolute or relative path to the blog system's base directory
path the relative or absolute path to your blog system


since version 0.1.2
switch debugging on or off. Switch it on for development and testing!
on add debug output as html comments
off no debug output nor errors generated


Availible since: Version 0.1.0
Description: Fetch posts from the blog system for later output in phpCMS. Availible output fields for the later B2P_Data command are:
  • ID (wordpress 2.1 posts table)
  • display_name (wordpress 2.1 users table)
  • post_date (wordpress 2.1 posts table)
  • post_content (wordpress 2.1 posts table)
  • post_title (wordpress 2.1 posts table)
  • cat_name (wordpress 2.1 categories table)
  • post_name (wordpress 2.1 posts table)
  • post_modified (wordpress 2.1 posts table)
  • guid (wordpress 2.1 posts table)



since version 0.7.1
Restrict the posts fetched to those in the given category
category name the name of this category in the wordpress DB


since version 0.7.2
Restrict the posts fetched to those written by the given user (display name).
user name the display name of the user in the wordpress DB


since version 0.3.0
Restrict the number of posts to fetch. The plugin will fetch the latest "maxrows" posts in state "publish" (wordpress).
number the number of rows to fetch


Availible since: Version 0.1.1
Description: Start an output loop for all fetched data rows of the weblog. This command must be stated alone on a single line of code!


Availible since: Version 0.1.1
Description: This is the ending position of the output loop. All lines between this and the B2P_ForEach command will be echoed and processed for each row in the output set of a B2P_Fetch command.
This command must be stated alone on a single line of code!


Availible since: Version 0.1.0
Description: Output data from the weblog system to the phpCMS content file.


since version 0.1.1
Specify which datafield to output. See the B2P_Fetch... function for a list of availible fields per fetch.
fieldname the name of the field to output, see fetch function for fieldlist


since version 0.1.1
Specify if html tags from the weblog content are echoed or deleted in the phpCMS output. Default is "no"
no strip_tags from the weblog content before output.
yes leave tags in the content as they are delivered from weblog DB.


since version 0.2.5
Specify the maximum number of charactres to use from the weblog content.
number the number of characters in the phpCMS output for this field (default = 100)

Last Update: April 2007