public
Description: Radiant extension that aids in the process of migrating from the Mephisto blogging engine to Radiant CMS
Homepage:
Clone URL: git://github.com/martinbtt/radiant-import-mephisto.git
franklouwers (author)
Wed Dec 10 10:47:27 -0800 2008
martinbtt (committer)
Tue Dec 16 06:55:35 -0800 2008
radiant-import-mephisto / import_mephisto_extension.rb
100644 27 lines (20 sloc) 0.94 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Uncomment this if you reference any of your controllers in activate
# require_dependency 'application'
 
class ImportMephistoExtension < Radiant::Extension
  version "0.1"
  description "Import the contents of a Mephisto blog into Radiant"
  url "http://github.com/martinbtt/radiant-import-mephisto"
  
  # redirect old style routes to new. Example:
  # OLD: http://www.beyondthetype.com/2008/1/3/new-rss-feed-url
  # NEW: http://www.beyondthetype.com/articles/2008/01/03/new-rss-feed-url/
  define_routes do |map|
      map.connect ':year/:month/:day/:slug', :controller => 'mephisto', :action => 'redirect',
                  :year => /\d{4}/, :month => /\d{1,2}/, :day => /\d{1,2}/
      
                   
    end
  
  def activate
    # admin.tabs.add "Import Mephisto", "/admin/import_mephisto", :after => "Layouts", :visibility => [:all]
  end
  
  def deactivate
    # admin.tabs.remove "Import Mephisto"
  end
  
end