Changes in / [20:30]


Ignore:
Location:
/trunk
Files:
4 added
4 edited

Legend:

Unmodified
Added
Removed
  • /trunk/templates/home_node.tt

    r20 r30  
    5555
    5656<p>
    57   <form action="wiki.cgi" method="get">
    58     <input type="hidden" name="action" value="search">
    59     <input type="text" size="50" name="terms">
    60     <input type="submit" name="Search" value="Search">
     57  <form action="supersearch.cgi" method="get">
     58    <input type="text" size="50" name="search">
     59    <input type="submit" name="Go" value="Search">
    6160  </form>
    6261</p>
  • /trunk/templates/navbar.tt

    r20 r30  
    11<div id="toolbar">
    22<!-- <div align="center"><a href="[% home_link %]"><img src="http://grault.net/grubstreet/grubstreet.gif" alt="" class="n"></a></div> -->
    3 <form method="post" action="[% cgi_url %]" enctype="application/x-www-form-urlencoded">
    43<ul>
    54    <li><a href="[% home_link %]">[% home_name %]</a></li>
     
    1514    </ul>
    1615    [% END %]
     16<form method="post" action="supersearch.cgi" enctype="application/x-www-form-urlencoded">
    1717<strong>Search:</strong><br>
    1818<input type="hidden" name="action" value="search" />
    19 <input type="text" size="15" name="terms" />
     19<input type="text" size="15" name="search" />
    2020</form>
    2121</div>
  • /trunk/templates/node.tt

    r20 r30  
    7070
    7171<p>
    72   <form action="wiki.cgi" method="get">
    73     <input type="hidden" name="action" value="search" />
    74     <input type="text" size="50" name="terms" />
    75     <input type="submit" name="Search" value="Search" />
     72  <form action="supersearch.cgi" method="get">
     73    <input type="text" size="50" name="search" />
     74    <input type="submit" name="Go" value="Search" />
    7675  </form>
    7776</p>
  • /trunk/wiki.cgi

    r20 r30  
    3838my $default_country = $config->{_}->{default_country};
    3939my $contact_email = $config->{_}->{contact_email};
    40 
     40my $search_url = $config->{_}->{search_url};
     41my $template_path = $config->{_}->{template_path};
    4142# Make store.
    4243my $store = CGI::Wiki::Store::Pg->new(
     
    4849# Make search.
    4950my $indexdb = Search::InvertedIndex::DB::DB_File_SplitHash->new(
    50     -map_name  => "/home/kake/public_html/wiki-index.db",
     51    -map_name  => $config->{_}{indexing_directory},
    5152    -lock_mode => "EX"
    5253);
    53 #my $search  = CGI::Wiki::Search::SII->new( indexdb => $indexdb );
     54my $search  = CGI::Wiki::Search::SII->new( indexdb => $indexdb );
    5455
    5556# Make formatter.
    5657my %macros = (
    5758    '@SEARCHBOX' =>
    58         qq(<form action="$script_name" method="get">
    59            <input type="hidden" name="action" value="search">
    60            <input type="text" size="20" name="terms">
    61            <input type="submit" name="Search" value="Search"></form>),
     59        qq(<form action="$search_url" method="get">
     60           <input type="text" size="20" name="search">
     61           <input type="submit" name="Go" value="Search"></form>),
    6262    qr/\@INDEX_LINK\s+\[\[Category\s+([^\]]+)\]\]/ =>
    6363        sub { return qq(<a href="$script_name?action=catindex&category=) . uri_escape($_[0]) . qq(">View all pages in Category $_[0]</a>)
     
    7272                               strike)],
    7373    macros              => \%macros,
    74     node_prefix         => '$script_name?',
    75     edit_prefix         => '$script_name?action=edit&id='
     74    node_prefix         => "$script_name?",
     75    edit_prefix         => "$script_name?action=edit&id="
    7676);
    7777
     
    194194             <p>Sorry!  Something went wrong.  Please contact the
    195195             Wiki administrator at
    196              <a href="mailto:kake\@earth.li">kake\@earth.li</a> and quote
     196             <a href="mailto:$contact_email">$contact_email</a> and quote
    197197             the following error message:</p><blockquote>)
    198198      . $q->escapeHTML($error)
     
    416416    my %node_data = $wiki->retrieve_node($node);
    417417    my ($content, $checksum) = @node_data{ qw( content checksum ) };
    418     my %metadata  = %{$node_data{metadata}};
    419     my $username  = &get_cookie;
     418    my %metadata   = %{$node_data{metadata}};
     419    my $username   = &get_cookie;
    420420    my %tt_vars = ( content    => $q->escapeHTML($content),
    421421                    checksum   => $q->escapeHTML($checksum),
     
    443443    }
    444444    else {
    445         $cookie = "Anonymous User";
     445        $cookie = "Anonymous";
    446446    }
    447447    return $cookie;
     
    525525
    526526    my %tt_conf = ( %$conf,
    527                 INCLUDE_PATH => "/home/kake/public_html/cgi-bin/templates" );
     527                INCLUDE_PATH => $template_path );
    528528
    529529    # Create Template object, print CGI header, process template.
Note: See TracChangeset for help on using the changeset viewer.