Apache-PageKit

 view release on metacpan or  search on metacpan

docsrc/features.xml  view on Meta::CPAN

    my $session = $model->session;
    $session->{'foo'}->{'bar'} = 1;

    # session will be saved
    my $session = $model->session;
    $session->{'foo'}->{'bar'} = 1;
    # since 'baz' is top level element and is assigned, session will be saved
    $session->{'baz'} = 1;
    </programlisting>
   </informalexample>
  </warning>
  <para>
   To store information during a request, use the
   <literal><link linkend="model.api.pnotes">pnotes</link></literal> method.
  </para>
  <para>
   As of PageKit 1.05, there is support for associating sessions with
   authentication.  The associated session ID may be specified by the second
   argument returned my <link linkend="model.api.pkit_auth_session_key">pkit_auth_session_key</link>.  When a user logs in, their current session may be merged with the session
   stored with their user ID.  To override the default behavior, use the
    <link linkend="model.api.pkit_merge_sessions">pkit_merge_sessions</link> hook.
  </para>
  <para>
   As of PageKit 1.08, there is support for page based sessions.
  </para>
 </sect1>
 <sect1><?dbhtml filename="authentication.html"?>
  <title>Authentication</title>
  <para>
   When a user logins in, the <literal><link linkend="request.pkit_login">pkit_login</link></literal> request parameter must be set to a true value.  In addition, if you want
the user to be redirected to another page, set the <literal><link linkend="request.pkit_done">pkit_done</link></literal> parameter.  To do this, place
the following hidden fields in your login form page:
  <informalexample>
   <programlisting>
    &lt;!-- Login Page --&gt;
    #  will get set by pagekit to the page the user is requesting
    &lt;input type="hidden" name="pkit_done"&gt;
    &lt;input type="hidden" name="pkit_login" value="1"&gt;
   </programlisting>
  </informalexample>
  </para>
  <para>
   If <literal><link linkend="request.pkit_login">pkit_login</link></literal> is set to a true value, then PageKit calls <literal><link linkend="model.api.pkit_auth_credential">pkit_auth_credential</link></literal> method.  If this method returns a s...
by <literal><link linkend="request.pkit_done">pkit_done</link></literal>,
setting the cookie <literal>pkit_id</literal> to the session_key.
  </para>
  <para>
   While the user is logged in, PageKit checks the session_key by using
   the <literal><link linkend="model.api.pkit_auth_session_key">pkit_auth_session_key</link></literal> method.  If the <literal><link linkend="request.pkit_logout">pkit_logout</link></literal> request parameter is set, then the user is
logged out.
  </para>
  <para>
PageKit access to pages based on the <literal><link linkend="config.page.require_login">require_login</link></literal> attribute.
If <literal><link linkend="config.page.require_login">require_login</link></literal>
is set to <emphasis>recent</emphasis>, then PageKit requires that session is currently active in the last
<literal><link linkend="config.global.recent_login_timeout">recent_login_timeout</link></literal>
seconds.
  </para>
  <para>
  Note, that the pages <literal><link linkend="config.global.default_page">default_page</link></literal>,
  <literal><link linkend="config.global.verify_page">verify_page</link></literal> and
  <literal><link linkend="config.global.login_page">login_page</link></literal> can not be protected in any way.
  </para>
 </sect1>
 <sect1><?dbhtml filename="validation.html"?>
  <title>Form Validation</title>
   <para>
  PageKit uses <ulink url="http://search.cpan.org/doc/MARKSTOS/Data-FormValidator-1.5/lib/Data/FormValidator.pm">Data::FormValidator</ulink> to provide easy form validation.  Highlights
fields in red that user filled incorrectly by using the
<link linkend="pkit.errorfont">PKIT_ERRORFONT</link> tag.  In addition,
error message(s) are displayed using the <link linkend="pkit.messages">PKIT_MESSAGES</link> tag.
To use, pass an input profile to the
<literal><link linkend="model.api.pkit_validate_input">pkit_validate_input</link></literal> method.
  </para>
  <para>
   In addition, you may implement your own custom error handling by using <literal><link linkend="model.api.pkit_set_errorfont">pkit_set_errorfont</link></literal> to set the <link linkend="pkit.errorfont">PKIT_ERRORFONT</link> tags.
  </para>
 </sect1>
 <sect1><?dbhtml filename="fillinform.html"?>
  <title>Sticky HTML Forms</title>
  <para>
   PageKit uses <ulink url="http://kobesearch.cpan.org/search?dist=HTML-FillInForm">HTML::FillInForm</ulink> to fill in HTML Forms with the request parameters.  You
   can turn this feature off by setting <literal><link linkend="config.page.fill_in_form">fill_in_form</link></literal> to <emphasis>no</emphasis>.
  </para>
  <para>
   One useful application is if you have set up error handling and if an user
   submits an HTML form without filling out
   a required field, PageKit will re-display the HTML form with all the form 
   elements containing the submitted info.
  </para>
  <para>
   In additon to filling in request parameters, you may fill in the HTML
   fields from the model by using the <literal><link linkend="model.api.fillinform">fillinform</link></literal> method.
  </para>
 </sect1>
 <sect1 id="features.multiple.views"><?dbhtml filename="multipleview.html"?>
  <title>Multiple Views</title>
  <para>
   Any page can have multiple views, by using the <literal><link linkend="request.pkit_view">pkit_view</link></literal> request parameter.
One example is Printable pages.  Another
is having the same web site branded differently for different companies.
Another is having different Media outputs such as HTML, XML and WML, by
using the <link linked="config.global.content_type">content_type</link>
configuration options.
  </para>
  <para>
   To create a new view, create a <filename>View/<replaceable>pkit_view</replaceable></filename> directory and place the PageKit Templates and XSLT files for
the pages and components that you wish to apply the view to.  Note that if
PageKit doesn't find a template or XSLT file in the <filename>View/<replaceable>pkit_view</replaceable></filename> directory it looks in the
<filename>View/Default</filename> directory.  That is, the files <filename>View/<replaceable>pkit_view</replaceable></filename> "override" the files
in <filename>View/Default</filename> directory.
  </para>
  <para>
   To association a media output such as XML, WML, or PDF with a view, use
   the View <link linkend="config.view.content_type">content_type</link> attribute.
   Note that in order for PDF output to work, you must install the Apache XML
   FOP processor, available from
   <ulink url="http://xml.apache.org/fop/">http://xml.apache.org/fop/</ulink>, and
   configure <link linkend="config.global.fop_command">fop_command</link> to point
   to the FOP processor.
  </para>



( run in 2.209 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )