vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Working hack just stopped working after upgrade to v2.2.6 - please advise (https://vborg.vbsupport.ru/showthread.php?t=39443)

skerjean 06-04-2002 07:54 PM

Working hack just stopped working after upgrade to v2.2.6 - please advise
 
Hi,

I made a little hack to display 'users browing this forum' in different colors according to their usergroupid. It was working fine until I upgraded to vBulletin v2.2.6, but I can't find why.

Here's an abstract from my forumdisplay.php (from line 687):
PHP Code:

// Get users browsing this forum
$onlineusers '';
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['invisible'] or $bbuserinfo['usergroupid'] == 6) and $bbuserinfo['userid'] != $forumuser['userid']) {
            
$userid $forumuser['userid'];
//          $username = $forumuser['username'];

// hack: highlight usergroups


                
if      (($forumuser[usergroupid] == 6) or ($forumuser[usergroupid] == 9))  $username "<b><font color=\"EED500\">$forumuser[username]</font></b>";
                else if ((
$forumuser[usergroupid] == 5) or ($forumuser[usergroupid] == 7))  $username "<b><font color=\"A0A0A0\">$forumuser[username]</font></b>";
                else                                                                        
$username "<b><font color=\"FFFFFF\">$forumuser[username]</font></b>";

// end hack

            
if ($forumuser['invisible'] == 1) { // Invisible User but show to Admin
                
$invisibleuser '*';
            } else {
                
$invisibleuser '';
                 }
            eval(
"\$browsers .= \"".$comma.gettemplate('forumdisplay_loggedinuser')."\";");
            
$comma ', ';
        }
    } 

I commented "$username = $forumuser['username'];" to replace it with the hack code.

Admin is usergroup 6 on my board (I did double-checked it) so it should be displayed in yellow (EED500). However, admins are still shown in white as are registered users. If I change "FFFFFF" to "FF000" in the else line, only registered users are shown in red, and admins are still in white.

So there's obviously something wrong with this, but I don't know what. I appreciate your help.

Thanks.

skerjean 06-11-2002 05:39 PM

huh... is it that nobody can help me or that nobody wants to help me?

24 views and a week later and still no anwers. Anybody can advise?

Atian 06-12-2002 02:38 PM

you should turn your forumdisplay.php to normal and code the hack again...


All times are GMT. The time now is 01:37 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.00963 seconds
  • Memory Usage 1,733KB
  • 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
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete