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)

Corriewf 01-18-2005 03:10 PM

Quote:

Originally Posted by djnth
I actually had the same problem because this mod had me add text to the controlpanel/index.php file in the same spot that vbarcade did. which resulted in this text being one line too low. I moved it up one line above the <quote>$printhr = true ;</quote> that was already there and it worked.

Thanks.

Tipi 01-18-2005 09:33 PM

"Users Currently Inside vBChat " show up blank, what have I missed to upload? :confused:

Joe Black 01-18-2005 10:34 PM

Quote:

Originally Posted by Tipi
"Users Currently Inside vBChat " show up blank, what have I missed to upload? :confused:

I think this may be a 3.0.4 bug, as the same thing happened to me after the vB upgrade. Just edit the forum_home template to not show it at all, the "Who's Online" still shows who's in vBChat for those that want to know without going into chat.

ambrosious 01-19-2005 01:23 AM

Can someone help me sort some code here? I'll put it all in a box so prying eyes don't see...

PHP Code:

Alright here are the instructions:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
FIND:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    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 when I look at my filewellit's been hacked so I have this:

        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 improvised and added it best I could to get this:

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;
                        }
                        if(preg_match("/vBChat.php/",$loggedin['
location']) && $loggedin['userid']){
                $vbchat_users[$loggedin['
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') . '";');
                        }
                }

        // 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 I am getting errors in the Who's online box (maybe called the "what's going on" box?)


Me trying to integrate the two of them, probably wasn't the brightest thing, i just can't figure out why I'm getting name duplication (it shows 4 of me, two of you, 3 of him online, but when you click the who's online link, everyone is back to being singular entities and I'm getting comma's.)

I run an adult site, but if you need to look at the error, I attached an example.

yoyoyoyo 01-19-2005 04:46 AM

I understand that in the 1.0.1 version of this hack this was an "upgrade":
Quote:

User Status - User status is displayed in the vBChat Page (in replace of time/date)
How can I get the time/date to display instead? I think that this should be an admin option (to choose to display either time/date, or user-defined chat status).

Tipi 01-19-2005 02:54 PM

Quote:

Originally Posted by Joe Black
I think this may be a 3.0.4 bug, as the same thing happened to me after the vB upgrade. Just edit the forum_home template to not show it at all, the "Who's Online" still shows who's in vBChat for those that want to know without going into chat.


This is what Forum_home say's about the chat:

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

What should I remove? :nervous:

ambrosious 01-20-2005 12:09 AM

Could anyone help with my coding problem?

nonet 01-20-2005 03:46 PM

Hi everyone!

I am installing vBChat v1.1.1 and have an issue with changing the root index.php file. I am running version 3.0.1 with several hacks and the code does not match that I am to replace. I am suppossed to find:

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

However in my file I have:

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

I tried several variations and just got errors. Any ideas.

Thanks for the help!

Toky0 01-20-2005 08:13 PM

How do you uninstall this hack?

1nf3rn0 01-21-2005 05:34 PM

Quote:

Originally Posted by ambrosious
i just can't figure out why I'm getting name duplication (it shows 4 of me, two of you, 3 of him online, but when you click the who's online link, everyone is back to being singular entities and I'm getting comma's.)

i too have the same problem...shows duplicates of members on th emain forum page in the whos online...if there is a quick solution..can someone point me to it..

do appreciate the knowledge here and the hack is awsome!..thx again!

UPDATE:never mind...i found the problem and fixed it..thx anways!!...also it fixed seeing my own username on the forums!..

ambrosious 01-21-2005 08:41 PM

Quote:

Originally Posted by 1nf3rn0
i too have the same problem...shows duplicates of members on th emain forum page in the whos online...if there is a quick solution..can someone point me to it..

do appreciate the knowledge here and the hack is awsome!..thx again!

UPDATE:never mind...i found the problem and fixed it..thx anways!!...also it fixed seeing my own username on the forums!..

How did you fix it?

1nf3rn0 01-22-2005 07:21 AM

Quote:

Originally Posted by ambrosious
How did you fix it?


wellif you loook at the instructions given it shows this as a replacement variable in the index.php (under //Guest & Before //Configure Peeps In VBChat):

Code:

$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;
}

}

Now i dontknow anything when it comes to html or java..but idid look at one thing that was a lil a different and instead of actully manually editing it....i just copied from the main index.php from the original forum folder and pasted it to the revision for the chat (figured why not, it worked right when it was original):

Code:

$numberguest++;
$inforum["$loggedin[inforum]"]++;
}
else if (empty($userinfos["$userid"]) OR ($userinfos["$userid"]['lastactivity'] < $loggedin['lastactivity']))
{
$userinfos["$userid"] = $loggedin;
}
}

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

