Konstrukt::Plugin::bookmarks - Bookmark management for registered users
You may simply integrate it by putting
<& bookmarks / &>
somewhere in your website.
This Konstrukt Plug-In provides bookmark-facilities for your website.
To be able to reference the stored bookmarks as links, which will update the visit counters and last visit timestamps and redirect to the URL stored in the bookmark create an empty redirect.ihtml (or any othername) with this content:
<& bookmarks show="visit" / &>
Then reference the bookmark like this:
<a href="redirect.ihtml?id=<bookmark-id>">Bookmark-Title</a>
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 bookmarks/backend DBI
See the documentation of the backend modules (e.g. "CONFIGURATION" in Konstrukt::Plugin::bookmarks::DBI) for their configuration.
#layout bookmarks/template_path /templates/bookmarks/ bookmarks/root_title Links #user levels bookmarks/userlevel_write 2 bookmarks/userlevel_admin 3
Yes, this plugin may return dynamic nodes (i.e. template nodes).
Initializes this object. Sets $self->{backend} and $self->{template_path}layout/. init will be called by the constructor.
Installs the templates.
Parameters:
none
We cannot prepare anything as the input data may be different on each request. The result is completely dynamic.
All the work is done in the execute step.
$tag - Reference to the tag (and its children) that shall be handled.
Displays the form to add a bookmark.
Takes the HTTP form input and adds a new bookmark entry.
Diesplays a confirmation of the successful addition or error messages otherwise.
Displays the form to edit a bookmark.
Flattens the tree of categories into an array of references to the category:
( { id => .., title => .., author => .., private => .., depth => .., categories => [ ... ], bookmarks => [ ... ] }, { ... }, ... )
$id - The id of the catetegory whose sub-categories should be flattened. (optional)
$depth - The current depth. (optional)
Takes the HTTP form input and updates the requested bookmark.
Displays a confirmation of the successful update or error messages otherwise.
Displays the confirmation form to delete an entry.
Deletes the specified entry.
Displays a confirmation of the successful removal or error messages otherwise.
Shows the requested bookmark.
$id - ID of the bookmark to show (optional)
Shows the categories and bookmarks.
$category - The category whose entries should be displayed
Recursively generates the tree of categories and bookmarks.
Returns a Konstrukt node that will display the tree.
Only used internally by "show_entries".
$id = The id if the category that should be handled
$user_id = The id of the user currently logged in
$user_level = The user level of the user currently logged in
$user_write = True, if the current user may create new entries
$user_admin = True, if the current user is an admin
$tree = Tree symbol of this category. Passed from the parent entry.
Displays the form to add a category.
Takes the HTTP form input and adds a new bookmark category.
Displays a confirmation of the successful addition or error messages otherwise.
Displays the form to edit a category.
Takes the HTTP form input and updates an existing bookmark category.
Displays the confirmation form to delete a category.
Takes the HTTP form input and removes an existing bookmark category.
Redirects to a given bookmark. Increases the "visits" counter and updates the "last visit" date.
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::DBI, Konstrukt::Plugin, 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.