Query: openguides::cgi
OS: debian
Section: 3pm
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
OpenGuides::CGI(3pm) User Contributed Perl Documentation OpenGuides::CGI(3pm)NAMEOpenGuides::CGI - An OpenGuides helper for CGI-related things.DESCRIPTIONDoes CGI stuff for OpenGuides. Distributed and installed as part of the OpenGuides project, not intended for independent installation. This documentation is probably only useful to OpenGuides developers.SYNOPSISSaving preferences in a cookie: use OpenGuides::CGI; use OpenGuides::Config; use OpenGuides::Template; use OpenGuides::Utils; my $config = OpenGuides::Config->new( file => "wiki.conf" ); my $cookie = OpenGuides::CGI->make_prefs_cookie( config => $config, username => "Kake", include_geocache_link => 1, preview_above_edit_box => 1, latlong_traditional => 1, omit_help_links => 1, show_minor_edits_in_rc => 1, default_edit_type => "tidying", cookie_expires => "never", track_recent_changes_views => 1, display_google_maps => 1, is_admin => 1 ); my $wiki = OpenGuides::Utils->make_wiki_object( config => $config ); print OpenGuides::Template->output( wiki => $wiki, config => $config, template => "preferences.tt", cookies => $cookie ); # and to retrive prefs later: my %prefs = OpenGuides::CGI->get_prefs_from_cookie( config => $config ); Tracking visits to Recent Changes: use OpenGuides::CGI; use OpenGuides::Config; use OpenGuides::Template; use OpenGuides::Utils; my $config = OpenGuides::Config->new( file => "wiki.conf" ); my $cookie = OpenGuides::CGI->make_recent_changes_cookie( config => $config, );METHODSmake_prefs_cookie my $cookie = OpenGuides::CGI->make_prefs_cookie( config => $config, username => "Kake", include_geocache_link => 1, preview_above_edit_box => 1, latlong_traditional => 1, omit_help_links => 1, show_minor_edits_in_rc => 1, default_edit_type => "tidying", cookie_expires => "never", track_recent_changes_views => 1, display_google_maps => 1, is_admin => 1 ); Croaks unless an OpenGuides::Config object is supplied as "config". Acceptable values for "cookie_expires" are "never", "month", "year"; anything else will default to "month". get_prefs_from_cookie my %prefs = OpenGuides::CGI->get_prefs_from_cookie( config => $config, cookies => @cookies ); Croaks unless an OpenGuides::Config object is supplied as "config". Returns default values for any parameter not specified in cookie. If "cookies" is provided, this overrides any cookies submitted by the browser. make_recent_changes_cookie my $cookie = OpenGuides::CGI->make_recent_changes_cookie( config => $config, ); Makes a cookie that stores the time now as the time of the latest visit to Recent Changes. Or, if "clear_cookie" is specified and true, makes a cookie with an expiration date in the past: my $cookie = OpenGuides::CGI->make_recent_changes_cookie( config => $config, clear_cookie => 1, ); get_last_recent_changes_visit_from_cookie my %prefs = OpenGuides::CGI->get_last_recent_changes_visit_from_cookie( config => $config ); Croaks unless an OpenGuides::Config object is supplied as "config". Returns the time (as seconds since epoch) of the user's last visit to Recent Changes.AUTHORThe OpenGuides Project (openguides-dev@lists.openguides.org)COPYRIGHTCopyright (C) 2003-2008 The OpenGuides Project. All Rights Reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2013-01-11 OpenGuides::CGI(3pm)
Related Man Pages |
---|
template::plugin::cgi(3) - centos |
cgi::application::standard::config(3pm) - debian |
openguides::json(3pm) - debian |
openguides::rdf(3pm) - debian |
openguides::utils(3pm) - debian |
Similar Topics in the Unix Linux Community |
---|
OpenGuides 0.64 (Default branch) |
How to do an IP Divert From one ip to the other? |
Help related to Script to move files depending on config values |
Read Data from Config file using Perl |