Author Topic: How would you match a banner with a search term on videos-by-search.tpl?  (Read 1039 times)

0 Members and 1 Guest are viewing this topic.

Offline Huge

  • Newbie
  • *
  • Posts: 13
  • Karma: +7/-0
    • View Profile
How would you match a banner with a search term on videos-by-search.tpl?

Offline a4evermedia

  • Global Moderator
  • Full Member
  • ***
  • Posts: 122
  • Karma: +25/-0
  • Gender: Male
    • View Profile
    • A4Ever Media
Re: How would you match a banner with a search term on videos-by-search.tpl?
« Reply #1 on: October 07, 2013, 04:48:06 PM »
I believe that in order to do this you will have to have banners tagged with the search term in question, then you would access the banner with code similar to this on your videos-by-search.tpl:

Code: [Select]
The correct code follows this post

This code will display banners tagged with the specific search term first - if no banner is tagged with that search term it will try to use a banner tagged with the word "default".

« Last Edit: October 08, 2013, 08:01:45 AM by a4evermedia »

Offline Huge

  • Newbie
  • *
  • Posts: 13
  • Karma: +7/-0
    • View Profile
Re: How would you match a banner with a search term on videos-by-search.tpl?
« Reply #2 on: October 08, 2013, 05:07:15 AM »
yup, that's it! after I set up the search term tags for each banner, it worked like a charm. here's the complete code with the right search term variable. Thanks!

Code: [Select]
   {capture var=$banner}
     {banner zone="Search Term Banner" tags=$g_term sort=RAND()}
   {/capture}

   {if empty($banner)}
     {banner zone="Search Term Banner" tags="dafault" sort=RAND()}
   {else}
     {banner zone="Search Term Banner" tags=$g_term sort=RAND()}
   {/if}

Offline a4evermedia

  • Global Moderator
  • Full Member
  • ***
  • Posts: 122
  • Karma: +25/-0
  • Gender: Male
    • View Profile
    • A4Ever Media
Re: How would you match a banner with a search term on videos-by-search.tpl?
« Reply #3 on: October 08, 2013, 07:58:46 AM »
Beautiful!

Unofficial JMB Support Forums

Re: How would you match a banner with a search term on videos-by-search.tpl?
« Reply #3 on: October 08, 2013, 07:58:46 AM »


Tags:
 

Related Topics

  Subject / Started by Replies Last post
0 Replies
1178 Views
Last post May 10, 2012, 09:09:43 AM
by a4evermedia
0 Replies
793 Views
Last post July 30, 2012, 04:01:13 AM
by a4evermedia
3 Replies
1181 Views
Last post December 08, 2012, 12:01:58 AM
by Chad
0 Replies
729 Views
Last post July 26, 2013, 10:36:56 PM
by MRB
3 Replies
993 Views
Last post October 31, 2013, 04:27:18 PM
by mike22

anything