Apache-PageKit
view release on metacpan or search on metacpan
docsrc/reference.xml view on Meta::CPAN
<!--
emphasis
filename
computeroutput
constant
literal
replaceable
varname
informalexample
programlisting
-->
<chapter><?dbhtml filename="reference.html"?>
<chapterinfo>
<releaseinfo role="meta">
$Id: reference.xml,v 1.68 2004/04/06 09:18:30 borisz Exp $
</releaseinfo>
</chapterinfo>
<title>Reference</title>
<sect1>
<title>Configuration Options</title>
<sect2>
<title>Global Attributes</title>
<para>
These settings are global in the sense that they apply over all servers, views, and pages.
They are attributes of the <GLOBAL> tag in <filename>Config/Config.xml</filename>.
</para>
<variablelist>
<varlistentry id="config.global.cache_dir">
<term>cache_dir</term>
<listitem>
<para>
Specifies the directory where the PageKit Template cache files are stored.
Defaults to <filename>View/pkit_cache</filename>.
</para>
</listitem>
</varlistentry>
<varlistentry id="config.global.cookies_not_set_page">
<term>cookies_not_set_page</term>
<listitem>
<para>
This is the page that gets displayed if the user attempts to log in,
but their cookies are not enabled. Defaults to <literal><link linkend="config.global.login_page">login_page</link></literal>.
</para>
</listitem>
</varlistentry>
<varlistentry id="config.global.default_errorstr">
<term>default_errorstr</term>
<listitem>
<para>
Default errorstr, that PageKit use for <link linkend="pkit.errorstr">PKIT_ERRORSTR</link>,
<link linkend="model.api.pkit_set_errorspan">pkit_set_errorspan</link> and the obsolete
<link linkend="model.api.pkit_set_errorfont">pkit_set_errorfont</link>.
</para>
<para>
Defaults to <emphasis>#ff0000</emphasis>.
</para>
</listitem>
</varlistentry>
<varlistentry id="config.global.default_input_charset">
<term>default_input_charset</term>
<listitem>
<para>
Default charset that PageKit Templates and Model output are encoded in.
Defaults to
<emphasis>ISO-8859-1</emphasis>. PageKit uses this to convert the
PageKit templates and output from <link linkend="model.api.output_convert">output_convert</link> to UTF-8.
</para>
</listitem>
</varlistentry>
<varlistentry id="config.global.default_output_charset">
<term>default_output_charset</term>
<listitem>
<para>
Default charset that PageKit templates compiled to.
Defaults to
<emphasis>ISO-8859-1</emphasis>. This should be the charset that
supports your <link linkend="config.global.default_input_charset">default_input_charset</link> and has good support among the client's browsers.
</para>
</listitem>
</varlistentry>
<varlistentry id="config.global.default_lang">
<term>default_lang</term>
<listitem>
<para>
Default language outputed when no language is specified
or request language is not available. Defaults to
<emphasis>en</emphasis>.
</para>
</listitem>
</varlistentry>
<varlistentry id="config.global.default_page">
<term>default_page</term>
<listitem>
<para>
Default page user gets when no page is specified. Defaults to
<emphasis>index</emphasis>.
</para>
docsrc/reference.xml view on Meta::CPAN
If set to <emphasis>all</emphasis>, output is gzipped dynamic and static content for browsers that send a
<literal>Accept-Encoding</literal> header containing <literal>gzip</literal>. If set to <emphasis>static</emphasis>, output is gzipped for
static pages only.
Defaults to
<emphasis>none</emphasis>.
</para>
</listitem>
</varlistentry>
<varlistentry id="config.global.login_page">
<term>login_page</term>
<listitem>
<para>
Page that gets displayed when user attempts to log in. Defaults to
<emphasis>login</emphasis>.
</para>
</listitem>
</varlistentry>
<varlistentry id="config.global.logout_kills_session">
<term>logout_kills_session</term>
<listitem>
<para>
When pkit_logout is called it normally resets just the pkit_id cookie.
With logout_kills_session enabled (set to yes), pkit_logout will also
reset pkit_session_id and forcing a new pkit_session_id cookie to be
set with a new session_id.
Defaults to <emphasis>yes</emphasis>.
</para>
</listitem>
</varlistentry>
<varlistentry id="config.global.model_base_class">
<term>model_base_class</term>
<listitem>
<para>
Specifies the <link linkend="model.base">base Model class</link>
that typically contains code
that used across entire the web application, including methods for
authentication and connecting to the database.
</para>
<para>
If you have multiple PageKit applications running on the same mod_perl
server, then you'll need to specify a unique <literal>model_base_class</literal>
for each application.
</para>
<para>
Defaults to <literal>MyPageKit::Common</literal>.
</para>
</listitem>
</varlistentry>
<varlistentry id="config.global.model_dispatch_prefix">
<term>model_dispatch_prefix</term>
<listitem>
<para>
This prefixeds the <link linkend="model.dispatch">Derived Model Classes</link>. Defaults to MyPageKit::MyModel.
</para>
<para>
Methods in this class take an derived Apache::PageKit::Model object as their only argument.
</para>
</listitem>
</varlistentry>
<varlistentry id="config.global.not_found_page">
<term>not_found_page</term>
<listitem>
<para>
Error page when page cannot be found. Defaults to <literal><link linkend="config.global.default_page">default_page</link></literal>.
</para>
</listitem>
</varlistentry>
<varlistentry id="config.global.page_session">
<term>page_session</term>
<listitem>
<para>
Sets the default for all non static pages.
If set to <emphasis>yes</emphasis>, every non static page gets a unique session.
Defaults to <emphasis>no</emphasis>. This value is overridden with
<literal><link linkend="config.page.page_session">page_session</link></literal>.
</para>
</listitem>
</varlistentry>
<varlistentry id="config.global.page_session_class">
<term>page_session_class</term>
<listitem>
<para>
Name for the Module, that is used to create the page_session objects.
Defaults to <emphasis>Apache::SessionX</emphasis>.
</para>
</listitem>
</varlistentry>
<varlistentry id="config.global.post_max">
<term>post_max</term>
<listitem>
<para>
Maximum size of file uploads, in bytes. Defaults to 100,000,000 (100 MB).
</para>
</listitem>
</varlistentry>
<varlistentry id="config.global.upload_tmp_dir">
<term>upload_tmp_dir</term>
<listitem>
<para>
Temporary directory for file uploads. Defaults to whatever libapreq finds usefull.
This options is only usefull if you use libapreq >= 1.0. The temporary directory
usually needs to reside on the same filesystem as the location supplied to the
upload object's <programlisting>link</programlisting> method. See the Apache::Request
documentation for further information.
</para>
</listitem>
</varlistentry>
<varlistentry id="config.global.protect_static">
<term>protect_static</term>
<listitem>
<para>
If set to <emphasis>yes</emphasis> static files can also be protected with the
require_login attribute in the SECTION or PAGE tags.
Set this option to <emphasis>no</emphasis> to be compatible to PageKit < 1.09.
Defaults to <emphasis>yes</emphasis>.
</para>
</listitem>
</varlistentry>
<varlistentry id="config.global.recent_login_timeout">
<term>recent_login_timeout</term>
<listitem>
docsrc/reference.xml view on Meta::CPAN
<para>
This tag highlights fields in red that Model reported as being filled in incorrectly.
Or, since version 1.10 of pkit it is possible to suppress the NAME attribute.
Then the field is always colored or whatever you want.
</para>
</refsect1>
</refentry>
<refentry id="pkit.errorspan">
<refnamediv>
<refname>PKIT_ERRORSPAN</refname>
<refpurpose>
Highlights Invalid Fields
</refpurpose>
</refnamediv>
<refsynopsisdiv>
<synopsis>
<![CDATA[<PKIT_ERRORSPAN NAME="lastname"> Last Name </PKIT_ERRORSPAN> <input name="lastname"> ]]>
<![CDATA[<PKIT_ERRORSPAN> new for PageKit 1.10 </PKIT_ERRORSPAN> ]]>
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
This tag highlights fields in red that Model reported as being filled in incorrectly.
Or, since version 1.10 of pkit it is possible to suppress the NAME attribute.
Then the field is always colored or whatever you want.
</para>
</refsect1>
</refentry>
<refentry id="pkit.have_messages">
<refnamediv>
<refname>PKIT_HAVE_MESSAGES</refname>
<refpurpose>
Include the block between <PKIT_HAVE_MESSAGES> and </PKIT_HAVE_MESSAGES> only,
if one or more messages are avail.
</refpurpose>
</refnamediv>
<refsynopsisdiv>
<synopsis>
<![CDATA[<PKIT_HAVE_MESSAGES>
Here are some messages for you: <p>
<PKIT_MESSAGES>
<PKIT_IS_ERROR><font color="<PKIT_ERRORSTR>"></PKIT_IS_ERROR>
<PKIT_MESSAGE>
<PKIT_IS_ERROR></font></PKIT_IS_ERROR>
<p>
</PKIT_MESSAGES>
</PKIT_HAVE_MESSAGES>]]>
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Include the block between <PKIT_HAVE_MESSAGES> and </PKIT_HAVE_MESSAGES> only,
if one or more messages are avail.
</para>
</refsect1>
</refentry>
<refentry id="pkit.have_not_messages">
<refnamediv>
<refname>PKIT_HAVE_NOT_MESSAGES</refname>
<refpurpose>
Include the block between <PKIT_HAVE_NOT_MESSAGES> and </PKIT_HAVE_NOT_MESSAGES> only,
if no messages are avail.
</refpurpose>
</refnamediv>
<refsynopsisdiv>
<synopsis>
<![CDATA[<PKIT_HAVE_NOT_MESSAGES>
No messages for you! <p>
</PKIT_HAVE_NOT_MESSAGES>]]>
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Include the block between <PKIT_HAVE_NOT_MESSAGES> and </PKIT_HAVE_NOT_MESSAGES> only,
if no messages are avail.
</para>
</refsect1>
</refentry>
<refentry id="pkit.hostname">
<refnamediv>
<refname>PKIT_HOSTNAME</refname>
<refpurpose>
Fills in the hostname in the URL.
</refpurpose>
</refnamediv>
<refsynopsisdiv>
<synopsis>
<PKIT_HOSTNAME>
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>DESCRIPTION</title>
<para>
Returns the hostname in the URL of the page being served. Particulary useful when you have production and development
servers and you need to link to a secure page.
</para>
<para>
Note that if you are running a proxy server in front of the PageKit server, you probably want to use mod_proxy_add_uri.c.
PageKit will extract the hostname from the frontend server using the X-Original-URI header that mod_proxy_add_uri sets.
</para>
</refsect1>
</refentry>
<refentry id="pkit.messages">
<refnamediv>
<refname>PKIT_MESSAGES</refname>
<refpurpose>
Display messages passed to pkit_message method.
</refpurpose>
</refnamediv>
<refsynopsisdiv>
<synopsis>
<![CDATA[<PKIT_MESSAGES>
<PKIT_IS_ERROR><font color="<PKIT_ERRORSTR>"></PKIT_IS_ERROR>
<PKIT_MESSAGE>
docsrc/reference.xml view on Meta::CPAN
<refnamediv>
<refname>PKIT_SELFURL</refname>
<refpurpose>
URL of current page.
</refpurpose>
</refnamediv>
<refsynopsisdiv>
<synopsis>
<PKIT_SELFURL exclude="foo bar">
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
The URL of the current page, including CGI parameters, but excluding those listed in the exclude attribute. Appends a '&' or '?' at the end to allow additionial parameters.
</para>
<para>
Note that if you are running a proxy server in front of the PageKit server, you probably want to use <ulink url="http://tjmather.com/mod_proxy_add_uri.c">mod_proxy_add_uri.c</ulink>.
PageKit will take the URL from the frontend server using the
X-Original-URI header that mod_proxy_add_uri sets.
</para>
</refsect1>
</refentry>
<refentry id="pkit.view">
<refnamediv>
<refname>PKIT_VIEW</refname>
<refpurpose>
Wraps a section of text to be displayed for a view.
</refpurpose>
</refnamediv>
<refsynopsisdiv>
<synopsis>
<PKIT_VIEW NAME="print">This is text display for the printable view</PKIT_VIEW>
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Displays the enclosed text if the <link linkend="request.pkit_view">pkit_view</link>
request parameter is set to NAME attribute.
</para>
</refsect1>
</refentry>
<refentry id="pkit.else">
<refnamediv>
<refname>PKIT_ELSE</refname>
<refpurpose>
Can be used to add a else part to PKIT_... tags.
</refpurpose>
</refnamediv>
<refsynopsisdiv>
<synopsis>
<PKIT_VIEW NAME="print">This is text display for the printable view<PKIT_ELSE>And this text if hte view is NOT printable</PKIT_VIEW>
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Can be used to add a else part to <link linkend="pkit.view">PKIT_VIEW</link>,
<link linkend="pkit.have_messages">PKIT_HAVE_MESSAGES</link>,
<link linkend="pkit.have_not_messages">PKIT_HAVE_NOT_MESSAGES</link>,
<link linkend="pkit.is_error">PKIT_IS_ERROR</link> or
<link linkend="pkit.not_error">PKIT_NOT_ERROR</link>.
</para>
</refsect1>
</refentry>
<refentry id="pkit.is_error">
<refnamediv>
<refname>PKIT_IS_ERROR</refname>
<refpurpose>
Used to display messages only if it is a errormessage.
</refpurpose>
</refnamediv>
<refsynopsisdiv>
<synopsis>
<![CDATA[<PKIT_HAVE_MESSAGES>
Here are some error messages for you: <p>
<PKIT_MESSAGES>
<PKIT_IS_ERROR>
<PKIT_MESSAGE>
</PKIT_IS_ERROR>
</PKIT_MESSAGES>
</p>
</PKIT_HAVE_MESSAGES>
]]>
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Used to display messages only if it is a errormessage. Or display errors and warnings in different places.
</para>
</refsect1>
</refentry>
<refentry id="pkit.not_error">
<refnamediv>
<refname>PKIT_NOT_ERROR</refname>
<refpurpose>
Used to display messages only if it is a NOT a errormessage.
</refpurpose>
</refnamediv>
<refsynopsisdiv>
<synopsis>
<![CDATA[
<PKIT_HAVE_MESSAGES>
Here are some warnings messages for you: <p>
<PKIT_MESSAGES>
<PKIT_NOT_ERROR>
<PKIT_MESSAGE>
</PKIT_NOT_ERROR>
</PKIT_MESSAGES>
</p>
</PKIT_HAVE_MESSAGES>
<PKIT_HAVE_MESSAGES>
Here are some error messages for you: <p>
<PKIT_MESSAGES>
<PKIT_IS_ERROR>
<PKIT_MESSAGE>
</PKIT_IS_ERROR>
</PKIT_MESSAGES>
</p>
</PKIT_HAVE_MESSAGES>
]]>
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
Used to display messages only if it is NOT a errormessage. Or display errors and warnings in different places.
</para>
</refsect1>
</refentry>
</sect2>
</sect1>
<sect1>
<title>Request parameters</title>
<para>
These are parameters that are specified in <emphasis role="bold">GET</emphasis> requests and <emphasis role="bold">POST</emphasis> requests where Content-type is one of
<constant>application/x-www-form-urlencoded</constant> or <constant>multipart/form-data</constant>.
</para>
<variablelist>
<varlistentry id="request.pkit_done">
<term>pkit_done</term>
<listitem>
<para>
The page to return to after the user has finished logging in or creating a new account.
</para>
</listitem>
</varlistentry>
<varlistentry id="request.pkit_lang">
( run in 0.466 second using v1.01-cache-2.11-cpan-39bf76dae61 )