The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
I have added user title graphics to my moderators on my message boards (similar to what SitePointForums.com has done) and the only way I figured out how to do this was manually edit moderator's options in the CP and add the HTML for the graphic.
Ideally, I'd like to have it so certain graphics go underneath different usergroup's user titles - but can you do that? I tried coding the HTML into a usergroup's properties and it didn't work. Since custom user titles are enabled, if my moderators change their titles, they will lose their graphic unless they code it in. There has to be a better way to do this, what I'm doing is not complicated. So, perhaps I overlooked a way to do this - should I be looking for a hack? Thanks for your assistance. ![]() |
#2
|
||||
|
||||
![]()
Yup, you need a hack. Since you have custom titles on putting the image in the usergroup's title won't do the trick.
![]() Anyway, in functions.php find: Code:
$post[joindate]=vbdate($registereddateformat,$post[joindate]); Code:
$post['userimage'] = '<img src="{imagesfolder}/userimages/'.$post['usergroupid'].'.gif" border="0">'; ![]() |
#3
|
||||
|
||||
![]()
Thanks.
![]() |
#4
|
||||
|
||||
![]()
Then use this code:
Code:
if (ismoderator(0, '', $post['userid'])) { $post['userimage'] = '<img src="https://vborg.vbsupport.ru/images/userimages/'.$post['usergroupid'].'.gif" border="0">'; } else { $post['userimage'] = ''; } |
#5
|
||||
|
||||
![]()
Thanks, Chen - weird that I didn't receive a notification to this thread.
Could you rephrase what I have to do from the beginning? ![]() |
#6
|
||||
|
||||
![]()
Ok
![]() Now create a folder named userimages under your images folder, and create 3 images: 5.gif - this will show up under Super Mods names. 7.gif - under Regular Mods names. 6.gif - under Admins names. |
#7
|
||||
|
||||
![]()
Ok, another update. Instead of this in the code:
Code:
if (ismoderator(0, '', $post['userid'])) { Code:
if ($post['usergroupid'] == 5 or $post['usergroupid'] == 6 or $post['usergroupid'] == 7) { freddie told me it's bad to run ismoderator() in a loop. ![]() |
#8
|
||||
|
||||
![]()
Chen,
I finally got around to actually trying this little code and it didn't work! I created a new folder in /images/userimages and uploaded the appropriate files there. I then made the changes to functions.php and there was no change on the site. Have you actually confirmed this works? ![]() To explain again, I want user titles under my administrators, senior moderator (super moderator), and moderators - no one else, not regular users. By your method, will it try to create an image for all usergroups or only ones with images uploaded? Also, am I right that the number of the image (i.e. 5.gif) corresponds to the usergroup ID? How can I find the usergroup ID? I would assume I could hover over the URL in the Admin CP page that lists the groups. Here is the code I used in function.php: Code:
$post['userimage'] = '<img src="http://www.sports-central.org/community/boards/images/userimages/'.$post['usergroupid'].'.gif" border="0">'; Any help is appreciated! |
#9
|
||||
|
||||
![]()
Re getting usergroup ID's, yes that's how.
Hmm, have you added $post[userimage] to your postbit template? I should've mentioned that! ![]() |
#10
|
||||
|
||||
![]()
Nope!
![]() ![]() |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|