Welcome to Geeklog, Anonymous Wednesday, November 27 2024 @ 02:04 pm EST
Geeklog Forums
phpblock_searchform
Status: offline
::Ben
Forum User
Full Member
Registered: 01/14/05
Posts: 1569
Location:la rochelle, France
Need to display a searchform in a phpblock. Try this function:
{
global $_CONF, $LANG09;
$searchbox = "<div>";
$searchbox .= " <form method=\"get\" action=\"{$_CONF['site_url']}/search.php\">";
$searchbox .= " <div>";
$searchbox .= " <input id=\"header-textbox\" type=\"text\" name=\"query\" maxlength=\"255\" value=\"{$LANG09[10]}\" title=\"Search\" onfocus=\"if (this.value=='{$LANG09[10]}')this.value='';\" onblur=\"if(this.value=='')this.value='{$LANG09[10]}';\"" . XHTML . "><input type=\"hidden\" name=\"type\" value=\"all\"><input type=\"hidden\" name=\"mode\" value=\"search\"" . XHTML . ">";
$searchbox .= " </div>";
$searchbox .= " </form>";
$searchbox .= " </div>";
return $searchbox;
}
Ben
I'm available to customise your themes or plugins for your Geeklog CMS
Text Formatted Code
function phpblock_searchform (){
global $_CONF, $LANG09;
$searchbox = "<div>";
$searchbox .= " <form method=\"get\" action=\"{$_CONF['site_url']}/search.php\">";
$searchbox .= " <div>";
$searchbox .= " <input id=\"header-textbox\" type=\"text\" name=\"query\" maxlength=\"255\" value=\"{$LANG09[10]}\" title=\"Search\" onfocus=\"if (this.value=='{$LANG09[10]}')this.value='';\" onblur=\"if(this.value=='')this.value='{$LANG09[10]}';\"" . XHTML . "><input type=\"hidden\" name=\"type\" value=\"all\"><input type=\"hidden\" name=\"mode\" value=\"search\"" . XHTML . ">";
$searchbox .= " </div>";
$searchbox .= " </form>";
$searchbox .= " </div>";
return $searchbox;
}
Ben
I'm available to customise your themes or plugins for your Geeklog CMS
12
9
Quote
All times are EST. The time is now 02:04 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content