The Arcive of vBulletin Modifications Site. |
|
Help: Customise the poster name formating in regard to usergroupid Details »»
|
|||||||||||||||||||||||||||||
|
Help: Customise the poster name formating in regard to usergroupid
Developer Last Online: Feb 2007
I've hacked the formating of in 'who's online', 'member list', and homepage's 'currently active users' so moderators and admins are shown in a different color.
I now which to do the same in the forum vies and tread view but I can't find where I need to edit the code. As an example, in forumdisplay.php I changed Quote:
Quote:
Can anyone help me with this? And by the way, I do not require a complete hack, I just need a hint on where I should look to insert my modifications. Thanks Show Your Support
|
|||||||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
In forumdisplay.php you need to change this:
Code:
$forumusers = $DB_site->query("SELECT username, invisible, userid
Code:
$forumusers = $DB_site->query("SELECT username, invisible, userid, usergroupid
|
|
#3
|
|||
|
|||
|
I already made that change in forumdisplay.php. I only included this code example to illustrate what I'm trying to do. This code already works for 'users browsing this forum' in forumdisplay.php. What I want to do now is apply the same customization to each post's poster name in showthread.php.
Any clue on that? |
|
#4
|
||||
|
||||
|
to mak the changes in showthread you have to edit admin/functions.php
the getpostbit function |
|
#5
|
|||
|
|||
|
I see nowhere to edit the username formating in admin/functions.php.
The only thing I found that look a little like it is the following (from line 225): PHP Code:
I guess this one is more complicated than the previous formating hacks I did. I might need a little more help with it. Thanks |
|
#6
|
||||
|
||||
|
just before the } else { claus add this lines:
if($post[usergroupid]==6) $post[username]="<font color=red>".$post[username]."</font>"; can't be easier
|
|
#7
|
|||
|
|||
|
Thanks a lot! It works like a charm.
|
|
#8
|
||||
|
||||
|
np
![]() i knew it, because this special thing has been asked two days ago, and i'll wrote this few lines to test it ![]() can i give you an advice: don't make the colors hardcoded. Better get it out from the database from the usergrouptable. so you can change it easier
|
|
#9
|
|||
|
|||
|
I agree, but I think this might be a little beyond my very small programming skills.
In fact, I can't code a thing on my own. I'm barely able to understand some parts of the actual code and make some small modifications to it using cut&paste and some small inputs. Playing with the database and modifying the admin control panel worries me a lot more than adding a hardcoded text formating line in a couple of places in the code. So unless you have an easy way to get this done, I'll stick with hardcoded modifications which I understand. Anyway, thanks a lot for your help. |
|
#10
|
||||
|
||||
|
i knew that procedure, but it's the best way to learn coding i think.
thast the way i learned the coding, and sometimes i have to do so once more ![]() but keep it in mind, and try to do it on a local board once you have little more experience. just think of: the best way to learn is to correct own errors
|
![]() |
|
|