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)
-   -   Who's in chat on forumhome.. (No eggdrop) (https://vborg.vbsupport.ru/showthread.php?t=65099)

Fender963 05-27-2004 03:39 AM

I have uploaded my index.php file.

here is the code I added:

Quote:

// Who's in chat
$chatdatecut = TIMENOW - 65;
$inchat=$DB_site->query("SELECT *
FROM " . TABLE_PREFIX . "chatters
WHERE chattime > $chatdatecut
ORDER BY username ASC");

if ($DB_site->num_rows($inchat)==0) {
$nobody = "No users are chatting.";
}

while ($chatting=$DB_site->fetch_array($inchat)) {

$chatusername = $chatting[username];
$chatuserid = $chatting[userid];

eval('$chatters .= ", ' . fetch_template('chat_chatters') . '";');
}
$chatters = substr($chatters , 2);
Just as the instructions said. I made no changes. Thank you for the help...

Kyle

EDIT: File removed by Boofo. vBulletin files cannot be posted here. Sorry. ;)

Fender963 05-27-2004 02:44 PM

Dont worry about it EvilLS1, I figured it out. I'm an idiot. Thank you for the help though!

Kyle

EvilLS1 05-27-2004 05:20 PM

Ok, glad ya got it sorted out. :)

moonclamp 05-27-2004 07:28 PM

I've just added this and it works well ... except if a member has elected to be hidden he/she is still showing as online in the chatroom.

Amy ideas?

EvilLS1 05-27-2004 07:31 PM

Quote:

Originally Posted by moonclamp
I've just added this and it works well ... except if a member has elected to be hidden he/she is still showing as online in the chatroom.

Amy ideas?

Yeah thats not a bug. I just didn't bother adding it because the hidden users will be listed in the chat's userlist anyway, so why hide them on forumhome? I didn't think it was necessary.

moonclamp 05-27-2004 07:38 PM

My hidden users aren't worried about other members seeing them online.

They are more worried about showing online to non-members who have no access to chat.

Is this easy to change?

... thanks

EvilLS1 05-27-2004 08:01 PM

Moonclamp,
I can give you a quick fix which will make it so that hidden users are never shown in chat (even to those who have permission to see invisible users).

In chat.php find:
Code:

$somestuff = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "chatters WHERE userid=$userid");

        if ($DB_site->num_rows($somestuff)!=0)
{
        $DB_site->query("UPDATE " . TABLE_PREFIX . "chatters SET chattime = $time WHERE userid = $userid");
} else {
  $DB_site->query("INSERT INTO " . TABLE_PREFIX . "chatters (username,chattime,userid) VALUES ('".addslashes($chatuser)."','$time','".intval($userid)."')");
}

Replace it with:
Code:

if ($bbuserinfo[invisible]!=1) {
 $somestuff = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "chatters WHERE userid=$userid");

        if ($DB_site->num_rows($somestuff)!=0)
{
        $DB_site->query("UPDATE " . TABLE_PREFIX . "chatters SET chattime = $time WHERE userid = $userid");
} else {
  $DB_site->query("INSERT INTO " . TABLE_PREFIX . "chatters (username,chattime,userid) VALUES ('".addslashes($chatuser)."','$time','".intval($userid)."')");
}
}

I didn't test it but it should work.

moonclamp 05-27-2004 08:07 PM

That'll do for me ~ I can always see who is there by going to online.php

Thank you

moonclamp 05-27-2004 08:18 PM

except it didn't work ... and '$somestuff' should have been called '$some****' ;)

EvilLS1 05-27-2004 08:21 PM

I had to use somestuff b/c the other is censored here. :p

Did you wait 60 seconds for the old session to expire before testing it? Strange.. It should work.

moonclamp 05-27-2004 08:31 PM

My apologies ... it did work I was just being my usual impatient self

Many thanks for that :)

EvilLS1 05-27-2004 08:32 PM

n/p. Glad it worked for ya. :)

94DROPTOPZ 06-05-2004 09:29 PM

Will this work with PHP Mychat??

EvilLS1 06-05-2004 09:33 PM

Quote:

Originally Posted by 94DROPTOPZ
Will this work with PHP Mychat??