now this showed myself online and also got rid of the dup members....currently active users is right now as well...now...because i couldnt get the whos in chat to work i just completely removed it from the forums....to me its all good....the chat is the most important part...and BTW...i did this with vb3.0.5...i dont see a problem with it woking with 3.0.6....which i will be upgrading to, soon...i hope this has helped you as all i did was copy the original index.php variable from the original vbulletin 3.0.5 and re-replaced the instructions given (since i had already followed the instros and edited the index.php)...attached is the index edited...so in essence all you have to do is open the file and edit the license # with your LEGIT license # from vbulletin (i edited my license # out for this attachment for security reasons of course) then replace the index file...:nervous:

1nf3rn0 01-22-2005 08:47 AM

Quote:

Originally Posted by nonet
Hi everyone!



However in my file I have:

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

I tried several variations and just got errors. Any ideas.

Thanks for the help!

just leave what you have alone.....and add the first part of lines in the instructions:

Code:

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

to the top of the index variable >>
Code:

while ($loggedin = $DB_site->fetch_array($forumusers)

Now get the last line of the instructions:

Code:

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

and enter it at the end of the index variable:

Code:

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

so once done it should look somehting like this:

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"]) OR ($userinfos["$userid"]['lastactivity'] < $loggedin['lastactivity']))
        {
            $userinfos["$userid"] = $loggedin;
        }
    }

    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') . '";');
        }
    }
// Configure Peeps In vBChat
$invBChat ="";

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


ambrosious 01-22-2005 10:20 PM

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"]) OR ($userinfos["$userid"]['lastactivity'] < $loggedin['lastactivity']))
        {
            
$userinfos["$userid"] = $loggedin;
        }
    }

    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') . '";');
        }
    }
// Configure Peeps In vBChat
$invBChat ="";

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



I put that in and it took care of all the multiple names, all the commas. The only issue I currently have is each person sees themselves twice.

