[pmwiki-users] searchbox design
Hans
design at flutesong.net
Thu Apr 7 11:00:11 CDT 2005
Hi,
I am trying to move the code for a sidebar searchbox out of the skin
template, to replace it with a variable which gets defined in the
skin.php. The problem I encounter is that the strings "Search Site"
and "Go" are now displayed as "$[Search Site]" and "$[Go]", i.e. the
translation mechanism fails. How can I get this going?
Here is the code:
Formerly in the skin template, and working fine:
<div id='sidebarsearch'>
<form id='wikisearch' action='$ScriptUrl/$[Main/SearchWiki]'>
<input type='hidden' name='pagename' value='$[Main/SearchWiki]' />
<input class='wikisearchbox' type='text' name='q' value=' $[Search Site] ' onfocus="if(this.value=' $[Search Site] ') {this.value=''}" onblur="if(this.value=='') {this.value=' $[Search Site] '}" />
<input name='submit' type='submit' class='wikisearchbutton' value=' $[Go] '/>
</form></div>
Now in the the skin template and the value names not being rendered
properly:
<div id='sidebarsearch'>$SidebarSearchbox</div>
and in the skin.php:
global $SidebarSearchbox;
$SidebarSearchbox = "
<form id='wikisearch' action='$ScriptUrl/$[Main/SearchWiki]'>
<input type='hidden' name='pagename' value='$[Main/SearchWiki]' />
<input class='wikisearchbox' type='text' name='q' value=' $[Search Site] ' onfocus=\"if(this.value=' $[Search Site] ') {this.value=''}\" onblur=\"if(this.value=='') {this.value=' $[Search Site] '}\" />
<input name='submit' type='submit' class='wikisearchbutton' value=' $[Go] '/>
</form> ";
Thanks for any assistance!
Best,
Hans
More information about the pmwiki-users
mailing list