vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   vBChat v2.3 (https://vborg.vbsupport.ru/showthread.php?t=71049)

djjeffa 11-11-2004 01:55 AM

anybody figer out whats up with the smillies? half are red x's and how could i close rooms?

SVTOA 11-11-2004 02:09 AM

Everything works on mine now.

Great hack.

Jag 11-11-2004 02:36 AM

*installed*

You're missing a semicolon in one of the instructional code bits BTW. ;)

RsX 11-11-2004 03:37 AM

Quote:

Originally Posted by RsX
yeah whats wrong here? (same as zorobz question)

Code:

// ### LOGGED IN USERS #################################################
$activeusers = '';
if ($vboptions['displayloggedin'])
{
        $datecut = TIMENOW - $vboptions['cookietimeout'];
        $numbervisible = 0;
        $numberregistered = 0;
        $numberguest = 0;

        $forumusers = $DB_site->query("
                SELECT
                        user.username, (user.options & $_USEROPTIONS[invisible]) AS invisible, user.usergroupid,
                        session.userid, session.inforum, session.lastactivity,
                        IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid
                FROM " . TABLE_PREFIX . "session AS session
                LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid = session.userid)
                WHERE session.lastactivity > $datecut
                " . iif($vboptions['displayloggedin'] == 1, "ORDER BY username ASC") . "
        ");

        if ($bbuserinfo['userid'])
        {
                // fakes the user being online for an initial page view of index.php
                $bbuserinfo['joingroupid'] = iif($bbuserinfo['displaygroupid'], $bbuserinfo['displaygroupid'], $bbuserinfo['usergroupid']);
                $userinfos = array
                (
                        $bbuserinfo['userid'] => array
                        (
                                'userid' => $bbuserinfo['userid'],
                                'username' => $bbuserinfo['username'],
                                'invisible' => $bbuserinfo['invisible'],
                                'inforum' => 0,
                                'lastactivity' => TIMENOW,
                                'usergroupid' => $bbuserinfo['usergroupid'],
                                'displaygroupid' => $bbuserinfo['displaygroupid'],
                        )
                );
        }
        else
        {
                $userinfos = array();
        }
        $inforum = array();

// Get the users in vBChat
        $vbchat_users = array();

        while ($loggedin = $DB_site->fetch_array($forumusers))
        {
                $userid = $loggedin['userid'];
                if (!$userid)
                {        // Guest
                        $numberguest++;
                        $inforum["$loggedin[inforum]"]++;
                }
                else if (empty($userinfos["$userid"]) OR ($userinfos["$userid"]['lastactivity'] < $loggedin['lastactivity']))
                {
                        $userinfos["$userid"] = $loggedin;
                }

                if(preg_match("/vBChat.php/",$loggedin['location']) && $loggedin['userid']){
                $vbchat_users[$loggedin['userid']] = $loggedin;
                }

        }

        // Configure Peeps In vBChat
        $invBChat = "";

        if(is_array($vbchat_users)){
                foreach($vbchat_users as $invbc){
                        if($invBChat == ""){
                        $extra = "";
                        } else {
                        $extra = ", ";
                        }

                // Get Username Style
                $invbc['musername'] = fetch_musername($invbc);

                $invBChat .= "{$extra}<a href='member.php?{$session['sessionurl']}&u={$invbc['userid']}'>{$invbc['musername']}</a>";
                }
        }

        if($invBChat == ""){
        $invBChat = "<i>No one is currently inside vBChat</i>";
        }

        foreach($userinfos AS $userid => $loggedin)
        {
                $numberregistered++;
                if ($userid != $bbuserinfo['userid'])
                {
                        $inforum["$loggedin[inforum]"]++;
                }
                $loggedin['musername'] = fetch_musername($loggedin);

                if (fetch_online_status($loggedin))
                {
                        $numbervisible++;
                        eval('$activeusers .= ", ' . fetch_template('forumhome_loggedinuser') . '";');
                }
        }

        // memory saving
        unset($userinfos, $loggedin);

        $activeusers = substr($activeusers , 2); // get rid of initial comma

        $DB_site->free_result($loggedins);

        $totalonline = $numberregistered + $numberguest;
        $numberinvisible = $numberregistered - $numbervisible;

        // ### MAX LOGGEDIN USERS ################################



And also How to change message and connected users area BG without killing the style sheet ?


Doesnt anyone know how to fix this?
:ermm:

Red Blaze 11-11-2004 03:52 AM

Upgraded mine with no problems, excellent. ^_^

Zero Tolerance 11-11-2004 08:00 AM

Im at college at this moment, so when i get home ill fix the semi-colon error and update the index.php edits so it will work for everyone else, then i'll take a looksy at some of your idea's :)

Sorry for any problems, but with a little patience i will fix them.

- Zero Tolerance

Cornolio 11-11-2004 08:52 AM

it's a great hack, but.. i've got this error:
Code:

Parse error: parse error, unexpected T_VARIABLE in /web/htdocs/www.discutere.it/home/admincp/index.php on line 567
:confused:
at that line there's
Code:

$printhr = false;
can you help me?
tnx :)

