CGI-Wiki-Kwiki

 view release on metacpan or  search on metacpan

lib/CGI/Wiki/Kwiki.pm  view on Meta::CPAN

                               'CGI::Wiki::Formatter::UseMod;
                             ],
                      },                  # example only, not default
        site_name => 'CGI::Wiki::Kwiki site',
        admin_email => 'email@invalid',
        template_path => './templates',
        stylesheet_url => "",
        home_node => 'HomePage',
        cgi_path => CGI::url(),
        search_map => './search_map',
        prefs_expire => '+1M',    # passed to CGI::Cookie; see its docs
        charset => 'iso-8859-1', # characterset for the wiki
    );

The C<db_type> parameter refers to a CGI::Wiki::Store::[type] class.
Valid values are 'MySQL', SQLite', etc: see the L<CGI::Wiki> man page
and any other CGI::Wiki::Store classes you have on your
system. C<db_user> and C<db_pass> will be used to access this
database.

C<formatters> should be a reference to a hash listing all the

lib/CGI/Wiki/Kwiki.pm  view on Meta::CPAN

     Copyright (C) 2003-2004 Tom Insam.  All Rights Reserved.

This module is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.

=cut

use strict;
use warnings;
use CGI;
use CGI::Cookie;
use CGI::Wiki;
use CGI::Wiki::Search::DB;
use CGI::Wiki::Plugin::Diff;
use Template;
use Algorithm::Merge qw(merge);

our $VERSION = '0.59';

my $default_options = {
    db_type => 'MySQL',

lib/CGI/Wiki/Kwiki.pm  view on Meta::CPAN

        vars     => {
                      %prefs,
                      show_prefs_form => 1,
                      not_editable    => 1,
                    },
    );
}

sub get_prefs_from_cookie {
    my $self = shift;
    my %cookies = CGI::Cookie->fetch;
    my $cookie_name = $self->prefs_cookie_name;
    my %data;
    if ( $cookies{$cookie_name} ) {
        %data = $cookies{$cookie_name}->value; # call ->value in list context
      }
    return ( username => $data{username} || "",
           );
}

sub set_preferences {

lib/CGI/Wiki/Kwiki.pm  view on Meta::CPAN

        vars     => {
                      not_editable => 1,
                    },
        cookies  => $cookie,
    );
}

sub make_prefs_cookie {
    my ($self, %args) = @_;
    my $cookie_name = $self->prefs_cookie_name;
    my $cookie = CGI::Cookie->new(
        -name    => $cookie_name,
        -value   => {
                      username => $args{username},
                    },
        -expires => $self->prefs_expire,
    );
    return $cookie;
}

sub prefs_expire {



( run in 0.497 second using v1.01-cache-2.11-cpan-e9199f4ba4c )