Apache-PageKit

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
        - Renamed <PKIT_*> tags as follows:
          <PKIT_IF NAME="VIEW:view"> -> <PKIT_VIEW NAME="view">
          <PKIT_LOOP NAME="MESSAGE"> -> <PKIT_MESSAGES>, <PKIT_IS_ERROR>, <PKIT_MESSAGE>
          <PKIT_VAR NAME="HOSTNAME"> -> <PKIT_HOSTNAME>
        - support for relative and absolute names for PKIT_COMPONENT
        - you may now place static HTML files in the pagekit/View/Default
                or View/pkit_view directories.
                If pagekit can not locate the approriate
                template/xml file, it will return declined, but set
                the filepath so that apache returns the files.
        - fixed up static handing with default_page and not_found_page
                (Boris Zentner)
        - Replaced MyPageKit::Common with __PACKAGE__ in Common.pm
                (Boris Zentner)
 
0.99
        - document() function now works in XML::XPathTemplate
        - logins are redirected to selfurl if there is no pkit_done param
        - merged View/Component and Page directories.
        - $model->input_param -> $model->input, $model->fillinform, $model->pnotes
        - $model->output_param -> $model->output

docsrc/reference.xml  view on Meta::CPAN

30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
   <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>

docsrc/reference.xml  view on Meta::CPAN

221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
     <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>

docsrc/reference.xml  view on Meta::CPAN

2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
  </synopsis>
 </refsynopsisdiv>
 <refsect1>
  <title>Description</title>
  <para>
    Include the block between &lt;PKIT_HAVE_MESSAGES&gt; and &lt;/PKIT_HAVE_MESSAGES&gt; 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 &lt;PKIT_HAVE_NOT_MESSAGES&gt; and &lt;/PKIT_HAVE_NOT_MESSAGES&gt; only,
   if no messages are avail.
  </refpurpose>
 </refnamediv>
 <refsynopsisdiv>
  <synopsis>
   <![CDATA[<PKIT_HAVE_NOT_MESSAGES>

docsrc/reference.xml  view on Meta::CPAN

2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
<refsynopsisdiv>
  <synopsis>
   &lt;PKIT_VIEW NAME="print"&gt;This is text display for the printable view&lt;PKIT_ELSE&gt;And this text if hte view is NOT printable&lt;/PKIT_VIEW&gt;
  </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>

docsrc/reference.xml  view on Meta::CPAN

2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
</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[

eg/Config/PageKit_Config-0.97.dtd  view on Meta::CPAN

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<!ELEMENT CONFIG (GLOBAL,SERVERS,PAGES)>
<!ELEMENT GLOBAL EMPTY>
<!ATTLIST GLOBAL
        cache_dir                       CDATA   #IMPLIED
        cookies_not_set_page            CDATA   #IMPLIED
        default_lang                    CDATA   "en"
        default_page                    CDATA   "index"
        login_page                      CDATA   "login"
        not_found_page                  CDATA   #IMPLIED
        model_base_class                CDATA   "MyPageKit::Common"
        model_dispatch_prefix           CDATA   "MyPageKit::MyModel"
        post_max                        CDATA   "100000000"
        recent_login_timeout            CDATA   "3600"
        request_param_in_tmpl           CDATA   "no"
        session_expires                 CDATA   #IMPLIED
        uri_prefix                      CDATA   #IMPLIED
        verify_page                     CDATA   #IMPLIED>
<!ELEMENT SERVERS (SERVER)*>
<!ELEMENT SERVER EMPTY>

lib/Apache/PageKit.pm  view on Meta::CPAN

437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
    # we deliver silently http://xyz.abc.de/my_dir/some_default_page
    # but all relative links on some_default_page get
    # http://xyz.abc.de/_the_link_ istead of
    # so we redirect better ...
    $apr->headers_out->{Location} = $pk->{page_id} . '/';
    return REDIRECT;
  }
 
  $pk->{page_id} = $config->uri_match($pk->{page_id})
    || $config->get_global_attr('not_found_page')
    || $model->pkit_get_default_page;
  unless ($pk->page_exists($pk->{page_id})){
    # if not_found_page is static, then return DECLINED...
    $filename = $pk->static_page_exists($pk->{page_id});
  }
}}
if ($filename){
  my $require_login  = $config->get_page_attr($pk->{page_id},'require_login') || 'no';
  my $protect_static = $config->get_global_attr('protect_static') || 'yes';
  if ( $require_login eq 'no' || $protect_static ne 'yes' ) {
    # return the static page only, if no parameters are attached to the uri
    # otherwise we can not login logout and so on when one the default or index
    # or whatever page is static.

lib/Apache/PageKit.pm  view on Meta::CPAN

554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
#       $apr->connection->user(undef);
      }
    }
  }
  else {
    # check if cookies should be set
    my $pkit_check_cookie = $apr->param('pkit_check_cookie');
    if(defined($pkit_check_cookie) && $pkit_check_cookie eq 'on'){
      # cookies should be set but aren't.
      if($config->get_global_attr('cookies_not_set_page')){
        # display "cookies are not set" error page.
        $pk->{page_id} = $config->get_global_attr('cookies_not_set_page');
        $pk->{browser_cache} = 'no';
 
      } else {
        # display login page with error message
        $pk->{page_id} = $config->get_global_attr('login_page');
        $model->pkit_gettext_message('Cookies must be enabled in your browser.', is_error => 1);
      }
    }
 
    my $require_login = $config->get_page_attr($pk->{page_id},'require_login');



( run in 0.250 second using v1.01-cache-2.11-cpan-bb97c1e446a )