[ABD] AJAX Chat

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
Locked
User avatar
madblueimp
Registered User
Posts: 182
Joined: Thu Jun 07, 2007 12:29 am
Contact:

[ABD] AJAX Chat

Post by madblueimp » Thu Jun 07, 2007 12:52 am

I'm running phpBB 3 on my site (https://blueimp.net) and wrote a lightweight open source AJAX Chat application which nicely integrates with phpBB's forum system.

You can download the chat application (including source code) and view a demo (integrated with my phpBB forum) here:
AJAX Chat

List of Chat Features:
  • * Multiple Channels
    * Private Messaging
    * Private Channels
    * Kick/Ban offending Users
    * Ignoring offending Users
    * Online users list
    * Smilies
    * Hyperlinks
    * Splitting of long words to preserve chat layout
    * IRC style commands
    * Multiple languages (auto-detection of ACCEPT_LANGUAGE browser setting)
    * Standards compliance (XHTML 1.0 strict)
    * Accepts any text input (using UTF-8), including code and special characters
    * Bandwidth saving update calls (only updated data is sent)
    * Survives connection timeouts
    * Small filesizes (see Download below)
    * Logging of chat messages in XML format
    * Included Log File Viewer using XSLT
    * Easy integration into existing authentification systems
    * sample phpBB 3 integration included
    * sample phpBB 2 integration included
    * Easy customization through stylesheets (CSS) and templates
    * Separation of layout and code
    * Well commented Source Code
The download includes installation instructions regarding phpBB 3 and phpBB 2 integration - the setup is rather easy.
Forum modifications are minimal: Only a link to the chat containing userID & userName for logged in Users is needed.

Important:
As the time and effort spent to support the AJAX Chat project has increased my support here on this topic will discontinue.
I will continue to answer support requests on the Official SourceForge project site.
Feel free to use this topic for user-to-user support.
Last edited by DavidIQ on Fri Jan 30, 2009 4:07 am, edited 5 times in total.
Reason: Marked as abandoned

mysportsplace
Registered User
Posts: 134
Joined: Sun Oct 09, 2005 2:44 pm

Re: [DEV] AJAX Chat

Post by mysportsplace » Thu Jun 07, 2007 1:58 am

I get the following error

Code: Select all

Warning: main(/home/mnl1986/public_html/chat/../forum/common.php) [function.main]: failed to open stream: No such file or directory in /home/mnl1986/public_html/chat/index.php on line 37

Warning: main(/home/mnl1986/public_html/chat/../forum/common.php) [function.main]: failed to open stream: No such file or directory in /home/mnl1986/public_html/chat/index.php on line 37

Warning: main() [function.include]: Failed opening '/home/mnl1986/public_html/chat/../forum/common.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/mnl1986/public_html/chat/index.php on line 37

Fatal error: Call to a member function on a non-object in /home/mnl1986/public_html/chat/index.php on line 40

internet1
Registered User
Posts: 77
Joined: Sun Apr 09, 2006 9:11 am
Contact:

Re: [DEV] AJAX Chat

Post by internet1 » Thu Jun 07, 2007 8:15 am

hi
please help :
how setup :cry:
Thanks

Code: Select all

phpBB 3 integration:
--------------------

Chat:

- Adjust $phpbb_root_path in doc/samples/phpBB3/index.php
- Overwrite index.php with doc/samples/phpBB3/index.php
- Overwrite lib/class/CustomChat.php with doc/samples/phpBB3/lib/class/CustomChat.php


Forum:

- Edit includes/functions.php:

	Add
		'CHAT_LINK' => '../chat/',
		'CHAT_LINK_REGISTERED' => '../chat/?userID='.$user->data['user_id'].'&userName='.$user->data['username'],
		'CHAT_LABEL' => 'Chat',
	Before
		'SITENAME' => $config['sitename'],

- Edit styles/[STYLE_NAME]/template/overall_header.html

	Add to JavaScript section:
		<!-- IF not S_IS_BOT -->
			function openChatWindow(url)
			{
				window.open(
					url,
					'chat',
					'screenX='+(screen.width/2-375)+',screenY='+(screen.height/2-255)+',width=750,height=510,resizable=yes'
				)
			}
		<!-- ENDIF -->

	Add to link section (FAQ, Register, etc.) or somewhere else:
		<!-- IF not S_IS_BOT -->
			<!-- IF S_USER_LOGGED_IN -->
				<a href="{CHAT_LINK_REGISTERED}" onclick="openChatWindow(this.href); this.blur(); return false;">{CHAT_LABEL}</a>&nbsp;
			<!-- ENDIF -->
			<!-- IF not S_USER_LOGGED_IN -->
				<a href="{CHAT_LINK}" onclick="openChatWindow(this.href); this.blur(); return false;">{CHAT_LABEL}</a>&nbsp;
			<!-- ENDIF -->
		<!-- ENDIF -->

