Announcement

Collapse
No announcement yet.

Automatic bold usertitles for mods?

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

  • Automatic bold usertitles for mods?

    Anyway I can do this? I got custom usertitles for all users but I wanna have mod's stand out, usually have to enter in the bold code manually but how can I have it be bold automatically? if its possible. thanks

  • #2
    In the usergroup manager you can edit a user group's "Username HTML Markup" option with the tags you want to include on either side of that usergroup's title.

    Comment


    • #3
      Put this in your postbit and postbit_legacy templates, replacing $post[usertitle]:

      <if condition="$post[usergroupid]==5"><b>$post[usertitle]</b><else />$post[usertitle]</if>

      You might need to clean that up a bit as I do not know the usergroup ID of the moderator group, nor am I certain if that's the right $post variable for the user title, but it should do what you want it to.
      To alcohol! The cause of, and solution to, all of life's problems. -- Homer Simpson

      Comment


      • #4
        Isn't it alot easier just to do it the way jmottle said... that's how I did it and I was actually quite impressed that vbulletin now supports that as a standard feature 8)

        Comment


        • #5
          what jmottle said is for the USERNAMES....im talking the usertitles....if anyone knows the correct code can they help, cka I tried that with the userid of my mod group but it doesnt work. thanks

          Comment


          • #6
            This code should do the trick:

            PHP Code:
             <if condition="$bbuserinfo[usergroupid]==5"><div class="smallfont"><b>$post[usertitle]</b></div><else /><div class="smallfont">$post[usertitle]</div></if> 

            Comment


            • #7
              Add bold HTML to the moderator group usertitle?

              Comment


              • #8
                Uhm yes, what else could it do? Of course you need to control whether the usergroupid is the right one for your moderators. But it should be, as the moderator-group is mostly groupid 5

                Comment


                • #9
                  • Open the template: postbit
                  • Find this code:
                    <if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>
                  • Replace it with this code:
                    <if condition="$post['usertitle']">
                    <if condition="$post['usergroupid'] == 7">
                    <div class="smallfont"><strong>$post[usertitle]</strong></div>
                    <else />
                    <div class="smallfont">$post[usertitle]</div>
                    </if>
                    </if>
                  • Save the template and check your forum!
                  Attached Files
                  Last edited by Floris; Sun 14 Mar '04, 2:30am.

                  Comment


                  • #10
                    Could work too. But I am not sure, whether the usergroup is also part of $post. I thought, that the safest way would be $bbuserinfo

                    Comment


                    • #11
                      $bbuserinfo[] is from the user who is browsing the post, not the details of the user who made the post.

                      Comment


                      • #12
                        I still thing the best method would be to change the usertitle markup

                        But, to bold moderators usertitles so they can have any usertitle, and still be moderators (or if you dont have a moderator usergroup)

                        THIS METHOD DOES NOT CHECK USERGROUPS!

                        Use the following code:

                        Replace
                        Code:
                        <if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>
                        With

                        Code:
                        <if condition="$post['usertitle']"><if condition="can_moderate(0, '', $post['userid'])"><div class="smallfont"><strong>$post[usertitle]</strong></div><else /><div class="smallfont">$post[usertitle]</div></if></if>


                        ps- if you are going to check for a usergroup membership - you should use is_member_of($post, 7) because not everyone will use primary usergroups for a moderator (or any other usergroup for that matter)
                        Last edited by merk; Sun 14 Mar '04, 4:08am.

                        Comment


                        • #13
                          I tried this - it made *all* user titles bold...
                          The Admin Zone - Resources for Forum Administrators
                          Articles - Forum Review
                          Interviews:
                          KierScottJerryAndreasSteveWayneJakeFlorisLogicianErwin
                          Paul M

                          Comment


                          • #14
                            My method?


                            OH CRAPIT! Silly typo, i didnt remove <strong> from the else

                            Code:
                            <if condition="$post['usertitle']"><if condition="can_moderate(0, '', $post['userid'])"><div class="smallfont"><strong>$post[usertitle]</strong></div><else /><div class="smallfont">$post[usertitle]</div></if></if>

                            Comment


                            • #15
                              Originally posted by merk
                              My method?


                              OH CRAPIT! Silly typo, i didnt remove <strong> from the else
                              That was quick! Works great now... thanks.
                              The Admin Zone - Resources for Forum Administrators
                              Articles - Forum Review
                              Interviews:
                              KierScottJerryAndreasSteveWayneJakeFlorisLogicianErwin
                              Paul M

                              Comment

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