How I got the SEARCH to appear on all pages
I noticed that the search wasn't appearing on all pages and I wanted it to. NOTE: THIS WAS WRITTEN FOR VSHARE 2.4
Here is my solution:
In HEADER.tpl look for
Code:
<CENTER>
{if $head_bottom ne ""}
{include file = head_bottom/$head_bottom}
{/if}
{if $head_bottom_add ne ""}
{include file = head_bottom/$head_bottom_add}
{/if}
THEN RIGHT ABOVE THAT PUT IN:
Code:
<FORM name=searchForm action="{$baseurl}/search.php" method="get">
<table border="0" cellspacing="0" cellpadding="0" align=center>
<tr>
<td height="34"><INPUT class=search_box tabIndex=1 maxLength=128 name="search_id" value="{$smarty.request.search_id}"></td>
<td width="20"></td>
<td><SELECT name=search_type class=search_select>
{if $smarty.request.search_type eq "search_videos"}<OPTION value=search_videos selected>Search Videos</OPTION>{else}<OPTION value=search_videos>Search Videos</OPTION>{/if}
{if $smarty.request.search_type eq "search_users"}<OPTION value=search_users selected>Search Users</OPTION>{else}<OPTION value=search_users>Search Users</OPTION>{/if}
{if $smarty.request.search_type eq "search_groups"}<OPTION value=search_groups selected>Search Groups</OPTION>{else}<OPTION value=search_groups>Search Groups</OPTION>{/if}
</SELECT>
</td>
<td width="10"></td>
<td><input type=image src="{$baseurl}/templates/images/search.gif" width="90" height="20"></td>
</tr>
</table>
</FORM>
Then open search_box.tpl and delete everything in there.
As always, before uploading anything, make sure you make a back up of your original (by renaming it search_box_original.tpl and header_original.tpl in case it doesn't work like you want it to.
Re: How I got the SEARCH to appear on all pages
i got search string empty? what i done wrong? help
ps : fixed it sorry
Re: How I got the SEARCH to appear on all pages
i've got search string empty too. how to solve this porblem???? :oops:
Re: How I got the SEARCH to appear on all pages
Basically, what you want to do is take all the code in search_box.tpl, copy and paste it into the section mentioned in header.tpl, then delete everything in search_box.tpl, at least that's what I did for version 2.4. May not work with other versions, but worth a try. REMEMBER TO RENAME YOUR ORIGINAL FILES SO YOU CAN REVERT BACK IF THIS SHOULD FAIL.
Re: How I got the SEARCH to appear on all pages
Does someone have VShare 2.5 and using this search function on all pages??? If yes, need help :D
Re: How I got the SEARCH to appear on all pages
Check with lesansan, s/he said s/he fixed it (but didn't say how) so...maybe pop him/her an email or PM or something.
Re: How I got the SEARCH to appear on all pages
your right, good idea :mrgreen:
Re: How I got the SEARCH to appear on all pages
If you do the same like in VShare 2.4 in 2.6 it will still work, to see how it looks like visit Lustige Videos - VioTV
Re: How I got the SEARCH to appear on all pages
And I have already done this work for you in the custom skins section of my skinning site. See my sig for details.
Re: How I got the SEARCH to appear on all pages
Code:
<form name="searchForm" action="{$baseurl}/search.php" method="GET">
<table border="0" cellspacing="0" cellpadding="0" align=center>
<tr>
<td height="34"><input class="search_box" maxlength="128" name="search" value=""></td>
<td width="20"></td>
<td><select name="type" class="search_select">
<option value=video>Search Videos</option><option value=user>Search Users</option><option value=group>Search Groups</option></select>
</td>
<td width="10"></td>
<td><input type="image" src="{$baseurl}/templates/images/search.gif" alt="Search" width="90" height="20"></td>
</tr>
</table>
</form>
This works! Just paste code where you want search. You can play with the parameters how you see fit!