aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2011-12-30 04:50:08 +0100
committerSem <sembrestels@riseup.net>2011-12-30 04:50:08 +0100
commit7803f4e28220c11ce6250fbf28e93cd1411a6e48 (patch)
tree0340113d2a5e8ce2edd43af0feb1ae45ffafad84 /views/default
parent7f6149b755b42125e18b767c7a361132c7a2f8c9 (diff)
downloadelgg-7803f4e28220c11ce6250fbf28e93cd1411a6e48.tar.gz
elgg-7803f4e28220c11ce6250fbf28e93cd1411a6e48.tar.bz2
No more config file. Cofiguration is now set by settings.
Diffstat (limited to 'views/default')
-rw-r--r--views/default/plugins/opensearch/settings.php97
1 files changed, 97 insertions, 0 deletions
diff --git a/views/default/plugins/opensearch/settings.php b/views/default/plugins/opensearch/settings.php
new file mode 100644
index 000000000..23ba19538
--- /dev/null
+++ b/views/default/plugins/opensearch/settings.php
@@ -0,0 +1,97 @@
+<?php
+/**
+ * Opensearch plugin settings
+ */
+
+// set default value
+if (!isset($vars['entity']->shortname)) {
+ $vars['entity']->shortname = elgg_get_site_entity()->name;
+}
+if (!isset($vars['entity']->desc)) {
+ $vars['entity']->desc = elgg_echo('opensearch:engine', array(elgg_get_site_entity()->name));
+}
+if (!isset($vars['entity']->longname)) {
+ $vars['entity']->longname = elgg_get_site_entity()->description;
+}
+if (!isset($vars['entity']->icon)) {
+ $vars['entity']->icon = '_graphics/favicon.ico';
+}
+if (!isset($vars['entity']->tags)) {
+ $vars['entity']->tags = '';
+}
+if (!isset($vars['entity']->lang)) {
+ $vars['entity']->lang = 'en-us';
+}
+if (!isset($vars['entity']->query)) {
+ $vars['entity']->query = '';
+}
+
+echo '<div>';
+echo '<label>'.elgg_echo('opensearh:settings:shortname').'</label> ';
+echo elgg_echo('opensearh:settings:shortname:description');
+echo ' ';
+echo elgg_view('input/text', array(
+ 'name' => 'params[shortname]',
+ 'value' => $vars['entity']->shortname,
+));
+echo '</div>';
+
+echo '<div>';
+echo '<label>'.elgg_echo('opensearh:settings:desc').'</label> ';
+echo elgg_echo('opensearh:settings:desc:description');
+echo ' ';
+echo elgg_view('input/text', array(
+ 'name' => 'params[desc]',
+ 'value' => $vars['entity']->desc,
+));
+echo '</div>';
+
+echo '<div>';
+echo '<label>'.elgg_echo('opensearh:settings:longname').'</label> ';
+echo elgg_echo('opensearh:settings:longname:description');
+echo ' ';
+echo elgg_view('input/text', array(
+ 'name' => 'params[longname]',
+ 'value' => $vars['entity']->longname,
+));
+echo '</div>';
+
+echo '<div>';
+echo '<label>'.elgg_echo('opensearh:settings:icon').'</label> ';
+echo elgg_echo('opensearh:settings:icon:description');
+echo ' ';
+echo elgg_view('input/text', array(
+ 'name' => 'params[icon]',
+ 'value' => $vars['entity']->icon,
+));
+echo '</div>';
+
+echo '<div>';
+echo '<label>'.elgg_echo('opensearh:settings:tags').'</label> ';
+echo elgg_echo('opensearh:settings:tags:description');
+echo ' ';
+echo elgg_view('input/text', array(
+ 'name' => 'params[tags]',
+ 'value' => $vars['entity']->tags,
+));
+echo '</div>';
+
+echo '<div>';
+echo '<label>'.elgg_echo('opensearh:settings:lang').'</label> ';
+echo elgg_echo('opensearh:settings:lang:description');
+echo ' ';
+echo elgg_view('input/text', array(
+ 'name' => 'params[lang]',
+ 'value' => $vars['entity']->lang,
+));
+echo '</div>';
+
+echo '<div>';
+echo '<label>'.elgg_echo('opensearh:settings:query').'</label> ';
+echo elgg_echo('opensearh:settings:query:description');
+echo ' ';
+echo elgg_view('input/text', array(
+ 'name' => 'params[query]',
+ 'value' => $vars['entity']->query,
+));
+echo '</div>';