Pukeko - weblog management system

TIPS

Install multiple "Pukeko" weblog systems

Pukeko does not support multi-weblog management function. To manage multiple weblogs, you need to install the same number of "Pukeko" weblog systems as you would like to.

"Pukeko" can share lib/, ext/, doc/, plugin/ directories and also share lock/ directory if you prefer.

Details to share those directories between multiple "Pukeko" systems are explained below.

To install two Pukeko weblog systems as described below.

Directories will be tiered like this.

  • /public_html/
    • sb0/
      • index.html
      • style.css
      • admin.cgi
      • blog.cgi
      • cnt.cgi
      • init.cgi
      • addlib.cgi
      • data/
      • log/
      • img/
      • lock/
    • sb1/
      • index.html
      • style.css
      • admin.cgi
      • blog.cgi
      • cnt.cgi
      • init.cgi
      • addlib.cgi
      • data/
      • log/
      • img/
      • lock/
    • doc/
    • lib/
    • ext/
    • plugin/

Note that there is an addlib.cgi in sb0/ and sb1/. This file is not included in the downloaded archive.

Write

use lib qw(../lib ../lib/lang ../ext);
1;
and save the file as addlib.cgi.

../lib is a lib/ directory that is seen from "blog.cgi".

The contents of addlib.cgi are exactly same in both sb0/ and sb1/.

Then, write

DataDir ./data/
DataSuffix .cgi
HelpSrv http://www.example.com/doc/
TempSrv http://www.example.com/lib/resource/
TempDir ../lib/resource/
WeblogId sb0
PluginDir ../plugin/
in init.cgi for sb0/ if /public_html/ file is located at http://www.example.com/.

HelpSrv, TempSrv, and TempDir are not set in init.cgi when using single Pukeko weblog system, however, they are required for sharing image parts used in the help document or management screen.

WeblogId is an identification given to each weblog system to avoid multiple Cookie information mixed up.

The settings of the init.cgi in sb1/ are almost same. Only one difference is emphasized in bold characters.

DataDir ./data/
DataSuffix .cgi
HelpSrv http://www.example.com/doc/
TempSrv http://www.example.com/lib/resource/
TempDir ../lib/resource/
WeblogId sb1
PluginDir ../plugin/

Now you can share above-mentioned four directories in multiple "Pukeko" systems. Configuration and other settings are saved respectively in each "Pukeko" system.

ScriptPath can be set by the installer though ScriptPath is not a mandatory setting in "Pukeko" system.

Output whole weblog contents dynamically

"Pukeko" generates the top page of your weblog (index.html) statically even though you select "None" for HTML file generation.

You can switch to dynamic generation of all pages including the top page. It is useful when automatic detection for access from cellular phones is needed.

Procedure is as follows.

  1. Rename the "blog.cgi" file to "index.cgi".
  2. Rename the "index.html" file to any appropriate name.
  3. Add settings of MainScript and TopIndex to init.cgi.
  4. Set ".htaccess".
  5. Select "None" for HTML file generation.

This is a fail-safe procedure although it looks redundant. .htaccess setting is web server dependent. Detailed procedure is as follows.

1. Rename the "blog.cgi" file to "index.cgi" to prepare for switching your top page from index.html, a statically generated file, to a dynamic script.

2. Rename the "index.html" file to any appropriate name, such as "dummy.html". You need a dummy file for top page since an error will occur if there is no file for the top page.

3. Add settings of MainScript and TopIndex to init.cgi to reflect the above two changes.

MainScript index.cgi
TopIndex dummy.html

Write a name of the renamed index.html file after TopIndex.

4. Set ".htaccess" in the directory where "Pukeko" is installed. This setting is web server dependent.

DirectoryIndex index.cgi

You can now change the address of the directory on your web server to "index.cgi".

5. Select "None" for HTML file generation to assign permalinks of your articles dynamically.

Authenticate yourself automatically to log-in

