vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Users Browsing Formatting (https://vborg.vbsupport.ru/showthread.php?t=37914)

Hwulex 04-26-2002 10:00 PM

Users Browsing Formatting
 
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'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

Quote:

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

Quote:

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:

PHP Code:

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

And replace with:
PHP Code:

$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

Quote:

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:

PHP Code:

<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

Quote:

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
PHP Code:

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


And replace with
PHP Code:

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

Quote:

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 :)

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 ;)

[EDIT]
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.
[/EDIT]

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

Quote:

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:
PHP Code:

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

to
PHP Code:

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

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

Quote:

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:

PHP Code:

} 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

Quote:

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:

PHP Code:

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

Replace With:
PHP Code:

// -=-=-=-=-=-=-=-=-=-=-=- 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

Quote:

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] 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

Quote:

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:

PHP Code:

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

Replace With:
PHP Code:

// -=-=-=-=-=-=-=-=-=-=-=- 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


All times are GMT. The time now is 06:30 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01589 seconds
  • Memory Usage 1,869KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (12)bbcode_php_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete