If Conditionals - Every Usergroup Except Group X

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Seawolf
    Member
    • Aug 2002
    • 44
    • 3.8.x

    If Conditionals - Every Usergroup Except Group X

    I know there's a way to do this, I used to do it myself... I just can't remember, I'm rusty.

    Something like <if usergroup = !12>


    something like that....

    what I'm trying to do is display adsense ads on my forum to every usergroup except contributors, which is group #12.

    Thanks.
    sigpic
  • Lats
    Senior Member
    • Mar 2002
    • 3671

    #2
    Try this...
    Code:
    <if condition="$bbuserinfo[usergroupid] != 12">
    Lats...

    Comment

    • Seawolf
      Member
      • Aug 2002
      • 44
      • 3.8.x

      #3
      Thanks
      sigpic

      Comment

      • Sergio68
        Senior Member
        • May 2002
        • 821
        • 6.0.X

        #4
        Originally posted by Lats
        Try this...
        Code:
        <if condition="$bbuserinfo[usergroupid] != 12">
        Thx, that's the way to read vbulletin variables, just what I need.
        Can I ask you:
        a) What's the variable for forum number ?
        b) The syntax of that if condition, in PHP I use { } instead of <>
        Italian Body Building & Fitness : www.BodyWeb.com
        Italian unofficial support Forum : www.vBulletin.it

        Comment

        • Lats
          Senior Member
          • Mar 2002
          • 3671

          #5
          Try this...
          Code:
          <if condition="$forumid == 2">
          Lats...

          Comment

          • Sergio68
            Senior Member
            • May 2002
            • 821
            • 6.0.X

            #6
            Probably I did not explain it in the correct way.

            I'm trying from the admin panel to insert in the Copyright Text variable some extra HTML.

            PHP Code:
            Copyright Â© 1999-2006 Bodyweb.it - <br><br /><a href='feed://www.bodyweb.it/forums/external.php?type=rss2&amp;forumids=$forumid'><img src='/forums/images/misc/rss2.gif' border='0' /></a><br><br /> 
            But the output on the link is $forumid and not the number.
            Italian Body Building & Fitness : www.BodyWeb.com
            Italian unofficial support Forum : www.vBulletin.it

            Comment

            • Lats
              Senior Member
              • Mar 2002
              • 3671

              #7
              Try placing $forumid within double quotes - "$forumid"
              Lats...

              Comment

              • Sergio68
                Senior Member
                • May 2002
                • 821
                • 6.0.X

                #8
                Originally posted by Lats
                Try placing $forumid within double quotes - "$forumid"
                Nope, this is the output URL : http://www.bodyweb.it/forums/external.php?type=rss2&forumids=%22$forumid%22

                Instead of : http://www.bodyweb.it/forums/externa...ss2&forumids=9

                Italian Body Building & Fitness : www.BodyWeb.com
                Italian unofficial support Forum : www.vBulletin.it

                Comment

                • Sergio68
                  Senior Member
                  • May 2002
                  • 821
                  • 6.0.X

                  #9
                  Ok this way is readed as a variable : '$forumid' but the result is empty
                  Italian Body Building & Fitness : www.BodyWeb.com
                  Italian unofficial support Forum : www.vBulletin.it

                  Comment

                  • Sergio68
                    Senior Member
                    • May 2002
                    • 821
                    • 6.0.X

                    #10
                    I've also tried $forum[forumid] but it's not working, I suppose there is a particolar syntax to let it works.
                    Italian Body Building & Fitness : www.BodyWeb.com
                    Italian unofficial support Forum : www.vBulletin.it

                    Comment

                    • Lats
                      Senior Member
                      • Mar 2002
                      • 3671

                      #11
                      Just to confirm, this is for your copyright text at the bottom of your forum? Can you not just place the number in there manually?

                      Or, does your copyright change from forum to forum?
                      Lats...

                      Comment

                      • Sergio68
                        Senior Member
                        • May 2002
                        • 821
                        • 6.0.X

                        #12
                        Originally posted by Lats
                        Just to confirm, this is for your copyright text at the bottom of your forum? Can you not just place the number in there manually?

                        Or, does your copyright change from forum to forum?
                        I would like to add in that copyright text the HTML I need just couse I was confortable, but I need a link to the RSS feed of that specific forum.

                        I can otherwise add it in the footer manually hoping I can read that variable.
                        Italian Body Building & Fitness : www.BodyWeb.com
                        Italian unofficial support Forum : www.vBulletin.it

                        Comment

                        • Sergio68
                          Senior Member
                          • May 2002
                          • 821
                          • 6.0.X

                          #13
                          Ok, in the footer it's working, probably directly in the text copyright variable it's not possible.
                          Italian Body Building & Fitness : www.BodyWeb.com
                          Italian unofficial support Forum : www.vBulletin.it

                          Comment

                          • Colin F
                            Senior Member
                            • May 2004
                            • 17689

                            #14
                            Conditionals and variables won't work in phrases.
                            Best Regards
                            Colin Frei

                            Please don't contact me per PM.

                            Comment

                            • Sergio68
                              Senior Member
                              • May 2002
                              • 821
                              • 6.0.X

                              #15
                              Thx.
                              Italian Body Building & Fitness : www.BodyWeb.com
                              Italian unofficial support Forum : www.vBulletin.it

                              Comment

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