https://www.icyphoenix.com/viewtopic.php?f=28&t=7932 ----------------------------------- Ghostsearcher Mon 11 Jul, 2011 15:42 [SOLVED] AJAX Chat 0.8.3 - Possible? (Update: YES It Is ^_^) ----------------------------------- Hello! I'm a big fan of the [url=https://blueimp.net/ajax/]AJAX Chat 0.8.3 which is downloadable [url=http://sourceforge.net/projects/ajax-chat/files/ajax-chat/0.8.3/]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 ----------------------------------- Mighty Gorgon Tue 12 Jul, 2011 00:47 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. ----------------------------------- mort Tue 12 Jul, 2011 01:29 Re: AJAX Chat 0.8.3 - Possible? ----------------------------------- This may help. :mryellow: http://sourceforge.net/apps/mediawiki/ajax-chat/index.php?title=Custom_integration_howto BTW MG the readme doc in the download also has the script for using it as a Shoutbox also. ;) And the usual dribble of "How do I do this - Change that - Move something - Cross the "t's" and dot the "I's" :lol: http://sourceforge.net/projects/ajax-chat/forums/forum/774132 ----------------------------------- Ghostsearcher Tue 12 Jul, 2011 16:46 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 [b]4. lib/custom.php[/b] 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: [code linenumbers=false]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);[/code] But there's no extension.inc in icyphoenix, so it results to an error: :cry: [b]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[/b] Further problems could be exists under point [b]5. lib/class/CustomAJAXChat.php[/b], 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. -.-" ----------------------------------- Informpro Tue 12 Jul, 2011 19:18 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 [code syntax=php]session_begin(); //$auth->acl($user->data); $user->setup();[/code]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 ! ----------------------------------- Ghostsearcher Tue 12 Jul, 2011 19:33 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 [color=#FF0019]ADDENDUM[/color]: [b]Sorry...just noticed: i can't get login. Only as guest but not as member of my forum. Anything is wrong. -.-"[/b] ----------------------------------- Informpro Tue 12 Jul, 2011 23:48 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 :D ! So, there's a lot of file to edit ... Let's go ! OPEN[code]login_ip.php[/code] FIND[code]$redirect_url = (!empty($redirect) ? urldecode(str_replace(array('&', ($redirect[0] == '?' ? '?' : ''), PHP_EXT . '&'), array('&', '&', PHP_EXT . '?'), $redirect)) : '');[/code] [b]BEFORE[/b] ADD[code]if (substr($redirect, 0, 4) == 'chat') $redirect_url = $redirect; else[/code] (this is because there's a problem with the ?redirect param when logging in) Let's modify the shoutbox itself ... OPEN[code]chat/lib/template/loggedIn.html[/code] FIND[code] [/code] [b]BEFORE[/b] ADD[code][/code] OPEN[code]chat/lib/class/AJAXChat.php[/code] FIND (line 61)[code] $this->_requestVars = array();[/code] [b]AFTER[/b] ADD[code] $this->_requestVars['sid'] = isset($_REQUEST['sid']) ? $_REQUEST['sid'] : null;[/code] OPEN[code]chat/lib/class/CustomAJAXChat.php[/code] REPLACE THE WHOLE FILE WITH http://pastebin.com/iC4wjedV OPEN[code]chat/js/chat.js[/code] FIND (ligne 119)[code] this.ajaxURL = config['ajaxURL'];[/code] REPLACE WITH[code] if (_sid) this.ajaxURL = config['ajaxURL'] + '&sid=' + _sid; else this.ajaxURL = config['ajaxURL'];[/code] 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 ! ----------------------------------- Ghostsearcher Wed 13 Jul, 2011 01:11 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!!! :thanks: :banana_04: BUT... :twisted: (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 :roll: :mricy: 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) ----------------------------------- Informpro Wed 13 Jul, 2011 01:40 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 ? ----------------------------------- Ghostsearcher Wed 13 Jul, 2011 01:54 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! ;) ----------------------------------- Informpro Wed 13 Jul, 2011 01:59 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. ----------------------------------- Ghostsearcher Wed 13 Jul, 2011 02:04 Re: AJAX Chat 0.8.3 - Possible? ----------------------------------- [align=center]:thanks: :thanks: :thanks: :thanks: :thanks: :thanks: [/align] 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 [align=center]:thanks: :thanks: :thanks: :thanks: :thanks: :thanks: [/align] Addendum: I forgot in that excitement :D to explain what informpro told me. So here's the solution! OPEN [b]chat/js/chat.js[/b] FIND [codeblock]if (_sid) this.ajaxURL = config['ajaxURL'] + '&sid=' + _sid;[/codeblock] [u]AFTER[/u] add [codeblock]else this.ajaxURL = config['ajaxURL'];[/codeblock] 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... ----------------------------------- Informpro Wed 13 Jul, 2011 02:29 Re: [SOLVED] AJAX Chat 0.8.3 - Possible? (Update: YES It Is ^_^) ----------------------------------- I already edited my little guide ;). ----------------------------------- mort Wed 13 Jul, 2011 08:53 Re: AJAX Chat 0.8.3 - Possible? ----------------------------------- [quote user="Ghostsearcher" post="53155"]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...[/quote] 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[b] only[/b] one to support it in future. Particularly when it will need to be converted to a "Plug-In" for the dev version. ;) ----------------------------------- Ghostsearcher Wed 13 Jul, 2011 15:03 Re: [SOLVED] AJAX Chat 0.8.3 - Possible? (Update: YES It Is ^_^) ----------------------------------- Hi mort! Well, it should be more like this [url=http://sourceforge.net/projects/ajax-chat/files/ajax-chat/0.8.3/]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 ----------------------------------- Informpro Thu 14 Jul, 2011 02:03 Re: [SOLVED] AJAX Chat 0.8.3 - Possible? (Update: YES It Is ^_^) ----------------------------------- Mort, the only things I've done are modifications to CustomAJAX... So, it can even be just another package disponible release on the sourceforge of the project ... Or here. ----------------------------------- mort Thu 14 Jul, 2011 11:28 Re: [SOLVED] AJAX Chat 0.8.3 - Possible? (Update: YES It Is ^_^) ----------------------------------- Thanks, But I only have one other question. Why is this topic allowed to run in "General Support" when it should have been moved to here. [b]Customizations And MODs Discussions [/b] :twisted: ----------------------------------- Informpro Thu 14 Jul, 2011 11:47 Re: [SOLVED] AJAX Chat 0.8.3 - Possible? (Update: YES It Is ^_^) ----------------------------------- Because he first asked for a "howto" ? Does that really matter so much for you ? If we provide the package, the release topic will be in the MODs forum. ----------------------------------- Joshua203 Thu 14 Jul, 2011 12:23 Re: [SOLVED] AJAX Chat 0.8.3 - Possible? (Update: YES It Is ^_^) ----------------------------------- [quote user="mort" post="53164"]Why is this topic allowed to run in "General Support" when it should have been moved to here. [b]Customizations And MODs Discussions [/b] :twisted:[/quote] As you wish (Moved) :wink: ----------------------------------- mort Fri 15 Jul, 2011 08:38 Re: [SOLVED] AJAX Chat 0.8.3 - Possible? (Update: YES It Is ^_^) ----------------------------------- [quote user="Informpro" post="53167"]Does that really matter so much for you ?.[/quote] [b]Yes it does![/b] This place does not have a great deal of support, and posting stuff all over the place is not going to help anyone or the Search Engine in future. But if you want to run it as a "Country Kitchen" - that's fine so long as you can remember where everything is when people start asking the same questions over and over again. ----------------------------------- Joshua203 Fri 15 Jul, 2011 08:54 Re: [SOLVED] AJAX Chat 0.8.3 - Possible? (Update: YES It Is ^_^) ----------------------------------- I think it could really help Icy if one of you would post this integration to their development so it can be included :mryellow: ----------------------------------- Informpro Fri 15 Jul, 2011 21:26 Re: [SOLVED] AJAX Chat 0.8.3 - Possible? (Update: YES It Is ^_^) ----------------------------------- I have nor interest neither intention to start a fight. I already said it : he first asked for a howto. Which must'nt be placed in "Customizations And MODs Discussions". Therefore, the chat will be provided as a plugin for IP (normally). So, THEN, it will make sense. BTW. Since Joshua moved the topic (thanks to him), isn't this discussion (even before) pointless ? I never said that general support is the best place, but at start it was fitting enough to ask that ... Discussion closed. ----------------------------------- Mighty Gorgon Tue 19 Jul, 2011 22:00 Re: [SOLVED] AJAX Chat 0.8.3 - Possible? (Update: YES It Is ^_^) ----------------------------------- Thanks GS for having suggested this addon, I checked it and it works very well. Thanks [b]Informpro[/b] for having integrated it! I have ported this chat to the plugin system, so the chat is now working as a plugin. ACP options should be ported as well... maybe in the future if someone is willing to work on that. I will add this plugin in the plugins repository next time I will update the package. ----------------------------------- Mighty Gorgon Thu 25 Aug, 2011 23:28 Re: [SOLVED] AJAX Chat 0.8.3 - Possible? (Update: YES It Is ^_^) ----------------------------------- This mod has been ported to latest Icy Phoenix version as a plugin. https://github.com/MightyGorgon/icy_phoenix_plugins/tree/master/trunk/chat Thanks for sharing and helping in integration. ----------------------------------- Ghostsearcher Fri 26 Aug, 2011 17:05 Re: [SOLVED] AJAX Chat 0.8.3 - Possible? (Update: YES It Is ^_^) ----------------------------------- Hi MG! Especially Safari-Problem! Maybe in Chrome, too? (i can't use Chrome, so please try it out. But i guess, yes, same problem.) I've noticed that the AJAX Chat not really works. => Special example is on Safari (up-to-date or any other Version of it) and the Styleswitcher. (btw: did you knew that Safari can't load different (alternate) Stylesheets? So this is the problem.) You will notice that the styleswitcher works under IE, FF and Opera, too. But if you're using Safari, the Chat will destroy! (Chrome, i don't know, just guess yes) Do you have a solution for it? See here using Safari with the StandardStyle "prosilver": http://chat.ecobytes.net/ (even noticed the error message in Safari? You can disable this maybe forgotten string in "js/chat.js" on line 633 (or search for "alert(e);"). Found it? Then just add two slashes before like this: //alert(e); done - no error message anymore! Maybe it's a general Problem to Safari because it can't play sounds? Maybe it should be quicktime installed? Unfortunely i don't know...) So, if you now change the style from standard "prosilver" to anything u like, the chat will destroy. See it? Ok, it can works on Safari, if you set a default/standard Style and delete all other CSS in lib/config.php on line 50+52. But that's not the solution. Do you have maybe a work around for it, so Safari can load different Styles? Maybe it's possible to change the Styles using Javascript. But unfortunely i don't know how it's done. It's maybe to add anywhere in lib/class/AJAXChatTemplate.php !? This could help you further?: http://www.alistapart.com/articles/alternate/ Greetings, Ghostsearcher Not really important Addendum: Also it could be, that some Safari users will kicked from the chat after round'bout 20 Minutes. Attention: I don't know if all(!) Safari users got this problem. I just know this from a Safari using friend that he will kicked all 20 minutes from the chat and (like i set this string to "true") re-auto log in again. So this notice is payed with attention because as i've already said, i don't know if any Safari user will have this problem. Maybe some Safari users can check this out on the chatlink i posted here in the beginning of this post? Just login, wait 20-30 minutes and check if you're kicked out. It doesn't matter if you typing or not. ----------------------------------- Informpro Fri 26 Aug, 2011 18:06 Re: [SOLVED] AJAX Chat 0.8.3 - Possible? (Update: YES It Is ^_^) ----------------------------------- Please ask chat-related problems in chat-related forums (or sourceforge, watevar).