RsX 11-11-2004 09:53 AM

Yeah i have this prob also.. Also,

I have some ideas...

1) Smiley caegory under vBChat options to organize how many smileys, witch smilies, ect..

2)In the options category page add a "BG editor" and a place to insert html wrap tags (like in usergroup editor) so we can put any image/color we want in the bg..

ih and also... Whats wrong here?


PHP Code:

// ### LOGGED IN USERS #################################################
$activeusers '';
if (
$vboptions['displayloggedin'])
{
    
$datecut TIMENOW $vboptions['cookietimeout'];
    
$numbervisible 0;
    
$numberregistered 0;
    
$numberguest 0;

    
$forumusers $DB_site->query("
        SELECT
            user.username, (user.options & 
$_USEROPTIONS[invisible]) AS invisible, user.usergroupid,
            session.userid, session.inforum, session.lastactivity,
            IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid
        FROM " 
TABLE_PREFIX "session AS session
        LEFT JOIN " 
TABLE_PREFIX "user AS user ON(user.userid = session.userid)
        WHERE session.lastactivity > 
$datecut
        " 
iif($vboptions['displayloggedin'] == 1"ORDER BY username ASC") . "
    "
);

    if (
$bbuserinfo['userid'])
    {
        
// fakes the user being online for an initial page view of index.php
        
$bbuserinfo['joingroupid'] = iif($bbuserinfo['displaygroupid'], $bbuserinfo['displaygroupid'], $bbuserinfo['usergroupid']);
        
$userinfos = array
        (
            
$bbuserinfo['userid'] => array
            (
                
'userid' => $bbuserinfo['userid'],
                
'username' => $bbuserinfo['username'],
                
'invisible' => $bbuserinfo['invisible'],
                
'inforum' => 0,
                
'lastactivity' => TIMENOW,
                
'usergroupid' => $bbuserinfo['usergroupid'],
                
'displaygroupid' => $bbuserinfo['displaygroupid'],
            )
        );
    }
    else
    {
        
$userinfos = array();
    }
    
$inforum = array();

// Get the users in vBChat
    
$vbchat_users = array();

    while (
$loggedin $DB_site->fetch_array($forumusers))
    {
        
$userid $loggedin['userid'];
        if (!
$userid)
        {    
// Guest
            
$numberguest++;
            
$inforum["$loggedin[inforum]"]++;
        }
        else if (empty(
$userinfos["$userid"]) OR ($userinfos["$userid"]['lastactivity'] < $loggedin['lastactivity']))
        {
            
$userinfos["$userid"] = $loggedin;
        }

        if(
preg_match("/vBChat.php/",$loggedin['location']) && $loggedin['userid']){
        
$vbchat_users[$loggedin['userid']] = $loggedin;
        }

    }

    
// Configure Peeps In vBChat
    
$invBChat "";

    if(
is_array($vbchat_users)){
        foreach(
$vbchat_users as $invbc){
            if(
$invBChat == ""){
            
$extra "";
            } else {
            
$extra ", ";
            }

        
// Get Username Style
        
$invbc['musername'] = fetch_musername($invbc);

        
$invBChat .= "{$extra}<a href='member.php?{$session['sessionurl']}&u={$invbc['userid']}'>{$invbc['musername']}</a>";
        }
    }

    if(
$invBChat == ""){
    
$invBChat "<i>No one is currently inside vBChat</i>";
    }

    foreach(
$userinfos AS $userid => $loggedin)
    {
        
$numberregistered++;
        if (
$userid != $bbuserinfo['userid'])
        {
            
$inforum["$loggedin[inforum]"]++;
        }
        
$loggedin['musername'] = fetch_musername($loggedin);

        if (
fetch_online_status($loggedin))
        {
            
$numbervisible++;
            eval(
'$activeusers .= ", ' fetch_template('forumhome_loggedinuser') . '";');
        }
    }

    
// memory saving
    
unset($userinfos$loggedin);

    
$activeusers substr($activeusers 2); // get rid of initial comma

    
$DB_site->free_result($loggedins);

    
$totalonline $numberregistered $numberguest;
    
$numberinvisible $numberregistered $numbervisible;

    
// ### MAX LOGGEDIN USERS ################################ 



And also How to change message and connected users area BG without killing the style sheet ?

manguish 11-11-2004 10:34 AM

Great chat room mod.

BUT : I have a number of usergroups banned from the chat - it bans them ok, and shows the right error message - HOWEVER - they still show within the chat room who's in the chat box while they are reading the error message.

Any ideas?

manguish 11-11-2004 10:50 AM

FOR ALL THOSE HAVING PROBLEMS WITH THE WHOs IN THE CHAT ROOM ON THE INDEX :

If you haven't got the code as stated in the instructions use this - it is working on my board (3.0.0) :

PHP Code:

// Get the users in vBChat
    
$vbchat_users = array();
    while (
$loggedin $DB_site->fetch_array($forumusers))
    {
        
$userid $loggedin['userid'];
        if (!
$userid)
        {    
// Guest
            
$numberguest++;
            
$inforum["$loggedin[inforum]"]++;
        }
        else if (empty(
$userinfos["$userid"]['lastactivity']) OR ($userinfos["$userid"]['lastactivity'] < $loggedin['lastactivity']))
        {
            
$userinfos["$userid"] = $loggedin;
            
$numberregistered++;
            if (
$userid != $bbuserinfo['userid'])
            {
                
$inforum["$loggedin[inforum]"]++;
            }
            
$loggedin['musername'] = fetch_musername($loggedin);

            if (
fetch_online_status($loggedin))
            {
                
$numbervisible++;
                eval(
'$activeusers .= ", ' fetch_template('forumhome_loggedinuser') . '";');
            }

            if(
preg_match("/vBChat.php/",$loggedin['location']) && $loggedin['userid'])
            {
                
$vbchat_users[$loggedin['userid']] = $loggedin;
            }
        }
    }
    
// Configure Peeps In vBChat
    
$invBChat "";

    if(
is_array($vbchat_users)){
        foreach(
$vbchat_users as $invbc){
            if(
$invBChat == ""){
            
$extra "";
            } else {
            
$extra ", ";
            }

        
// Get Username Style
        
$invbc['musername'] = fetch_musername($invbc);

        
$invBChat .= "{$extra}<a href='member.php?{$session['sessionurl']}&u={$invbc['userid']}'>{$invbc['musername']}</a>";
        }
    }

    if(
$invBChat == ""){
    
$invBChat "<i>No one is currently inside vBChat</i>";
    } 

Replace the bit it says in the instructions with that ;)


All times are GMT. The time now is 11:10 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.01900 seconds
  • Memory Usage 1,851KB
  • 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
  • (3)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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