I'm relatively new to Zikula, although I've been reading the Wikis, documentation, forums, etc... but now I've run into a problem adding a Search field to a plug-in. I've done some rough work on my website (http://www.digitalmeister.com it doesn't look good in IE6 yet) and I was able use
Code
<!--[search value="Search" size="9em"]-->&
However, now I'm trying to do some changes on my VM test machine where I can remove the menu block and just use my navigation bar so that it's easier to maintain the site. So far, so good, until I try to get the Search field to work in the plug-in.
The plug-in has the following code:
Code
<?php
function smarty_function_navigation($params, &$smarty)
{
$uid = pnUserGetVar('uid');
$isAdministrator = false;
extract($params);
unset($params);
$output = '<ul>';
$output .= '<li ><a href="' . pnGetBaseURL() . '">HOME</a></li>';
$output .= '<li ><a href="">NEWS & INFO</a></li>';
$output .= '<li ><a href="">PROGRAMMING</a></li>';
$output .= '<li ><a href="">PROJECTS</a></li>';
$output .= '<li ><a href="">FORUMS</a></li>';
# check if the user is an administrator
Loader::loadClass('UserUtil');
$user_groups = UserUtil::getGroupsForUser(SessionUtil::getVar('uid'));
#NOTE: the group ID for Administrators in this case is 2
foreach ($user_groups as $gid)
{
if($gid == 2)
{
$output .= '<li ><a href="">ADMIN</a></li>';
}
}
$output .= '<li ><div ><!--[search value="Search" size="9em"]--> </div></li>';
$output .= '</ul>';
return $output;
}
?>
function smarty_function_navigation($params, &$smarty)
{
$uid = pnUserGetVar('uid');
$isAdministrator = false;
extract($params);
unset($params);
$output = '<ul>';
$output .= '<li ><a href="' . pnGetBaseURL() . '">HOME</a></li>';
$output .= '<li ><a href="">NEWS & INFO</a></li>';
$output .= '<li ><a href="">PROGRAMMING</a></li>';
$output .= '<li ><a href="">PROJECTS</a></li>';
$output .= '<li ><a href="">FORUMS</a></li>';
# check if the user is an administrator
Loader::loadClass('UserUtil');
$user_groups = UserUtil::getGroupsForUser(SessionUtil::getVar('uid'));
#NOTE: the group ID for Administrators in this case is 2
foreach ($user_groups as $gid)
{
if($gid == 2)
{
$output .= '<li ><a href="">ADMIN</a></li>';
}
}
$output .= '<li ><div ><!--[search value="Search" size="9em"]--> </div></li>';
$output .= '</ul>';
return $output;
}
?>
But, the Search field now gets processed as commented piece of HTML, so it doesn't appear. If tried find a function that will allow me to put it in like before, but no luck. Does anyone have an idea how to insert a Search field using a plug-in?
Thanks in advance,
DM
