Announcement

Collapse
No announcement yet.

Single user conditional

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

  • Single user conditional

    What would I use for a single userid for a conditional? I want to show a specific image for 1 user. I do not want to make them apart of a new user group. This would be going in the post bit too.

  • #2
    <if condition="$bbuserid=XX">stuff here</if>

    Replace XX with the userid you want to check for.
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API

    Comment


    • #3
      That didn't work. Here's what I did:
      <if condition="$bbuserid=64">stuff</if>

      That "Stuff" shows on every user in the post bit.
      Last edited by Mainer82; Thu 30 Oct '03, 11:28am.

      Comment


      • #4
        The conditional would be

        Code:
        <if condition="$bbuserinfo[userid][b][u]==[/u][/b]64">Stuff</if>

        Comment


        • #5
          That's not working either, it's showing the text for every user.

          Comment


          • #6
            You have a link to where this is not working and what it's not supposed to be showing?

            Comment


            • #7
              try using an else
              Code:
              <if condition "$bbuserinfo[userid] == xx">
              stuff
              <else />
              other stuff
              </if>
              Also, merk yours didnt work because you spelt condition wrong

              Comment


              • #8
                Originally posted by ogden2k
                What would I use for a single userid for a conditional? I want to show a specific image for 1 user. I do not want to make them apart of a new user group. This would be going in the post bit too.
                If it's going in the postbit you need to use
                $post[userid]

                <if condition="$post[userid]==X">stuff here</if>
                Last edited by Babylon; Sat 1 Nov '03, 12:48pm.

                Comment


                • #9
                  Yes, if you are looking to apply it based on the poster's userid. If you are looking to apply it based on the viewer's userid, then $bbuserinfo[userid] is what you would want.

                  Comment


                  • #10
                    Originally posted by assassingod
                    Also, merk yours didnt work because you spelt condition wrong
                    All im going to say to that statement is

                    WHA?

                    Go look at my spelling........

                    Comment


                    • #11
                      vBulletin version 3.0.0 beta 7:
                      template: FORUMHOME

                      <if condition="$bbuserinfo[userid] == 1">*</if>

                      Replace the 1 with the userid to which you want to display stuff to and replace * to the text you want to show up for that user.

                      I tested this and it works and since $bbuserinfo[] is globalized in almost all the pages, this will work in postbit and other templates too.

                      Comment


                      • #12
                        Originally posted by merk
                        All im going to say to that statement is

                        WHA?

                        Go look at my spelling........
                        Right thats it, i've officially gone insane. I could of sworn you added an extra i in there. Sorry!

                        Comment


                        • #13
                          Getting back on topic here...

                          This...
                          Code:
                          <if condition="$post[userid]==X">stuff here</if>
                          which Babylon posted is most likely what you are looking for since you said you want to apply it to one user.

                          Comment


                          • #14
                            Originally posted by Babylon
                            If it's going in the postbit you need to use
                            $post[userid]

                            <if condition="$post[userid]==X">stuff here</if>
                            That worked, thank you, and thanks everyone else for helping too.

                            Comment


                            • #15
                              Originally posted by ogden2k
                              That worked, thank you, and thanks everyone else for helping too.
                              hmm would this same thing work in the usercp.php? just checkin 2 make sure
                              http://img66.exs.cx/img66/4535/astgmail.gif

                              Comment

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