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)

spence2 02-08-2005 01:13 PM

sv1cec

thanks for all the help you are giving us for this orphaned hack!

sv1cec 02-08-2005 02:24 PM

Quote:

Originally Posted by spence2
sv1cec

thanks for all the help you are giving us for this orphaned hack!

It looks as if it is my destiny to take over, wherever ZT's leaves. The same thing happen with his Warning Hack. That's where I got started to make my Advanced Warning System.

One more thing, if there are any of you here, who use AWS as well, be advised that you can integrate the two hacks together, so when a chat user uses a censored word, he gets a warning. Also, your moderators have the ability to warn a user from within the chat.

Kind rgds

oldengine 02-08-2005 08:00 PM

Quote:

Originally Posted by cnczone
What do you change there?

Code:

<tr>
<td class="smallfont" nowrap="nowrap">[<span class='time'>{$mychat['time']}</span>] <b>{$ThisMSG['username']}:</b>
</td>
<td><font face='{$ThisMSG['vbchat_pref_font_face']}' style='color:{$ThisMSG['vbchat_pref_font_color']};'>{$ThisMSG['s_message']}</font></td>

This was written up before on post #511.

MaXxed 02-09-2005 12:58 AM

sorry to trouble you but do you think you could give some more detail on this? I have no problem reverting all my templates to the standard, but I would like to get rid of the tables and have no clue how to even start....


Quote:

Originally Posted by Craigr
For uninstalling i just followed the install steps in reverse and deleted the relevant database tables.


Craigr 02-09-2005 12:19 PM

Quote:

Originally Posted by MaXxed
sorry to trouble you but do you think you could give some more detail on this? I have no problem reverting all my templates to the standard, but I would like to get rid of the tables and have no clue how to even start....

Okay, delete these files:
vBChat.php --> ROOT FORUM DIRECTORY
vbchat.gif --> ROOT FORUM DIRECTORY/images
admin_vbchat.php --> ROOT FORUM DIRECTORY/admincp
install_vbchat.php --> ROOT FORUM DIRECTORY/admincp
vbchat.xml --> ROOT FORUM DIRECTORY/admincp
vbchat.php --> ROOT FORUM DIRECTORY/includes/cron

Go to admin-cp, scheduled tasks, delete vBChat Auto Prune.

Delete the following tables from your database using phpmyadmin or equivalent:
vbchat_store
vbchat_datastore

Then delete these columns in the user table:
vbchat_pref_font_face
vbchat_pref_font_color
vbchat_pref_user_ignore
vbchat_pref_status
vbchat_pref_auto_on
vbchat_pref_auto_msg
vbchat_pref_in_room

Remember to back up before doing the above. ;)

Revert the templates you've edited, remove the vbchat templates too.

Do the opposite for the php files that you did to install.

MaXxed 02-11-2005 07:51 AM

craigr, thanks so much for the info, that really helped. Was finally able to remove this :)

Raven_FCF 02-11-2005 02:23 PM

Quote:

Originally Posted by sv1cec
Most of the changes requested have been dealt by either ZT (before he lost interest in this hack), or by me, at the last few pages.


cool. all i need to know is how i get "Users Currently Inside vbChat" showing on my VBAdvanced portal/front page.

this variable is all that needs changing.
Code:

{$invBChat}
below is what i've got so far in my template.


Code:


<table cellpadding="4" cellspacing="$stylevar[cellspacing]" border="0" class="tborder" width="100%">

<!-- Start vBChat Users -->
<tbody>
        <tr>
                <td class="thead" colspan="2">
                        <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_chatusers')"><img id="collapseimg_forumhome_chatusers" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_chatusers].gif" alt="" border="0" /></a>
                        <a href='$vboptions[bburl]/vBChat.php?$session[sessionurl]'>Users Currently Inside vBChat</a>
                </td>
        </tr>
</tbody>
<tbody id="collapseobj_forumhome_chatusers" style="$vbcollapse[collapseobj_forumhome_chatusers]">
        <tr>
                <td class="alt2"><a href="$vboptions[bburl]/vBChat.php?$session[sessionurl]"><img src="$stylevar[imgdir_statusicon]/forum_link.gif" alt="vBChat" border="0" /></a></td>
                <td class="alt1" width="100%">
                        <div class="smallfont">
                        {$invBChat}
                        </div>
                </td>
        </tr>
</tbody>
<!-- End vBChat Users -->
</table>
<br>

who can help?

