Source for file sigma-example.php
Documentation is available at sigma-example.php
* Example usage for Search_Mnogosearch renderer
* with Sigma Templates and Pager.
* @author Gerrit Goetsch <goetsch@cross-solution.de>
* $Id: sigma-example.php,v 1.2 2004/11/10 10:33:14 goetsch Exp $
require_once 'Search/Mnogosearch.php';
require_once 'Search/Mnogosearch/Renderer/Sigma.php';
require_once 'HTML/QuickForm.php';
require_once 'HTML/QuickForm/Renderer/ITStatic.php';
require_once 'HTML/Template/Sigma.php';
require_once 'Pager/Pager.php';
// define the DNS to mnogosearch
// define('DSN_MNOGOSEARCH', 'mysql://user:password@localhost/database');
$tpl = & new HTML_Template_Sigma (dirname(__FILE__ ). '/renderers/templates/');
$tpl->loadTemplateFile ('search.html', false , true );
$tpl->setVariable ("subject", "Search_Mnogosearch renderer example for the sigma renderer");
$params['excerptsize'] = "400";
$params['excerptpadding'] = "64";
$params['pagesize'] = $perPage;
$params['mode'] = 'UDM_MODE_ALL';
$params['sortorder'] = 'DRP';
$params['detectclones'] = 1;
$params['cachemode'] = 0;
$params['crosswords'] = 0;
$params['minwordlength'] = 2;
$params['charset'] = "iso-8859-1";
$params['dateformat'] = "%d-%m-%y";
// create a new Search_Mnogosearch Object
// set the http parameters if you want.
$search->setHttpParameters (array (
$search->setParameters ($params);
$search->setLimits ($limits);
$sigma->setVariableNames (array (
'contentmain' => 'contentmain',
// set the template to use
$sigma->setTemplates (array (
'groupbysite' => 'bygroup.html',
'single' => 'result.html',
'noresult' => 'noresult.html'
$sigma->setPagerOptions (array (
'firstPageText' => '<< ',
// set section weight factors
$search->setSectionWeights (array (
5 => '4' // Organization (custom)
$sigma->setHighlightTags (array (
'begin' => '<font color="#003300"><b>',
'end' => '</b></font>'));
Documentation generated on Mon, 11 Mar 2019 14:31:31 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|