Log in

View Full Version : Code for this


silvermerc
10-13-2011, 08:55 PM
Hi,

Im wanting to make a shoutbox, but im wanting to make the username's come with the colours aswel? If you get what i mean here's a example.
Ross ~ Administrator (Colour = Red)

When he talks on the shoutbox im wanting his colour to show up, How would i do this? Plus make it clickable so it takes the user to his profile?
Ross

kh99
10-13-2011, 09:33 PM
For the color, look at the function fetch_musername in includes/function.php. Maybe you can even call that function if you're including vb files in your shoutbox code.

To link to the profile you just need to make a link to member.php?u= and add the userid on the end.

youfif
10-15-2011, 02:05 PM
If every entry calls fetch_musername, this would not be very good.

You can also read the beginning and the ending of the userstyle from the forum cache. You "send" the usergroupid to this function, use the forum search.

kh99
10-15-2011, 02:47 PM
If every entry calls fetch_musername, this would not be very good.


Why not? I looked at the code in fetch_musername() and don't see anything there that looks like it would be expensive to call many times.