View Full Version : Gallery home conditional
October 7th, 2012, 01:49 PM
I have a sponsor that wants their ads only in the gallery index page... guess I could add it somewhere in the sidebar.
But I can't figure out a conditional to only show this code in the main page and avoid it on the other pages. :eek:
Thanks for helping
October 7th, 2012, 02:31 PM
well to give you a suggestion I need to know what your doing where.
Are you using this code in the gallery only meaning this is a standalone or non vb install or is this a vb install where your placing code in vbulletin?
There is a huge syntax difference between the two.
October 8th, 2012, 11:39 AM
Here is an example if your doing a non vb install using the a php header or editing one of our templates the php code would look like this. This will only show the ads on the gallery index page
if ( THIS_SCRIPT == "ppindex" )
YOUR AD HTML CODE HERE
If your adding something in a vb 4.x header the code to add to only show the ads on a gallery index would be the following.
<vb:if condition="THIS_SCRIPT == 'ppindex'">
YOUR AD CODE HERE
October 9th, 2012, 12:36 PM
It was the first one, inside the gallery.
Thanks Chuck! :D
October 9th, 2012, 12:52 PM
Glad to help enjoy your day let us know if you need anything else.
October 9th, 2012, 01:57 PM
Thanks, same for you. :)
October 9th, 2012, 02:01 PM
Yep off to go release another plugin. ;)
October 10th, 2012, 12:50 PM
yeah with the new plugin system say for instance you wanted to only display an ad below the header instead of the sidebar the code would look something like this.
Does not matter that I say this is for classifieds this works for photopost pro also.
You would just surround the plugin code with the if clause and do a plugin on the header_bottom location. Of course edit the code for your ad display.
Trying to get everyone use to the plugin system so they can give feedback and ideas on plugins they might want.
October 10th, 2012, 01:45 PM
Interesting... thanks! :D
October 10th, 2012, 01:55 PM
Yep trying to get people use to the new plugin system and how versatile it is. last thing you want to do is hard code stuff in files and templates. That is why there is a plugin system so nothing is affected you can upgrade and things are easy and good to go without mess ups.
vBulletin® v3.8.1, Copyright ©2000-2014, Jelsoft Enterprises Ltd.