<<

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.

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 => .. }

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 => .., email => .., text =>.., 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 => .., email => .., text =>.., 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:

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::Plugins::blog, Konstrukt

<<