I don't see why not. As long as your phpmychat is included in the chat.php from the hack it should work. :)

94DROPTOPZ 06-05-2004 09:36 PM

Quote:

Originally Posted by EvilLS1
I don't see why not. As long as your phpmychat is included in the chat.php from the hack it should work. :)

Uh thank you very much! I'm not the "sharpest" knife in the drawer but I might try this one out...

EvilLS1 06-05-2004 09:42 PM

Quote:

Originally Posted by 94DROPTOPZ
Uh thank you very much! I'm not the "sharpest" knife in the drawer but I might try this one out...

Shouldn't be too difficult. Check the file called phpmychat.php in your main chat directory where you have phpmychat installed. It shows how to include phpmychat in another page.

RetroDreams 06-17-2004 01:39 AM

I just upgraded my forums to vb3 from 2.2.8. Can anyone tell me the new code to make the chat.php only for certain usergroups?

EvilLS1 06-17-2004 12:48 PM

Quote:

Originally Posted by RetroDreams
I just upgraded my forums to vb3 from 2.2.8. Can anyone tell me the new code to make the chat.php only for certain usergroups?

In chat.php find this:
Code:

if (!$bbuserinfo['userid'])
{
        print_no_permission();
}

Replace it with this:
Code:


if(!in_array($bbuserinfo['usergroupid'], array(X,X,X)))
{
        print_no_permission();
}

In the code above where it says array(X,X,X) replace those Xs with the usergroup IDs for those that you want to allow access to chat. Members of all other usergroups will recieve a no permission message when viewing the page.

RetroDreams 06-17-2004 02:52 PM

Thanks for bringing me up to speed!

EvilLS1 06-17-2004 09:35 PM

Quote:

Originally Posted by RetroDreams
Thanks for bringing me up to speed!

You're welcome. :)

InnerSelf 07-06-2004 09:00 PM

i installed this one and its working good, but for getting to see the online people in the whos online i have to go trough the link inside the "who's online in chat",
But i have a link in the top of the forum to go to that chat also. But if i go to the chat trough that link he wont show the online user. Can i solve that?

EvilLS1 07-06-2004 09:11 PM

Quote:

Originally Posted by InnerSelf
i installed this one and its working good, but for getting to see the online people in the whos online i have to go trough the link inside the "who's online in chat",
But i have a link in the top of the forum to go to that chat also. But if i go to the chat trough that link he wont show the online user. Can i solve that?

As long as the link points to forums/chat.php it shouldn't make any difference. Can you give me a link to your site so that I can see it for myself?

InnerSelf 07-08-2004 02:47 PM

i tried to make it still stand alone from this hack, but without eggdrop that is not possible, so i did like what is normal (boooring :p) and putten my irc code in the template :)

so its working, thnx!

RichieBoy67 07-18-2004 10:06 PM

Quote:

Originally Posted by Boofo
The wife (Internet Support Technician) seems to think you might have a corrupted IE installation. If you have the WinME CD, she suggests that you re-install IE. If you want, jumnp on the site and I will have her talk to you about it.

Go into your chat settings in you admincp and enable guest users...

RichieBoy67 07-18-2004 10:07 PM

Here's a question... It says to place the code here to embed my chat... which code do I place there???

EvilLS1 07-18-2004 10:38 PM

Quote:

Originally Posted by RichieBoy67
Here's a question... It says to place the code here to embed my chat... which code do I place there???

The code to embed the applet. You should find it in one of the html files that came with your IRC chat software.

Here's an example (jpilot).. Yours may be slightly different depending on what kind of IRC software you have, but it should start and end with < applet > tags.
Code:

