Log in

View Full Version : Help with modding how usernames display.


TomParad0x
11-05-2006, 11:21 PM
Basically, we run a radio station website ( http://haxradio.com ). We want to make it so our users that are listening to the show have an icon of some kind next to their name. We know how to mod the shoutcast to update a database for it, but i cant find where VB determines how a username looks.

Can some one direct me to the file / function / veriable (s) that controls how usernames look?

Also, i cant figure out what actually executes an MySQL query in the files, IE: I want to get a field "listening" in a table somewhere, how would i go about doing this?

Lastly, if i am modding this in the plugin management thing, what hook do i use?

I know PHP to actually *write* the plugin, but i am new to the vBulletin code layout.

Thanks, TomParad0x.

Reeve of shinra
11-05-2006, 11:32 PM
Wait... are you looking to add an icon next to the username or are you trying to change how the username looks or both?

Just to make your life easy,
1 - create a new product and associate your plugins and phrases with it

2. - create a new plugin using the global start hook location so you can access this anywhere on the site.

3. - look at the postbit template and add your html for the icon there.

ie:

<if condition = listening>
html for listening to radio station
<else />
html for not listening
</if>

TomParad0x
11-05-2006, 11:53 PM
Well, basically we want it to display a small icon by their name ( like a headphone set or something ) when they are listening, so the first one.

@ The other info. Thanks, i will look into that :)

edit: Where might i find the postbit template?

Reeve of shinra
11-06-2006, 12:18 AM
<div>
<if condition="$post['field5'] = ''yes">
<img src="path_to_img_here" />
</if>
</div>
<br />