Daniel.C 02-11-2005 05:16 PM

I can't see the chat program, i uploaded the files and modified the old ones succsefully and now everytime i click on the link to it i just get a blank white page. Any Suggestions ?

sv1cec 02-11-2005 06:07 PM

Quote:

Originally Posted by Daniel.C
I can't see the chat program, i uploaded the files and modified the old ones succsefully and now everytime i click on the link to it i just get a blank white page. Any Suggestions ?

Check your templates.

sv1cec 02-11-2005 06:10 PM

Quote:

Originally Posted by Raven_FCF
cool. all i need to know is how i get "Users Currently Inside vbChat" showing on my VBAdvanced portal/front page.

this variable is all that needs changing.
Code:

{$invBChat}
below is what i've got so far in my template.


Code:


<table cellpadding="4" cellspacing="$stylevar[cellspacing]" border="0" class="tborder" width="100%">

<!-- Start vBChat Users -->
<tbody>
        <tr>
                <td class="thead" colspan="2">
                        <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_chatusers')"><img id="collapseimg_forumhome_chatusers" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_chatusers].gif" alt="" border="0" /></a>
                        <a href='$vboptions[bburl]/vBChat.php?$session[sessionurl]'>Users Currently Inside vBChat</a>
                </td>
        </tr>
</tbody>
<tbody id="collapseobj_forumhome_chatusers" style="$vbcollapse[collapseobj_forumhome_chatusers]">
        <tr>
                <td class="alt2"><a href="$vboptions[bburl]/vBChat.php?$session[sessionurl]"><img src="$stylevar[imgdir_statusicon]/forum_link.gif" alt="vBChat" border="0" /></a></td>
                <td class="alt1" width="100%">
                        <div class="smallfont">
                        {$invBChat}
                        </div>
                </td>
        </tr>
</tbody>
<!-- End vBChat Users -->
</table>
<br>

who can help?

I am not sure what exactly you want. You want the user names, for the users who are in the chat? The code for that, is found in index.php, I think this is it:

PHP Code:

// Get the users in vBChat
    
$vbchat_users = array();
    
$chatusers=0;
    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>";
        
$chatusers $chatusers+1;
        }
    }

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


Kyderoy 02-12-2005 04:20 AM

I am having the same problem with the blank page .... I checked everything ...

sv1cec 02-12-2005 04:41 AM

Quote:

Originally Posted by Kyderoy
I am having the same problem with the blank page .... I checked everything ...

Could you please be more specific? Were you able to see them before and now you can't?

Rgds

Kyderoy 02-12-2005 04:45 AM

No I just finished the install and when I click the vbchat link in the menu bar i get a blank page. I double checked the templates so I am now lost. :(

Daniel.C 02-12-2005 09:18 AM

Me too i double checked the templates and still nothing but a blank page. http://www.infinitiveintentions.com/forums/vBChat.php?

sv1cec 02-12-2005 09:47 AM

Quote:

Originally Posted by Daniel.C
Me too i double checked the templates and still nothing but a blank page. http://www.infinitiveintentions.com/forums/vBChat.php?

Are you using more than one style? Maybe the templates are not in all styles.

Just a thought.

Rgds

Raven_FCF 02-12-2005 02:31 PM

Quote:

Originally Posted by sv1cec
I am not sure what exactly you want. You want the user names, for the users who are in the chat?


yep. i want usernames current;y inside chat to appear in left block on front page. will the one you gave me work?

Daniel.C 02-12-2005 06:48 PM

Quote:

Originally Posted by sv1cec
Are you using more than one style? Maybe the templates are not in all styles.

Just a thought.

Rgds

Nope i only have the one style up, i gues the hack just doesn't want to work.

highlander_RD 02-16-2005 08:55 AM

Great hack, zero tolerance: thank you!
clicked ***install ***

I would be very impressed if you can add few more improvements:

1) a text formatting bar (Font, size, color, bold, italic, underlined, paragraph align, etc.), just above the post input line, identical to the one in vB interface when you quote/reply a post.

2) visible/invisible users to appear in chat as set in vB, same features/permissions.

3) consent the Admins to enter as invisible the private chats (even passworded) to control any illegal abuse of them.

4) ignore users: both cannot read each other posts.

Thank you so much! :D

sv1cec 02-16-2005 12:03 PM

Quote:

Originally Posted by Raven_FCF
yep. i want usernames current;y inside chat to appear in left block on front page. will the one you gave me work?

Yes, that part of the code will collect the user names inside vBChat for you. In order to see them though, you have to edit your ForumHome template, to include something like:

HTML Code:

<!-- Start vBChat Users -->
<tbody>
        <tr>
                <td class="thead" colspan="2">
                        <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_chatusers')"><img id="collapseimg_forumhome_chatusers" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_chatusers].gif" alt="" border="0" /></a>
                        <a href='vBChat.php?$session[sessionurl]'>Users Currently Inside vBChat</a>
                </td>
        </tr>
</tbody>
<tbody id="collapseobj_forumhome_chatusers" style="$vbcollapse[collapseobj_forumhome_chatusers]">
        <tr>
                <td class="alt2"><a href="vBChat.php?$session[sessionurl]"><img src="$stylevar[imgdir_statusicon]/forum_link.gif" alt="vBChat" border="0" /></a></td>
                <td class="alt1" width="100%">
                        <div class="smallfont">
                        {$invBChat}
                        </div>
                </td>
        </tr>
</tbody>
<!-- End vBChat Users -->

Put the above, right after the part which looks like:

HTML Code:

<div style="white-space: nowrap"><phrase 1="$recordusers" 2="$recorddate" 3="$recordtime">$vbphrase[most_users_ever_online_was_x_y_at_z]</phrase></div>
                                <div>$activeusers</div>
                        </div>
                </td>
        </tr>
</tbody>
<!-- end logged-in users -->

rgds

ambrosious 02-16-2005 05:22 PM

Quote:

Originally Posted by sv1cec
Well, here is that part of the code, from my index.php:

PHP Code:

// Get the users in vBChat
    
$vbchat_users = array();
    
$chatusers=0;
    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>";
        
$chatusers $chatusers+1;
        }
    }

    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 

You may use the variable $chatusers in the forum home page, to show you how many users there are in the chat.

rgds

Thanks, but I am having trouble with getting this to work in the What's Going On Box on my forums home page. Is there anyone who has this working that would like to share the code with me? (Now, if you just answered my question with the code above, then I apologize for being a total noob with this, could you instruct me how to make it work?)

Thanks!

sv1cec 02-16-2005 06:10 PM

Quote:

Originally Posted by ambrosious
Thanks, but I am having trouble with getting this to work in the What's Going On Box on my forums home page. Is there anyone who has this working that would like to share the code with me? (Now, if you just answered my question with the code above, then I apologize for being a total noob with this, could you instruct me how to make it work?)

Thanks!

The code above, will collect the names of users in vBChat, the names are collected in the variable $invBChat, while the variable $chatusers tells you how many users are in vBChat.

Now in order to show the user names in your Forum Home, "What's going on" box, you should edit your FORUMHOME template, and add the code I supplied a few posts back. In that template, find:

HTML Code:

<div style="white-space: nowrap"><phrase 1="$recordusers" 2="$recorddate" 3="$recordtime">$vbphrase[most_users_ever_online_was_x_y_at_z]</phrase></div>
                                <div>$activeusers</div>
                        </div>
                </td>
        </tr>
</tbody>
<!-- end logged-in users -->

Right below that, add:

HTML Code:

<!-- Start vBChat Users -->
<tbody>
        <tr>
                <td class="thead" colspan="2">
                        <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_chatusers')"><img id="collapseimg_forumhome_chatusers" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_chatusers].gif" alt="" border="0" /></a>
                        <a href='vBChat.php?$session[sessionurl]'>Users Currently Inside vBChat</a>
                </td>
        </tr>
</tbody>
<tbody id="collapseobj_forumhome_chatusers" style="$vbcollapse[collapseobj_forumhome_chatusers]">
        <tr>
                <td class="alt2"><a href="vBChat.php?$session[sessionurl]"><img src="$stylevar[imgdir_statusicon]/forum_link.gif" alt="vBChat" border="0" /></a></td>
                <td class="alt1" width="100%">
                        <div class="smallfont">
                        {$invBChat}
                        </div>
                </td>
        </tr>
</tbody>
<!-- End vBChat Users -->

This is how I have it in my system and it works fine.

Rgds

ambrosious 02-16-2005 11:09 PM

I almost have it running, see if this makes sense:

The edit for index.php looks like this:

PHP Code:

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;
        }
    }
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
REPLACE WITH:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    
// 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>"

But, my index.php has this instead:

PHP Code:

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

So I have no idea what to do here. It seems to work up until this point. I am still not showing whos in chat, although the box is there. If I replace what I have with the recommeded file changes then I lose "Who's Online" except for myself.

If you can help out, I'll be forever in your debt.

TNAImpact 02-17-2005 01:21 AM

Installed within minutes. Works like a charm, the page re-loading can get a little annoying, other than that I'm very impressed. :) Keep it up.

sv1cec 02-17-2005 05:03 AM

In your index.php find:

PHP Code:

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

Replace that with:

PHP Code:

$vbchat_users = array();
$chatusers=0;
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>";
        
$chatusers $chatusers+1;
        }
    }

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

See if this works.

Rgds

illusions 02-17-2005 09:57 AM

:( I followed the instructions clearly, even had my vbchat installed correctly... but when i try to upload my forum I recieve the following error msg...

Parse error: parse error, unexpected T_VARIABLE in /home/illusion/public_html/forums/index.php on line 298

can anyone tell me where i have gone wrong? would appreciate your input.

savageracer 02-17-2005 02:00 PM

my vbchat works great with the default style on the board.. If a user is in another of the styles all they get is a blank page.. www.savageracer.com/forum/index.php

I added all the mods to each of the templates.. Any help would be greatly apreciated

savageracer 02-17-2005 02:17 PM

I just looked and the templates.. Custom Templates is only in my default style. How do I add these to all the styles in the forum

Thanks
RICH

Chrissicom 02-17-2005 06:52 PM

I did the required changes in functions_online.php but it still says Unknown Location in Who is Online... might the reason be that I also have v3 Arcade installed?

ambrosious 02-19-2005 07:36 PM

Quote:

Originally Posted by sv1cec
In your index.php find:

PHP Code:

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

Replace that with:

PHP Code:

$vbchat_users = array();
$chatusers=0;
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>";
        
$chatusers $chatusers+1;
        }
    }

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

See if this works.

Rgds


I put the above in and got a parse error, unexpected else on a line way down. If you dont mind, would you look to see what is wrong with this code? Have I mucked it up?

PHP Code:

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;

        
// ### MAX LOGGEDIN USERS ################################
        
$maxusers unserialize($datastore['maxloggedin']);
        if (
intval($maxusers['maxonline']) <= $totalonline)
        {
                
$maxusers['maxonline'] = $totalonline;
                
$maxusers['maxonlinedate'] = TIMENOW;
                
build_datastore('maxloggedin'serialize($maxusers));
        }

        
$recordusers $maxusers['maxonline'];
        
$recorddate vbdate($vboptions['dateformat'], $maxusers['maxonlinedate'], true);
        
$recordtime vbdate($vboptions['timeformat'], $maxusers['maxonlinedate']);

        
$show['loggedinusers'] = true;
}
else
{
        
$show['loggedinusers'] = false;


Thanks for all your help on this so far!

Code3Services 02-20-2005 02:13 AM

Quick question, everything regarding vBChat is running slowly, such as sending a message in the chat rooms, or modifying personal settings. Any suggestions on how to speed things up?

Thanks!

iSpanish 02-20-2005 11:04 AM

hello

hi Zero Tolerance
i have q.?

i am using v1.0.1
how can i update it to v1.1.1 Features????

Zero Tolerance 02-22-2005 07:32 PM

Seems like a familiar thread .. sorry for my abscence, my time was greatly limited due to certain things which i'd rather not announce publically...

In any case, this mod deserve's an upgrade, so if anyone could reply below to this post giving future requests/ideas, id be happy to think about them, gather up numerous ideas and get started on a v2.

I'd give support, but i've probably missed around 20 pages of this thread, so i think it would be better to release a new versions and restart support from there on. :)

So, let's hear those ideas people!

- Zero Tolerance

cnczone 02-22-2005 07:38 PM

Ideas-

1- some kind of pop-up to notify when a member coming in or leaves the chat while browsing in the forums
2-something to stop the constant updating of the chat session
3-real time user list of who is chatting and a notification when someone leaves
4-allowing the posting of url that work

Zero Tolerance 02-22-2005 07:42 PM

1. Perhaps a message in the chat display which says "[User] has just entered/left this room" (i think a pop up would be annoying, especially if it's an active room)
2. Hmm, little more specific please? :)
3. The list shows real time, as sessions are updated on every page load.
4. Posting URL's do work if you allow BBCode to be posted.

- Zero Tolerance

ambrosious 02-23-2005 12:53 AM

