Welcome to Geeklog Tuesday, December 12 2017 @ 03:28 am EST


Status: offline

::Ben

Forum User
Full Member
Registered: 14/01/2005
Posts: 1569
Location:la rochelle, France
Need to display a searchform in a phpblock. Try this function:

PHP 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

All times are EST. The time is now 03:28 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