Done. :)

User avatar
madblueimp
Registered User
Posts: 182
Joined: Thu Jun 07, 2007 12:29 am
Contact:

Re: [DEV] AJAX Chat

Post by madblueimp » Thu Jun 07, 2007 1:27 pm

@mysportsplace:
Before using the provided phpBB3 integration samples, you have to adjust $phpbb_root_path (as declared in doc/readme.txt) in doc/samples/phpBB3/index.php.

$phpbb_root_path is a relative (or absolute) path pointing to your phpBB3 forum installation.

if, for example you uploaded the chat to your_website.tld/some_dir/chat/ and your forum resides in your_website.tld/some_other_dir/forum/, then $phpbb_root_path must be set to '../../some_other_dir/forum/'



@internet1:
Could you please explain with which part of the installation insctructions poses problems?
The explanations under section Chat describe which files in the chat directory have to be edited.
The explanations under section Forum describe which files in the forum directory have to be edited.

mysportsplace
Registered User
Posts: 134
Joined: Sun Oct 09, 2005 2:44 pm

Re: [DEV] AJAX Chat

Post by mysportsplace » Thu Jun 07, 2007 3:33 pm

Our forums is on our main DIR - / ... I changed the DIR to / in index.php but I get the same error.

User avatar
JunglistPerfection
Registered User
Posts: 611
Joined: Mon Apr 09, 2007 11:58 pm
Location: Chicago, IL

Re: [DEV] AJAX Chat

Post by JunglistPerfection » Thu Jun 07, 2007 4:04 pm

I think you should change the DEV tag to BETA, since people are trying out your mod. But anyway, I love the mod. I wish this mod was for phpbb 2.0.22 also.

User avatar
madblueimp
Registered User
Posts: 182
Joined: Thu Jun 07, 2007 12:29 am
Contact:

Re: [DEV] AJAX Chat

Post by madblueimp » Thu Jun 07, 2007 5:01 pm

@mysportsplace:
In which directory did you upload the chat?

paths are different for web access and for script inclusion - / is the root of your webserver, not your document root.


@JunglistPerfection:
I used the "DEV" tag because I didn't release yet any real MOD files.

My AJAX Chat will work as well with phpbb 2.0.22 - perhaps someone likes to change the parts in the sample phpBB integration files - I have no phpBB 2 installation any more to test it (and not really time to set one up and do it - exams coming soon ;)).

mysportsplace
Registered User
Posts: 134
Joined: Sun Oct 09, 2005 2:44 pm

Re: [DEV] AJAX Chat

Post by mysportsplace » Thu Jun 07, 2007 10:35 pm

The forums are on the main DIR and the chat is on /chat

Macrike
Registered User
Posts: 70
Joined: Sat May 05, 2007 5:53 pm

Re: [DEV] AJAX Chat

Post by Macrike » Thu Jun 07, 2007 11:26 pm

Looks awesome. I'll wait until beta to try it out.

I was just wondering, does this consume much server resources? I've got a friend who as a really big forum, he once added a AJAX Shoutbox and the server kept falling every now and then.

Sorry if I made a stupid question, that's what us noobs usually do. lol

User avatar
madblueimp
Registered User
Posts: 182
Joined: Thu Jun 07, 2007 12:29 am
Contact:

Re: [DEV] AJAX Chat

Post by madblueimp » Fri Jun 08, 2007 11:01 am

mysportsplace wrote:The forums are on the main DIR and the chat is on /chat
Then you have to set $phpbb_root_path like this:

Code: Select all

$phpbb_root_path = PATH.'/../';
(absolute path)

Or you could as well use this:

Code: Select all

$phpbb_root_path = '../';
(relative path)

Macrike wrote:Looks awesome. I'll wait until beta to try it out.
The chat itself is in fact in release state - only the mod files are still in development (they are not really needed, but will make setup easier and better documented).
Macrike wrote:I was just wondering, does this consume much server resources? I've got a friend who as a really big forum, he once added a AJAX Shoutbox and the server kept falling every now and then.
The chat is written resource efficient - only updated data is sent to the client - nonetheless every client (Browser) has to make update calls frequently - else they wouldn't get new messages as HTTP is a stateless protocol.
If the chat consumes too much resources, you can use a higher timerRate in [chat_directory]/js.config.js
(timerRate is the time in MS a client waits until the next update call).
Macrike wrote:Sorry if I made a stupid question, that's what us noobs usually do. lol
There are no stupid questions ;) - and all of us have been noobs someday and are still noobs on a lot of subjects. :)