Looks much better! Any ideas why they still see themselves twice? (And edited to say that the "Who's In Chat" shows no one chatting, ever, but they are?

Can you help again?

Toky0 01-23-2005 09:10 PM

Newb here.. How do you uninstall this hack? I like it, but it's murder on my 56k users.

djjeffa 01-24-2005 01:41 AM

ok I updated vb from .3 to .5 now what do I have to do to get this hack working again? There are no options in my admin cp and the who in chat is not showing up.

NFLForums 01-24-2005 09:33 PM

Quote:

Originally Posted by Toky0
Newb here.. How do you uninstall this hack? I like it, but it's murder on my 56k users.

Same here -- I love it, but occasionally posts disappear...and the dialup users are whining...so we have to go with a different format...

MaXxed 01-26-2005 02:28 AM

I am also looking for some help to uninstall this, I hope someone could help us?

Adrian Schneider 01-26-2005 12:40 PM

Quote:

Originally Posted by 1nf3rn0
ut that in and it took care of all the multiple names, all the commas. The only issue I currently have is each person sees themselves twice.

Looks much better! Any ideas why they still see themselves twice? (And edited to say that the "Who's In Chat" shows no one chatting, ever, but they are?

Did this, worked, but I see myself twice on the list. Any ideas?

Eagle Creek 01-26-2005 01:44 PM

Quote:

Originally Posted by TheSpecialist
Did this, worked, but I see myself twice on the list. Any ideas?

If I read all these problemes... I was planning to install it but I think I won't.

Big Kahuna 01-27-2005 08:22 PM

I kinda stumbled into this hack and need to replace the php Chat I'm currently using. I'll keep an eye on this for when the wrinkles get ironed.

It is a great idea -- I just can't afford to be bleeding edge right now.

KPalicz 01-28-2005 03:48 AM

Does anyone have a chat set up somewhere I can try out before I decide to install this?

Have the bugs all been fixed?

ambrosious 01-28-2005 09:28 PM

From what I can tell, no one is supporting this one right now. Maybe interest will be picked up again soon? I hope so because I love the parts that do work right now!

MaXxed 01-29-2005 01:29 AM

Quote:

Originally Posted by Eagle Creek
If I read all these problemes... I was planning to install it but I think I won't.

fwiw, the hack has worked well for me. However, I need to uninstall it now and there is no support/help or even a hint in the general direction on how to do this. It kinda leaves me stuck and regretting the decision to install in the first place...

TripleOx 01-29-2005 10:59 AM

Quote:

Originally Posted by Eagle Creek
If I read all these problemes... I was planning to install it but I think I won't.

Same here. Back to my constant mission to find a decent chat system for my forum... :disappointed:

Eagle Creek 01-29-2005 03:33 PM

Triple--> if you fine one, PM me please ;)

Eagle Creek 01-29-2005 03:34 PM

Triple--> if you find one, PM me please


(reposted becauce I dont see an edit button (!))

You may edit your posts

sv1cec 01-30-2005 01:28 PM

Can someone who has been using this hack tell me a couple of things:

1. What is the option, in the AdminCP menu, "vBChat Room Control" for? I have a chat room open where we're discussing, and it shows nothing there. If that is for a permanent chat room, why doesn't I get any option to create a room (only to delete it).

2. This may have been answered in the past, but I am not sure. When are the user names refreshed? I have users who have left the site for hours, still showing there.

Thanks for your help, I just do not have time to go through all the pages, and the last remarks about no support, make me feel unease.

Rgds

Big Kahuna 01-30-2005 02:05 PM

Is this the same chat used here at .org? The reason I ask is that my (normally pretty stable and up-to-date) puter locked up when I tried to use this site's chat. I haven't tried it on my other puters -- but if one of my puters locks up -- then 2,500 of the goofballs with a stone and chisel for a 12Mhz 386SX puter running Windows 3.0 on my board will commit mass suicide.

Too bad this never went anywhere -- the phpchat I use now (written in France 100 years ago) is a POS.

cloner001 01-30-2005 02:45 PM

has anyone found any uninstall support?or know how to uninstall this hack?thanks :squareeyed:

FASherman 01-31-2005 04:14 AM

Suggestions to add:

Prune all when room is empty (via cron)
On Join message
Room title
Built in responsebot

PKRWUD 01-31-2005 05:36 AM

Quote:

Originally Posted by KPalicz
Does anyone have a chat set up somewhere I can try out before I decide to install this?

Have the bugs all been fixed?

You can check it out on my site. I have it set up so there is only one room, and it works great, but I would like to know how to review the days posts. For some reason, as of today, when I post in there, the text and the user name aren't lined up properly. Probably just my browser. Really, though, this Chat program is much better than any of the others I've tried, which is most of them.

http://www.ricehatersclub.com/vbulletin/vBChat.php?

You can log in as: Guest One
Password: one

Or as: Guest Two
Password: two

Eagle Creek 01-31-2005 11:20 AM

chat seems nice :)

sv1cec 01-31-2005 01:56 PM

Well, for one reason or another, I decided to give it a try. I installed it last night and it works OK. Some minor issues with IE (it spreads the first lines over the whole table, trying to space them out evenly over the whole height of the table), but these were not significant.

Some of the complaints I've read here, and which I've managed to fix are:

- Show the number of users in chat in FORUMHOME.
- Make the users column, show the right users, not users who are gone, for hours. This requires a "Logout" button of some sort, that the users have to press instead of just closing the browser window, when done (yes, I open a new window for the chat). This removes their session in the chat from the database, so they no longer show up on the list. At the moment, I am trying to figure out how to prevent them from pressing the X at the top right corner, instead of the log out button, that would need some more searching.
- I didn't exactly like the way the members could create new rooms and then leave them there for the admin to erase. That looked stupid to me, so I changed the hack to delete these rooms, when the last member in them logs out.
- with some changes in the cron job, I made the hack erase the posts which are older than a few minutes. I changed the autoprune parameter to specify minutes instead of days, and I have the cron job running every 15 minutes.
- I also didn't like the way the hack acted when you created a new room, or asked to join a room. If you go to the Select a room to join screen and you select a room, you are immediately transfered to that room. If you ask to create a new room, as soon as you create it, you are transfered to the Select a room to join.

If someone is interested in my changes, I could post them here. But do not take it for granted I'll provide support, in place of ZT.

Rgds

Big Kahuna 01-31-2005 04:08 PM

