PDA

View Full Version : Users Browsing Formatting


Hwulex
04-26-2002, 10:00 PM
This may well of been done before, but I did look and couldn't find anything.

This small (ok, teeny) hack changes the way that usernames are displayed in [Users Browsing this Forum:]
on the forum display page.
I'd always wondered why vB had made Moderators names in bold, and Admininstrators names bold italic on the front page
(Who's Online) but no-where else where it applied, so I altered the forumdisplay.php file so that Mods and Admin were
always bold (and italic) for "Users Browsing" too.

To see a demo of this hack working, please visit
http://www.hwulex.co.uk/vB/forumdisplay.php?forumid=2

NB: If you do install this hack, please click on the INSTALL button. You will receive updates in your email whenever I add new features to it.
Also post a reply with your comments, they are appreciated.

Tested on: vBulletin 2.2.5
File to modify: forumdisplay.php (also showthread.php if using with FireFly's hack)
Estimated Install Time: 2 minutes

HACK UPDATES
Version 1.1
???????????
- Now includes instructions to use with FireFly (https://vborg.vbsupport.ru/member.php?action=getinfo&userid=1)'s Users Browsing This Thread hack.

Version 1.2
???????????
- Altered hack to now work with the Super Moderator user group as well.
- Added instructions for Glow Text and Colours


|H|

Hwulex
04-27-2002, 01:46 AM
Here's a demo shot of what the hack looks like installed:

JulianD
04-27-2002, 02:20 AM
Nice addition! :) thanks for sharing!

Velocd
04-27-2002, 03:18 AM
Very nice :D
I've been thinking about doing this recently also, but haven't found the time. Thanks!

Velocd
04-27-2002, 03:51 AM
Damnit, this hack won't doesn't want to work. I modified the code and everything but for some reason the formatting is not being applied, it still shows up as normal font. I setted the usergroup id's to their correct value also.

NTLDR
04-27-2002, 06:01 AM
Originally posted by Velocd
I've been thinking about doing this recently also, but haven't found the time.

Same here, I've been thinking about trying to change that to ;)

I will Intsall when I get home from work, thanks for sharing with us :D

Floris
04-27-2002, 07:47 AM
fnx for sharing!

Hwulex
04-27-2002, 09:47 AM
Originally posted by Velocd
Damnit, this hack won't doesn't want to work. I modified the code and everything but for some reason the formatting is not being applied, it still shows up as normal font. I setted the usergroup id's to their correct value also.
Hmm, not sure why it's not working for ou Velocd. I've installed it on 3 different copies here and works fine.
Did you definately do the first line, else it won't work. I know because this is why the hack wouldn't work to start with :p

Around line 691
Find the code:

$forumusers = $DB_site->query("SELECT username, invisible, userid

And replace with:

$forumusers = $DB_site->query("SELECT username, invisible, userid, usergroupid


If it still doesn't work, you could send me your forumdisplay.php file to vB_Hacks@Hwulex.com and I'll gladly take a look for you :)

|H|

John
04-27-2002, 09:57 AM
This doesn't screw up with version 2.2.4 does it? :p

Crazy Mofo
04-27-2002, 10:29 AM
is there away too make them glow?

John
04-27-2002, 10:43 AM
Originally posted by Crazy Mofo
is there away too make them glow?

I don't have this installed myself, so I can test this - but your typical glow code looks something like:

<table style="filter:glow(color=[COLORHERE], strength=3)">Thing to format</table>

Should be fairly easy to add - I'm sure Hwu will do it ;)

P.S. - does it have to be in a table? :confused:

Hwulex
04-27-2002, 10:57 AM
Originally posted by Crazy Mofo
is there away too make them glow?
Yes, it's fairly easy to make them glow.

When you've installed the hack;

Find

if ($bbuserinfo['usergroupid'] == 6) {
$username = "<b><i>$bbuserinfo[username]</i></b>";




And replace with

if ($bbuserinfo['usergroupid'] == 6) {
$username = "<span style=\"width: 40; height: 12; color: blue; Filter: Glow(Color=blue, Strength=2)\">$bbuserinfo[username]</span>";


Just change the Style settings as you please.
This can of course be done to any of the $username = "$bbuserinfo[username]"; code at your discretion.

I've attatched a small image to show what it looks like when applied :)

NTLDR
04-27-2002, 05:41 PM
Installed on 2.2.4 and seems to be working very nicely, thanks Hwulex :D

Unknown553
04-27-2002, 08:50 PM
If you want it to glow, don't use the table tag. This will put the name in a new table, which will not list the names in a line, it will be broken up..

(Users Browsing this Forum: name1, name2,
name3
, name 4)

I believe....

Hwulex
04-27-2002, 08:53 PM
Originally posted by Unknown553
If you want it to glow, don't use the table tag. This will put the name in a new table, which will not list the names in a line, it will be broken up..

(Users Browsing this Forum: name1, name2,
name3
, name 4)

I believe....
Correct, if you want to use the Glow feature, follow the instructions I put in Post #12 (https://vborg.vbsupport.ru/showthread.php?postid=244934#post244934) :)

Crazy Mofo
04-27-2002, 09:47 PM
Thx you are my hero :D sl ois there a way too make it show like that on Who's Online if there is ill be over da moon

NTLDR
04-27-2002, 09:53 PM
Yeah, Who's Online can be changed to, I haven't got time to post the changes now, I need sleep :D but I can do tomorrow ;)


Thinking about it Who's Online & Currently Active users already does this, unless I'm very much mistaken, which I don't think I am! I have changed my Who's Online & Active Users to display me in a different colour, but the Bold and Italics I belive have allways been there.

John
04-28-2002, 04:01 PM
You're right NTLDR, "Who's Online" does already do this automatically :)

TECK
04-28-2002, 04:11 PM
nice job :D
altough.. your first post.. it looks alot like my thread descriptions... jk.

Hwulex
04-29-2002, 12:04 AM
Originally posted by nakkid
nice job :D
altough.. your first post.. it looks alot like my thread descriptions... jk.

Errrr.... I've no idea what you mean ;) :bandit: :cheeky:



'Tis me first hack, and yours looked eye catching :)
Will suss me own layout for next time :)

Boofo
04-29-2002, 12:07 AM
Is there a way to get it to display the Admin and Mods in a different color like the colored online users hack?

Hwulex
04-29-2002, 02:32 PM
Yes, that's not too hard to do. You just need to alter the Admin/Mod lines like so:
if ($bbuserinfo['usergroupid'] == 6) {
$username = "<b><i>$bbuserinfo[username]</i></b>";
to
if ($bbuserinfo['usergroupid'] == 6) {
$username = "<font color=FF0000>$bbuserinfo[username]<font>";

And so on :)

Boofo
04-29-2002, 04:20 PM
Thank you very much. Looks great! BTW: Shouldn't the colors have a # before them? I found out it won't take the quotes for the font color but it accepted the number sign and worked without it too. (Shows you what I know about it, huh? :-) )

psico
05-01-2002, 11:31 AM
What about SUPERMODS???
This hacks only shows Mods and Admins different from the rest of the users, I´m I right?

Hwulex
05-01-2002, 12:01 PM
Psico, you're right!
I completely forgot about SuperMods, probably because I don't use them. I'll go alter it now :)

Hwulex
05-01-2002, 12:32 PM
Hack Updated to Version 1.2 to include support for SuperMods

Download v1.2 (https://vborg.vbsupport.ru/showthread.php?postid=244831#post244831)

NTLDR
05-01-2002, 01:53 PM
Thanks for updating the hack :D

I was just going to modify it myself to apply the formatting to super mods ;)

inetd
05-02-2002, 06:13 PM
don't work update. Hwulex, please post what need replace for user who installed version 1-1.. Please

NTLDR
05-02-2002, 06:18 PM
Originally posted by inetd
don't work update. Hwulex, please post what need replace for user who installed version 1-1.. Please

The update does work, the line that needs to be added twice is:

} elseif ($forumuser['usergroupid'] == 5) {
$username = "<b><u>$forumuser[username]</u></b>";

Thats the only change that I can see and works for me.

inetd
05-02-2002, 06:34 PM
NTLDR, that only for Super Mods, but i need glow too...

inetd
05-03-2002, 04:06 PM
ohhh!
I'm very idiot :( :D
I'm find EXTRAS in new Instructions :) :lol:

N9ne
06-30-2002, 07:44 AM
How can I make it so usergroup 8 on my board is in bold and italics too?

Chris M
06-30-2002, 01:27 PM
Just a Question...

When I try and do it for "Users Browsing This Thread", I get a parse error...

Why?

Satan

lifesourcerec
06-30-2002, 01:56 PM
heh.. how do you find out the usergroupid? :) Haven't messed with it in a while.

Chris M
06-30-2002, 03:01 PM
Well...

Hover over the Usergroup in "Modify" section of "User Groups"...

The number at the end of the link is the usegroupid...

Usually :

Guest = 0
Not Logged in = 1
Registered = 2
Super Mod = 5
Mod = 7
Admin = 6

Satan

N9ne
06-30-2002, 06:09 PM
bump

Hwulex
06-30-2002, 06:42 PM
Originally posted by Tha Rock
How can I make it so usergroup 8 on my board is in bold and italics too?
To use it with usergroup 8 as well, then use the following Replace Code instead of the one from the instructions file

Around line 697
Find the code:

if ((!$forumuser['invisible'] or $bbuserinfo['usergroupid'] == 6) and $bbuserinfo['userid'] != $forumuser['userid']) {
$userid = $forumuser['userid'];
$username = $forumuser['username'];

Replace With:

// -=-=-=-=-=-=-=-=-=-=-=- Bold Mods & Admin on Forum Display -=-=-=-=-=-=-=-=-=-=-=-
if ($forumuser['usergroupid'] == 6) {
$username = "<b><i>$forumuser[username]</i></b>";
} elseif ($forumuser['usergroupid'] == 8) {
$username = "<b><i>$forumuser[username]</i></b>";
} elseif ($forumuser['usergroupid'] == 7) {
$username = "<b>$forumuser[username]</b>";
} elseif ($forumuser['usergroupid'] == 5) {
$username = "<b><u>$forumuser[username]</u></b>";
} else {
$username = $forumuser[username];
}
// -=-=-=-=-=-=-=-=-=-=-=- Bold Mods & Admin on Forum Display -=-=-=-=-=-=-=-=-=-=-=-
I've set the formatting of Usergroup 8 to Bold and Italic as requested, but can be changed to whatever you want :)

Use this for both replacement sets.

HTH

Hwulex

Hwulex
06-30-2002, 06:44 PM
Originally posted by hellsatan
Just a Question...

When I try and do it for "Users Browsing This Thread", I get a parse error...

Why?

Satan
Don't honestly know mate, have you got any other hacks installed? And did you copy+paste all code exact from the instructions.txt file?
If you're still having problems with it you could send it over to me [Email Me (hwulex@hwulex.com)] and I'll take a look at it for you :)

Regards.

H

Chris M
06-30-2002, 06:47 PM
I'll see if I can get it working again, but I replaced it with the pre-your hacked version...

If it doesnt work this time, I'll email it to you...

Satan

N9ne
06-30-2002, 06:56 PM
Originally posted by Hwulex

To use it with usergroup 8 as well, then use the following Replace Code instead of the one from the instructions file

Around line 697
Find the code:

if ((!$forumuser['invisible'] or $bbuserinfo['usergroupid'] == 6) and $bbuserinfo['userid'] != $forumuser['userid']) {
$userid = $forumuser['userid'];
$username = $forumuser['username'];

Replace With:

// -=-=-=-=-=-=-=-=-=-=-=- Bold Mods & Admin on Forum Display -=-=-=-=-=-=-=-=-=-=-=-
if ($forumuser['usergroupid'] == 6) {
$username = "<b><i>$forumuser[username]</i></b>";
} elseif ($forumuser['usergroupid'] == 8) {
$username = "<b><i>$forumuser[username]</i></b>";
} elseif ($forumuser['usergroupid'] == 7) {
$username = "<b>$forumuser[username]</b>";
} elseif ($forumuser['usergroupid'] == 5) {
$username = "<b><u>$forumuser[username]</u></b>";
} else {
$username = $forumuser[username];
}
// -=-=-=-=-=-=-=-=-=-=-=- Bold Mods & Admin on Forum Display -=-=-=-=-=-=-=-=-=-=-=-
I've set the formatting of Usergroup 8 to Bold and Italic as requested, but can be changed to whatever you want :)

Use this for both replacement sets.

HTH

Hwulex


What do you mean by using it for both replacement sets? How can I do that?

Also, when I made the change in forumdisplay.php, I got the following Parse Error;

Parse error: parse error, unexpected '}' in /home/sdsym/public_html/forum/forumdisplay.php on line 759

N9ne
06-30-2002, 07:02 PM
ignore my above problem, I now have another problem, now it just doesn't show any names at all :(

Hwulex
06-30-2002, 07:35 PM
By both replacement sets I mean from my instructions sorry, it's bad wording because they're called that in the vB admin panel.

I meant to use that bit of code I posted above ^^ for both

Around line 697
Find the code:

And replace with:...


AND


Around line 711
Find the code:

And replace with:...

If ya get me.

If you're still having trouble, the offer is to you as well, feel free to send me the file and I'll have a scan over it :)

N9ne
06-30-2002, 07:41 PM
I'll attempt the hack once again, if it still does not work, I will do so :)

N9ne
06-30-2002, 07:53 PM
ok well I just tried it again and it works ;) this is just a great hack, thumbs up!

Hwulex
06-30-2002, 09:15 PM
Thankyou :) and glad to hear all is working ok

Gary King
07-10-2002, 07:51 PM
Nice little hack :)

Renegade
07-24-2002, 07:30 PM
Very nicely done.