Announcement

Collapse
No announcement yet.

If Conditionals - Every Usergroup Except Group X

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

  • 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

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

    Comment


    • #3
      Thanks
      sigpic

      Comment


      • #4
        Originally posted by Lats View Post
        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


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

          Comment


          • #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


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

              Comment


              • #8
                Originally posted by Lats View Post
                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


                • #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


                  • #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


                    • #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


                      • #12
                        Originally posted by Lats View Post
                        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


                        • #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


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

                            Please don't contact me per PM.

                            Comment


                            • #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...
                              X