ref: master
plugins/google_cse/lib/google_cse_plugin.rb
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 |
class GoogleCsePlugin < Noosfero::Plugin def self.plugin_name "GoogleCsePlugin" end def self.plugin_description _("A plugin that uses the Google Custom Search as Noosfero general search engine.") end def google_id environment.settings[:google_cse_id] end def self.results_url_path '/plugin/google_cse/results' end def body_beginning unless google_id.blank? expanded_template('search-box.rhtml', {:selector => '#top-search, #footer-search', :plugin => self}) end end end |