Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Search box look only for tags

  1. #1
    Join Date
    Jan 2008
    Posts
    216

    Default Search box look only for tags

    I saw there is another post like this, I mean is possible to make the search engine to look also for title and description words??
    One member, I read in another post, solved putting back again search.php and search.tpl from version 2.4.
    I purchased version 2.5 and now I have 2.6, did someone solved in another way?

  2. #2
    Join Date
    Jan 2008
    Posts
    216

    Default Re: Search box look only for tags

    No reply :(
    May be is not important for all using vshare but I think that a search module that looks only for tags is quite restrictive.
    Is there a way to make the search to look also at title and description of the video??

  3. #3
    Join Date
    May 2007
    Location
    Planet Earth
    Posts
    1,389

    Default Re: Search box look only for tags

    Send an email or a PM to the person who is using the search from 2.4, perhaps he/she is willing to share it or can post the code for it. Would you be so kind as to reference the other thread?
    If it's not fun, stop doing it!

  4. #4
    Join Date
    May 2007
    Location
    Planet Earth
    Posts
    1,389

    Default Re: Search box look only for tags

    I posted about this in the other thread and also sent a PM to the person who fixed it but have not yet received a reply. Probably doesn't check forums often and/or doesn't have his/her profile set to notify him/her of replies to threads.

    Another member was kind enough to share the 2.4 search.php and search.tpl after seeing my post, but I am missing a key part...where the poster said s/he replaced a piece of code somewhere. Didn't say what code and where it goes...that's the part we need.

    I tried the search.php and search.tpl and renamed the search_box.tpl but it crashed the script unless I did something wrong and maybe shouldn't have renamed search_box.tpl....I'll try it again.

    FYI: The original post I made about moving the search includes the search_box.tpl code from 2.4
    If it's not fun, stop doing it!

  5. #5
    Join Date
    May 2007
    Location
    Planet Earth
    Posts
    1,389

    Default Re: Search box look only for tags

    Oh hey, it worked, all except searching "groups". I uploaded the old search.php and search.tpl then I took the code from the original post about moving the search box ( the code from the 2.4 search_box.tpl) and inserted it into the new search_box.tpl and the search worked.

    Here is the code from the SEARCH.TPL (copy and paste this into a document and call it search.tpl then upload to the templates folder)

    Code:
    <table width=92% align=center border=0>
    <tr>
    <td>
    
    
    {if $total gt "0"}
    
    <div style="MARGIN-BOTTOM: 10px; COLOR: #333; PADDING-TOP: 10px">
    Related Tags:
    
    {section name=i loop=$tags}
    {$tags[i]}
    {/section}
    </div>
    
    
    <div style="MARGIN-BOTTOM: 10px; COLOR: #333; PADDING-TOP: 10px">
    
    Sort by: Relevance -
    Date Added -
    Title -
    View Count -
    Rating
    </div>
    
    <table cellSpacing=0 cellPadding=0 width="100%" align=center bgColor=#cccccc border=0>
    
    <tr><td>
    
    <div class=moduleTitleBar>
    
    <table cellSpacing=0 cellPadding=0 width="100%" border=0>
    
    <TR vAlign=top class=moduleTitle>
    <td>
    
    <table width="739"  border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td width="5" height="24" background="{$baseurl}/templates/images/bg1_l.gif">[img]{$baseurl}/templates/images/bg1_l.gif[/img]</td>
    <th background="{$baseurl}/templates/images/bg1.gif"  width=729>
    <div align="left">
    
    <table width="728"  border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td class="white_bold" width="307">  
    Search for:  {$smarty.request.search_id}</td>
    </td>
    <td  width="300" align=right  class="white_bold"><div style="MARGIN-RIGHT: 5px">Results {$start_num}-{$end_num} of {$total} for
    
    ' {if $smarty.request.search_type eq "related"}
    {section name=k loop=$ch}{$ch[k]}{/section}
    {else}
    {$smarty.request.search_id}
    {/if} '
    
    <SPAN style="FONT-SIZE: smaller"> ({$ttime} seconds)</SPAN>
    </div>
    
    </td>
    
    
    </tr>
    </table>
    </div>
    </th>
    <td width="5" background="{$baseurl}/templates/images/bg1_r.gif">[img]{$baseurl}/templates/images/bg1_r.gif[/img]</td>
    </tr>
    
    </table>
    
    </td>
    </tr>
    </table>
    
    </div>
    
    
    {section name=i loop=$answers}
    <div class=moduleEntry>
    
    <table cellSpacing=0 cellPadding=0 width="100%" border=0>
    <TR vAlign=top>
    <td>
    
    <table cellSpacing=0 cellPadding=0 border=0>
    <tr>
    <td>[img]{$tmburl}/1_{$answers[i].VID}.jpg[/img]</td>
    <td>[img]{$tmburl}/2_{$answers[i].VID}.jpg[/img]</td>
    <td>[img]{$tmburl}/3_{$answers[i].VID}.jpg[/img]</td>
    </tr>
    </table>
    
    </td>
    
    <td width=100%>
    
    <div class=moduleEntryTitle>
    {$answers[i].title}</div>
    <div class=moduleEntryDescription>{$answers[i].description}</div>
    <div class=moduleEntryTags>Tags:
    {insert name=video_keyword assign=tags vid=$answers[i].VID}
    {section name=j loop=$tags}
    {$tags[j]}
    {/section}
    </div>
    
    <div class=moduleEntryDetails>Channels:
    {insert name=video_channel assign=channel vid=$answers[i].VID}
    {section name=k loop=$channel}
    {$channel[k].name}
    {/section}
    </div>
    
    <div class=moduleEntryDetails>Added:
    {insert name=time_range IDFR=vid tbl=video field=addtime assign=timeran id=$answers[i].VID}{$timeran} by
    {insert name=id_to_name assign=uname un=$answers[i].UID}
    {$uname}
    </div>
    
    <div class=moduleEntryDetails>
    Runtime: {$answers[i].duration|string_format:"%.2f"} | Views: {$answers[i].viewnumber} |
    {insert name=comment_count assign=commentcount vid=$answers[i].VID}
    Comments: {$commentcount}
    </div>
    
    <NOBR>{insert name=show_rate assign=rate rte=$answers[i].rate}{$rate}</NOBR>
    
    </td>
    </tr>
    </table>
    
    </div>
    {/section}
    
    
    </table>
    
    </div>
    
    {if $total gt $items_per_page}
    <div class=moduleTitleBar>
    <div class=page_links align=right>Pages: {$page_links}  </div>
    </div>
    {/if}
    
    </td>
    </tr>
    </table>
    
    {/if}
    
    </td>
    </tr>
    </table>

    Next, open search_box.tpl, copy this code and REPLACE everything in the new search_box.tpl (you can also find this code in the thread about how to move the search box) --this does not include the fix for groups search crashing, just comment out or delete the code for the option to search groups)--:

    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>
    The only thing needed after that is the original search.php which I will send to you.
    If it's not fun, stop doing it!

  6. #6
    Join Date
    Jan 2008
    Posts
    216

    Default Re: Search box look only for tags

    Perfect! I write you my email via PM, would you be so kind to send me the file pls?

  7. #7
    Join Date
    May 2007
    Location
    Planet Earth
    Posts
    1,389

    Default Re: Search box look only for tags

    I sent you an email already through the PM function, will send file as soon as possible.

    Since the search.tpl comes from v2.4 it needs a little work to look right with 2.6, which is what I'm working on right now.
    If it's not fun, stop doing it!

  8. #8
    Join Date
    May 2007
    Location
    Planet Earth
    Posts
    1,389

    Default Re: Search box look only for tags

    Ok, files are on the way. I sent you the search.php, the search.tpl and search_box.tpl. I'm sending you the search.tpl as I have it modified to work better with 2.6. The 2.4 version was kinda messed up (thumbs didn't have spaces between them and the text was squashed up against the thumbs...I fixed that). I also fixed the search_box.tpl by taking out the option for "groups", which doesn't work.

    I will include this somewhere on my skins site for free download for anybody else who wants it.
    If it's not fun, stop doing it!

  9. #9
    Join Date
    May 2007
    Location
    Planet Earth
    Posts
    1,389

    Default Re: Search box look only for tags

    Here's an update for y'all...the original 2.4 uses the OLD timer code, so you'll want to remove the "sort by relevance" menu part. There's a lot of tweaking that needs to be done to the search.tpl, just to warn you. Personally, my sites aren't busy enough to warrant worrying about it so I haven't gone out of my way on this one, but I know others are working diligently at it. If anybody has a working search and wants to share, please email me and I'll post your "fix" at webgeek-design.com vshare templates and give you full credit.
    If it's not fun, stop doing it!

  10. #10
    Join Date
    Jan 2008
    Posts
    216

    Default Re: Search box look only for tags

    Hello, I've just modified again search.tpl now both runtime and rating are working properly.
    Let me know... :)

Page 1 of 2 12 LastLast

Similar Threads

  1. Search Fix for Vshare 2.6 tag-only search
    By mersh in forum Fixed Bugs
    Replies: 3
    Last Post: 01-07-2010, 03:59 PM
  2. Search Box????
    By ourlordstv in forum Template Modifications
    Replies: 1
    Last Post: 01-14-2008, 08:26 PM
  3. tags
    By caboz in forum General Discussions
    Replies: 2
    Last Post: 10-18-2007, 03:13 PM
  4. Less tags
    By Bjorn in forum General Discussions
    Replies: 11
    Last Post: 10-05-2007, 11:14 AM
  5. tags
    By karlmay in forum Fixed Bugs
    Replies: 13
    Last Post: 08-26-2007, 10:14 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •