View Full Version : $Newscount
xiaNaix
05-06-2010, 01:53 AM
In the 3.x versions, I was able to add banners (or whatever I wanted) after each news post using a conditional...
<if condition="$newscount == 4">
CODE WENT IN HERE
</if>
This does not seem to work anymore. What is the proper conditional for this sort of thing in 4.0?
Brian
05-06-2010, 02:05 PM
It looks like that variable isn't globalized for the templates, so that's why it's not working. If you'll look in your modules/news.php file for two instances of this code:
$templater = vB_Template::create('adv_portal_newsbits');
And replace each with this:
$templater = vB_Template::create('adv_portal_newsbits');
$templater->register('newscount', $newscount);
Then you should be able to use the $newscount variable again. Note this change has been applied to the dev files as well so it will be included in the next release.
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.