Source for file search.php
Documentation is available at search.php
* Zikula Application Framework
* @copyright (c) 2004, Zikula Development Team
* @link http://www.zikula.org
* @version $Id: search.php 24342 2008-06-06 12:03:14Z markwest $
* @license GNU/GPL - http://www.gnu.org/copyleft/gpl.html
* @package Zikula_System_Modules
* @author The Zikula Development Team
* get information on block
* @author The Zikula Development Team
* @return array The block information
return array('text_type' => 'Search',
'text_type_long' => 'Search Box',
'allow_multiple' => true,
'admin_tableless' => true);
* @author The Zikula Development Team
* @param array $blockinfo a blockinfo structure
* @return output the rendered bock
if (!isset ($vars['displaySearchBtn'])) {
$vars['displaySearchBtn'] = 0;
// assign the block vars array
$pnRender->assign('vars',$vars);
// set a title if one isn't present
if (empty($blockinfo['title'])) {
// return the rendered block
$blockinfo['content'] = $pnRender->fetch('search_block_search.htm');
* @author The Zikula Development Team
* @param array $blockinfo a blockinfo structure
* @return output the bock form
// get all the search plugins
$search_modules = pnModAPIFunc('Search', 'user', 'getallplugins');
if (!isset ($vars['displaySearchBtn'])) {
$vars['displaySearchBtn'] = 0;
// load user language file
$searchmodules = array();
foreach($search_modules as $mods) {
$searchmodules[] = array('module' => pnModAPIFunc($mods['title'], 'Search', 'options', $vars));
// assign the block vars array
$pnRender->assign('searchvars', $vars);
$pnRender->assign('searchmodules', $searchmodules);
return $pnRender->fetch('search_block_search_modify.htm');
* @author The Zikula Development Team
* @param array $blockinfo a blockinfo structure
* @return $blockinfo the modified blockinfo structure
// list of vars that don't need to be saved
$search_reserved_vars = array('authid', 'bid', 'title', 'positions', 'language', 'submit',
'refresh', 'filter', 'type', 'functions', 'customargs');
foreach($_POST as $key => $value) {
if (in_array($key, $search_reserved_vars)) {
// write back the new contents
$pnRender->clear_cache('search_block_search.htm');
|