Thomas Wittek > Konstrukt > Konstrukt::Plugin::blog::DBI

Download:
konstrukt/Konstrukt-0.5-beta13.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View Bugs
Report a bug
Source  

NAME ^

Konstrukt::Plugin::blog::DBI - Konstrukt blogging DBI backend

SYNOPSIS ^

        #TODO

DESCRIPTION ^

Konstrukt blogging DBI Backend driver.

CONFIGURATION ^

Note that you have to create the tables blog_entry and blog_comment. You may turn on the install setting (see "CONFIGURATION" in Konstrukt::Handler) or use the KonstruktBackendInitialization.pl script to accomplish this task.

You may define the source of this backend:

        #backend
        blog/backend/DBI/source       dbi:mysql:database:host
        blog/backend/DBI/user         user
        blog/backend/DBI/pass         pass

If no database settings are set the defaults from "CONFIGURATION" in Konstrukt::DBI will be used.

METHODS ^

init

Initialization of this class

install

Installs the backend (e.g. create tables).

Parameters:

none

add_entry

Adds a new blog entry and returns its ID.

Parameters:

update_entry

Updates an existing blog entry.

Parameters:

get_entry

Returns the requested blog entry as an hash reference with the keys id, title, description, content, author, year, month, day, hour, minute, private, comment_count and trackback_count.

Returns undef if the entry does not exist.

Parameters:

get_entries_count

Returns the count of the entries.

get_entries

Returns the blog entries as an array reference of hash references: { id => .., title => .., description => .., content => .., author => .., year => .., month => .., day => .., hour => .., minute => .., private => .., comment_count => .., trackback_count => .. }

Parameters:

delete_entry

Removes an existing blog entry.

Parameters:

get_authors

Returns the user IDs of all blog authors as an array reference: [5, 7, 1, 6]

get_comment

Returns the comments with the specified id as an hash reference: { id => .., entry => .., user => .., author => .., text => .., email => .., email_public => .., email_notify => .., year => .., month => .., day => .., hour => .., minute => .. }

Parameters:

get_comments

Returns the comments of a specified blog entry as an array reference of hash references: { id => .., entry => .., user => .., author => .., text => .., email => .., email_public => .., email_notify => .., year => .., month => .., day => .., hour => .., minute => .. }

The entries should be ordered by ascending date (earliest post first).

Parameters:

add_comment

Adds a new comment.

Parameters:

delete_comment

Deletes an existing comment.

Parameters:

get_trackback

Returns the trackback with the specified id as an hash reference: { id => .., entry => .., url => .., title => .., excerpt => .., blog_name => .., year => .., month => .., day => .., hour => .., minute => .. }

Parameters:

get_trackbacks

Returns the trackbacks of a specified blog entry as an array reference of hash references: { id => .., entry => .., url => .., title => .., excerpt => .., blog_name =>.., year => .., month => .., day => .., hour => .., minute => .. }

The entries should be ordered by ascending date (earliest post first).

Parameters:

add_trackback

Adds a new trackback. Or replace it, if a trackback with that url already exists.

Parameters:

delete_trackback

Deletes an existing trackback.

Parameters:

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.

SEE ALSO ^

Konstrukt::Plugin::blog, Konstrukt