Changeset 1088
- Timestamp:
- 06/17/07 16:13:47 (1 year ago)
- Files:
-
- trunk/Build.PL (modified) (2 diffs)
- trunk/INSTALL (modified) (2 diffs)
- trunk/lib/OpenGuides/Build.pm (modified) (3 diffs)
- trunk/lib/OpenGuides/Config.pm (modified) (4 diffs)
- trunk/static (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Build.PL
r1058 r1088 105 105 licence_name licence_url licence_info_url moderation_requires_password 106 106 enable_node_image enable_common_categories enable_common_locales 107 spam_detector_module 107 spam_detector_module static_path static_url 108 108 ) ) { 109 109 my $q_method = $var . "__qu"; … … 376 376 ] ); 377 377 378 $build->config_data( __static_files => [ 379 # XXX to be supplied when we have some 380 ] ); 381 378 382 # Finally write the build script. 379 383 $build->create_build_script; trunk/INSTALL
r1037 r1088 284 284 to the question of whether the edit should be considered to be spam. 285 285 286 "What directory should we install static content (CSS, images, javascript) 287 to?" 288 289 OpenGuides comes with some static content which will be installed 290 automatically. 291 292 "What is the URL corresponding to the static content?" 293 294 You will need to configure the above directory in your web server, then 295 input the URL the content will be visible at here. 296 286 297 "Distance calculation methods available are: 287 298 1) British National Grid … … 331 342 provide site-specific design. These templates are stored in the directory 332 343 custom-templates/ by default and are described in the file CUSTOMISATION. 344 333 345 The id and class tags used for the CSS in OpenGuides are specified in 334 346 README.CSS. trunk/lib/OpenGuides/Build.pm
r1028 r1088 60 60 my $custom_template_path = $config->custom_template_path; 61 61 my $custom_lib_path = $config->custom_lib_path; 62 my $static_path = $config->static_path; 62 63 my @extra_scripts = @{ $self->config_data( "__extra_scripts" ) }; 63 64 my @templates = @{ $self->config_data( "__templates" ) }; 65 my @static_files = @{ $self->config_data( "__static_files" ) }; 64 66 65 67 print "Installing scripts to $install_directory:\n"; … … 140 142 if ( $FAKE ) { 141 143 print "templates/$template -> $template_path/$template (FAKE)\n"; 142 } else {143 $self->copy_if_modified(from => "templates/$template", to_dir => $template_path, flatten => 1)144 } else { 145 $self->copy_if_modified(from => "templates/$template", to_dir => $template_path, flatten => 1) 144 146 or print "Skipping $template_path/$template (unchanged)\n"; 145 147 } … … 151 153 print "Creating directory $custom_template_path.\n"; 152 154 mkdir $custom_template_path or warn "Could not make $custom_template_path"; 155 } 156 } 157 158 print "Installing static files to $static_path:\n"; 159 foreach my $static_file ( @static_files ) { 160 if ( $FAKE ) { 161 print "static/$static_file -> $static_path/$static_file (FAKE)\n"; 162 } else { 163 $self->copy_if_modified(from => "static/$static_file", to_dir => $static_path, flatten => 1) 164 or print "Skipping $static_path/$static_file (unchanged)\n"; 153 165 } 154 166 } trunk/lib/OpenGuides/Config.pm
r1037 r1088 22 22 licence_name licence_url licence_info_url moderation_requires_password 23 23 enable_node_image enable_common_categories enable_common_locales 24 spam_detector_module 24 spam_detector_module static_path static_url 25 25 ); 26 26 my @questions = map { $_ . "__qu" } @variables; … … 109 109 licence_info_url => "", 110 110 spam_detector_module => "", 111 static_path => "/usr/local/share/openguides/static", 111 112 ); 112 113 … … 190 191 licence_info_url => "What is the URL to your local page about your licensing policy?", 191 192 spam_detector_module => "What module would you like to use for spam detection? (optional)", 193 static_path => "What directory should we install static content (CSS, images, javascript) to?", 194 static_url => "What is the URL corresponding to the static content?", 192 195 ); 193 196 … … 316 319 =item * spam_detector_module 317 320 321 =item * static_path 322 323 =item * static_url 324 318 325 =back 319 326
