OSSTag - A Social Tagging Engine
Copyright (c) 2006 Open Source Development Labs, Inc.
OSSTag assumes that you already have a database-connection which it may use
In order to use osstag, put the following code in your script:
use osstag; my $osstag = new osstag($dbh, $cgi);
Parameters:
$dbh: DBI Database Handler $cgi: CGI Handler
After this you can call any of the included functions.
Example:
$osstag->printFormattedTaglist($whatid);
Prints a list of all tags associated with the given id to stdout
Parameters: whatid: the id of what is tagged
This function is protected via preventHTMLInjection
Returns a formatted string used to display the taglist assiciated with the given whatid
Parameters: whatid: the id of what is tagged
This function is protected via preventHTMLInjection
Returns an array of tags for this whatid
Parameters: whatid: the id of what is tagged
This function is NOT protected via preventHTMLInjection. It returns the plain entries as they are stored in the database
Include this function in each script that might be called via the tag-submission form
This function expects the following CGI Parameters:
osstag_new - the text of the tag. This is usually the name of the input text field in you html form.
osstag_whatid - the whatid of what was tagged This is usually the name of a hidden field in your html form
This function is protected via preventSQLInjection*
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Version: 0.1
Date: 26-MAY-2006
Author: Jan Kechel (jan@kechel.de)