Announcement

Collapse
No announcement yet.

[RELEASE vb2.0.3]Colored Online User Hack -> colored Buddies

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [RELEASE vb2.0.3]Colored Online User Hack -> colored Buddies

    Hi, i use the very cool Hack from Afterburner, but something is Missing: Extra Colors for Users on the Buddylist.

    It can also stand alone, but with Afterburners Hack, its all inclusive

    just open the file index.php

    after
    PHP Code:
    $numbervisible=0;
    $numberregistered=0
    add
    PHP Code:
    //buddies feststellen
      
    $buddyuserssql=str_replace(" ","' OR user.userid='",$bbuserinfo[buddylist]);
      
    $sql="SELECT DISTINCT session.lastactivity, user.userid,username,session.userid AS online,invisible
          FROM user
          LEFT JOIN session ON session.userid=user.userid
          WHERE (user.userid='
    $buddyuserssql')
          ORDER BY username"
    ;
      
    //$sql="SELECT * FROM user WHERE (userid='$buddyuserssql') AND invisible=0 ORDER BY username";
      
    $buddys=$DB_site->query($sql); 
    after
    PHP Code:
    } else {
            
    $username=$loggedin['username'];
            
    $invisibleuser '';
          }
          
    //$location=$loggedin['location']; 
    add
    PHP Code:
          // Abfrage ob Buddy dabei
          
    while ($buddy=$DB_site->fetch_array($buddys)) {
            if (
    $userid == $buddy['userid'] && $farbe == 2) {
              
    $username "<font color=darkgreen>".$username."</font>"// Color for Buddies
            
    }
          }  
          
    $DB_site->free_result($buddys); 
          
    $buddy '';
          
    $buddys=$DB_site->query($sql); 
    after
    PHP Code:
    if ($loggedin['invisible']==1) { // Invisible User but show to Admin
            
    $username=$loggedin['username'];
            
    $invisibleuser '*';
          } else {
            
    $username=$loggedin['username'];
          }
          
    $location=$loggedin['location']; 
    add
    PHP Code:
          // Abfrage ob Buddy dabei
          
    while ($buddy=$DB_site->fetch_array($buddys)) {
            if (
    $userid == $buddy['userid'] && $farbe == 2) {
              
    $username "<font color=darkgreen>".$username."</font>"// Color for Buddies
            
    }
          }
          
    $DB_site->free_result($buddys); 
          
    $buddy '';
          
    $buddys=$DB_site->query($sql); 

    Thats all
    i dont know if it is the finest way to realize what i want, but it works
    Last edited by Xenon; Sun 28 Oct '01, 10:29am.
    The price of freedom is eternal vigilance!
    - Thomas Jefferson
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X