Apache2-PageKit

 view release on metacpan or  search on metacpan

docsrc/reference.xml  view on Meta::CPAN

      </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 &gt;= 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 &lt; 1.09.
      Defaults to <emphasis>yes</emphasis>.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry id="config.global.recent_login_timeout">
     <term>recent_login_timeout</term>
     <listitem>
      <para>
Seconds that user's session has to be inactive before a user is asked
to verify a password on pages with the <literal><link linkend="config.page.require_login">require_login</link></literal> attribute
set to <emphasis>recent</emphasis>. Defaults to 3600 (1 hour).
      </para>
     </listitem>
    </varlistentry>
   <varlistentry id="config.global.relaxed_parser">
    <term>relaxed_parser</term>
    <listitem>
     <para>
       If set to yes, this option allows template tags to be placed inside
HTML comments. It also permits spaces and newlines within the tag itself.
This option may be useful to HTML authors who would like to validate their
templates' HTML syntax prior to processing, or who use DTD-aware editing
tools.

      Defaults to <emphasis>no</emphasis>.
      <informalexample>
       <programlisting>
        relaxed_parser = "yes"

        # these tags are all allowed if relaxed_parser is enabled:
        &lt;MODEL_VAR NAME="x"&gt;
        &lt; MODEL_VAR NAME = 'x' &gt;
        &lt; MODEL_LOOP NAME = x &gt;
        &lt; PKIT_COMPONENT NAME = x /&gt;
        &lt;!-- MODEL_VAR NAME="x" --&gt;
        &lt;!--   CONTENT_VAR   NAME   =    "x"   /--&gt;
       </programlisting>
      </informalexample>
     </para>
    </listitem>
   </varlistentry>
    <varlistentry id="config.global.request_param_in_tmpl">
     <term>request_param_in_tmpl</term>
     <listitem>
      <para>
If set to yes, then <literal><link linkend="model.var">&lt;MODEL_VAR&gt;</link></literal> tags in template automatically get filled in
with corresponding request parameters across all pages.  Can be overriden
by the corresponding <link linkend="config.page.request_param_in_tmpl">page attribute</link>.  Defaults to <emphasis>no</emphasis>.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry id="config.global.request_class">
     <term>request_class</term>
     <listitem>
      <para>
      Name for the Module, that is used to create the request class objects.
      Defaults to <emphasis>Apache::Request::PageKit</emphasis>. Which is a 
      subclass of Apache::Request. A own subclass is usefull, if you like to
      change the data container for your requstparameter or modify them on
      init() or new(). 
      </para>
     </listitem>
    </varlistentry>

    <varlistentry id="config.global.session_class">
     <term>session_class</term>
     <listitem>
      <para>
      Name for the Module, that is used to create the session objects.
      Defaults to <emphasis>Apache::SessionX</emphasis>.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry id="config.global.session_expires">
     <term>session_expires</term>
     <listitem>
      <para>
       Sets the expire time for the cookie that stores the session id on
       the user's computer.  If it is not set, then the expire time on the
       cookie will not be set, and the cookie will expire when the user closes
       their browser.

