public
Description: This contains various plugins for Feather
Clone URL: git://github.com/eldiablo/feather-plugins.git
Search Repo:
Click here to lend your support to: feather-plugins and make a donation at www.pledgie.com !
whoisjake (author)
Sat May 10 14:38:11 -0700 2008
commit  32044e0cf46643fb3bbaddc4539c460f72df8a28
tree    6b2fb5aa28b4105fc9657dc7819e26eaf31d0413
parent  8a23772d42e56d48cd849354e4f03bf3514c05f8
100644 20 lines (16 sloc) 0.824 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
require File.join(File.join(File.dirname(__FILE__), "controllers"), "tags")
require File.join(File.join(File.dirname(__FILE__), "models"), "tag")
require File.join(File.join(File.dirname(__FILE__), "models"), "tagging")
require File.join(File.join(File.dirname(__FILE__), "lib"), "article")
require File.join(File.join(File.dirname(__FILE__), "lib"), "global_helpers")
 
include Merb::Cache::ControllerInstanceMethods
 
Merb::Router.prepend do |r|
  r.match('/tags/:id').to(:controller => 'tags', :action =>'show').name(:tag)
end
 
Hooks::View.register_partial_view "article_form_fields", "tag_field"
Hooks::View.register_partial_view "meta_section", "tag_list"
Hooks::View.register_partial_view "sidebar", "tag_cloud"
 
Hooks::Events.register_event(:after_save_article) do |args|
  args.first.create_tags
  expire_all_pages
end