Source for file pnsearchapi.php
Documentation is available at pnsearchapi.php
* Zikula Application Framework
* @copyright (c) 2002, Zikula Development Team
* @link http://www.zikula.org
* @version $Id: pnsearchapi.php 24342 2008-06-06 12:03:14Z markwest $
* @license GNU/GPL - http://www.gnu.org/copyleft/gpl.html
* @package Zikula_Value_Addons
return array('title' => 'FAQ',
'functions' => array('FAQ' => 'search'));
$pnRender->assign('active',(isset ($args['active'])&&isset ($args['active']['FAQ']))|| (!isset ($args['active'])));
return $pnRender->fetch('faq_search_options.htm');
* Search plugin main function
$faqtable = $pntable['faqanswer'];
$faqcolumn = $pntable['faqanswer_column'];
$searchTable = $pntable['search_result'];
$searchColumn = $pntable['search_result_column'];
array($faqcolumn['question'],
// define the permission filter to apply
$permFilter = array(array('realm' => 0,
'component_left' => 'FAQ',
'instance_left' => 'faqid',
if ($objArray === false) {
$addcategorytitletopermalink = pnModGetVar('FAQ', 'addcategorytitletopermalink');
"INSERT INTO $searchTable
// Process the result set and insert into search result table
foreach ($objArray as $obj) {
if ($addcategorytitletopermalink) {
$extra = serialize(array('faqid' => $obj['faqid'], 'cat' => isset ($obj['__CATEGORIES__']['Main']['name']) ? $obj['__CATEGORIES__']['Main']['name'] : null));
$extra = serialize(array('faqid' => $obj['faqid']));
* Do last minute access checking and assign URL to items
* Access checking is ignored since access check has
* already been done. But we do add a URL to the found item
$datarow = &$args['datarow'];
$datarow['url'] = pnModUrl('FAQ', 'user', 'display', array('faqid' => $extra['faqid'], 'cat' => $extra['cat']));
|