NAME
Konstrukt::Plugin::blog - Konstrukt blogging engine
SYNOPSIS
<& blog / &>
DESCRIPTION
This Konstrukt Plug-In provides blogging-facilities for your website.
You may simply integrate it by putting
<& blog / &>
somewhere in your website.
To show a form to filter the entries put
<& blog show="filter" / &>
in your page source.
If you want to get your content as an RSS 2.0 compliant XML file you may want to put
<& blog show="rss2" / &>
alone in a separate file.
The HTTP parameters "email" and "pass" will be used to log on the user before retrieving the entries. This will also return private entries.
http://domain.tld/blog_rss2.ihtml?email=foo@bar.baz;pass=23
CONFIGURATION
You may do some configuration in your konstrukt.settings to let the plugin know where to get its data and which layout to use. Default:
#backend
blog/backend DBI
#layout
blog/entries_per_page 5
blog/template_path /templates/blog/
#user levels
blog/userlevel_write 1
blog/userlevel_admin 2
#rss export
blog/rss2_template /templates/blog/export/rss2.template
blog/rss2_entries 20 #number of exported entries
#prefix for cached rendered article markup
blog/cache_prefix blog_article_cache/
#use a captcha to prevent spam
blog/use_captcha 1 #you have to put <& captcha / &> inside your add-template
See the documentation of the backend modules (e.g. "CONFIGURATION" in Konstrukt::Plugin::blog::DBI) for their configuration.
METHODS
execute_again
Yes, this plugin may return dynamic nodes (i.e. template nodes).
init
Initializes this object. Sets $self->{backend} and $self->{template_path}. init will be called by the constructor.
install
Installs the templates.
Parameters:
none
prepare
Prepare method
Parameters:
$tag - Reference to the tag (and its children) that shall be handled.
execute
All the work is done in the execute step.
Parameters:
$tag - Reference to the tag (and its children) that shall be handled.
add_entry_show
Displays the form to add an article.
add_entry
Takes the HTTP form input and adds a new blog entry.
Desplays a confirmation of the successful addition or error messages otherwise.
edit_entry_show
Grabs the article from the backend and puts it into a form from which the user may edit the article.
Displays the form to edit an article.
edit_entry
Takes the HTTP form input and updates the requested blog entry.
Displays a confirmation of the successful update or error messages otherwise.
delete_entry_show
Displays the confirmation form to delete an article.
delete_entry
Deletes the specified entry.
Displays a confirmation of the successful removal or error messages otherwise.
show_entry
Shows the requested blog entry including its comments
Displays the entry or error messages otherwise.
Parameters:
$id - ID of the entry to show (optional)
show_entries
Shows the blog entries
Displays the entries or error messages otherwise.
format_and_cache_content
Take plain text and formats it using the wiki plugin. Caches the result. If a cached file already exists, the cached result will be used.
Returns a field tag node contatining the formatted output nodes.
Parameters:
$id - The ID of the article
$content - The (plaintext) content
delete_cache_content
Deletes the content cache for a given article
Parameters:
$id - The ID of the article
add_comment_show
Takes the specified entry ID or HTTP form input and shows the form to add a comment.
Displays the form to add a comment.
Parameters:
$id - ID of the entry, which shall be commented. (optional)
add_comment
Takes the HTTP form input and adds a new comment.
Displays a confirmation of the successful addition or error messages otherwise.
delete_comment
Takes the HTTP form input and removes an existing comment.
Displays a confirmation of the successful removal or error messages otherwise.
filter_show
Displays the form to select articles.
export_rss
Generates an RSS 2.0 compliant XML file with the content from the database.
AUTHOR
Copyright 2006 Thomas Wittek (mail at gedankenkonstrukt dot de). All rights reserved.
This document is free software. It is distributed under the same terms as Perl itself.