Log-in screen will be usually shown when accessing a management screen of your weblog.

"Pukeko" saves Cookie of user information in your browser by default. You can skip this log-in screen by changing the followings.

For instance, if you access http://www.example.com/sb/admin.cgi to open your management screen, change this address to http://www.example.com/sb/admin.cgi?__mode=status.

You can skip the log-in screen and open "Status" menu directly if Cookie is not expired.

Cookie for the management screen of "Pukeko" is set to expire in one day by default. To extend the period to save Cookie from "1 day" to "7 days", write

AdminCookieDay 7

in your "init.cgi".

XML-RPC API

Following XML-RPC methods are supported.

Some parameters that do not comply with specifications of "Pukeko" will be ignored. Your weblog can be updated from XML-RPC client by using XML-RPC API.

blogid and appkey are not used in "Pukeko". You can use any characters you wish.

End point of XML-RPC API will be the address of your management script (admin.cgi).

blogger.newPost
Function
Post a new article.
Argument
appkey [string], blogid [string], username [string], password [string], content [string], publish [boolean]
Return value
Article ID (string) will be returned when successful.
blogger.editPost
Function
Update an article of the specified ID (postid).
Argument
appkey [string], postid [string], username [string], password [string], content [string], publish [boolean]
Return value
"true" will be returned when successful.
blogger.getRecentPosts
Function
Acquire a list of articles posted to Pukeko.
Argument
appkey [string], blogid [string], username [string], password [string], numberOfPosts [int]
Return value
An array of structures including as many numbers of article information as the successfully acquired articles will be returned.
Memo
Article information contains;
  • dateCreated [dateTime.iso8601]
  • userid [string]
  • postid [string]
  • content [string]
blogger.getUsersBlogs
Function
Acquire weblog information where users can post their articles.
Argument
appkey [string], username [string], password [string]
Return value
An array of structures including weblog information where users can post their articles will be returned.
Memo
Weblog information contains;
  • url [string]
  • blogid [string]
  • blogName [string]
blogger.getUserInfo
Function
Acquire user information.
Argument
appkey [string], username [string], password [string]
Return value
Structure of user information will be returned.
Memo
User information contains;
  • userid [string]
  • firstname [string]
  • lastname [string]
  • nickname [string]
  • email [string]
  • url [string]
blogger.deletePost
Function
Delete an article of the specified ID (postid).
Argument
appkey [string], postid [string], username [string], password [string], publish [boolean]
Return value
"true" will be returned when successful.
metaWeblog.newPost
Function
Post a new article.
Argument
blogid [string], username [string], password [string], content [struct], publish [boolean]
Return value
Article ID (string) will be returned when successful.
Memo
content [struct] contains;
  • title [string]
  • description [string]
  • dateCreated [dateTime.iso8601]
  • mt_allow_comments [int]
  • mt_allow_pings [int]
  • mt_convert_breaks [string]
  • mt_text_more [string]
  • mt_excerpt [string]
  • mt_keywords [string]
  • mt_tb_ping_urls [array]
metaWeblog.editPost
Function
Update an article of the specified ID (postid).
Argument
postid [string], username [string], password [string], content [struct], publish [boolean]
Return value
"true" will be returned when successful.
Memo
content [struct] contains;
  • title [string]
  • description [string]
  • dateCreated [dateTime.iso8601]
  • mt_allow_comments [int]
  • mt_allow_pings [int]
  • mt_convert_breaks [string]
  • mt_text_more [string]
  • mt_excerpt [string]
  • mt_keywords [string]
  • mt_tb_ping_urls [array]
metaWeblog.getPost
Function
Acquire article information of the specified ID (postid).
Argument
postid [string], username [string], password [string]
Return value
Structure of the article information will be returned when successful.
Memo
Article information contains;
  • dateCreated [dateTime.iso8601]
  • userid [string]
  • postid [string]
  • title [string]
  • description [string]
  • link [string]
  • permaLink [string]
  • mt_allow_comments [int]
  • mt_allow_pings [int]
  • mt_convert_breaks [string]
  • mt_text_more [string]
  • mt_excerpt [string]
  • mt_keywords [string]
