Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-04-2002, 02:35 PM
Tim Wheatley's Avatar
Tim Wheatley Tim Wheatley is offline
 
Join Date: Nov 2001
Location: England
Posts: 489
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default colors staff on 'users browsing this forum' on forumdisplay.php

Hi,

I'd like staff names to be red (admin) and green (mods/sup-mods) on this:

(Users Browsing this Forum: (44 members) Ed Clark, pegas77, Herb, BillK, Meik Thiemann, Kieron, David Biggs, David Wright Lo67, Jamnut*, tenmantaylor, Bmod, Peter O'Connor, WilliamsBMW3, Mark Levoe, TheoF.......

which shows under the mod list here:
http://forum.racesimcentral.com/foru...?s=&forumid=36

I have coloured the names inside the postbit and on who's online, I'd like them to be on there or (if possible) everywhere on the whole board???
Reply With Quote
  #2  
Old 08-04-2002, 02:44 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

in forumdisplay.php
find:
PHP Code:
if ($showforumusers) {
    
$datecut $ourtimenow $cookietimeout;
    
$browsers '';
    
$comma '';
    
$forumusers $DB_site->query("SELECT username, invisible, userid
                        FROM user
                        WHERE  inforum = 
$foruminfo[forumid]
                            AND lastactivity > 
$datecut
                            AND lastvisit <> lastactivity"
);
    while (
$forumuser $DB_site->fetch_array($forumusers)) {
        if ((!
$forumuser['invisible'] or $bbuserinfo['usergroupid'] == 6) and $bbuserinfo['userid'] != $forumuser['userid']) {
            
$userid $forumuser['userid'];
            
$username $forumuser['username'];
            if (
$forumuser['invisible'] == 1) { // Invisible User but show to Admin
                
$invisibleuser '*';
            } else {
                
$invisibleuser '';
                 }
            eval(
"\$browsers .= \"".$comma.gettemplate('forumdisplay_loggedinuser')."\";");
            
$comma ', ';
        }
    } 
replace it with:
PHP Code:
if ($showforumusers) {
    
$datecut $ourtimenow $cookietimeout;
    
$browsers '';
    
$comma '';
    
$forumusers $DB_site->query("SELECT username, invisible, userid, usergroupid
                        FROM user
                        WHERE  inforum = 
$foruminfo[forumid]
                            AND lastactivity > 
$datecut
                            AND lastvisit <> lastactivity"
);
    while (
$forumuser $DB_site->fetch_array($forumusers)) {
        if(
$forumuser['usergroupid']==6$forumuser['username'] = "<font color=red>".$forumuser['username']."</font>";
                                elseif(
$forumuser['usergroupid']==or $forumuser['usergroupid']==7$forumuser['username'] = "<font color=green>".$forumuser['username']."</font>";
                           if ((!
$forumuser['invisible'] or $bbuserinfo['usergroupid'] == 6) and $bbuserinfo['userid'] != $forumuser['userid']) {
            
$userid $forumuser['userid'];
            
$username $forumuser['username'];
            if (
$forumuser['invisible'] == 1) { // Invisible User but show to Admin
                
$invisibleuser '*';
            } else {
                
$invisibleuser '';
                 }
            eval(
"\$browsers .= \"".$comma.gettemplate('forumdisplay_loggedinuser')."\";");
            
$comma ', ';
        }
    } 
should work
Reply With Quote
  #3  
Old 08-04-2002, 06:54 PM
Tim Wheatley's Avatar
Tim Wheatley Tim Wheatley is offline
 
Join Date: Nov 2001
Location: England
Posts: 489
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you. I had to modify it to this to exist with current hacks (plus I added bold tags), but it only shows the mods as green, doesn't show the admins (namely me when I was viewing it) as red. So any idea how to get the red functioning? I have an understanding of PHP but don't know how to write my own - but I can't see anything wrong as it's logically the same as the one underneath (the mod-sup.mod line).
Reply With Quote
  #4  
Old 08-04-2002, 06:57 PM
Tim Wheatley's Avatar
Tim Wheatley Tim Wheatley is offline
 
Join Date: Nov 2001
Location: England
Posts: 489
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
if ($showforumusers) { 
$datecut = $ourtimenow - $cookietimeout; 
$browsers = ''; 
$comma = ''; 
$forumusers = $DB_site->query("SELECT username, invisible, userid, usergroupid 
FROM user 
WHERE inforum = $foruminfo[forumid] 
AND lastactivity > $datecut 
AND lastvisit <> lastactivity"); 
while ($forumuser = $DB_site->fetch_array($forumusers)) { 
if($forumuser['usergroupid']==6) $forumuser['username'] = "<font color='red'><b>".$forumuser['username']."</b></font>"; 
elseif($forumuser['usergroupid']==5 or $forumuser['usergroupid']==7) $forumuser['username'] = "<font color='green'><b>".$forumuser['username']."</b></font>"; 
if ((!$forumuser['invisible'] or $bbuserinfo['usergroupid'] == 6) and $bbuserinfo['userid'] != $forumuser['userid']) { 
$userid = $forumuser['userid']; 
$username = $forumuser['username']; 
if ($forumuser['invisible'] == 1) { // Invisible User but show to Admin 
$invisibleuser = '*'; 
} else { 
$invisibleuser = ''; 
} 
eval("\$browsers .= \"".$comma.gettemplate('forumdisplay_loggedinuser')."\";"); 
$comma = ', ';
$usercount++; 
} 
}
Reply With Quote
  #5  
Old 08-04-2002, 07:33 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i don't see a bug in this code

are you sure your adminusergroup is 6?
Reply With Quote
  #6  
Old 08-04-2002, 07:46 PM
Tim Wheatley's Avatar
Tim Wheatley Tim Wheatley is offline
 
Join Date: Nov 2001
Location: England
Posts: 489
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm guessing that it's something to do with admin invisibility??

Yeah it's the default 5, 6, 7.
Reply With Quote
  #7  
Old 08-04-2002, 07:58 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

no it has to do with yourself: the code of showing yourself at the browsing list is another part of code:

below the code above, find this:
PHP Code:
if ((!$bbuserinfo['invisible'] or $bbuserinfo['usergroupid'] == 6) and $bbuserinfo['userid'] <> 0) {
        
$userid $bbuserinfo['userid'];
        
$username $bbuserinfo['username']; 
after that add:
PHP Code:
if($bbuserinfo['usergroupid']==6$username="<font color='red'><b>".$username."</b></font>";
elseif(
$bbuserinfo['usergroupid']==or $bbuserinfo['usergroupid']==7)  $username="<font color='green'><b>".$username."</b></font>"
now it should work
Reply With Quote
  #8  
Old 08-04-2002, 08:16 PM
Tim Wheatley's Avatar
Tim Wheatley Tim Wheatley is offline
 
Join Date: Nov 2001
Location: England
Posts: 489
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nearly there!

I am red, so are the mods. Other admins are normal... Any further clues for the dunce of php we all call Tim Wheatley?
Reply With Quote
  #9  
Old 08-04-2002, 08:20 PM
Tim Wheatley's Avatar
Tim Wheatley Tim Wheatley is offline
 
Join Date: Nov 2001
Location: England
Posts: 489
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The mods are green I mean.
Reply With Quote
  #10  
Old 08-05-2002, 09:35 PM
Tim Wheatley's Avatar
Tim Wheatley Tim Wheatley is offline
 
Join Date: Nov 2001
Location: England
Posts: 489
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*bump* This still isn't working.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:35 PM.


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.08430 seconds
  • Memory Usage 2,292KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (4)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete