Changeset 336
- Timestamp:
- 03/26/04 17:25:47 (5 years ago)
- Location:
- trunk
- Files:
-
- 4 modified
-
Build.PL (modified) (3 diffs)
-
newpage.cgi (modified) (1 diff)
-
preferences.cgi (modified) (4 diffs)
-
wiki.cgi (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Build.PL
r312 r336 49 49 type => "y_n" 50 50 }, 51 { question => "What's the URL of the wiki's stylesheet?",51 { question => "What's the URL of the site's stylesheet?", 52 52 variable => "stylesheet_url" 53 53 }, 54 { question => "What's the wikicalled? (should be unique)",54 { question => "What's the site called? (should be unique)", 55 55 variable => "site_name", 56 default => " OpenGuides Wiki"56 default => "My OpenGuides Site" 57 57 }, 58 58 { question => "Do you want the navigation bar included on the home page?", … … 65 65 default => "Home" 66 66 }, 67 { question => "How would you describe the wiki?",67 { question => "How would you describe the site?", 68 68 variable => "site_desc", 69 default => " Development site for openguides.org's software"70 }, 71 { question => "What city is the wikibased in?",69 default => "A guide to [my city]" 70 }, 71 { question => "What city is the site based in?", 72 72 variable => "default_city", 73 73 default => "London" 74 74 }, 75 { question => "What country is the wikibased in?",75 { question => "What country is the site based in?", 76 76 variable => "default_country", 77 77 default => "United Kingdom" 78 78 }, 79 { question => "Contact email address for the wiki admin?", 79 { question => "What language will the site be in? (Please give an ISO language code.)", 80 variable => "default_language", 81 default => "en" 82 }, 83 { question => "Contact email address for the site administrator?", 80 84 variable => "contact_email" 81 85 }, … … 111 115 my @answers; 112 116 113 # Database type is speshull - can be one of three.117 # It is an ancient Configurer, and he chooseth one of three. 114 118 my $dbtype; 115 119 my $dbtype_qu = "what type of database do you want the site to run on? postgres/mysql/sqlite"; -
trunk/newpage.cgi
r320 r336 1 #!/usr/bin/perl -w 1 #!/usr/local/bin/perl 2 3 use warnings; 2 4 use strict; 3 5 -
trunk/preferences.cgi
r290 r336 1 #!/usr/ bin/perl -w1 #!/usr/local/bin/perl -w 2 2 3 3 use strict; 4 4 use CGI; 5 5 use lib '/home/earle/lib'; 6 6 use Config::Tiny; 7 7 use OpenGuides::CGI; … … 13 13 my $cgi = CGI->new(); 14 14 my $action = $cgi->param('action') || ''; 15 my $language = $config->{_}->{default_language}; 15 16 16 17 if ( $action eq "set_preferences" ) { … … 43 44 template => "preferences.tt", 44 45 cookies => $cookie, 45 vars => { not_editable => 1, 46 vars => { 47 language => $language, 48 not_editable => 1, 46 49 username => $username, 47 50 include_geocache_link => $gc_link, … … 63 66 template => "preferences.tt", 64 67 vars => { %prefs, 68 language => $language, 65 69 not_editable => 1, 66 70 show_form => 1 -
trunk/wiki.cgi
r328 r336 1 #!/usr/local/bin/perl -w1 #!/usr/local/bin/perl 2 2 3 3 use strict; … … 30 30 # Read in configuration values from config file. 31 31 my $script_name = $config->{_}->{script_name}; 32 my $script_url = $config->{_}->{script_url}; 32 my $script_url = $config->{_}->{script_url}; 33 my $language = $config->{_}->{default_language}; 33 34 34 35 # Ensure that script_url ends in a '/' - this is done in Build.PL but … … 47 48 48 49 # Note $q->param('keywords') gives you the entire param string. 49 # We need this because usemod has URLs like foo.com/wiki.pl?This_Page50 # We need this to do URLs like foo.com/wiki.cgi?This_Page 50 51 my $node = $q->param('id') || $q->param('title') || $q->param('keywords') || ""; 51 52 $node = $formatter->node_param_to_node_name( $node ); … … 230 231 metadata => $node_data{metadata} ); 231 232 232 %tt_vars = ( %tt_vars, 233 %tt_vars = ( 234 %tt_vars, 233 235 %metadata_vars, 234 236 content => $content, … … 237 239 version => $node_data{version}, 238 240 node_name => $q->escapeHTML($node), 239 node_param => $q->escape($node) ); 241 node_param => $q->escape($node), 242 language => $language, ); 243 240 244 241 245 # We've undef'ed $version above if this is the current version.