metaWeblog.getRecentPosts
Function
Acquire a list of articles posted to Pukeko.
Argument
blogid [string], username [string], password [string], numberOfPosts [int]
Return value
An array of structures including as many numbers of article information as the successfully acquired articles will be returned.
Memo
Article information contains;
  • dateCreated [dateTime.iso8601]
  • userid [string]
  • postid [string]
  • title [string]
  • description [string]
  • link [string]
  • permaLink [string]
  • mt_allow_comments [int]
  • mt_allow_pings [int]
  • mt_convert_breaks [string]
  • mt_text_more [string]
  • mt_excerpt [string]
  • mt_keywords [string]
metaWeblog.newMediaObject
Function
Upload a file to a server.
Argument
blogid [string], username [string], password [string], file [struct]
Return value
URL of the uploaded file will be returned.
Memo
file [struct] contains;
  • bits [base64]
  • name [string]
  • type [string]
mt.getCategoryList
Function
Acquire a list of categories set in your weblog.
Argument
blogid [string], username [string], password [string]
Return value
An array of structures including category information will be returned.
Memo
Category information contains;
  • categoryId [string]
  • categoryName [string]
mt.setPostCategories
Function
Categorize an article of the specified ID (postid).
Argument
postid [string], username [string], password [string], categories [array]
Return value
"true" will be returned when successful.
Memo
categories [array] is an structure that contains;
  • categoryId [string]
  • isPrimary [boolean]
mt.getPostCategories
Function
Acquire a category for the article of the specified ID (postid).
Argument
postid [string], username [string], password [string]
Return value
An array of structures including category information set in the article will be returned.
Memo
Category information contains;
  • categoryId [string]
  • categoryName [string]
  • isPrimary [boolean]
mt.getRecentPostTitles
Function
Acquire a list of articles posted to Pukeko.
Argument
blogid [string], username [string], password [string], numberOfPosts [int]
Return value
An array of structures including as many numbers of article information as the successfully acquired articles will be returned.
Memo
Article information contains;
  • dateCreated [dateTime.iso8601]
  • userid [string]
  • postid [string]
  • title [string]
mt.publishPost
Function
Rebuild the top page and the selected articles of your weblog.
Argument
postid [string], username [string], password [string]
Return value
"true" will be returned when successful.
Memo
Pukeko does not change the status of the selected articles (leaves closed articles closed). Top page will be rebuilt. The html file that including the selected articles will be rebuilt depending on what you have selected for HTML file generation.
mt.supportedMethods
Function
Acquire a list of methods supported in "Pukeko".
Argument
None
Return value
An array of supported methods will be returned.
mt.supportedTextFilters
Function
Acquire a list of text filters supported in your weblog.
Argument
None
Return value
An array of the supported text filter information will be returned.
sb.getMediaObjectList
Function
Acquire a list of the uploaded image files.
Argument
blogid [string], username [string], password [string], numberOfObjects [int]
Return value
An array of uploaded image file information will be returned.
Memo
Image file information contains;
  • objectid [string]
  • dateCreated [dateTime.iso8601]
  • name [string]
  • url [string]
sb.getMediaObject
Function
Acquire the uploaded image files.
Argument
blogid [string], objectid [string], username [string], password [string]
Return value
The selected image file encoded by base64 will be returned.
sb.deleteMediaObject
Function
Delete uploaded image files.
Argument
blogid [string], objectid [string], username [string], password [string]
Return value
"true" will be returned when successful.
Memo
Delete their thumbnails too if any there.

Copyright © SimpleBoxes/SerendipityNZ Ltd. 2004-2006, All rights reserved. [Pukeko 1.00R]