App-ZofCMS
view release on metacpan or search on metacpan
lib/App/ZofCMS/Config.pm view on Meta::CPAN
takes a hashref as a value, the keys of that hashref are directories for
which you want to apply the defaults specified as values, which are hashrefs
identical to C<template_defaults>.
By "directory" is meant the C<dir> query parameter that is calculated
as is described in section B<Note on page and dir query parameters>
above.
B<Note:> when specifying the "directory keys", make sure to have the leading
and ending slash (or just one slash if it's a "root" directory),
because that's what the C<dir> query parameter looks like after being
processed.
=head2 C<zcms_template_extension>
{ zcms_template_extension => '.tmpl', }
B<Optional>. The C<zcms_template_extension> key takes a string as an argument. This string
represents the extensions for your ZofCMS Template files. B<Defaults to:> C<.tmpl>
=head1 METHODS
lib/App/ZofCMS/Plugin/QueryToTemplate.pm view on Meta::CPAN
=head1 DESCRIPTION
Plugin can be run at any priority level and it does not take any input from
ZofCMS template.
Upon plugin's execution it will stuff the C<{t}> first level key (see
L<App::ZofCMS::Template> if you don't know what that key is) with all
the query parameters as keys and values being the parameter values. Each
query parameter key will be prefixed with C<query_>. In other words,
if your query looks like this:
http://foo.com/index.pl?foo=bar&baz=beerz
In your template parameter C<foo> would be accessible as C<query_foo>
and parameter C<baz> would be accessible via C<query_baz>
Foo is: <tmpl_var name="query_foo">
Baz is: <tmpl_var name="query_baz">
=head1 REPOSITORY
lib/App/ZofCMS/Plugin/SplitPriceSelect.pm view on Meta::CPAN
range may be the same if there are not enough prices available.
Thus you can do something along the lines of:
my ( $start_price, $end_price ) = split /-/, $query->{plug_split_price_select};
my @products_in_which_the_user_is_interested = grep {
$_->{price} >= $start_price and $_->{price} <= $end_price
} @all_of_the_products;
=head1 GENERATED HTML CODE
This is what the HTML code generated by the plugin looks like (providing all the optional
arguments are left at their default values):
<select id="plug_split_price_select" name="plug_split_price_select">
<option value="200-1000">$200 - $1000</option>
<option value="4000-6000">$4000 - $6000</option>
<option value="7000-7000">$7000 - $7000</option>
</select>
=head1 REPOSITORY
lib/App/ZofCMS/Plugin/StartPage.pm view on Meta::CPAN
If C<no_redirect> argument (see above) is set to a true value, the
plugin will stick C<plug_start_page_form> variable into C<{t}>
ZofCMS Template special key. It will contain the start page selecting
form in it.
<tmpl_var name='plug_start_page_form'>
=head1 GENERATED HTML CODE
Here's what plugin generated start page selecting form looks like:
<p class="success-message">Successfully saved</p>
<form action="" method="POST" id="plug_start_page_form">
<div>
<input type="hidden" name="page" value="/index">
<input type="hidden" name="plugsp_save_settings" value="1">
<label for="plugsp_page">Start page:</label
><select id="plugsp_page" name="plugsp_page"
lib/App/ZofCMS/Plugin/UserLogin/ForgotPassword.pm view on Meta::CPAN
request password reset.
Once the user does that, the plugin checks that the provided login indeed
exists, checks that there's no abuse going on (flooding with reset
requests), generates a special "code" that, as part of a full
link-to-follow, is sent to the user inviting them to click it to proceed
with the reset.
Once the user clicks the link in their email (and thus ends up back on your
site), the plugin will invite them to enter (and reenter to confirm)
their new password. Once the plugin ensures the password looks good,
it will update user's password in the database.
All this can be enabled on your site with a few keystroke, thanks to this
plugin :)
=head1 FIRST-LEVEL ZofCMS TEMPLATE AND MAIN CONFIG FILE KEYS
=head2 C<plugins>
plugins => [
lib/App/ZofCMS/Plugin/UserLogin/ForgotPassword.pm view on Meta::CPAN
<tmpl_if name='plug_forgot_password_stage_code_bad_pass_copy'>
It's really hard to type the same thing twice, ain't it?
</tmpl_if>
This indicator turns on if the user did not retype the new password
correctly.
=head2 C<plug_forgot_password_stage_change_pass_done>
<tmpl_if name='plug_forgot_password_stage_change_pass_done'>
Well, looks like you're all done with reseting your pass and what not.
</tmpl_if>
This indicator shows that the final stage of plugin's run has been reached;
i.e. the user has successfully reset the password and can go on with
their other business.
=head1 OUTPUT
The plugin generates a whole bunch of various output; what's below should
cover all the bases:
( run in 0.653 second using v1.01-cache-2.11-cpan-64827b87656 )