Results 1 to 2 of 2

Thread: $Newscount

  1. #1
    Join Date
    Nov 2006
    Posts
    2

    Default $Newscount

    In the 3.x versions, I was able to add banners (or whatever I wanted) after each news post using a conditional...

    PHP Code:
                    <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?

  2. #2
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    Default

    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:
    PHP Code:
                        $templater vB_Template::create('adv_portal_newsbits'); 
    And replace each with this:
    PHP Code:
                        $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.
    Frequently Asked Questions
    CMPS Users Manual

    For vBadvanced software assistance, please use the support forums.
    Unsolicted PMs, IMs, and email will not be responded to.
    If you have a non-software related question or problem with your account, please submit a support ticket.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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