| AxKit-App-TABOO documentation | view source | Contained in the AxKit-App-TABOO distribution. |
AxKit::App::TABOO::XSP::Story - News story management tag library for TABOO
Add the story: namespace to your XSP <xsp:page> tag, e.g.:
<xsp:page
language="Perl"
xmlns:xsp="http://apache.org/xsp/core/v1"
xmlns:story="http://www.kjetil.kjernsmo.net/software/TABOO/NS/Story"
>
Add this taglib to AxKit (via httpd.conf or .htaccess):
AxAddXSPTaglib AxKit::App::TABOO::XSP::Story
This XSP taglib provides tags to store information related to news stories and to fetch and return XML representations of that data, as it communicates with TABOO Data objects, particulary AxKit::App::TABOO::Data::Story.
Apache::AxKit::Language::XSP::SimpleTaglib has been used to write this taglib.
<store/>It will take whatever data it finds in the Apache::Request object
held by AxKit, and hand it to a new AxKit::App::TABOO::Data::Story
object, which will use whatever data it finds useful. It will not
store anything unless the user is logged in and authenticated with an
authorization level. If an authlevel is not found in the user's
session object, it will throw an exception with an AUTH_REQUIRED
code. If asked to store certain priviliged fields, it will check the
authorization level and throw an exception with a FORBIDDEN code if
not satisfied. If timestamps do not exist, they will be created based
on the system clock.
If TABOOAkismetKey is set (and spammers will make you want this really
fast), it will check the Akismet anti-spam system if article has not
been approved by an editor and the user has an authlevel less than 2,
and return a FORBIDDEN if it is deemed to be spam. Once the article
has been approved by an editor, it is fed to Akismet to teach it what
is ham.
Finally, the Data object is instructed to save itself.
If successful, it will return a store element in the output
namespace with the number 1.
<this-story/>Will return an XML representation of the data submitted in the last
request, enclosed in a story-submission element. Particularly
useful for previewing a submission.
<get-story/>Will return an XML representation of the data for a previously saved
story, enclosed in a story-loaded element. It needs to get the
story identified by storyname and sectionid attributes or child
elements.
<number-of-unapproved sectionid="subqueue"/>Will return the number of articles in a given section that has not been approved by an editor. Especially useful for giving the editors a heads-up as to new articles in the submission queue, like in the example.
See AxKit::App::TABOO.
| AxKit-App-TABOO documentation | view source | Contained in the AxKit-App-TABOO distribution. |