|
Page 1 of 2
|
Ghostsearcher
Joined: December 2009
Posts: 90
Location: North GERmanny ^^
|
[SOLVED] AJAX Chat 0.8.3 - Possible? (Update: YES It Is ^_^)
Hello!
I'm a big fan of the AJAX Chat 0.8.3 which is downloadable here.
I've already started the question in the german support forum of icy, but unfortunely no one could help me.
Well, now my question is comin' back again for me: How can i implement this chat into the Icy Phoenix 1.3.0.53b? (or git version)
Because i'm not really impressed of the main chat here in icy and, of course, i'm using AJAX Chat since years. (phpbb 3.x)
My Problem is, i can't get this chat works when i just download/install it for phpbb 2.
So how i can do this?
Any suggestions?
Thank you very much!
Greetings, Ghostsearcher
____________ What i'm using:
Forumsoftware = phpBB 3.0.8 and Icy Phoenix f7f8a52 (GIT)
Style = Black-Pearl 1.6.4 (phpbb 3 only)
MySql= 5.1.49
Last edited by Ghostsearcher on Wed 13 Jul, 2011 02:16; edited 1 time in total |
#1 Mon 11 Jul, 2011 15:42 |
|
Sponsors
|
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.
|
|
Mighty Gorgon
Luca Libralato
Joined: August 2006
Posts: 7192
Location: Borgo San Michele
|
Re: AJAX Chat 0.8.3 - Possible?
Hi,
that chat is very nice.
Can you try to contact the author and ask if he is willing to provide a fix for Icy Phoenix? He already ported the chat to other systems, maybe he will be happy to do that.
____________ Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
|
#2 Tue 12 Jul, 2011 00:47 |
|
Ghostsearcher
Joined: December 2009
Posts: 90
Location: North GERmanny ^^
|
Re: AJAX Chat 0.8.3 - Possible?
Hiho!
Yes, this chat is very nice, useful and got sounds, too. (thru flash-solution it's possible for everyone to hear it instead of wav)
In this case i have to tell ya, i knew the documentation site. (just forgot to tell you all -.- sorry!)
But there's a problem.
(i'm using obviously the right version: ajax_chat-0.8.3.zip)
In the documentation 4. lib/custom.php i can't figure it out what i have to do, because it's empty.
So i've also downloaded the phpbb2 version of the chat und copied following essentials into my custom.php, because the example of the phpbb3 implementation results to the common "Hacking attempt"-Site of icy:
define ('IN_PHPBB', true);
$phpbb_root_path = AJAX_CHAT_PATH.'../';
require($phpbb_root_path.'extension.inc');
require($phpbb_root_path.'common.'.$phpEx);
// phpBB session management:
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
But there's no extension.inc in icyphoenix, so it results to an error:
Warning: require(/xxx/xxx/xxx/board/chat/../extension.inc) [function.require]: failed to open stream: No such file or directory in /xxx/xxx/xxx/board/chat/lib/custom.php on line 12
Further problems could be exists under point 5. lib/class/CustomAJAXChat.php, but for now i have to run the chat.
Any suggestions?
Thank you!
Greetings, Ghostsearcher
P.s.: I've already contact the author before a few weeks w/o answer. -.-"
____________ What i'm using:
Forumsoftware = phpBB 3.0.8 and Icy Phoenix f7f8a52 (GIT)
Style = Black-Pearl 1.6.4 (phpbb 3 only)
MySql= 5.1.49
|
#4 Tue 12 Jul, 2011 16:46 |
|
Informpro
Joined: October 2008
Posts: 1110
Location:
|
Re: AJAX Chat 0.8.3 - Possible?
Hi.
I wanted to know what this chat looks like, so I've installed it ...
It's really easy !
Replace your chat/lib/custom.php with -
<?php
-
/*
-
* @package AJAX_Chat
-
* @author Sebastian Tschan
-
* @copyright (c) Sebastian Tschan
-
* @license GNU Affero General Public License
-
* @link https://blueimp.net/ajax/
-
*
-
* IcyPhoenix integration :
-
* Informpro@http://icyphoenix.com
-
*/
-
-
// phpBB initialization:
-
define('IN_ICYPHOENIX', true);
-
if (!defined('IP_ROOT_PATH')) define('IP_ROOT_PATH', AJAX_CHAT_PATH.'../');
-
if (!defined('PHP_EXT')) define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
-
include(IP_ROOT_PATH . 'common.' . PHP_EXT);
-
-
// Start session management
-
$user->session_begin();
-
//$auth->acl($user->data);
-
$user->setup();
Go to the page via your browser, and voilĂ ! You're done.
Remove that file ... Now you can just go to chat/index.php (via your browser) and the chat works.
Don't forget, there's a configuration (chat/lib/config.php).
HF !
|
#5 Tue 12 Jul, 2011 19:18 |
|
Ghostsearcher
Joined: December 2009
Posts: 90
Location: North GERmanny ^^
|
Re: AJAX Chat 0.8.3 - Possible?
Huh that's GREAT! It works!
What did i wrong?
Well but i have just one question.
Because of my other phpbb 3 Forum, the login was automatically. The new chat works but im not automatically logged in if i visit my forum. I have to login manually.
Yes, sure i changed my config.php (force autologin:true). But i doesn't works.
Maybe something missing/wrong in a anywhere file?
Or is it normally in phpbb2?
Like i said in my phpbb3 i'm everytime auto loggedin so far i'm logged in my forum at the same time.
Hope ou can understand what i mean?
Thx!
Thank you and greetings, Ghostsearcher
ADDENDUM:
Sorry...just noticed: i can't get login. Only as guest but not as member of my forum.
Anything is wrong. -.-"
____________ What i'm using:
Forumsoftware = phpBB 3.0.8 and Icy Phoenix f7f8a52 (GIT)
Style = Black-Pearl 1.6.4 (phpbb 3 only)
MySql= 5.1.49
|
#6 Tue 12 Jul, 2011 19:33 |
|
Informpro
Joined: October 2008
Posts: 1110
Location:
|
Re: AJAX Chat 0.8.3 - Possible?
Yeah, I noticed the problem just after ...
Took quite time to understand ! But the problem is easy to see : sid is not re-sent each time.
It took quite time to understand HOW I can do that ... But after watching Matrix, everything is okay !
So, there's a lot of file to edit ...
Let's go !
OPEN
FIND - $redirect_url = (!empty($redirect) ? urldecode(str_replace(array('&', ($redirect[0] == '?' ? '?' : ''), PHP_EXT . '&'), array('&', '&', PHP_EXT . '?'), $redirect)) : '');
BEFORE ADD - if (substr($redirect, 0, 4) == 'chat')
- $redirect_url = $redirect;
- else
(this is because there's a problem with the ?redirect param when logging in)
Let's modify the shoutbox itself ...
OPEN - chat/lib/template/loggedIn.html
FIND - <script src="js/chat.js" type="text/javascript" charset="UTF-8"></script>
BEFORE ADD - <script type="text/javascript">
- var _sid = "[SID/]";
- </script>
OPEN - chat/lib/class/AJAXChat.php
FIND (line 61) - $this->_requestVars = array();
AFTER ADD - $this->_requestVars['sid'] = isset($_REQUEST['sid']) ? $_REQUEST['sid'] : null;
OPEN - chat/lib/class/CustomAJAXChat.php
REPLACE THE WHOLE FILE WITH http://pastebin.com/iC4wjedV
OPEN
FIND (ligne 119) - this.ajaxURL = config['ajaxURL'];
REPLACE WITH - if (_sid)
- this.ajaxURL = config['ajaxURL'] + '&sid=' + _sid;
- else
- this.ajaxURL = config['ajaxURL'];
What have I done ?
Two things : first, I needed to replace login page with IP's login one (_ip).
Second : I needed to re-send SID each ajax call.
Everything should now work !
Last edited by Informpro on Wed 13 Jul, 2011 01:59; edited 2 times in total |
#7 Tue 12 Jul, 2011 23:48 |
|
Ghostsearcher
Joined: December 2009
Posts: 90
Location: North GERmanny ^^
|
Re: AJAX Chat 0.8.3 - Possible?
Hi Informpro!
First i have immediately to say: You are a GREAT man.
Thank you very much for your support. Really great!!!
BUT... (always there's a "but" ^_~ )
...well, it's not very nice to say, but: It doesn't works - unfortunely. (i can't type anything, see no users and in the right upper corner you can see the "status bulp" - it should be normally green. Yellow and red "!" displays errors...hmmm, what's wrong here?)
I've copied all what you wrote here and i've re-checked it 3 times again... and it didn't worked.
...
And please note i'm using the GIT version of icy, if it's necessary to know.
Well, i think there's probably a slightly tiny mistake anywhere in a string...maybe!? I don't know. I try to understand all the php strings, but i guess a monkey is smarter then me. WAHAHAHA
What do you think about the mistake? There must be a little thing which is hook up the chat.
Please head on. You are very smart!!!
Thank you very much!
Much Greetings, Ghostsearcher
Addendum:
Maybe you should think about for a release of AJAX Chat for icy? Many people like this chat.
Addendum #2: Ah i forgot to wrote: Yes, of course i've purged the forums cache. (because of login_ip.php)
____________ What i'm using:
Forumsoftware = phpBB 3.0.8 and Icy Phoenix f7f8a52 (GIT)
Style = Black-Pearl 1.6.4 (phpbb 3 only)
MySql= 5.1.49
Last edited by Ghostsearcher on Wed 13 Jul, 2011 01:46; edited 1 time in total |
#8 Wed 13 Jul, 2011 01:11 |
|
Informpro
Joined: October 2008
Posts: 1110
Location:
|
Re: AJAX Chat 0.8.3 - Possible?
Meh, gonna retry (I've installed it myself with that guide, for testing, but I maybe did something more), let me 10 minutes.
[20 later]Oke. Re-tryed ... Everything works here. Your config seems weird, I get the error "you have to allow cookies", but ... My cookies are allowed !
Did you do the install properly ?
And I can't create an account on your board. Could you provide me a test account via PM for testing ?
|
#9 Wed 13 Jul, 2011 01:40 |
|
Ghostsearcher
Joined: December 2009
Posts: 90
Location: North GERmanny ^^
|
Re: AJAX Chat 0.8.3 - Possible?
Hi there!
You got just a PM. (with slightly admin rights/ ACP)
I also wonder about the cookie failure. Don't know why it is.
Yes i installed the chat properly because i could login.
All the things you said, i've copied them.
If you need another things, please let me know.
Thank you very much!
____________ What i'm using:
Forumsoftware = phpBB 3.0.8 and Icy Phoenix f7f8a52 (GIT)
Style = Black-Pearl 1.6.4 (phpbb 3 only)
MySql= 5.1.49
|
#10 Wed 13 Jul, 2011 01:54 |
|
Informpro
Joined: October 2008
Posts: 1110
Location:
|
Re: AJAX Chat 0.8.3 - Possible?
Oke, so the bug is easy to spot.
It was juste a missing else statement - tried it with autologin, so I didn't noticed.
|
#11 Wed 13 Jul, 2011 01:59 |
|
Ghostsearcher
Joined: December 2009
Posts: 90
Location: North GERmanny ^^
|
Re: AJAX Chat 0.8.3 - Possible?
It works!!!!
Thank you sooo much!
Please notice my PM to you about a release for icy.
Thank you!
Best greetings and wishes from me to you, Ghostsearcher
Addendum:
I forgot in that excitement to explain what informpro told me.
So here's the solution!
OPEN chat/js/chat.js
FIND
if (_sid) this.ajaxURL = config['ajaxURL'] + '&sid=' + _sid;
AFTER add
else this.ajaxURL = config['ajaxURL'];
Later at day i will add a complete package in the first post for the guys who want this chat using with icyphoenix.
Please be patient...
____________ What i'm using:
Forumsoftware = phpBB 3.0.8 and Icy Phoenix f7f8a52 (GIT)
Style = Black-Pearl 1.6.4 (phpbb 3 only)
MySql= 5.1.49
|
#12 Wed 13 Jul, 2011 02:04 |
|
Informpro
Joined: October 2008
Posts: 1110
Location:
|
Re: [SOLVED] AJAX Chat 0.8.3 - Possible? (Update: YES It Is ^_^)
I already edited my little guide ;).
|
#13 Wed 13 Jul, 2011 02:29 |
|
mort
Spam Basher
Joined: August 2010
Posts: 998
Location: Up a tree
|
Re: AJAX Chat 0.8.3 - Possible?
Later at day i will add a complete package in the first post for the guys who want this chat using with icyphoenix.
Please be patient...
While I share your enthusiasm,
I think it would be far better if InformPro wrote up the MOD instructions and packaged it as a complete MOD, as he is the one who actually wrote all the changes and will no doubt be the only one to support it in future.
Particularly when it will need to be converted to a "Plug-In" for the dev version.
|
#14 Wed 13 Jul, 2011 08:53 |
|
Ghostsearcher
Joined: December 2009
Posts: 90
Location: North GERmanny ^^
|
Re: [SOLVED] AJAX Chat 0.8.3 - Possible? (Update: YES It Is ^_^)
Hi mort!
Well, it should be more like this packages.
Support would be further given in they forum of ajax chat....hmm...so i thought about it. ^^
But i think you're right - i let it be. I'm not a pro coder.
Greetings, Ghostsearcher
____________ What i'm using:
Forumsoftware = phpBB 3.0.8 and Icy Phoenix f7f8a52 (GIT)
Style = Black-Pearl 1.6.4 (phpbb 3 only)
MySql= 5.1.49
|
#15 Wed 13 Jul, 2011 15:03 |
|
|
Page 1 of 2
|
Was this topic useful?
Was this topic useful?
Link this topic |
URL |
|
BBCode |
|
HTML |
|
You cannot post new topics You cannot reply to topics You cannot edit your posts You cannot delete your posts You cannot vote in polls You cannot attach files You can download files You cannot post calendar events
|
|
|
|