Usergroup in postbit

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Darkblade
    Senior Member
    • Jul 2004
    • 690
    • 3.6.x

    Usergroup in postbit

    How to display a user's group in postbit while viewing a thread?

    ie:

    Group: Administrator
    Join Date: Aug 2005
    Location: Cleveland, Ohio
    Age: 20
    Posts: 1,500
    Metal Gear Forums - Discussion on the popular series of computer and console stealth-based games.

    My Mods: Coming Soon | My Tutorials: Coming Soon
  • evilzedar
    Senior Member
    • Jun 2005
    • 137
    • 3.0.7

    #2
    Well here's an example using the postbit_legacy template. Find
    Code:
       <div class="smallfont">
        &nbsp;<br />
        <if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>
        <if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if>
        <if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if>
        <div>
    and add the red text, as shown below
    Code:
       <div class="smallfont">
        &nbsp;<br />
        [COLOR=#000000][COLOR=red]<div class="smallfont">Group: $post[displaygrouptitle]</div>[/COLOR]  [/COLOR]
        <if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>
        <if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if>
        <if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if>
        <div>
    At least that should work, try it and see how you get on.

    Comment

    • Darkblade
      Senior Member
      • Jul 2004
      • 690
      • 3.6.x

      #3
      It works, thanks buddy.
      Metal Gear Forums - Discussion on the popular series of computer and console stealth-based games.

      My Mods: Coming Soon | My Tutorials: Coming Soon

      Comment

      • TheExpatDirector
        Member
        • Sep 2007
        • 43
        • 3.6.x

        #4
        Toptip but - You dont need the class identifier in the string as small font is already being used.
        So you can get away with:
        <div>Group: $post[displaygrouptitle]</div>
        Alternativelym use the alt1 class to make the group stand out (alt2 being the class used for the thread/post header)
        i.e

        <div class="alt1">Group: $post[displaygrouptitle]</div>
        TED
        The Expat Directory
        Free Business Webs

        Comment

        • wolfy
          Senior Member
          • Apr 2005
          • 194
          • 3.5.x

          #5
          how about IF that user is a member of XX usergroup?

          I have a secondary usergroup that some members belong to. I would like to display badges for under the avatar in postbit.

          Comment

          • Trevor Hannant
            vBulletin Support
            • Aug 2002
            • 24358
            • 5.7.X

            #6
            A lot of good references to conditionals in the manual here:



            and at this site:

            Vote for:

            - Admin Settable Paid Subscription Reminder Timeframe (vB6)
            - Add Admin ability to auto-subscribe users to specific channel(s) (vB6)

            Comment

            • Ace
              Senior Member
              • Apr 2004
              • 4051
              • 4.2.X

              #7
              Neither of those pages mention membergroupids Trevor.. is there anywhere that does?

              From memory, it's been something that's never been possible (unless it got 'fixed' in a release that I missed).
              My Live vB5 Site - NZEating.com
              vBulletin Hosting | vBulletin Services - Need hosting for your vB? Need it installed? Something else? Let me take that hassle off your hands.

              Comment

              • wolfy
                Senior Member
                • Apr 2005
                • 194
                • 3.5.x

                #8
                Thanks Ace, that's what I noticed as well.

                Those show how to show something TO a member of a usergroup, but not how to make something show ON a person that is a MEMBER of a usergroup.

                Note: I need this to work on secondary usergroups as well as primary.

                Comment

                • Ace
                  Senior Member
                  • Apr 2004
                  • 4051
                  • 4.2.X

                  #9
                  Originally posted by wolfy
                  Thanks Ace, that's what I noticed as well.

                  Those show how to show something TO a member of a usergroup, but not how to make something show ON a person that is a MEMBER of a usergroup.

                  Note: I need this to work on secondary usergroups as well as primary.
                  Like, let's say.. I have a group of people who are in Registered Users, but some of them have paid for a Gold Membership. I want to be able to display something for those members, while leaving them in the Primary group of Registered Users? Then, some of those people have also been around for the whole time the site has been up, so they are also in a Secondary group called Founders. I want to be able to display both things for these people.

                  Etc, etc.

                  If anyone's figured this out, it would be awesome to know.

                  (Yes, Ranks are available, and that's the only way I have come up with, would prefer to be able to <vb:if> them if possible.)
                  My Live vB5 Site - NZEating.com
                  vBulletin Hosting | vBulletin Services - Need hosting for your vB? Need it installed? Something else? Let me take that hassle off your hands.

                  Comment

                  • wolfy
                    Senior Member
                    • Apr 2005
                    • 194
                    • 3.5.x

                    #10
                    +1 for this

                    Originally posted by Ace
                    Like, let's say.. I have a group of people who are in Registered Users, but some of them have paid for a Gold Membership. I want to be able to display something for those members, while leaving them in the Primary group of Registered Users? Then, some of those people have also been around for the whole time the site has been up, so they are also in a Secondary group called Founders. I want to be able to display both things for these people.

                    Etc, etc.

                    If anyone's figured this out, it would be awesome to know.

                    (Yes, Ranks are available, and that's the only way I have come up with, would prefer to be able to <vb:if> them if possible.)

                    Comment

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