<applet archive="jirc_nss.zip"  code=Chat.class
width=500 height=325 >
<param name="CABBASE" value="jirc_mss.cab">
<param name="LicenseKey" value="asdf1234">
<param name="ServerPort" value="7000">
<param name="ServerName1" value="astro.ga.us.dal.net">
<param name="Channel1" value="whatever">
<param name="AllowURL" value="true">
<param name="AllowIdentd" value="true">
<param name="WelcomeMessage" value="Welcome to IRC chat!">
<param name="RealName" value="Optional">
<param name="NickName" value="$bbuserinfo[username]">
<param name="UserName" value="jirc">
<param name="isLimitedServers" value="true">
<param name="isLimitedChannels" value="true">
<param name="MessageCol" value="80">
<param name="BackgroundColor" value="silver">
<param name="TextColor" value="black">
<param name="TextScreenColor" value="white">
<param name="ListTextColor" value="red">
<param name="TextFontName" value="Arial">
<param name="TextFontSize" value="12">
<param name="ConfigNickOnly" value="true">
<param name="NickNChannelOnly" value="true">
<param name="LogoBgColor" value="blue">
<param name="BorderVsp" value="3">
<param name="DirectStart" value="true">
<param name="FGColor" value="black">
<param name="TitleBackgroundColor" value="silver">
<param name="TitleForegroundColor" value="blue">
<param name="InputTextColor" value="black">
<param name="InputScreenColor" value="white">
<param name="IgnoreLevel" value="3">
<param name="DisplayConfigRealName" value="false">
<param name="DisplayConfigServer" value="false">
<param name="DisplayConfigPort" value="false">
<param name="DisplayConfigMisc" value="false">
<param name="FilterKeys" value=":) :( :D :P :b ;) :p :? jcool">
<param name="FilterVals" value="smile.gif frown.gif biggrin.gif tongue.gif boids.gif icon_wink.gif icon13.gif confused.gif IRClogo.gif">
</applet>


RichieBoy67 07-18-2004 10:48 PM

I have VBXirc chat.... I'm still not sure exactly what to add but thanks for the reply

EvilLS1 07-18-2004 10:59 PM

Quote:

Originally Posted by RichieBoy67
I have VBXirc chat.... I'm still not sure exactly what to add but thanks for the reply

Correct me if I'm wrong, but I don't think VBXIRC is an actual chat software, but rather a hack that integrates PJIRC with vbulletin. The actual chat software is pjirc, so thats where you'd download the applet code. I don't know what all the integration hack does but it most likely embeds the code into a template just like this hack. Not sure if its compatible with this hack or not.

GatorLCA 08-19-2004 11:02 PM

Got everything installed and works fine, but it seems like some of my members aren't showing up when they are in the Chat room on the Who's In Chat. Not that people have gone in yet but me and the co-admin are showing up but not everyone, anything I need to do to fix it

EvilLS1 08-20-2004 02:09 AM

GatorLCA,
I registered at your site to test it and it seems to be working fine for me. Keep in mind that if some users join your IRC channel via their own client that they will not show up as in chat on your forum home even though they're listed in the channel. In order for them to show up on your "Who's in Chat" list they must join the channel by using your web based chat client by visiting chat.php. If they're logged into your forum and logged in to chat through chat.php their name will be listed.

Dewayne

OrangeFlea 09-07-2004 07:13 PM

Will this hack work with Digichat?

EvilLS1 09-07-2004 08:18 PM

I'm not familiar with digichat but this one works with all embedded IRC applets. If digichat can be embedded into a template then it should work.

OrangeFlea 09-08-2004 04:33 AM

I'm not familiar with the term: "irc applets"

Digichat is a java applet. It doesn't log onto IRC or use IRC servers from what I know of it.

Here's a site that uses it:

http://www.mswebpals.org/digi.htm

I'm seriously considering whether I should get digichat, and the only thing that's holding me back are questions regarding its "Who's Chatting" flexibility. If a good-quality chat program can't do it as you've illustrated in your hack, then I don't want it.

EvilLS1 09-08-2004 04:50 AM

Quote:

Originally Posted by OrangeFlea
I'm not familiar with the term: "irc applets"

Digichat is a java applet. It doesn't log onto IRC or use IRC servers from what I know of it.

Here's a site that uses it:

http://www.mswebpals.org/digi.htm

I'm seriously considering whether I should get digichat, and the only thing that's holding me back are questions regarding its "Who's Chatting" flexibility. If a good-quality chat program can't do it as you've illustrated in your hack, then I don't want it.

I should have said Java applet. Anyway, as long as the applet itself can be embedded into the template supplied in the hack instructions I can't think of any reason that it wouldn't work.

