Project

General

Profile

1
//:Create a searchbox
2
//:Creates a serachbox on the position of [[searchbox]]. Optional parameter "?msg=the search message"
3
global $TEXT;
4
$return_value = true;
5
if (!isset($msg)) $msg='search this site..';
6
$j = "onfocus=\"if(this.value=='$msg'){this.value='';this.style.color='#000';}else{this.select();}\"
7
        onblur=\"if(this.value==''){this.value='$msg';this.style.color='#b3b3b3';}\"";
8
if(SHOW_SEARCH) { 
9
	$return_value  = '<div class="searchbox">';
10
	$return_value  .= '<form action="'.WB_URL.'/search/index'.PAGE_EXTENSION.'" method="get" name="search" class="searchform" id="search">';
11
	$return_value  .= '<input style="color:#b3b3b3;" type="text" name="string" size="25" class="textbox" value="'.$msg.'" '.$j.'  />&nbsp;';
12
	$return_value  .= '</form>';
13
	$return_value  .= '</div>';
14
}
15
return $return_value;
(10-10/15)