docsrc/reference.xml  view on Meta::CPAN

    <varlistentry id="config.global.verify_page">
     <term>verify_page</term>
     <listitem>
      <para>
       Verify password form.  Defaults to <literal><link linkend="config.global.login_page">login_page</link></literal>.
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </sect2>

  <sect2>
   <title>Section Attributes</title>
   <para>
   These options are global across each server and all Views. They are in the
    &lt;SECTIONS&gt; tag of <filename>Config/Config.xml</filename>.
   </para>
   <para>
   All Page attributes are valid. &lt;SECTION&gt; Tags with the longest matching part of the id attribute
   provide the defaults for pages without the attribute in question.

   &lt;PAGE&gt; attributes written in the &lt;PAGE&gt; tag have the highest priority. If nothing is found the
   &lt;SECTION&gt; Tags are scanned for a default. The closest match wins and the search is over.
   See the line with /xyz in the example bellow, if we request /xyz/abc, the search ends at
   the line with id='/xyz' and the page does not require a login!

   </para>
      <informalexample>
       <programlisting>
        &lt;SECTIONS&gt;
        &lt;SECTION id='/' require_login='yes'/&gt;
        &lt;SECTION id='/xyz' request_param_in_tmpl='yes'/&gt;
        &lt;SECTION id='/free' require_login='no'/&gt;
        &lt;/SECTIONS&gt;
       </programlisting>
      </informalexample>

   <variablelist>
    <varlistentry id="config.section.id">
     <term>id</term>
     <listitem>
      <para>
        This is part of the uri path to the page where the defaults take place. '/' Means the whole site.
        This attribute is needed in every &lt;SECTION&gt; tag.
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </sect2>



  <sect2>
   <title>Server Attributes</title>
   <para>
    These options are global over all pages, but are local to each server configuration
    (e.g. production, staging, development). They are located in the &lt;SERVERS&gt; tag of
    <filename>Config/Config.xml</filename>.
   </para>
   <variablelist>
    <varlistentry id="config.server.can_edit">
     <term>can_edit</term>
     <listitem>
      <para>
If set to <emphasis>yes</emphasis>, enables <link linkend="features.editing">on-line editing tools</link>.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry id="config.server.cookie_domain">
     <term>cookie_domain</term>
     <listitem>
      <para>
       Domain for that cookies are issued.  Note that you must have
       at least two periods in the cookie domain.
      </para>
      <para>
       If not set then cookie issued for the current domain name.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry id="config.server.cookie_postfix">
     <term>cookie_postfix</term>
     <listitem>
      <para>
The content of <literal><link linkend="config.server.cookie_postfix">cookie_postfix</link></literal> is appended to <literal>pkit_id</literal>
and <literal>pkit_session_id</literal>. With this option it is possible to force different names for your cookies.
Usefull if for some reason your cookies overwrite eachother.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry id="config.server.fop_command">
     <term>fop_command</term>
     <listitem>
      <para>
       Command line that should be used to run Apache XML FOP to generate
       PDF output.  PageKit will append FO file and PDF file arguments at end.
      </para>
      <informalexample>
       <programlisting>
        # some example fop command lines
	fop_command = "/usr/java/jdk1.3.0_02/bin/java -cp /usr/local/javaclass/fop org.apache.fop.apps.CommandLine"
	fop_command = "/usr/java/jdk1.3.0_02/bin/java -cp /usr/local/javaclass/fop org.apache.fop.apps.CommandLine"
	fop_command = "/usr/java/jdk1.3.0_02/bin/java -cp /usr/local/javaclass/fop org.apache.fop.apps.Fop"
	fop_command = "/usr/lib/java/bin/java -classpath /opt/fop-0.20.3/lib/xerces-1.2.3.jar:/opt/fop-0.20.3/lib/xalanj1compat.jar:/opt/fop-0.20.3/lib/xalan-2.0.0.jar:/opt/fop-0.20.3/lib/xalan-1.2.2.jar:/opt/fop-0.20.3/lib/stylebook.jar:/opt/fop-0.20.3/lib...
       </programlisting>
      </informalexample>
     </listitem>
    </varlistentry>
    <varlistentry id="config.server.html_clean_level">
     <term>html_clean_level</term>
     <listitem>
      <para>
       Sets optimization level for <ulink url="http://kobesearch.cpan.org/search?dist=HTML-Clean">HTML::Clean</ulink>.  If set to 0, disables use of
<ulink url="http://kobesearch.cpan.org/search?dist=HTML-Clean">HTML::Clean</ulink>.  Levels range from 1 to 9.
Level 1 includes only simple fast optimizations.  Level 9 includes all
optimizations.  Defaults to <emphasis>0</emphasis>. A good choice for production is 3. Higher Levels might end up in wrong pages.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry id="config.server.reload">
     <term>reload</term>
     <listitem>
      <para>