Like I said, I'm not familiar with digichat but I do know that some of the high dollar chat softwares such as realchat do provide a way to show who's in chat on remote pages. This hack is geared more toward people who use web based IRC clients such as jpilot or pjirc. It could work with other types aswell but the only way to find out is to try it.

Dewayne

Partybuster 09-27-2004 11:44 PM

Quote:

Correct me if I'm wrong, but I don't think VBXIRC is an actual chat software, but rather a hack that integrates PJIRC with vbulletin. The actual chat software is pjirc, so thats where you'd download the applet code. I don't know what all the integration hack does but it most likely embeds the code into a template just like this hack. Not sure if its compatible with this hack or not.
You are right I guess. It uses pjirc and integrates it with vbulletin.

I also use VBXirc which is in /forum/chat directory and I would like to know if I can make some modifications to use forum/chat/index.php instead of forum/chat.php and make it work. I guess it isn't easy because you need chat.php to make it work, right?

I'm satisfied with VBXirc and it would be great to keep it and use this hack at the same time.

EvilLS1 09-28-2004 12:38 AM

Quote:

Originally Posted by Partybuster
You are right I guess. It uses pjirc and integrates it with vbulletin.

I also use VBXirc which is in /forum/chat directory and I would like to know if I can make some modifications to use forum/chat/index.php instead of forum/chat.php and make it work. I guess it isn't easy because you need chat.php to make it work, right?

I'm satisfied with VBXirc and it would be great to keep it and use this hack at the same time.

I'm sure its possible to get them to work together but I have no way to test it b/c I don't use vbxirc, so you'd have to do some experimenting yourself.

I think all you'd really need to do is copy this section of code from chat.php:
Code:

if (!$bbuserinfo['userid'])
{
        print_no_permission();
}


$chatuser = $bbuserinfo[username];
$userid = $bbuserinfo[userid];
$time = intval(TIMENOW);

 $somestuff = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "chatters WHERE userid=$userid");

        if ($DB_site->num_rows($somestuff)!=0)
{
        $DB_site->query("UPDATE " . TABLE_PREFIX . "chatters SET chattime = $time WHERE userid = $userid");
} else {
  $DB_site->query("INSERT INTO " . TABLE_PREFIX . "chatters (username,chattime,userid) VALUES ('".addslashes($chatuser)."','$time','".intval($userid)."')");
}



// ########################## EXTEND CHAT SESSION #############################
if ($_GET['do'] == "extendsession") {
        echo "<META HTTP-EQUIV=Refresh CONTENT=\"60; URL=".$vboptions['bburl']."/chat.php?do=extendsession\">";
        exit;
}

...And paste it into your forums/chat/index.php.

Then you'd need to add this to the template that loads the chat applet:
Code:

<iframe src="$vboptions[bburl]/chat.php?do=extendsession" width=0 height=0 frameborder=0></iframe>
After that, you'd still need to run the query to create the table, add the chat_chatters template, do the edits to index.php and your forumhome template.

Partybuster 09-28-2004 10:34 AM

Thanks for the info, I will give it a try.

Partybuster 09-28-2004 03:33 PM

When you say : "add this to the template that loads the chat applet"
are you talking about the chat_chatbit template or the one which loads my chat (some template from vbxirc) ?

don't I need to modify all lines with /chat.php to /chat/index.php also?

EvilLS1 09-28-2004 07:31 PM

Quote:

Originally Posted by Partybuster
When you say : "add this to the template that loads the chat applet"
are you talking about the chat_chatbit template or the one which loads my chat (some template from vbxirc) ?

don't I need to modify all lines with /chat.php to /chat/index.php also?

You'd need to put it in the vbxirc template which loads the applet.

And yeah, you'd need to change all links that point to /chat.php to /chat/index.php.

JohnBee 11-24-2004 06:24 PM

I also use vbxirc
I am very interested in getting this hack working with vbxirc, alot of users
use it, your instructions are not very clear though.

could someone please work throug it and post the code?


All times are GMT. The time now is 10:18 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.01369 seconds
  • Memory Usage 1,850KB
  • 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
  • (7)bbcode_code_printable
  • (15)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (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