Author: dom Date: 2005-07-24 00:57:57 +0100 (Sun, 24 Jul 2005) New Revision: 669
Added: tags/rel0_48/ tags/rel0_48/Changes Removed: branches/foo/templates/ branches/foo/wiki.cgi tags/rel0_48/Changes Log: add release tag
Deleted: branches/foo/wiki.cgi =================================================================== --- branches/foo/wiki.cgi 2005-07-23 23:28:46 UTC (rev 668) +++ branches/foo/wiki.cgi 2005-07-23 23:57:57 UTC (rev 669) @@ -1,619 +0,0 @@ -#!/usr/bin/perl -w - -use strict; -use warnings; - -use lib qw( /home/kake/local/share/perl/5.6.1/ - /home/kake/local/lib/perl/5.6.1/ - ); - -use CGI qw/:standard/; -use CGI::Wiki; -use CGI::Wiki::Store::SQLite; -use CGI::Wiki::Search::SII; -use CGI::Wiki::Formatter::UseMod; -use CGI::Wiki::Plugin::Locator::UK; -use Geography::NationalGrid; -use Geography::NationalGrid::GB; -use CGI::Wiki::Plugin::RSS::ModWiki; -use CGI::Wiki::Plugin::RSS::ChefMoz; -use Template; -use CGI::Carp qw(fatalsToBrowser); -use Time::Piece; -use URI::Escape; - -# config vars -my $FULL_CGI_URL = "http://the.earth.li/~kake/cgi-bin/cgi-wiki/wiki.cgi?"; - -# Make store. -my $store = CGI::Wiki::Store::SQLite->new( - dbname => "/home/kake/public_html/cgi-out/cgi-wiki.db" -); - -# Make search. -my $indexdb = Search::InvertedIndex::DB::DB_File_SplitHash->new( - -map_name => "/home/kake/public_html/cgi-out/cgi-wiki-index.db", - -lock_mode => "EX" -); - -my $search = CGI::Wiki::Search::SII->new( indexdb => $indexdb ); - -# Make formatter. -my %macros = ( - '@SEARCHBOX' => - qq(<form action="wiki.cgi" method="get"> - <input type="hidden" name="action" value="search"> - <input type="text" size="20" name="terms"> - <input type="submit" name="Search" value="Search"></form>), - qr/@INDEX_LINK\s+[[Category\s+([^]]+)]]/ => - sub { return qq(<a href="wiki.cgi?action=catindex&category=) . uri_escape($_[0]) . qq(">View all pages in Category $_[0]</a>) - } -); - -my $formatter = CGI::Wiki::Formatter::UseMod->new( - extended_links => 1, - implicit_links => 0, - allowed_tags => [qw(a p b strong i em pre small img table td tr th - br hr ul li center blockquote kbd div code - strike)], - macros => %macros, - node_prefix => 'wiki.cgi?', - edit_prefix => 'wiki.cgi?action=edit&id=' -); - -my %conf = ( store => $store, - search => $search, - formatter => $formatter ); - -my ($wiki, $locator, $q); -eval { - $wiki = CGI::Wiki->new(%conf); - $locator = CGI::Wiki::Plugin::Locator::UK->new( wiki => $wiki ); - - # Get CGI object, find out what to do. - $q = CGI->new; - - # Note $q->param('keywords') gives you the entire param string. - # We need this because usemod has URLs like foo.com/wiki.pl?This_Page - my $node = $q->param('id') || $q->param('title') || $q->param('keywords') || ""; - $node = $formatter->node_param_to_node_name( $node ); - - my $action = $q->param('action') || 'display'; - my $commit = $q->param('Save') || 0; - my $preview = $q->param('preview') || 0; - my $search_terms = $q->param('terms') || $q->param('search') || ''; - my $username = $q->param('username') || ''; - my $format = $q->param('format') || ''; - - # Alternative method of calling search, supported by usemod. - $action = 'search' if $q->param("search"); - - if ($commit) { - commit_node($node); - } elsif ($preview) { - preview_node($node); - } elsif ($action eq 'edit') { - edit_node($node); - } elsif ($action eq 'search') { - do_search($search_terms); - } elsif ($action eq 'show_backlinks') { - show_backlinks($node); - } elsif ($action eq 'index') { - my @all_nodes = $wiki->list_all_nodes(); - my @nodes = map { { name => $_, - param => $formatter->node_name_to_node_param($_) } - } sort @all_nodes; - process_template("site_index.tt", "index", { nodes => @nodes }); - } elsif ($action eq 'random') { - my @nodes = $wiki->list_all_nodes(); - $node = $nodes[int(rand(scalar(@nodes) + 1)) + 1]; - redirect_to_node($node); - exit 0; - } elsif ($action eq 'catindex') { - my $cat = $q->param('category'); - my @cats = $wiki->list_nodes_by_metadata( metadata_type => "category", - metadata_value => $cat ); - my @nodes = map { { name => $_, - param => $formatter->node_name_to_node_param($_) } - } sort @cats; - my ($template, $omit_header); - if ( $format eq "rdf" ) { - $template = "rdf_index.tt"; - $omit_header = 1; -# print "Content-type: application/xml\n\n"; - print "Content-type: text/plain\n\n"; - } else { - $template = "site_index.tt"; - } - process_template($template, "Category Index", - { nodes => @nodes, - category => { name => $q->escapeHTML($cat), - url => "wiki.cgi?Category_" - . uri_escape($formatter->node_name_to_node_param($cat)) - } - }, - {}, - $omit_header); - } elsif ($action eq 'find_within_distance') { - my $metres = $q->param("distance_in_metres"); - my @finds = $locator->find_within_distance( node => $node, - metres => $metres ); - my @nodes; - foreach my $find ( @finds ) { - my $distance = $locator->distance( from_node => $node, - to_node => $find, - unit => "metres" ); - push @nodes, { name => $find, - param => $formatter->node_name_to_node_param($find), - distance => $distance }; - } - @nodes = sort { $a->{distance} <=> $b->{distance} } @nodes; - process_template("site_index.tt", "index", - { nodes => @nodes, - origin => $node, - origin_param => $formatter->node_name_to_node_param($node), - limit => "$metres metres" } ); - } elsif ($action eq 'userstats') { - show_userstats( $username ); - } elsif ($action eq 'list_all_versions') { - list_all_versions($node); - } elsif ($action eq 'rss') { - my $feed = $q->param("feed"); - if ( !defined $feed or $feed eq "recent_changes" ) { - emit_recent_changes_rss(); - } elsif ( $feed eq "chef_moz" ) { - emit_chef_moz_rss( node => $node ); - } elsif ( $feed eq "chef_dan" ) { - emit_chef_dan_rss( node => $node ); - } else { - croak "Unknown RSS feed type '$feed'"; - } - } else { - my $version = $q->param("version"); - display_node($node, $version); - } -}; - -if ($@) { - my $error = $@; - warn $error; - print $q->header; - print qq(<html><head><title>ERROR</title></head><body> - <p>Sorry! Something went wrong. Please contact the - Wiki administrator at - <a href="mailto:kake\@earth.li">kake@earth.li</a> and quote - the following error message:</p><blockquote>) - . $q->escapeHTML($error) - . qq(</blockquote><p><a href="wiki.cgi">Return to the Wiki home page</a> - </body></html>); -} -exit 0; - -############################ subroutines ################################### - -sub redirect_to_node { - my $node = shift; - print $q->redirect($FULL_CGI_URL . $q->escape($formatter->node_name_to_node_param($node))); - exit 0; -} - -sub display_node { - my ($node, $version) = @_; - $node ||= "Home"; - - my %tt_vars; - - # If this is a Category node, check whether it exists and write it - # a stub node if it doesn't. - if ( $node =~ /^Category (.*)$/ ) { - $tt_vars{is_category_node} = 1; - $tt_vars{category_name} = $1; - - unless ( $wiki->node_exists($node) ) { - warn "Creating default node $node"; - $wiki->write_node( $node, - "@INDEX_LINK [[$node]]", - undef, - { username => "Auto Create", - comment => "Auto created category stub page" - } - ); - } - } - - my %current_data = $wiki->retrieve_node( $node ); - my $current_version = $current_data{version}; - undef $version if ($version && $version == $current_version); - my %criteria = ( name => $node ); - $criteria{version} = $version if $version;#retrieve_node default is current - - my %node_data = $wiki->retrieve_node( %criteria ); - my $raw = $node_data{content}; - if ( $raw =~ /^#REDIRECT\s+(.+?)\s+$/ ) { - my $redirect = $1; - # Strip off enclosing [[ ]] in case this is an extended link. - $redirect =~ s/^[[//; - $redirect =~ s/]]$//; - # See if this is a valid node, if not then just show the page as-is. - if ( $wiki->node_exists($redirect) ) { - redirect_to_node($redirect); - } - } - my $content = $wiki->format($raw); - my $modified = $node_data{last_modified}; - my %metadata = %{$node_data{metadata}}; - my $catref = $metadata{category}; - my $locref = $metadata{locale}; - my $os_x = $metadata{os_x}[0]; - my $os_y = $metadata{os_y}[0]; - my $phone = $metadata{phone}[0]; - my $website = $metadata{website}[0]; - my $hours_text = $metadata{opening_hours_text}[0]; - my $postcode = $metadata{postcode}[0]; - - my ($lat, $long); - if ( $os_x && $os_y ) { - my $point = Geography::NationalGrid::GB->new( Easting => $os_x, - Northing => $os_y ); - $lat = $point->latitude; - $long = $point->longitude; - } - - my @categories = map { { name => $_, - url => "wiki.cgi?Category_" - . uri_escape($formatter->node_name_to_node_param($_)) } } @$catref; - - my @locales = map { { name => $_, - url => "wiki.cgi?Category_" - . uri_escape($formatter->node_name_to_node_param($_)) } } @$locref; - - %tt_vars = ( %tt_vars, - content => $content, - categories => @categories, - locales => @locales, - os_x => $os_x, - os_y => $os_y, - phone => $phone, - website => $website, - hours_text => $hours_text, - postcode => $postcode, - latitude => $lat, - longitude => $long, - last_modified => $modified, - version => $node_data{version}, - node_name => $q->escapeHTML($node), - node_param => $q->escape($node) ); - - # We've undef'ed $version above if this is the current version. - $tt_vars{current} = 1 unless $version; - - if ($node eq "RecentChanges") { - my @recent = $wiki->list_recent_changes( days => 7 ); - @recent = map { {name => $q->escapeHTML($_->{name}), - last_modified => $q->escapeHTML($_->{last_modified}), - comment => $q->escapeHTML($_->{metadata}{comment}[0]), - username => $q->escapeHTML($_->{metadata}{username}[0]), - url => "wiki.cgi?" - . $q->escape($formatter->node_name_to_node_param($_->{name})) } - } @recent; - $tt_vars{recent_changes} = @recent; - $tt_vars{days} = 7; - process_template("recent_changes.tt", $node, %tt_vars); - } elsif ($node eq "Home") { - my @recent = $wiki->list_recent_changes( last_n_changes => 10); - @recent = map { {name => $q->escapeHTML($_->{name}), - last_modified => $q->escapeHTML($_->{last_modified}), - comment => $q->escapeHTML($_->{metadata}{comment}[0]), - username => $q->escapeHTML($_->{metadata}{username}[0]), - url => "wiki.cgi?" - . $q->escape($formatter->node_name_to_node_param($_->{name})) } - } @recent; - $tt_vars{recent_changes} = @recent; - process_template("home_node.tt", $node, %tt_vars); - } else { - process_template("node.tt", $node, %tt_vars); - } -} - -sub list_all_versions { - my $node = shift; - my %curr_data = $wiki->retrieve_node($node); - my $curr_version = $curr_data{version}; - croak "This is the first version" unless $curr_version > 1; - my @history; - for my $version ( 1 .. $curr_version ) { - my %node_data = $wiki->retrieve_node( name => $node, - version => $version ); - push @history, { version => $version, - modified => $node_data{last_modified}, - username => $node_data{metadata}{username}[0], - comment => $node_data{metadata}{comment}[0] }; - } - @history = reverse @history; - my %tt_vars = ( node => $node, - version => $curr_version, - history => @history ); - process_template("node_history.tt", $node, %tt_vars ); -} - -sub show_userstats { - my $username = shift; - croak "No username supplied to show_userstats" unless $username; - my @nodes = $wiki->list_recent_changes( - last_n_changes => 5, - metadata_is => { username => $username } - ); - @nodes = map { {name => $q->escapeHTML($_->{name}), - last_modified => $q->escapeHTML($_->{last_modified}), - comment => $q->escapeHTML($_->{metadata}{comment}[0]), - url => "wiki.cgi?" - . $q->escape($formatter->node_name_to_node_param($_->{name})) } - } @nodes; - my %tt_vars = ( last_five_nodes => @nodes, - username => $username ); - process_template("userstats.tt", "", %tt_vars); -} - -sub preview_node { - my $node = shift; - my $content = $q->param('content'); - $content =~ s/\r\n/\n/gs; - my $checksum = $q->param('checksum'); - my $categories_text = $q->param('categories'); - my $os_x = $q->param('os_x'); - my $os_y = $q->param('os_y'); - my $phone = $q->param('phone'); - my $website = $q->param('website'); - my $hours_text = $q->param('hours_text'); - my $postcode = $q->param('postcode'); - my $username = $q->param('username'); - my $comment = $q->param('comment'); - - my @categories = sort split("\r\n", $categories_text); - - if ($wiki->verify_checksum($node, $checksum)) { - my %tt_vars = ( content => $q->escapeHTML($content), - categories => @categories, - os_x => $os_x, - os_y => $os_y, - phone => $phone, - website => $website, - hours_text => $hours_text, - postcode => $postcode, - username => $username, - comment => $comment, - preview_html => $wiki->format($content), - checksum => $q->escapeHTML($checksum) ); - - process_template("edit_form.tt", $node, %tt_vars); - } else { - croak "edit_conflict needs to be brought up to date to cope with metadata"; - my %node_data = $wiki->retrieve_node($node); - my ($stored, $checksum) = @node_data{ qw( content checksum ) }; - my %tt_vars = ( checksum => $q->escapeHTML($checksum), - new_content => $q->escapeHTML($content), - stored => $q->escapeHTML($stored) ); - process_template("edit_conflict.tt", $node, %tt_vars); - } -} - -sub edit_node { - my $node = shift; - my %node_data = $wiki->retrieve_node($node); - my ($content, $checksum) = @node_data{ qw( content checksum ) }; - my %metadata = %{$node_data{metadata}}; - my $catref = $metadata{category}; - my $locref = $metadata{locale}; - my $os_x = $metadata{os_x}[0]; - my $os_y = $metadata{os_y}[0]; - my $phone = $metadata{phone}[0]; - my $website = $metadata{website}[0]; - my $hours_text = $metadata{opening_hours_text}[0]; - my $postcode = $metadata{postcode}[0]; - my %tt_vars = ( content => $q->escapeHTML($content), - checksum => $q->escapeHTML($checksum), - categories => $catref, - locales => $locref, - os_x => $os_x, - os_y => $os_y, - phone => $phone, - website => $website, - hours_text => $hours_text, - postcode => $postcode - ); - - process_template("edit_form.tt", $node, %tt_vars); -} - - -sub emit_recent_changes_rss { - my $rss = CGI::Wiki::Plugin::RSS::ModWiki->new( - wiki => $wiki, - site_name => "CGI::Wiki Test Site", - site_description => "A clone of the Open Community Guide To London", - make_node_url => sub { - my ( $node_name, $version ) = @_; - return "http://the.earth.li/~kake/cgi-bin/cgi-wiki/wiki.cgi?id=" - . uri_escape( - $wiki->formatter->node_name_to_node_param( $node_name ) - ) - . ";version=" . uri_escape($version); - }, - recent_changes_link => - "http://the.earth.li/~kake/cgi-bin/cgi-wiki/wiki.cgi?RecentChanges" - ); - - print "Content-type: text/plain\n\n"; - print $rss->recent_changes; - exit 0; -} - -sub emit_chef_moz_rss { - my %args = @_; - my $node = $args{node}; - my $rss = CGI::Wiki::Plugin::RSS::ChefMoz->new( - wiki => $wiki, - site_name => "CGI::Wiki Test Site", - site_description => "A clone of the Open Community Guide To London", - make_node_url => sub { - my ( $node_name, $version ) = @_; - return "http://the.earth.li/~kake/cgi-bin/cgi-wiki/wiki.cgi?id=" - . uri_escape( - $wiki->formatter->node_name_to_node_param( $node_name ) - ) - . ";version=" . uri_escape($version); - }, - full_node_prefix => - "http://the.earth.li/~kake/cgi-bin/cgi-wiki/wiki.cgi?", - default_city => "London", - default_country => "United Kingdom" - ); - - print "Content-type: text/plain\n\n"; - print $rss->chef_moz( node => $node ); - exit 0; -} - -sub emit_chef_dan_rss { - my %args = @_; - my $node = $args{node}; - my $rss = CGI::Wiki::Plugin::RSS::ChefMoz->new( - wiki => $wiki, - site_name => "CGI::Wiki Test Site", - site_description => "A clone of the Open Community Guide To London", - make_node_url => sub { - my ( $node_name, $version ) = @_; - if ( defined $version ) { - return "http://the.earth.li/~kake/cgi-bin/cgi-wiki/wiki.cgi?id=" - . uri_escape( - $wiki->formatter->node_name_to_node_param( $node_name ) - ) - . ";version=" . uri_escape($version); - } else { - return "http://the.earth.li/~kake/cgi-bin/cgi-wiki/wiki.cgi?" - . uri_escape( - $wiki->formatter->node_name_to_node_param( $node_name ) - ); - } - }, - full_node_prefix => "REMOVE - not used", - default_city => "London", - default_country => "United Kingdom" - ); - - print "Content-type: text/plain\n\n"; - print $rss->chef_dan( node => $node ); - exit 0; -} - - -sub process_template { - my ($template, $node, $vars, $conf, $omit_header) = @_; - - $vars ||= {}; - $conf ||= {}; - - my %tt_vars = ( %$vars, - site_name => "CGI::Wiki Test Site", - cgi_url => "wiki.cgi", - full_cgi_url => $FULL_CGI_URL, - contact_email => "kake@earth.li", - description => "", - keywords => "", - stylesheet => "http://grault.net/grubstreet/grubstreet.css", - home_link => "wiki.cgi", - home_name => "Home" ); - - if ($node) { - $tt_vars{node_name} = $q->escapeHTML($node); - $tt_vars{node_param} = $q->escape($formatter->node_name_to_node_param($node)); - } - - my %tt_conf = ( %$conf, - INCLUDE_PATH => "/home/kake/public_html/cgi-bin/cgi-wiki/templates" ); - - # Create Template object, print CGI header, process template. - my $tt = Template->new(%tt_conf); - print $q->header unless $omit_header; - unless ($tt->process($template, %tt_vars)) { - print qq(<html><head><title>ERROR</title></head><body><p> - Failed to process template: ) - . $tt->error - . qq(</p></body></html>); - } -} - - -sub commit_node { - my $node = shift; - my $content = $q->param('content'); - $content =~ s/\r\n/\n/gs; - my $checksum = $q->param('checksum'); - my $categories_text = $q->param('categories'); - my $locales_text = $q->param('locales'); - my $os_x = $q->param('os_x'); - my $os_y = $q->param('os_y'); - my $phone = $q->param('phone'); - my $website = $q->param('website'); - my $hours_text = $q->param('hours_text'); - my $postcode = $q->param('postcode'); - my $username = $q->param('username'); - my $comment = $q->param('comment'); - - my @categories = sort split("\r\n", $categories_text); - my @locales = sort split("\r\n", $locales_text); - - my $written = $wiki->write_node($node, $content, $checksum, - { category => @categories, - locale => @locales, - os_x => $os_x, - os_y => $os_y, - phone => $phone, - website => $website, - opening_hours_text => $hours_text, - postcode => $postcode, - username => $username, - comment => $comment } ); - if ($written) { - redirect_to_node($node); - } else { - croak "edit_conflict needs to be brought up to date to cope with metadata"; - my %node_data = $wiki->retrieve_node($node); - my ($stored, $checksum) = @node_data{ qw( content checksum ) }; - my %tt_vars = ( checksum => $q->escapeHTML($checksum), - new_content => $q->escapeHTML($content), - stored => $q->escapeHTML($stored) ); - process_template("edit_conflict.tt", $node, %tt_vars); - } -} - - -sub do_search { - my $terms = shift; - my %finds = $wiki->search_nodes($terms); -# my @sorted = sort { $finds{$a} cmp $finds{$b} } keys %finds; - my @sorted = sort keys %finds; - my @results = map { - { url => $q->escape($formatter->node_name_to_node_param($_)), - title => $q->escapeHTML($_) - } } @sorted; - my %tt_vars = ( results => @results, - num_results => scalar @results, - not_editable => 1, - search_terms => $q->escapeHTML($terms) ); - process_template("search_results.tt", "", %tt_vars); -} - -sub show_backlinks { - my $node = shift; - my @backlinks = $wiki->list_backlinks( node => $node ); - my @results = map { - { url => $q->escape($formatter->node_name_to_node_param($_)), - title => $q->escapeHTML($_) - } } sort @backlinks; - my %tt_vars = ( results => @results, - num_results => scalar @results, - not_editable => 1 ); - process_template("backlink_results.tt", $node, %tt_vars); -} -
Copied: tags/rel0_48 (from rev 666, trunk)
Deleted: tags/rel0_48/Changes =================================================================== --- trunk/Changes 2005-07-23 02:01:06 UTC (rev 666) +++ tags/rel0_48/Changes 2005-07-23 23:57:57 UTC (rev 669) @@ -1,490 +0,0 @@ -0.48 22 July 2005 - RDF enhancements: - Removed redundant "id" parameter specification from dc:source in - rdf:Description in RDF node listings. - Fixed bug that was causing all nodes to be flagged as a - geo:SpatialThing whether they were or not. - Ensured that ampersands and greater/less than symbols were properly - escaped so as not to be XML-toxic. - Added geo:lat, geo:long and RSS link attributes to items in - category/locale listings to facilitate integration with mapping - applications. - Added owl:sameAs property to RDF output for nodes that are redirects - to other nodes. - RSS feed now has correct timestamp (matching most recent item) and - matching Last-Modified HTTP header. - Reorder navigation bar to provide more logical groupings. - Add "format=plain" option for all-nodes index listing and associated - template plain_index.tt. - New message to appear on pages when you have been redirected - informing you of the fact. - Stop showing potentially very long map URLs in metadata section of - node display. - Replace ugly obliques in display of categories and locales with more - natural commas; change "locale" to "locales" in label. - Replace <label> tags in display_metadata.tt with <span - class="metadata_label">. - Wanted pages listing now displays, and sorts by, the number of nodes - pointing to each node. - Prevent redirect loops. - Add _ to the list of forbidden characters in node names. - -0.47 15 January 2005 - Fixed bug with list_all_versions for nodes with only one version. - Extended config changes to examples/reindex.pl (thanks jimbo). - Now require CGI::Wiki 0.62 to fix bug with deleting versions. - Try to ensure that a .htaccess file protecting wiki.conf is installed. - Allow for external URLs for Text Formatting help. - Home node recent changes box now flags new entries. - Made default city and country be blank; specify them if you want them. - Missing PREREQUISITE on Plucene added. - Added CSS id "maincontent" to exclude the navbar and footer. Misc - template tidying including removing old layout tables. - -0.46 21 December 2004 - Minor bug fixes: remove bogus edit link on index listings, - add missing default behaviour for geolocation - Update supersearch help text URL. - Add nofollow to robots meta tag. - Added new CSS class "node_name" for inline non-hyperlink references - to node names - see README.CSS for details. - Fix bug with diff display on nodes containing macros. - Fixed distance search paging bug. - Fixed bug that allowed autocreation of locales and categories with - trailing spaces in the name. - Config management refactoring. This should not result in any - user-visible changes, apart from introducing a new dependency on - Class::Accessor. - Make it clearer in documentation that overriding factory templates - is a risky activity. - Update feedback details and include URL of RT queue. - Add missing tests to MANIFEST so they are included with the - distribution. - -0.45 1 December 2004 - Made the geolocation stuff work worldwide. Squeeeeeee! - You can now choose between doing your distance calculations with - the British National Grid, the Irish National Grid, or a UTM - ellipsoid. If you wish to use anything other than the British - National Grid and you have pre-existing location data then you - will need to save an edit of each node with location data before - distance searches will work. - In less exciting news: - Fixed bug relating to lat/long representation. - Removed debugging warn accidentally left in last release. - Fixed some HTML validation errors. - -0.44 17 November 2004 - Remove all traces of display_categories, which was obsoleted but - not completely removed before. - Improved the efficiency of the search. - Fixed a couple of minor bugs in the search - note that node.tt - and supersearch.tt have changed. - Change the default indexer for new installs to Plucene. - Only run certain search-related tests if Plucene is installed. - -0.43 21 October 2004 - Fix broken navbar changes that crept into last release. - -0.42 20 October 2004 - Handle distance searching with OpenGuides::Supersearch instead of - find_within_distance action. - Fixed bug with paging on distance-only search (reported by Bob Walker). - Improved encapsulation in OpenGuides::Supersearch - accessors. - *INCOMPATIBLE CHANGE* Custom templates are now stored in - user-definable path, and their names are prefixed with custom_. - This only affects you if you have used the custom template support - introduced in 0.41. - Replace use of CGI::Wiki::Plugin::Geocache with improved node.tt. - -0.41 21 September 2004 - Added backlinks link to navbar. - Added some anti-robot tags to certain pages. - Fixed bug in install procedure - blank script_name should now get - installed as index.cgi - Added option of munging in custom lib paths on install. - Added option of custom templates for footer, license warning - on edit form, banner at top of page (see CUSTOMISATION file - for details). - Added new macro - used as eg @INDEX_LIST [[Locale Fulham]] - Also fixed the RSS reader macro - use this as eg - @RSS http://london.openguides.org/?action=rss;username=Kake - More semantic markup for metadata display - see README.CSS - -0.40 18 September 2004 - Recent Changes now shows changes in the past 24 hours, past week, - past fortnight, and past 30 days. - New preferences option to allow Recent Changes visit tracking. - Preferences now has an option for when your prefs expire. - Navbar added to diff and history pages. - The "omit help links" preference now actually works. - Set some pages to non-editable and non-deletable that should have been. - Recent Changes RSS fixed so "wiki:importance" is set correctly. - New "ignore_minor_edits" option for Recent Changes RSS. - Added RSS feeds for contributors, locales and categories. - -0.39 15 September 2004 - Split commit_node out into OpenGuides.pm in preparation for spam filter - Added option of using Plucene for searching. If you want to do this - (and it is recommended over the default of Search::InvertedIndex) - you will need to do two things: - - either delete your old indexes (they're just files in the index - directory) or use a different index directory - - reindex your entire wiki (see reindex.pl in the examples/ - directory of this distribution) - -0.38 26 July 2004 - Major improvements to the search result ordering (thanks to - Steve Jolly, Bob Walker and Billy Abbott for test cases). - -0.37 23 July 2004 - Fixed bug in diff view - the versions are the right way round now... - Fixed bug with links in historic view. Require CGI.pm 2.92 to - avoid escapeHTML bug. - -0.36 13 July 2004 - Added diff link to node template. - Fixed case sensitivity bug in index node autocreation. - Fixed bug with node history comments not being HTML-escaped. - -0.35 25 June 2004 - Forgot to add version prerequisite on CGI::Wiki. Don't use 0.34, - use this. - -0.34 25 June 2004 - Add facility to delete only certain revisions of a page - access - this from the node history page. - -0.33 20 June 2004 - Improve node history page to allow diffing between each version and - the previous one or the current one. - Test overhauls - you don't need to run the configuration step in - order to run the tests now, but you do need to have DBD::SQLite - for most of them. - Fixed template bug in display_metadata.tt that was stopping map - links being displayed for nodes with no address data (spotted - by Steve Jolly). - Removed inline style from recent_changes.tt. You will need to add - the styles table#recentchanges, td.recentchanges_meta, - td.recentchanges_user, td.recentchanges_node_name and - td.recentchanges_comment to your stylesheets. - td#map changed to td#map_link in edit_conflict.tt. - Added searching by distance from an arbitrary point (click on - Advanced Search). - Internal rejigging - extracted some methods from wiki.cgi to - OpenGuides.pm. - Added new preference for default edit type. - Reinstate apparently lost change from 0.26 to show IP rather than - "Anonymous" in RecentChanges. - More informative <title> tags for non-node (e.g. node version - history) pages. - -0.32 7 June 2004 - Change auto-creating behaviour of index nodes (categories and - locales): instead of being created on access they are created - when the referring node is committed. This fixes compliance with - RFC 2616 section 9.1.1 and prevents corrupted index nodes being - created accidentally. - -0.31 09 May 2004 - Created a new macro to allow the embedding of RSS feeds into - pages, using CGI::Wiki::Plugin::RSS::Reader. This allows you - to do this to produce a list of up to ten hyperlinks: - @RSS [http://example.com/example.rss] - - Numerous template tweaks to comply with the W3C's Web Content - Accessibility Guidelines (http://www.w3.org/TR/WAI-WEBCONTENT/): - - summaries for all HTML tables - - labels for all form input elements and some textual additions - to templates, such as '/' separators between navbar items, - because the guidelines specify links should not only be - separated by whitespace. If you don't want these to appear, - put the following in your stylesheet and they'll be hidden by - CSS (but will still appear for people using textual browsers or - screen readers): ".hidden { display: none }". - - the "lang" element (a two-letter code identifying the language - you're writing pages in) will now be added to the <html> tag on - all pages; a new question has been added to the configuration - script to ask for it and it will be stored in wiki.conf. - *** YOU WILL NEED TO RUN BUILD.PL AGAIN. *** - *** Remember to keep a backup copy of your old wiki.conf! *** - - Improved navigation for search results (next and previous n hits). - Removed underscores from page names in search results. - - Overhauled RDF output. Changes: - - everything is no longer classified as a restaurant(!) - - empty tags are no longer generated - - show categories, locales and OS x/y coords in invididual - node RDF view - - switch to W3C contact namespace for addressing data - - move homepage tag out of wiki metadata - - remove nonexistent "gs:" namespace from category indices - - logical structure improvements (subjects of pages are now - identified as spatial things if they are, or are RDF - descriptions if they're not, instead of being anonymous - FOAF topics) - - include city and country in RDF only for spatial things. - - Fixed bug that prevented automatic database initialization on - SQLite databases. - - Doc fix for private installations. - - Removed the following characters from the list of forbidden ones in - node names in newpage.cgi (a restriction which dates from all the way - back when we were using UseModWiki): " ! $ ^ ~ @ [ ] { } - - Removed newlines from output of search box macro. - - Reimplemented diffing using CGI::Wiki::Plugin::Diff as it seems the - change in 0.30 got lost. Removed OpenGuides::Diff.pm as we should not - be distributing it. - -0.30 29 December 2003 - Added method to allow admins to delete nodes. You will need to - explicitly enable this option in your wiki.conf, since it brings - with it the risk of accidental data loss. - - Major overhaul of templates - added numerous style hooks. See - examples/ for two stylesheet designs that take advantage of these. - Added new banner template for page headers. Also ensured presence - of navigation bar is consistent. - *** INCOMPATIBLE CHANGE: *** The navbar class in the stylesheet - has been renamed to, unsurprisingly, "navbar", for consistency - (from "toolbar"). *** YOU WILL NEED TO REWRITE YOUR STYLESHEET. *** - You are advised to create a duplicate wiki.cgi that reads its data - from your database but its stylesheet and templates from the new - ones in order to test them *before* deploying them. - - Added "FAQ", "How To Get Started" and "Wiki Etiquette" to the - navigation, under "Help" - these won't exist unless you create them - on your site, so at first the links serve as examples of - documentation you can provide. - - Modified preferences.cgi so that all the help links in the navbar - can be hidden, not just the text formatting link. - - Fixed some HTML validation bugs. - - Added multiple install and pretty URL notes to INSTALL. - - Removed pubcrawl stuff from distro for now - it doesn't really work. - - Changed to use CGI::Wiki::Plugin::Diff instead of OpenGuides::Diff. - -0.29 8 November 2003 - Expanded section in TROUBLESHOOTING about permissions problems. - - Diff.pm now absorbs trailing punctuation and spaces into words - it is diffing (to give less blocky results). - - SuperSearch.pm change NOT to use '-' instead of '!'. - -0.28 1 November 2003 - Allow running sites on SQLite databases. - - Fixed bug with navbar prompt in Build.PL (CPAN RT #3894). - Junked OpenGuides::Config completely to avoid database password - leakage, and easier install (CPAN RT #3916). - -0.27 1 November 2003 - Fixed bug with category/locale indexing - no longer case-sensitive. - - Fixed bug that had the supersearch results page offering an edit link. - - Revamp of search syntax to make the SuperSearch UI much more like - Google and Alta Vista. See the POD of SuperSearch.pm for details. - -0.26 9 October 2003 - Modified TROUBLESHOOTING to reflect the correct invocation for - Module::Build to install into a private directory. - - Show IP address for anonymous edits. - - Changed CGI.pm version dependency for Dom (CPAN bug #3895). - - Added check to OpenGuides::SuperSearch to stop it trying to - retrieve a nonexistent node when the search indexes have screwed up. - -0.25 23 September 2003 - Applied recent changes fix to front page feed as well. - - Search box now searches categories and locales as well as title and - body - so for example a search on "holborn & pubs" will DTRT. - - NOT and phrase search tests were passing even though they shouldn't - have been - skip them for now. - -0.24 8 September 2003 - Fix to recent changes so minor changes don't mask major ones. - - Fixed supersearch.cgi to use a template instead of CGI.pm to avoid - weird errors, also turned it into a module and added tests. - Strip whitespace from OS co-ords before storing in database. - -0.23 4 August 2003 - Removed the "POST_CHOMP" option as it was messing up textareas, added - a test to make sure this doesn't reoccur. - -0.22 4 August 2003 - Fixed bug with usernames containing spaces in recent changes/userstats. - - Try out create_makefile_pl => "passthrough" in Build.PL - - Minor fixes to tests to make them work with newest UseMod formatter. - - Prevented "Edit this page" from showing up on category indexes. - - Set TT "POST_CHOMP" option to strip unnecessary newlines from HTML. - - Fixed CPAN bug #3085 - quotes in change summary box. - - Added openguides_version template variable and added it to page - footer (CPAN request 3110). - -0.21 17 July 2003 - We no longer autogenerate a Makefile.PL, since it doesn't pick up - all the questions that need to be asked. Sorry. Use Module::Build - as detailed in INSTALL, since you won't be able to get the right - version of Text::WikiFormat installed without it in any case. - - Added version number to CGI.pm prereq as Alex McLintock hit a - version that didn't have unescape. - - Added a link on RecentChanges to the RSS version, and put an - autodiscovery tag for the RSS in the head section. - - Changed diff feature to hide checksums, which aren't necessary for - the user to see. Fixed a minor bug in the node history template so - that the diff links compare the selected version against the previous - one, not the original one every time. - -0.20 10 July 2003 - Fixed all the email addresses to openguides-dev@openguides.org. - -0.19 10 July 2003 - Extra checks that script_url ends in a '/'. - - Fixed small bug with edit conflict form - map link field was missing. - - Moved "content" div in a couple of templates to fix incorrect nesting. - - @INDEX_LINK macros now have optional title text like so: - @INDEX_LINK [[Category Pubs|Pubs]] - - Added preferences option for including or excluding text formatting - rules link in navbar. Enable this by setting text_formatting_node - in your config file. - - Added config option for including the navbar on the home page. - - Implemented minor edits. - - Fixed cookie to persist beyond session. - -0.18 16 June 2003 - Added a Makefile.PL as well as a Build.PL, for CPAN.pm users. - -0.17 15 June 2003 - Fixed OpenGuides::Utils to take note of dbhost. - - Added example stylesheet provided by the OxfordGuide team. - -0.16 26 May 2003 - Ivor fixed OpenGuides::Diff to diff by word instead of by character. - - Fixed edit conflict up so it works nicely when you click the - Save button as well as the Preview one. - - Added preferences option of displaying lat/long as deg-min-sec - instead of decimal (requested by James). - -0.15 18 May 2003 - Added Algorithm::Diff version dependency to prereqs, fixed bug - with preferences.cgi and blank script_name, fixed REDIRECT bug. - -0.14 17 May 2003 - Added "Wanted Pages" link to navbar, thanks to Simon Cozens for - the idea. - - Fixed many bugs noticed by Dominic Hargreaves and other Oxonians. - Many thanks to Dominic for making an Oxford OpenGuides install for - us to find bugs in. - -0.13 17 May 2003 - Added some more stylesheet hooks. - - Tweaked OpenGuides::Diff to make it testable, added a start at tests. - - Lat and long now stored to only 6dp instead of millions. - - Added edit field for map link. - -0.12 14 May 2003 - Added OpenGuides::CGI to manage cookies and things, used this to - do more code tidying. Added edit box position option to preferences. - -0.11 14 May 2003 - Added newpage.cgi for an easy way to create new pages. - - Took loads of repeated code (for extracting and packaging metadata - variables) out of wiki.cgi into OpenGuides::Template. - -0.10 11 May 2003 - Added OpenGuides::Diff to provide nice diff output between - node versions. - - Added OpenGuides::Template to handle Template Toolkit stuff in a - more testable and reusable way than just bunging it in wiki.cgi. - -0.09 10 May 2003 - Added OpenGuides::UK::PubCrawl and pubcrawl.cgi as a start at a - pub crawl generator. - - Added OpenGuides::Utils to make it easier to write little standalone - scripts like supersearch.cgi, pubcrawl. cgi, etc. Made wiki.cgi and - supersearch.cgi use it, and lost loads of duplicated code in the - process, hurrah. - -0.08 3 May 2003 - Added fuzzy matching capability - - action=index;index_type=fuzzy_title_match;index_value=hollborne - Someone needs to write a nice search box interface for this. - - Fixed edit_conflict template and preview method to cope with stale - checksum - passes through all the metadata properly now and offers - a side by side comparison of what you input and what is stored. - - RDF output for node is now encoding-agnostic (used to have UTF-8 - hardcoded). Also is now called as wiki.cgi?id=Node_Name;format=rdf - -0.07 3 May 2003 - Require CGI::Wiki 0.32 to avoid bug (again a Bob find!) where - committing a node with metadata but no content would die. - - Auto-created category/locale stub pages now added to Category Category - or Category Locales as appropriate. - - Added a couple of extra allowed HTML tags to cater for existing - grubstreet data. - - Fixed bug in OpenGuides::RDF - it used to die if called on a - nonexistent node, now it returns stuff with a wiki:version of 0. - -0.06 2 May 2003 - Fixed supersearch.cgi so it works with MySQL as well as Postgres - (thanks again to Bob for finding the bug). - -0.05 2 May 2003 - Redid the script and template installation so the script does - actually get called what you said it should be (code copied - somewhat from Siesta::Build). - - Fixed the support for non-local databases/IDENT authentication. - I think. - - Fixed the hardcoded 'wiki.cgi' in some of the templates (thanks Bob). - -0.04 29 April 2003 - First public release.
Copied: tags/rel0_48/Changes (from rev 667, trunk/Changes)