vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Flashchat: Who is chatting (https://vborg.vbsupport.ru/showthread.php?t=73042)

Paul M 04-18-2005 08:21 PM

That's why it doesn't work then - the header has already been called by then.

Find ;

Code:

// get new private message popup
and put it just above that.

:)

MortysTW 04-18-2005 09:37 PM

If I'm ever asked who my hero is, I'll proudly say Paul M.

Thanks buddy. Works like a champ. Now I just gotta get my "Who's Online" working at the same location and I'm good to go.

Thanks again!

Paul M 04-18-2005 10:07 PM

Glad it worked. :) You might want to check this hack as well if you are using flashchat 3.9.

I'm surprised at how many people seem to use flashchat, I never expected this to reach so many installs. :)

delilah429 04-21-2005 04:34 PM

I did everything you said step-by-step and the second piece of the hack works beautifully, and i even see the spot for Who's Chatting

But when i modify the index.php file, i get this error:

Parse error: parse error, unexpected ',' in /home/content/a/d/m/admin032769/html/index.php on line 35

any ideas? is spacing an issue at all? i amusing notepad and not sure if maybe that is putting in some weird chars?

delilah429 04-21-2005 04:36 PM

Not sure what you need to see of my index.php but here is the relevant portion:

PHP Code:

// ############# Paul M - Flashchat - Who is in the chat v2.00 ###############

$chatlist $DB_site->query("SELECT connections.userid, connections.roomid, rooms.name, rooms.ispublic, 

connections.start, 
user.usergroupid, user.displaygroupid, user.options, user.username, groupa.opentag as opentaga, groupa.closetag 

as closetaga, 
groupb.opentag as opentagb, groupb.closetag as closetagb
FROM " 
TABLE_PREFIX "connections as connections
LEFT JOIN " 
TABLE_PREFIX "rooms as rooms ON(connections.roomid = rooms.id)
LEFT JOIN " 
TABLE_PREFIX "user as user ON(connections.userid = user.userid)
LEFT JOIN " 
TABLE_PREFIX "usergroup as groupa ON(user.usergroupid = groupa.usergroupid)
LEFT JOIN " 
TABLE_PREFIX "usergroup as groupb ON(user.displaygroupid = groupb.usergroupid)
WHERE connections.userid IS NOT NULL ORDER BY start" 
);
unset(
$chatters);
$totalchatters 0;
while (
$chat $DB_site->fetch_array($chatlist))
{
    
$totalchatters += 1;
    
$roomname "In private room";
    
$chat['opentag'] = $chat['opentaga'] ;
    
$chat['closetag'] = $chat['closetaga'] ;
    if (
$chat['displaygroupid']) 
    {
        
$chat['opentag'] = $chat['opentagb'] ;
        
$chat['closetag'] = $chat['closetagb'] ;
    }
    if (
$chat['ispublic']) { $roomname "In ".$chat['name']; }
    
$chatters .= "<a href='member.php?u=$chat[userid]' title=\"$roomname\" >";
    
$chatters .= $chat['opentag'].$chat['username'].$chat['closetag']."</a>, ";
}
if (
$chatters)
{
    
$chatters substr($chatters0strlen($chatters)-2);
}
else
{
    
$chatters "No one is currently using the chat";
}

// ############# End of Who is in the chat ###############

// ### 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();

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

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


Paul M 04-21-2005 04:57 PM

Posting a section of code for all to see is not something you should be doing. Please hide all code inside code/php tags. It's also a waste of time since there are no line numbers. Also, you are not showing as having installed the hack, I will normally only provide support if you have clicked install. Thanks. :)

delilah429 04-21-2005 05:18 PM

Sorry - i didn't know how to do the code inside php tags? for future reference, how should i do that?

Anyway, i clicked Install - sorry about that.

Anyway, line 35 references $globaltemplates = array(

so do i need to add a reference to this new template that is being called?

Paul M 04-21-2005 05:47 PM

There is no new template associated with this hack - and line 35 is well away from the changes made by this hack. I suggest you revert to a fresh [original] copy of index.php and make the edit again.

MortysTW 04-22-2005 01:56 AM

Also for the future, using notepad is probably about the safest thing you could use. NotePad doesn't add in junk. Word would. Just FYI.

Also, delilah429, this might sound really stupid, but you didn't by any chance remove all the code that was ABOVE the logged in users when you added the chat snippet in your index.php did you? I just found it odd you chose to include soooo much of everything below the LOGGED IN USERS but didn't include anything above the CHAT snippet in what you pasted in above.

delilah429 04-22-2005 02:00 AM

Well I was just coming back here to say that I downloaded EditPlus to see if it was something the editor was doing and it worked PERFECTLY! so i am not sure - and no, i didn't delete what was above that line - it was silly just to show that snippet though - irrelevant, i suppose - but like i said i did the exact same thing and it worked - go figure

Love this!


All times are GMT. The time now is 06:42 PM.

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.01422 seconds
  • Memory Usage 1,800KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_php_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
  • (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