Well I like the way it was implimented on the Rice Haters club and sure could use it -- but I don't know if I'm willing to take the plunge in something that appears to have been abandon. I've seldom required any support on any of the many hacks I've installed -- but I am concerned when a hack or addin gets abandon.

If you don't mind posting your changes -- I might give it a shot on my test board.

guydogg 01-31-2005 07:54 PM

Is there a way to refresh the user list? I have 6 people in chat, but i know that only two are there, and the others havent been there in awhile.

Thanks in advance.

sv1cec 01-31-2005 08:30 PM

The only way to have a correct user list, is if you force your users to log out, from the chat session. If they do not, they session stays in the list (I think there is a time limit, after that the session is erased). Until it gets erased, you see them in the list.

I added a log out button in my forms, so that the users can log out. In the vBChat.php file, you need to add something like this:

Find:

PHP Code:

// ---------------------------------------------------
// Start Page Output
// --------------------------------------------------- 

Above that, add:

PHP Code:


    
// ---------------------------------------------------
    // Start Logout
    // ---------------------------------------------------

    
if($_GET['do']=="logout")
    {
        
$DB->query("delete from ".TABLE_PREFIX."session WHERE userid=$bbuserinfo[userid] AND location like '%vBChat.php%'");
        eval(
'print_output("' fetch_template('chat_close') . '");');
        exit;
    } 

The template chat_close can be something like:

HTML Code:

<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript"><!--
function winClose() {
    setTimeout('self.close()',8000);
}
//-->
</SCRIPT>
<title>$vboptions[bbtitle] - $pagetitle</title>
$headinclude
</HEAD>

<BODY>
$header
<br><br><br><br>
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
        <td class="tcat" colspan="3"><center>Thank you for using our Chat</center></td>
</tr>
<tr>
        <td class="alt1"><CENTER>This window will now close.<br>Please come back at your convenience.</center></td>
</tr>
</table>

<SCRIPT LANGUAGE="JavaScript"><!--

//and at the end of the page place this call
 
winClose()

//-->
</SCRIPT>
</BODY>
</HTML>

I do that, because I have the chat open in a new window, which I want it to close after the user logs out.

As for the log out link, in your chat_main template, find:

HTML Code:

<b>Post Message:</b>
<input type='text' name='message' class='button' size='70'> <input type='submit' value=' Post ' class='button'>
</td>

Below that, add:

HTML Code:

<td align='right' class='tfoot'><a href='vBChat.php?$session[sessionurl]do=logout&amp;u=$bbuserinfo[userid]'>
<input type="submit" class="button" name="logout" value="Log Out" accesskey="l" onClick="window.location='vBChat.php?$session[sessionurl]do=logout&amp;u=$bbuserinfo[userid]'">
</a>
</td>


marster37 01-31-2005 09:13 PM

When more messages are added they disappear from the box message area. I get about 14 one line messages before it starts with the new message. Any way to have all the messages stay on the screen. When I scroll up there isnt anything more than 14 messages at a time

sv1cec 01-31-2005 09:45 PM

Quote:

Originally Posted by marster37
When more messages are added they disappear from the box message area. I get about 14 one line messages before it starts with the new message. Any way to have all the messages stay on the screen. When I scroll up there isnt anything more than 14 messages at a time

In vBChat.php find:

PHP Code:

$chat_page .= "<table height='100%' border='0'>";

        
// Get All Chat Messege's If Any
        
$Get_Chat_MSG $DB->query("select m.*,u.* from ".TABLE_PREFIX."vbchat_store m
        left join "
.TABLE_PREFIX."user u on (u.userid = m.s_postby) where m.s_forroom = '{$bbuserinfo['vbchat_pref_in_room']}' order by m.s_postime desc limit 0,15"); 

The last number there, at the last line, that 15, is the number of messages that it shows you. I changed that to 30 in my site. If you want all messages to show, remove the " limit 0,15" part. But it's useless, if you scroll up to read the previous messages, and the screen refreshes, you will be thrown back at the bottom again, so I do not see it very useful.

Rgds

Eagle Creek 01-31-2005 10:51 PM

Are these nice alternatives:

https://vborg.vbsupport.ru/showthrea...highlight=chat

https://vborg.vbsupport.ru/showthrea...ight=Flashchat

?


All times are GMT. The time now is 05:59 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.02518 seconds
  • Memory Usage 2,001KB
  • 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
  • (10)bbcode_code_printable
  • (3)bbcode_html_printable
  • (6)bbcode_php_printable
  • (15)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