From 7803f4e28220c11ce6250fbf28e93cd1411a6e48 Mon Sep 17 00:00:00 2001 From: Sem Date: Fri, 30 Dec 2011 04:50:08 +0100 Subject: No more config file. Cofiguration is now set by settings. --- views/xml/opensearch/description.php | 42 +++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 15 deletions(-) (limited to 'views/xml/opensearch/description.php') diff --git a/views/xml/opensearch/description.php b/views/xml/opensearch/description.php index 78aadc699..586cadf83 100644 --- a/views/xml/opensearch/description.php +++ b/views/xml/opensearch/description.php @@ -1,6 +1,6 @@ email; +$shortname = elgg_get_plugin_setting('shortname', 'opensearch'); +$description = elgg_get_plugin_setting('desc', 'opensearch'); +$longname = elgg_get_plugin_setting('longname', 'opensearch'); +$icon = elgg_get_plugin_setting('icon', 'opensearch'); +$tags = elgg_get_plugin_setting('tags', 'opensearch'); +$lang = string_to_tag_array(elgg_get_plugin_setting('lang', 'opensearch')); +$query = elgg_get_plugin_setting('query', 'opensearch'); + +if (empty($shortname)) { + $shortname = $site->name; +} +if (empty($description)) { + $description = elgg_echo('opensearch:engine', array(elgg_get_site_entity()->name)); +} +if (empty($icon)) { + $icon = '_graphics/favicon.ico'; +} +if (empty($lang)) { + $lang = 'en-us'; +} + + $rss_url = elgg_normalize_url('search/?q={searchTerms}&view=opensearch_rss'); $rss_url = elgg_format_url($rss_url); $html_url = elgg_normalize_url('search/?q={searchTerms}'); @@ -35,11 +48,10 @@ $site_url = elgg_get_site_url(); email; ?> - - - - - + + + + -- cgit v1.2.3