wacsblogtodb — write a new blog entry into the specified database table
use Wacs;
use Wacs::WacsStd;
scalar wacsblogtodb( | ...) ; |
parameter | description |
---|---|
title | Title of the blog entry (max 80 characters) |
text | The text for the blog entry (max 4095 characters) |
table | The database schema to write to - normally the result of doing a
conf_get_attr("table","notes") to get the real name
of the notes schema. This is the default action if this parameter is not
specified. |
tablekey | Name of the primary key to the table specified above - typically
nentryno for the notes table. This is the default
action if this parameter is not specified. |
bywhom | Name of the person/entity who made this blog entry. Defaults to
anonymous if not specified. |
type | Type of blog entry to create - B for standard
Blog, F for Feature article. |
method | Method of creation - A for Automatic when created
by updatestats or similar, M for
manual when uploading a file using wacsblogctl. |
dbhandle | The open database handle for use in accessing the database |
The wacsblogtodb
function writes text for a
blog entry into the notes table with the correct formating and splits
it if necessary. At present it will accept blog entries up to 4095 bytes
in length and these can include all of the standard WACS configuration
substitutions (#SITEURL#
et al) as handled by
conf_dosubs
to allow for icons and set links to be
included quickly and efficiently.
It is provided with the ability to specify the destination table and key in case you wish to use a different database other than notes for the blog. The fields and the structures (with the exception of the primary key) have to be the same, but of course the permissions can be different on that table.