View Full Version : How do I Use If Then vB Statements?
xtrematrix
10-07-2004, 09:43 PM
I want to add a counter to the footer of my forums, but it is also ment to track what pages people go to. I want to have it change on each page of the Custom Pages. I have made some pregress and this code will only display on the vBadvanced pages:
<if condition="$pages['name'] != ''">Test</if>
BUT i am looking on how to put en else in there OR get the code that will only showup on none vBadcnaced pages...
Any suggestions?
xtrematrix
10-08-2004, 05:54 PM
Can anyone help me with this?
Brian
10-08-2004, 11:10 PM
Open your forum/includes/vba_cmps_include_bottom.php file and look for:
eval('print_output("' . fetch_template('adv_portal') . '");');
Right above that you'll want to add something like this:
switch($pages['name'])
{
case 'home':
$mycounter = '<!-- Counter Code Here -->';
break;
case 'page1':
$mycounter = '<!-- Counter Code Page 1 Here -->';
break;
case 'page2':
$mycounter = '<!-- Counter Code Page 2 Here -->';
break;
}
Replace the Counter Code part in each of those to the different counter you need for each page, then add $mycounter somewhere in your footer.
xtrematrix
10-09-2004, 12:18 AM
This isnt quite what i had in mind... I dont need custom code for each of the pages, just one set of code for the vBadvanced and one set for the forums. If you know of a way to use the If statements that can be used in the footer to only display during none vBadvanced pages that would be perfect. I already have the code that shows on vBadvanced pages. Thanks in advance!
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.