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)

royals 11-27-2004 09:32 AM

I've hit a snag with the install.

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

found it, but I have something additional before the closing brackets. Mine looks like:
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') . '";');
            }
        }
    } 

I think I can add the additional part that is missing after location - but I'm not 100% sure how many } to add before adding the rest on.

I have a closed board so I dont know if its that or some other install.

SVTOA 11-27-2004 12:06 PM

Quote:

Originally Posted by royals
I've hit a snag with the install.

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

found it, but I have something additional before the closing brackets. Mine looks like:
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') . '";');
            }
        }
    } 

I think I can add the additional part that is missing after location - but I'm not 100% sure how many } to add before adding the rest on.

I have a closed board so I dont know if its that or some other install.



try this:

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

Harley D 11-27-2004 12:13 PM

Quote:

Originally Posted by royals
I've hit a snag with the install.

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

found it, but I have something additional before the closing brackets. Mine looks like:
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') . '";');
            }
        }
    } 

I think I can add the additional part that is missing after location - but I'm not 100% sure how many } to add before adding the rest on.

I have a closed board so I dont know if its that or some other install.

I had the same problem, this is what I did. Please make a backup the original just incase this doesn't work for you, but it should :o)

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

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


royals 11-27-2004 12:51 PM

Thanks Harley D and SVTOA :D It's up and going!

SVTOA 11-27-2004 01:06 PM

Quote:

Originally Posted by royals
Thanks Harley D and SVTOA :D It's up and going!

No problem, that's what we're here for.

royals 11-27-2004 02:46 PM

ok..... may I please have the text for the chat_main template?

etaslim 11-27-2004 03:02 PM

installed perfectly in vb 3.0.3! thanks for this great hack

John Lester 11-27-2004 11:09 PM

Holy cow. What a fantastic mod! I finally got it all set up on my site. Was waiting for you to iron out a few bugs and add a few features. Version 1.1.1 is fantastic.

This.....is just what I needed.

Can't wait to see future versions...you've got a real hit on your hands!

Excellent work, Zero. You are my hero. :)

John Lester 11-27-2004 11:39 PM

Just two quick questions. I would like to do two things:

1) increase the lines of chat in the buffer. I read I can do this by editing vbchat.php and changing:

left join ".TABLE_PREFIX."user u on (u.userid = m.s_postby) order by m.s_postime desc limit 0,15");

to

left join ".TABLE_PREFIX."user u on (u.userid = m.s_postby) order by m.s_postime desc limit 0,<some_larger_number>");

This won't screw up the database, will it? Since the buffer is, I assume, stored in the database, I wasn't sure if I had to change any variable properties.

Also,

2) increase the size of the chat window. It's a bit small and I'd like it to fill most of the page. I couldn't figure out how to do that based on this thread. Any tricks?

Harley D 11-28-2004 01:15 AM

Quote:

Originally Posted by royals
ok..... may I please have the text for the chat_main template?

Code:

<script type="text/javascript">
<!--

setBlank = false;

function doRestore(){
setBlank = true;
}

function checkInp(){
        if(setBlank){
        document.forms['chatForm'].message.value = ""
        setBlank = false;
        }
}

function chatFrameReload(){
window.frames['vBChatFrame'].location.href = window.frames['vBChatFrame'].location.href

window.frames['vBChatUser'].location.href = window.frames['vBChatUser'].location.href
}

function AddSmilie(code){
document.forms['chatForm'].message.value += " " + code + " "
}

setInterval("chatFrameReload()",10000)
-->
</script>

<form name='chatForm' method='post' action='vBChat.php?{$session['sessionurl']}' target='vBChatFrame' onsubmit='doRestore()'>
<input type='hidden' name='do' value='post_message' />
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
<thead>
    <tr>
        <td class="tcat" colspan='2'>
            <a style="float:right" href="#top" onclick="return toggle_collapse('forumhome_vBChat')"><img id="collapseimg_forumhome_vBChat" src="$stylevar[imgdir_button]/collapse_tcat.gif" alt="" border="0" /></a>
            <div align='center'>vBChat</div></td>
    </tr>
</thead>
<tbody id="collapseobj_forumhome_vBChat" style="{$vbcollapse['collapseobj_forumhome_vBChat']}">
        <tr>
                <td class='alt2' align='center' width='80%' height='300' rowspan='2'>
                <iframe width='100%' height='100%' frameborder='0' border='0' src='vBChat.php?&do=chatFrame' name='vBChatFrame' onload='checkInp()'>Your Browser Does Not Support Iframe's, Get One That Does!</iframe>
                </td>
                <td class='alt2' align='center' width='20%' height='300'>
                <iframe width='100%' height='100%' frameborder='0' border='0' src='vBChat.php?&do=chatUser' name='vBChatUser'>Your Browser Does Not Support Iframe's, Get One That Does!</iframe>
                </td>
        </tr>
<tr>
<td class='alt2' align='center'><img alt='Powered By vBChat' src='images/vbchat.gif' /></td>
</tr>
<if condition="$Chat_Options[d_smiliedisplay] == '1'">
<tr>
<td class='alt2' align='center' width='100%' colspan='2'>
<table width='100%' height='1%' border='0'><tr>{$Smile_Display}</tr></table>
</td>
</tr>
</if>
<tr>
<td class='tfoot' align='left' width='100%' colspan='2'>
<b>Post Message:</b>
<input type='text' name='message' class='button' size='70'> <input type='submit' value=' Post ' class='button'>
</td>
</tr>
</tbody>
</table>
</form>
<br />



All times are GMT. The time now is 01:24 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.03376 seconds
  • Memory Usage 1,844KB
  • 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_code_printable
  • (6)bbcode_php_printable
  • (4)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