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)

RsX 11-11-2004 05:27 PM

please can someone tell me how to change the background in teh chat and decide what smileys to show?

And also why does it always say no users online in home page but there are users online? Oo

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


nnjj.net 11-11-2004 07:03 PM

how I can change the timing of the refresh and the background of the refresh?

nnjj.net 11-11-2004 07:18 PM

also if I have catagories of smiles, how I can spacify one category only of that to be appear on the chat?

manguish 11-11-2004 07:26 PM

Quote:

Originally Posted by RsX
please can someone tell me how to change the background in teh chat and decide what smileys to show?

And also why does it always say no users online in home page but there are users online?

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


See my post here :

https://vborg.vbsupport.ru/showpost....&postcount=230

vorphalack 11-11-2004 07:57 PM

I got the "who's online in chat" to work!

I tried the code posted by manguish, it didn't work either.

Then I looked in the file for the "fresh install" of the chat - THAT code worked!

I'm using 3.0.3, by the way.

cogimo 11-11-2004 08:02 PM

Hi

When I go to edit the index.php file in the root directory, my file looks different. Everything is bold and green is different.

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') . '";');
}
}
}

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

manguish 11-11-2004 08:06 PM

If you aren't using 3.0.3 your code WILL be different and you'll have to manually (ie:yourself) go through the code and replace as necessary.

I had to completely change the who's online bit (for 3.0.0) to get it to work.

Zero Tolerance 11-11-2004 08:14 PM

Okay back at home, updated the download

Those of you having problems with accessing the admin cp, please re-download the zip and re-edit admincp/index.php

Those of you having problems with showing the users online, i updated the edits for index.php so they ask you to find the EXACT code that is in a fresh vb3.0.3 download, if you have modified that area from another hack then im afraid you will have to look at what your told to replace it with and see what's different and attempt to manually change it (Hint: there are two new parts added into the replace)

Sorry for any inconveniance,

- Zero Tolerance

owen100 11-11-2004 09:18 PM

Zero Tolerance - thanks for your last post; that's fixed the blank page problem with the admincp/index.php file.

Other than that easy to install and will be MUCH appreciated. One thing left though previously mentioned that I can't find a fix for..

Quote:

Originally Posted by Deimos
Yea it's odd, it randomly shows one smiley, but the rest are red x's
Hrm, the smileys are all working on posts etc, but not showing up in the chat.
Is it because I have two groups of smilies? Standard set and a secondary set perhaps?
I have that same problem, I mainly get valid smilies but also random image not found red Xs instead of smilies.

SVTOA 11-11-2004 09:47 PM

Quote:

Originally Posted by vorphalack
I got the "who's online in chat" to work!

I tried the code posted by manguish, it didn't work either.

Then I looked in the file for the "fresh install" of the chat - THAT code worked!

I'm using 3.0.3, by the way.

I had to do as ZT suggested and manually edit my index.php to work correctly, and mine looks different than mangusih's yet I also have 3.0.0


All times are GMT. The time now is 08:02 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.04230 seconds
  • Memory Usage 1,862KB
  • 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
  • (2)bbcode_php_printable
  • (3)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