<?php
/**
- * Elgg core search.
- *
- * @package Elgg
- * @subpackage Core
- * @author Curverider Ltd <info@elgg.com>, The MITRE Corporation <http://www.mitre.org>
- * @link http://elgg.org/
- */
+ * Elgg core search.
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd <info@elgg.com>, The MITRE Corporation <http://www.mitre.org>
+ * @link http://elgg.org/
+ */
/**
* Initialise search helper functions.
// add in CSS for search elements
elgg_extend_view('css', 'search/css');
+
+ // extend view for elgg topbar search box
+ elgg_extend_view('header/extend', 'search/search_box');
}
/**
+++ /dev/null
-<?php
-
-if (array_key_exists('value', $vars)) {
- $value = $vars['value'];
-} elseif ($value = get_input('q', get_input('tag', NULL))) {
- $value = $value;
-} else {
- $value = elgg_echo('search');
-}
-
-$value = stripslashes($value);
-
-?>
-
-<form id="searchform" action="<?php echo $vars['url']; ?>pg/search/" method="get">
- <input type="text" size="21" name="q" value="<?php echo $value; ?>" onclick="if (this.value=='<?php echo elgg_echo('search'); ?>') { this.value='' }" class="search_input" />
- <input type="submit" value="<?php echo elgg_echo('search:go'); ?>" class="search_submit_button" />
-</form>
--- /dev/null
+<?php
+
+if (array_key_exists('value', $vars)) {
+ $value = $vars['value'];
+} elseif ($value = get_input('q', get_input('tag', NULL))) {
+ $value = $value;
+} else {
+ $value = elgg_echo('search');
+}
+
+$value = stripslashes($value);
+
+?>
+
+<div id="elgg_search">
+ <form id="searchform" action="<?php echo $vars['url']; ?>pg/search/" method="get">
+ <input type="text" size="21" name="q" value="<?php echo elgg_echo('search'); ?>" onblur="if (this.value=='') { this.value='<?php echo elgg_echo('search'); ?>' }" onfocus="if (this.value=='<?php echo elgg_echo('search'); ?>') { this.value='' };" class="search_input" />
+ <input type="submit" value="<?php echo elgg_echo('search:go'); ?>" class="search_submit_button" />
+ </form>
+</div>
\ No newline at end of file
// insert a view which can be extended
echo elgg_view('header/extend');
?>
-
- <div id="elgg_search">
- <form id="searchform" action="<?php echo $vars['url']; ?>pg/search/" method="get">
- <input type="text" size="21" name="tag" value="<?php echo elgg_echo('search'); ?>" onblur="if (this.value=='') { this.value='<?php echo elgg_echo('search'); ?>' }" onfocus="if (this.value=='<?php echo elgg_echo('search'); ?>') { this.value='' };" class="search_input" />
- <input type="submit" value="<?php echo elgg_echo('search:go'); ?>" class="search_submit_button" />
- </form>
- </div>
-
</div>
</div>
\ No newline at end of file
/**
* Start html output.
* The standard HTML header that displays across the site
+ *
* @uses $vars['config'] The site configuration settings, imported
* @uses $vars['title'] The page title
* @uses $vars['body'] The main content of the page
<?php
echo $feedref;
- echo elgg_view('metatags',$vars);
+ if (elgg_view_exists('metatags')) {
+ echo elgg_view('metatags', $vars);
+ }
// this was previously required because of an odd browser canvas drawing bug
// in firefox. It seems to not be require with the new layout...?
// jQuery(document).ready(function($) {
// });
// </script>
-
?>
<?php