Welcome to Geeklog, Anonymous Friday, March 29 2024 @ 01:05 am EDT

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:

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
 Quote

All times are EDT. The time is now 01:05 am.

  • 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