Changesets can be listed by changeset number.
The Git repository is here.
Changeset 74
Reapplied changes to Typo 4.0.0 from previous version in order to
configure it for use on the RISC OS Open site. Hopefully, the RISC
OS Open theme can be sorted out so that it works with no further
core changes.
Note that this configured v4.0.0 installation has not been tested.
- Comitted by: adh
- Date: Monday August 07 22:34:29 2006 (over 18 years ago)
Affected files:
- rool/rails/typo/trunk/config/database.yml-
- rool/rails/typo/trunk/app/controllers/redirect_controller.rb (diff)
- rool/rails/typo/trunk/config/environment.rb (diff)
- rool/rails/typo/trunk/config/routes.rb (diff)
- rool/rails/typo/trunk/public/dispatch.cgi (diff)
- rool/rails/typo/trunk/public/dispatch.fcgi (diff)
- rool/rails/typo/trunk/public/dispatch.rb (diff)
rool/rails/typo/trunk/app/controllers/redirect_controller.rb:
prev. | current | |
path = url_root + path unless url_root.nil? or path[0,url_root.length] == url_root | ||
redirect_to path | ||
else | ||
13 | | |
13 | render :text => '<html><head><title>Page not found</title></head><body>Internal redirection error - page not found.<br>Please consult the system adminstrator.</body></html>', :status => 404 | |
end | ||
end | ||
end |
rool/rails/typo/trunk/config/environment.rb:
prev. | current | |
# Bootstrap the Rails environment, frameworks, and default configuration | ||
require File.join(File.dirname(__FILE__), 'boot') | ||
10 | # Location of application relative to document root in terms of | |
11 | # URLs (i.e. according to the web server configuration, not the | |
12 | # filesystem location). | |
13 | ||
14 | PATH_PREFIX = '/rails/typo' | |
15 | ||
Rails::Initializer.run do |config| | ||
17 | # We don't run in the document root, so images etc. must come from | |
18 | # a non-root location too. Hijack the 'asset host' facility to get | |
19 | # helper-based links pointing in the right place. | |
20 | config.action_controller.asset_host = PATH_PREFIX | |
21 | ||
# Skip frameworks you're not going to use | ||
# config.frameworks -= [ :action_web_service, :action_mailer ] | ||
... | ... | |
# Force all environments to use the same logger level | ||
# (by default production uses :info, the others :debug) | ||
37 | | |
48 | config.log_level = :warn | |
# Use the database for sessions instead of the file system | ||
# (create the session table with 'rake create_sessions_table') | ||
... | ... | |
# Include your application configuration below | ||
83 | # Allow multiple Rails applications by giving the session cookie a | |
84 | # unique prefix. | |
85 | ||
86 | ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:session_key] = 'typoapp_session_id' | |
87 | ||
# Load included libraries. | ||
require 'redcloth' | ||
require 'bluecloth' |
rool/rails/typo/trunk/config/routes.rb:
prev. | current | |
ActionController::Routing::Routes.draw do |map| | ||
# default | ||
4 | | |
5 | | |
4 | map.index PATH_PREFIX + '/', :controller => 'articles', :action => 'index' | |
5 | map.admin PATH_PREFIX + '/admin', :controller => 'admin/general', :action => 'index' | |
# admin/comments controller needs parent article id | ||
8 | | |
8 | map.connect PATH_PREFIX + '/admin/comments/article/:article_id/:action/:id', | |
:controller => 'admin/comments', :action => nil, :id => nil | ||
10 | | |
10 | map.connect PATH_PREFIX + '/admin/trackbacks/article/:article_id/:action/:id', | |
:controller => 'admin/trackbacks', :action => nil, :id => nil | ||
12 | | |
12 | map.connect PATH_PREFIX + '/admin/content/:action/:id', :controller => 'admin/content' | |
# make rss feed urls pretty and let them end in .xml | ||
# this improves caches_page because now apache and webrick will send out the | ||
# cached feeds with the correct xml mime type. | ||
17 | | |
18 | | |
19 | | |
20 | | |
17 | map.xml PATH_PREFIX + '/xml/itunes/feed.xml', :controller => 'xml', :action => 'itunes' | |
18 | map.xml PATH_PREFIX + '/xml/articlerss/:id/feed.xml', :controller => 'xml', :action => 'articlerss' | |
19 | map.xml PATH_PREFIX + '/xml/commentrss/feed.xml', :controller => 'xml', :action => 'commentrss' | |
20 | map.xml PATH_PREFIX + '/xml/trackbackrss/feed.xml', :controller => 'xml', :action => 'trackbackrss' | |
22 | | |
23 | | |
24 | | |
25 | | |
26 | | |
27 | | |
22 | map.xml PATH_PREFIX + '/xml/:format/feed.xml', :controller => 'xml', :action => 'feed', :type => 'feed' | |
23 | map.xml PATH_PREFIX + '/xml/:format/:type/feed.xml', :controller => 'xml', :action => 'feed' | |
24 | map.xml PATH_PREFIX + '/xml/:format/:type/:id/feed.xml', :controller => 'xml', :action => 'feed' | |
25 | map.xml PATH_PREFIX + '/xml/rss', :controller => 'xml', :action => 'feed', :type => 'feed', :format => 'rss' | |
26 | map.xml PATH_PREFIX + '/sitemap.xml', :controller => 'xml', :action => 'feed', :format => 'googlesitemap', :type => 'sitemap' | |
27 | ||
# allow neat perma urls | ||
29 | | |
29 | map.connect PATH_PREFIX + '/articles', | |
:controller => 'articles', :action => 'index' | ||
31 | | |
31 | map.connect PATH_PREFIX + '/articles/page/:page', | |
:controller => 'articles', :action => 'index', | ||
:page => /\d+/ | ||
35 | | |
35 | map.connect PATH_PREFIX + '/articles/:year/:month/:day', | |
:controller => 'articles', :action => 'find_by_date', | ||
:year => /\d{4}/, :month => /\d{1,2}/, :day => /\d{1,2}/ | ||
38 | | |
38 | map.connect PATH_PREFIX + '/articles/:year/:month', | |
:controller => 'articles', :action => 'find_by_date', | ||
:year => /\d{4}/, :month => /\d{1,2}/ | ||
41 | | |
41 | map.connect PATH_PREFIX + '/articles/:year', | |
:controller => 'articles', :action => 'find_by_date', | ||
:year => /\d{4}/ | ||
45 | | |
45 | map.connect PATH_PREFIX + '/articles/:year/:month/:day/page/:page', | |
:controller => 'articles', :action => 'find_by_date', | ||
:year => /\d{4}/, :month => /\d{1,2}/, :day => /\d{1,2}/, :page => /\d+/ | ||
48 | | |
48 | map.connect PATH_PREFIX + '/articles/:year/:month/page/:page', | |
:controller => 'articles', :action => 'find_by_date', | ||
:year => /\d{4}/, :month => /\d{1,2}/, :page => /\d+/ | ||
51 | | |
51 | map.connect PATH_PREFIX + '/articles/:year/page/:page', | |
:controller => 'articles', :action => 'find_by_date', | ||
:year => /\d{4}/, :page => /\d+/ | ||
55 | | |
55 | map.connect PATH_PREFIX + '/articles/:year/:month/:day/:title', | |
:controller => 'articles', :action => 'permalink', | ||
:year => /\d{4}/, :day => /\d{1,2}/, :month => /\d{1,2}/ | ||
59 | | |
59 | map.connect PATH_PREFIX + '/articles/category/:id', | |
:controller => 'articles', :action => 'category' | ||
61 | | |
61 | map.connect PATH_PREFIX + '/articles/category/:id/page/:page', | |
:controller => 'articles', :action => 'category', | ||
:page => /\d+/ | ||
65 | | |
65 | map.connect PATH_PREFIX + '/articles/tag/:id', | |
:controller => 'articles', :action => 'tag' | ||
67 | | |
67 | map.connect PATH_PREFIX + '/articles/tag/:id/page/:page', | |
:controller => 'articles', :action => 'tag', | ||
:page => /\d+/ | ||
71 | | |
71 | map.connect PATH_PREFIX + '/pages/*name',:controller => 'articles', :action => 'view_page' | |
73 | | |
73 | map.connect PATH_PREFIX + '/stylesheets/theme/:filename', | |
:controller => 'theme', :action => 'stylesheets' | ||
75 | | |
75 | map.connect PATH_PREFIX + '/javascript/theme/:filename', | |
:controller => 'theme', :action => 'javascript' | ||
77 | | |
77 | map.connect PATH_PREFIX + '/images/theme/:filename', | |
:controller => 'theme', :action => 'images' | ||
80 | | |
80 | map.connect PATH_PREFIX + '/plugins/filters/:filter/:public_action', | |
:controller => 'textfilter', :action => 'public_action' | ||
# Kill attempts to connect directly to the theme controller. | ||
# Ideally we'd disable these by removing the default route (below), | ||
# but that breaks too many things for Typo 2.5. | ||
86 | | |
86 | map.connect PATH_PREFIX + '/theme/*stuff', | |
:controller => 'theme', :action => 'error' | ||
# Allow legacy urls to still work | ||
90 | | |
90 | map.connect PATH_PREFIX + '/:controller/:action/:id' | |
92 | | |
92 | map.connect PATH_PREFIX + '/*from', :controller => 'redirect', :action => 'redirect' | |
end |
rool/rails/typo/trunk/public/dispatch.cgi:
prev. | current | |
1 | ||
1 | #!/bin/env ruby | |
require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT) | ||
rool/rails/typo/trunk/public/dispatch.fcgi:
prev. | current | |
1 | ||
1 | #!/bin/env ruby | |
# | ||
# You may specify the path to the FastCGI crash log (a log of unhandled | ||
# exceptions which forced the FastCGI instance to exit, great for debugging) |
rool/rails/typo/trunk/public/dispatch.rb:
prev. | current | |
1 | ||
1 | #!/bin/ruby | |
require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT) | ||