Macrike
Registered User
Posts: 70
Joined: Sat May 05, 2007 5:53 pm

Re: [DEV] AJAX Chat

Post by Macrike » Fri Jun 08, 2007 11:19 am

Nice! Thanks for your explanation.

I'll be trying it later on, and maybe bugging you about the $phpbb_root_path aswell. :D

saaiberke
Registered User
Posts: 1126
Joined: Wed Jul 20, 2005 8:13 am
Location: Gent/Belgium
Contact:

Re: [DEV] AJAX Chat

Post by saaiberke » Fri Jun 08, 2007 12:17 pm

Great Mod! I have just one question though, I installed this chat with phpBB3 integration but I see all my forumcategories as chat channels now. How can I make just one channel that is used by everyone that enters the chatroom?

Is there any possibility you adjust your chat window so it fits the Prosilver or subsilver2 format?

Thank you for your splendid work! :)

Grtz,

Nic

User avatar
Mav
Former Team Member
Posts: 2261
Joined: Wed May 15, 2002 9:19 am
Location: England
Contact:

Re: [DEV] AJAX Chat

Post by Mav » Fri Jun 08, 2007 1:05 pm

Nice looking mod. is it integrated with the phpbb3 smilies, or does it use it's own? it doesn't look like it uses the forum smilies (unless you've customised those already)

User avatar
madblueimp
Registered User
Posts: 182
Joined: Thu Jun 07, 2007 12:29 am
Contact:

Re: [DEV] AJAX Chat

Post by madblueimp » Fri Jun 08, 2007 3:14 pm

saaiberke wrote: I see all my forumcategories as chat channels now. How can I make just one channel that is used by everyone that enters the chatroom?
That's an easy task - just edit lib/class/CustomChat.php and remove the lines 79-92 ("// Get valid phpBB forums:" to "$db->sql_freeresult($result);").
The method will look like this:

Code: Select all

	function getChannels() {
		global $db, $auth;
		
		if($this->_channels === null) {
			$this->_channels = array();
			
			// Default channel, public to everyone:
			$this->_channels[$this->_params['defaultChannelName']] = $this->_params['defaultChannelID'];
		}
		return $this->_channels;
	}
saaiberke wrote:Is there any possibility you adjust your chat window so it fits the Prosilver or subsilver2 format?
I guess with "format" you mean "theme" or "look".
Customozing the look is fairly easy, just edit css/chat.css (you need knowledge of Cascading Style Sheets though).

Mav wrote:Nice looking mod. is it integrated with the phpbb3 smilies, or does it use it's own? it doesn't look like it uses the forum smilies (unless you've customised those already)
No, it uses it's own - they are part of the Tango Desktop Project (see img/emoticons/license.txt
).
To use your own smilies, the easiest way would be replacing the smilies with different ones using the same names.
You might as well adjust the method "replaceEmoticons" in js/chat.js to add your own smiley replacements.
But make sure you don't produce invalid XHTML.

mysportsplace
Registered User
Posts: 134
Joined: Sun Oct 09, 2005 2:44 pm

Re: [DEV] AJAX Chat

Post by mysportsplace » Fri Jun 08, 2007 4:53 pm

madblueimp wrote:
mysportsplace wrote:The forums are on the main DIR and the chat is on /chat
Then you have to set $phpbb_root_path like this:

Code: Select all

$phpbb_root_path = PATH.'/../';
(absolute path)

Or you could as well use this:

Code: Select all

$phpbb_root_path = '../';
(relative path)

same error:

Code: Select all

Warning: main(/home/mnl1986/public_html/chat/../forum/common.php) [function.main]: failed to open stream: No such file or directory in /home/mnl1986/public_html/chat/index.php on line 37

Warning: main(/home/mnl1986/public_html/chat/../forum/common.php) [function.main]: failed to open stream: No such file or directory in /home/mnl1986/public_html/chat/index.php on line 37

Warning: main() [function.include]: Failed opening '/home/mnl1986/public_html/chat/../forum/common.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/mnl1986/public_html/chat/index.php on line 37

Fatal error: Call to a member function on a non-object in /home/mnl1986/public_html/chat/index.php on line 40

Locked

Return to “[3.0.x] Abandoned MODs”