How about adding "Who's in chat" code that dummys like me can use easily?!

Code3Services 02-23-2005 12:55 AM

I afraid I can't think of anything that would improve this script, but I do have a couple of questions if you have the time to help me out a bit.

1) I use vbAdvanced, and the vBChat link in the Navbar on the vBAdvanced page does not include the correct url of /forums/vbchat.php. While in the Forums the link in the Navbar links to the correct url. Any suggestions on how to repair this?

2) vBChat is running very slow, such as editing options, joining rooms, and entering text into the chatroom. I'm not sure what other info you might need on this one, it's a clean install.

If you have time for those two questions I would gretly appreciate it! Other than that, I'm looking forward to the new version even though the current version is great!

oldengine 02-23-2005 03:01 AM

Please see Post #511 regarding a time stamp on each line of text.

sv1cec 02-23-2005 05:02 AM

Hey Zero,

Nice to have you back here. I took the liberty of playing with your code a little, nothing major since it was nicely executed to start with.

Some changes I would suggest are:

- Make the chat window open in a new browser window. In that way users can still browse the forums, while also keeping an eye on the chat.

- Alter the route the program takes, when creating or selecting a room. When one creates a room, I think the most logical next step, is to take him to the room selection form, so he can select which room he wants to go in.

- Add a log out button, which when pressed removes the user from the chat session. That helps in having an accurate user list shown. Of course, there will be users which just close the window without logging out, but the button can reduce the ghost users who left an hour ago. I have it created and my user list is quite more accurate now than before. Unfortunatelly, there is no easy way to stop a user from clicking the X button and close the window, at least I haven't find one.

- I changed the code, so that when the last user logs out from a user-created room, this room is deleted. In that way, there are no useless rooms there, which need to be deleted by the admin.

- Some cosmetic changes to show the user in which room he is etc. See pic below.

https://vborg.vbsupport.ru/external/2005/02/1.jpg

- I also added some code in the first page of the site, so that users can immediately see if there are other users in the chat. You can make the code, so that when you move your mouse over it, the <A HREF> title, shows you which users are already in the chat, if your "Users in Chat" table is positioned at the bottom of the page, like mine is.

https://vborg.vbsupport.ru/external/2005/02/2.jpg

- I've also added the feature of allowing moderators to warn members inside the chat. If a moderator clicks on the user name, on the left column, Warn.php gets activated with the proper offenses. Also, if a user has warning points, then these are shown next to his name, in red color, inside brackets. Integration with AWS! Oh yes, I've also changed your code a bit, so that if a user types a censored word, in a message, this word is replaced by **** or whatever, and the user gets an automatic warning.

- The most important feature, for my users, is the way the chat messages are presented (separate columns, for the poster name and message), this makes the chat easier to read. Also, the ability to seamlessly integrate it with vBulletin, is a huge benefit.

- The only thing that everyone complained about, but have all accepted after a few trials, is the screen refreshing thing. But I prefer this to a solution based on Java scripts (which I can't modify, ignorant coder) or Flash, which can't be that well-integrated with vB.

Overall, a big thanks for a lovely hack, as usual.

Rgds

P.S.: If I think of anything else I've done, and forgot it, I'll let you know.

oldengine 02-23-2005 11:34 AM

Quote:

Originally Posted by sv1cec
I changed the code, so that when the last user logs out from a user-created room, this room is deleted. In that way, there are no useless rooms there, which need to be deleted by the admin.

No way!

I want to used FIXED named rooms that are always available. In fact, I'd like for each of the rooms to have a URL that I could link users into for an immediate room choice. Like having four individual chat rooms available at any time.

sv1cec 02-23-2005 11:42 AM

Quote:

Originally Posted by oldengine
No way!

I want to used FIXED named rooms that are always available. In fact, I'd like for each of the rooms to have a URL that I could link users into for an immediate room choice. Like having four individual chat rooms available at any time.

Then, there should be two room categories, those which are created by the admin, and remain permanently in the chat, and those which are created by users, which should be erased when the last user logs out of that room.

Either that, or the admin will have to erase rooms created by the users, and left in the chat.

But you gave me an idea, I'll go add that parameter in my own chat, so that I can create permanent rooms.

Rgds


All times are GMT. The time now is 10:08 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.03706 seconds
  • Memory Usage 2,116KB
  • 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
  • (5)bbcode_code_printable
  • (4)bbcode_html_printable
  • (9)bbcode_php_printable
  • (17)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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