Konstrukt::Plugin::bookmarks::DBI - Konstrukt bookmarks DBI backend driver
#TODO
Konstrukt bookmarks DBI backend driver.
Note that you have to create the tables bookmarks_item and bookmarks_category. You may turn on the install setting (see "CONFIGURATION" in Konstrukt::Handler) or use the KonstruktBackendInitialization.pl script to accomplish this task.
bookmarks_item
bookmarks_category
install
KonstruktBackendInitialization.pl
You may define those settings to use this backend.
#Backend bookmarks/backend/DBI/source dbi:mysql:database:host bookmarks/backend/DBI/user user bookmarks/backend/DBI/pass pass
If no database settings are set the defaults from "CONFIGURATION" in Konstrukt::DBI will be used.
Initialization of this class
Installs the backend (e.g. create tables).
Parameters:
none
Adds a new bookmark.
$category - The category under which the bookmark should be added
$url - The URL of this bookmark
$title - The title of this bookmark
$private - Is this entry only visible to the author?
$author - The entry's author
Returns the requested bookmark as an hash reference with the keys id, url, title, category, private, visits, author, year, month, day, hour and minute.
$id - The id of the entry
Returns the requested category and its sub-categories and -bookmarks visible to the specified author as an hash reference: { id => .., title => .., author => .., private => .., categories => [ { id => .. }, { id => .. }, ... ], bookmarks => [ { id => .., url => "..", title => "..", author => .., private => .., category => .., visits => .., year => .., month => .., ... }, ... ] }
$category - The category whose entries should be returned. All entries will be returned, when $category is 0 (root).
$author - The author who will read the entries. All private entries, whose author not equals to the specified author won't be shown
Updates an existing bookmark.
$id - The id of the bookmark, which should be updated
$private - Is this entry only visible to me?
$category - To which category does this entry belong?
Removes an existing bookmark.
$id - The id of the bookmark, which should be removed
Adds a new category.
$parent - ID of the parent category
$title - The title of this category
$author - The category's author
$private - Private flag
Returns the requested category as an hash reference: { id => .., title => .., author => .., private => .., parent => ..}
$id - The id of the category
Updates an existing category.
$id - The id of the category, which should be updated
$title - The new title
$private - The new private flag
$parent - To which parent category does this category belong?
Recursively deletes an existing category and all sub-categories and -items.
$id - The id of the category, which should be removed
Increates the visits counter and updates the last_visit timestamp for a specified bookmark.
$id - The id of the bookmark, which will be visited
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.
Konstrukt::Plugin::bookmarks, Konstrukt
To install Konstrukt, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Konstrukt
CPAN shell
perl -MCPAN -e shell install Konstrukt
For more information on module installation, please visit the detailed CPAN module installation guide.