[RC] Simple Chat v2.1 - new AJAX chat for phpBB3

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Get Involved
User avatar
Traction
Registered User
Posts: 288
Joined: Fri Jun 06, 2003 8:42 pm
Location: Staten Island, New York
Contact:

Re: [BETA] SimpleChat v2.0 - new AJAX chat for phpBB3

Post by Traction » Sat Feb 21, 2009 6:58 pm

naushadhassam wrote:
Mudjosh wrote:Run this sql:

Code: Select all

CREATE TABLE IF NOT EXISTS `phpbb_chat_messages2` (
	`msg_id` int(11) unsigned NOT NULL auto_increment,
	`user_id` mediumint(8) unsigned NOT NULL default '0',
	`username` varchar(255) collate utf8_bin NOT NULL default '',
	`time` int(11) unsigned NOT NULL default '0',
	`text` varchar(255) collate utf8_bin NOT NULL default '',
	`color` varchar(6) collate utf8_bin NOT NULL default '',
	PRIMARY KEY  (`msg_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=0;

CREATE TABLE IF NOT EXISTS `phpbb_chat_sessions2` (
	`user_id` mediumint(8) unsigned NOT NULL default '0',
	`username` varchar(255) collate utf8_bin NOT NULL default '',
	`last_active` int(11) unsigned NOT NULL default '0',
	`user_status` tinyint(3) unsigned NOT NULL default '0',
	`user_activity` smallint(6) NOT NULL default '0',
	`user_blocked` tinyint(1) NOT NULL default '0',
	UNIQUE KEY `user_id` (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

root/chat/index.php

Find:

Code: Select all

define('CHAT_MESSAGES_TABLE',	$table_prefix . 'chat_messages');
define('CHAT_SESSIONS_TABLE',	$table_prefix . 'chat_sessions');
Replace:

Code: Select all

define('CHAT_MESSAGES_TABLE',	$table_prefix . 'chat_messages2');
define('CHAT_SESSIONS_TABLE',	$table_prefix . 'chat_sessions2');
That should work..

Hope I helped!
What changes will that make? You forgot to say. :)
Failure is not an option.
Zap! Classic Video Game Forums

maclanes
Registered User
Posts: 37
Joined: Thu Mar 09, 2006 2:53 am

Re: [BETA] SimpleChat v2.0 - new AJAX chat for phpBB3

Post by maclanes » Sun Feb 22, 2009 9:31 am

It looks like the code comments are getting scrambled when I transfer the folder to my server. It doesn't like that the comments are in another language. :(

austriaka
Registered User
Posts: 8
Joined: Wed Jan 21, 2009 7:21 am

Re: [BETA] SimpleChat v2.0 - new AJAX chat for phpBB3

Post by austriaka » Sun Feb 22, 2009 9:34 am

make sure that the files are stored in UTF-8 without BOM and with UNIX line endings (LF)
Then it should work with the russian comments too

sporx
Registered User
Posts: 16
Joined: Fri Feb 20, 2009 5:57 am

Re: [BETA] SimpleChat v2.0 - new AJAX chat for phpBB3

Post by sporx » Mon Feb 23, 2009 3:45 am

hi, i installed this and went to example.com/chat (in my case thestudybuff.com/chat) and it works, except the stuff i type doesnt show up. i get the txt box to write things in, the smileys, and the color bar, but when i type in stuff it doesnt show up above it where it should be. any advice?

also, my phpbb3 is installed directly to the root, so its not forum/chat or phpbb3/chat, its just /chat for me. do i have to change anything cuz of that?

hey i forgot to mention that im running phpbb version 3.0.4 n godaddy.com via a shared host account
Last edited by sporx on Wed Feb 25, 2009 7:02 pm, edited 1 time in total.

ksxj
Registered User
Posts: 47
Joined: Fri Sep 05, 2008 11:10 pm

Re: [BETA] SimpleChat v2.0b - new AJAX chat for phpBB3

Post by ksxj » Tue Feb 24, 2009 3:58 am

VEG wrote:It's a feature. Displaying recent messages at enter allows to quickly penetrate into the topic.
A feature that can be turned off?

User avatar
edgar davids
Registered User
Posts: 376
Joined: Mon Jan 19, 2009 7:15 am

Re: [BETA] SimpleChat v2.0 - new AJAX chat for phpBB3

Post by edgar davids » Tue Feb 24, 2009 10:28 am

where do you run the SQL from??? Anyone got any more instructions?

sporx
Registered User
Posts: 16
Joined: Fri Feb 20, 2009 5:57 am

Re: [BETA] SimpleChat v2.0 - new AJAX chat for phpBB3

Post by sporx » Tue Feb 24, 2009 6:00 pm

you have to go to your MSQL databases, and run it.

User avatar
Traction
Registered User
Posts: 288
Joined: Fri Jun 06, 2003 8:42 pm
Location: Staten Island, New York
Contact:

Re: [BETA] SimpleChat v2.0 - new AJAX chat for phpBB3

Post by Traction » Tue Feb 24, 2009 8:54 pm

Any word on if they are working on updates? I love this chat, but it needs a couple of thing and it'll be perfect (guest ability to see chat, chat log, who's in chat, etc.). :)
Failure is not an option.
Zap! Classic Video Game Forums

cesarillo
Registered User
Posts: 2
Joined: Tue Feb 24, 2009 12:51 pm

Re: [BETA] SimpleChat v2.0 - new AJAX chat for phpBB3

Post by cesarillo » Wed Feb 25, 2009 8:30 pm

hi! great mode and work fine but... i have a little request..
there's a mod to HIDE join and left info on chat?
TIA

BuNtEr
Registered User
Posts: 35
Joined: Mon Feb 14, 2005 9:25 am

Re: [BETA] SimpleChat v2.0 - new AJAX chat for phpBB3

Post by BuNtEr » Tue Mar 10, 2009 7:46 am

i have installed this mod works well only one thing, how do i add a link from my forum to the chat for registed users to use it only ?

khrath
Registered User
Posts: 5
Joined: Fri Aug 27, 2004 5:18 am

Re: [BETA] SimpleChat v2.0 - new AJAX chat for phpBB3

Post by khrath » Mon Mar 16, 2009 8:42 pm

Here is how I got it to list the number of users in chat in the chat link, and also how I got it to show who is in chat by mouse over on the chat link.

You have to enable php in template files through the admin panel for it to work.


# of users in chat

I created a php file containing the following code, named it chatnum.php, and put it in the forum root directory.

Code: Select all

<?php
$dbhost = 'xxxxxx';                  // MySQL server hostname
$dbuser = 'xxxxxx';                     // MySQL username
$dbpass = 'xxxxxx';                     // MySQL password
$dbname = 'xxxxxx';                     // MySQL database name


$conn = mysql_connect($dbhost, $dbuser, $dbpass); 
mysql_select_db($dbname, $conn); 

$res = mysql_query("select count(1) as chatnum from phpbb_chat_sessions");
if ($row = mysql_fetch_array($res)) {
$num_users = $row['chatnum'];
}
print $num_users;

?>
Then I added this into my link in overall_headers.html

Code: Select all

(<!-- INCLUDEPHP chatnum.php -->)




list of users in chat

I created a php file containing the following code, named it chatnames.php, and put it in the forum root directory.

Code: Select all

<?php
$dbhost = 'xxxxx';                  // MySQL server hostname
$dbuser = 'xxxxx';                     // MySQL username
$dbpass = 'xxxxx';                     // MySQL password
$dbname = 'xxxxx';                     // MySQL database name



$conn = mysql_connect($dbhost, $dbuser, $dbpass); 
mysql_select_db($dbname, $conn); 

$res = mysql_query("select username from phpbb_chat_sessions order by username limit 20");
while ($row = mysql_fetch_array($res)) {
$usernames[] = $row['username'];
}
if (count($usernames) == 0) {
$userlist = '< Chat is Empty =( >';
} else {
$userlist = implode(', ', $usernames);
}

print "Users in chat: $userlist";
?>
then I added this to the link in overall_headers.html

Code: Select all

title='<!-- INCLUDEPHP chatnames.php -->'


The entire line in overall_headers.html looks like this.

Code: Select all

<!-- IF S_USER_LOGGED_IN --><a href="http://www.yourdomain.com/forums/chat/index.php" onclick="openWindow(this.href,800,500);this.blur();return false;" title='<!-- INCLUDEPHP chatnames.php -->'>Chat (<!-- INCLUDEPHP chatnum.php -->)</a> &#8226; <!-- ENDIF -->




This is a sloppy way of doing things, and really should be redone correctly by someone who knows a bit more about phpbb3, but it works, and shows how many people are in the chat room, and also shows who is in the chat room when you mouse over the link, features a lot of my users requested.

User avatar
Traction
Registered User
Posts: 288
Joined: Fri Jun 06, 2003 8:42 pm
Location: Staten Island, New York
Contact:

Re: [BETA] SimpleChat v2.0 - new AJAX chat for phpBB3

Post by Traction » Tue Mar 17, 2009 5:00 am

Where in the ACP is the option to turn on php?
Failure is not an option.
Zap! Classic Video Game Forums

BuNtEr
Registered User
Posts: 35
Joined: Mon Feb 14, 2005 9:25 am

Re: [BETA] SimpleChat v2.0 - new AJAX chat for phpBB3

Post by BuNtEr » Tue Mar 17, 2009 8:16 am

khrath wrote: Then I added this into my link in overall_headers.html

Code: Select all

title='<!-- INCLUDEPHP chatnames.php -->'
in what part of overall_headers.html do i put this ?

karujev
Registered User
Posts: 1
Joined: Tue Apr 20, 2010 7:17 pm

Re: [BETA] SimpleChat v2.0 - new AJAX chat for phpBB3

Post by karujev » Tue Apr 20, 2010 7:22 pm

I have same question..
i created chatnames and chatnum php files. Changed the overall_header. Link Chat is there but number not appearing.
Traction wrote:Where in the ACP is the option to turn on php?

User avatar
VEG
Registered User
Posts: 84
Joined: Sat Jun 25, 2005 9:31 am
Location: Belarus, Minsk
Contact:

Simple Chat v2.1 Released!

Post by VEG » Mon Sep 03, 2012 10:12 pm

New version of Simple Chat!
— Bug fixes
— HTML5 <audio> for notifications (instead of Flash)
— HTML5 local store for storing of settings (instead of cookies)

Image

Demo URL: http://phpbbex.com/chat/
Demo Username: demo_en
Demo Password: demo_en

Modification Download:
phpbb3_simplechat.zip (83kb)
Best regards, Evgeny

Locked

Return to “[3.0.x] MODs in Development”