Apache-PageKit
view release on metacpan or search on metacpan
434435436437438439440441442443444445446447448449450451452453454
- 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
30313233343536373839404142434445464748495051
<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
221222223224225226227228229230231232233234235236237238239240241242
<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
250025012502250325042505250625072508250925102511251225132514251525162517251825192520
</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>
docsrc/reference.xml view on Meta::CPAN
26452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667<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>
docsrc/reference.xml view on Meta::CPAN
268326842685268626872688268926902691269226932694269526962697269826992700270127022703</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
12345678910111213141516171819<!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
437438439440441442443444445446447448449450451452453454455456457458459460
# 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
554555556557558559560561562563564565566567568569570571572573574575576# $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 )