If set to <emphasis>yes</emphasis>, check for new view, content and config xml files
on each request.  Should be set to <emphasis>no</emphasis> on production servers.

docsrc/reference.xml  view on Meta::CPAN

  sub xxx {
    my $model = shift;
    my $fields = $model->pkit_component_params_hashref;
    my $select_statement = $fields->{DATASRC};
    ...
  }
]]>
     </synopsis>
    </refsynopsisdiv>
    <refsect1>
     <title>Description</title>
     <para>
      This method return a hashref that contain the component parameters (or undef if the calling routine is not a component).
      All keys are uppercase and the NAME of the component is not present in the hash. If the same component is used twice or more,
      the component code is called only once.
     </para>
    </refsect1>
   </refentry>
   <refentry id="model.api.pkit_input_hashref">
    <refnamediv>
     <refname>pkit_input_hashref</refname>
     <refpurpose>
      Gets all request paramaters.
     </refpurpose>
    </refnamediv>
    <refsynopsisdiv>
     <synopsis>
      $params = $model->pkit_input_hashref;
     </synopsis>
    </refsynopsisdiv>
    <refsect1>
     <title>Description</title>
     <para>
This method fetches all of the parameters from the Apache request object,
returning a reference to a hash containing the parameters as keys, and
the parameters' values as values.  Note a multivalued parameters
is returned as a reference to an array.
     </para>
     <para>
Note, that the values in this hash are <emphasis role="bold">readonly</emphasis>. 
To modify something use $model-><literal>input</literal>( key => $value );.
     </para>
    </refsect1>
   </refentry>
   <refentry id="model.api.fillinform">
    <refnamediv>
     <refname>fillinform</refname>
     <refpurpose>
      Fills in HTML Forms
     </refpurpose>
    </refnamediv>
    <refsynopsisdiv>
     <synopsis>
  $model->fillinform(email => $email);
     </synopsis>
    </refsynopsisdiv>
    <refsect1>
     <title>Description</title>
     <para>
Used with <ulink uri="http://kobesearch.cpan.org/search?dist=HTML-FillInForm">HTML::FillInForm</ulink> to fill in HTML forms.  Useful for example
when you want to fill an edit form with data from the database.
     </para>
    </refsect1>
   </refentry>
   
   <refentry id="model.api.ignore_fillinform_fields">
    <refnamediv>
     <refname>ignore_fillinform_fields</refname>
     <refpurpose>
      Fills in HTML Forms
     </refpurpose>
    </refnamediv>
    <refsynopsisdiv>
     <synopsis>
  $model->ignore_fillinform_fields( qw/email name/ );
     </synopsis>
    </refsynopsisdiv>
    <refsect1>
     <title>Description</title>
     <para>
     All fields named in this call are NOT changed by fillinform.
    </para>
    </refsect1>
   </refentry>

   <refentry id="model.api.pnotes">
    <refnamediv>
     <refname>pnotes</refname>
     <refpurpose>
      Pass values from one method/handler to another
     </refpurpose>
    </refnamediv>
    <refsynopsisdiv>
     <synopsis>
sub pkit_auth_credential {
  # ...
  $model->pnotes(user_id => $user_id);
  # ...
}
     </synopsis>
    </refsynopsisdiv>
    <refsect1>
     <title>Description</title>
     <para>
Wrapper to mod_perl's <literal>pnotes</literal> method, used to pass values from
one handler to another.
     </para>
     <para>
In the example above the <literal>user_id</literal> is set when the user
gets authenticated.
     </para>
    </refsect1>
   </refentry>
   <refentry id="model.api.output_convert">
    <refnamediv>
     <refname>output_convert</refname>
     <refpurpose>
      Outputs data for display, converting charset.
     </refpurpose>
    </refnamediv>
    <refsynopsisdiv>



( run in 0.683 second using v1.01-cache-2.11-cpan-39bf76dae61 )