Announcement

Collapse
No announcement yet.

Help: Conditional (based on forumid) button

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help: Conditional (based on forumid) button

    I am trying to replace the "New Thread" button with a "Place an Ad" button that links to a 3rd party classifieds app, but only in one forum.

    My problem is that if I use == I never get the button change (in any forum) and if I use just a single = I get the new button in every forum.

    This is the code I'm trying:
    Code:
        <if condition="$forum[forumid]==32">
            <a href="www.google.com"><img src="$stylevar[imgdir_button]/placead.jpg"  border="0" /></a>
    
        <else />
    
    
            <if condition="$show['newthreadlink']">
                <a href="newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]" rel="nofollow"><img src="$stylevar[imgdir_button]/newthread.gif" alt="$vbphrase[post_new_thread]" border="0" /></a>
    
    
                <if condition="$show['neweventlink']">
                    &nbsp;<a href="newthread.php?$session[sessionurl]do=newevent&amp;f=$foruminfo[forumid]" rel="nofollow"><img src="$stylevar[imgdir_button]/newevent.gif" alt="$vbphrase[lv_vb_eventforums_phrase_post_new_event]" border="0" /></a>
    
    
                </if>
    
    
            <else />
            &nbsp;
            </if>
        
        
        </if>
    Please help!

  • #2
    What template are you trying to put this in?

    Comment


    • #3
      forumdisplay

      Comment


      • #4
        Use $foruminfo[forumid] instead of $forum[forumid]

        Comment


        • #5
          Originally posted by Kerry-Anne View Post
          Use $foruminfo[forumid] instead of $forum[forumid]

          That did the trick!

          Wow, you're two for two with me today! Thanks!

          Comment


          • #6
            No problem

            Comment

            widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
            Working...
            X