AjaxChat Integration (latest version 3.2.1)

Started by .HuNTeR., August 27, 2008, 12:59:06 AM

Previous topic - Next topic

mrtrc266

@ 4T3IG0 looks like you are missing the script for the popup feature

   // the [chat] button
   if (!empty($modSettings['chatPopUp']))
      echo '    <script type="text/javascript">
            function openWindow(url,width,height,options,name) {
                width = width ? width : 800;
                height = height ? height : 600;                 options = options ? options : 'resizable=yes';
                name = name ? name : 'openWindow';
                window.open(
                    url,
                    name,
                    'screenX='+(screen.width-width)/2+',screenY='+(screen.height-height)/2+',width='+width+',height='+height+','+options
                )
            }
    </script>';


And then in your button code you also need add the scriptrul to call it..EXAMPLE For the default theme

   $chatPath = str_replace("index.php", "chat/index.php", $scripturl);
   $num = (empty($modSettings['enableChatButtonNo'])) ? 0 : count(chatOnlineUsers());
   echo $context['browser']['is_ie4'] ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '', '
      <td valign="top" class="maintab_back">
         <a href="', $chatPath, '"', empty($modSettings['chatPopUp']) ? 'target="_blank"' : ' onclick="openWindow(this.href);this.blur();return false;"', '>', $txt['chat'], ($num > 0) ?  ('('.$num.')') : '' , '</a>
      </td>';

Kat-2

#1421
Quote from: mrtrc266 on April 21, 2009, 06:59:54 PM
Ok Kat please don't kill me  :P  but this will work 99.9% sure ;)

Find

/* Dilber Theme*/

Replace with
@import url(../../shoutBox/css/shoutbox.css);
/* Dilber Theme*/


You can see it working here and this is your index template also.

My Test Site





:-[  I am not sure where you mean for me to find/put this???

(I do see it on your test site)


If you mean the index.template.php  I can't find it in there...

4T3IG0

Quote from: mrtrc266 on April 21, 2009, 10:10:16 PM
@ 4T3IG0 looks like you are missing the script for the popup feature

   // the [chat] button
   if (!empty($modSettings['chatPopUp']))
      echo '    <script type="text/javascript">
            function openWindow(url,width,height,options,name) {
                width = width ? width : 800;
                height = height ? height : 600;                 options = options ? options : 'resizable=yes';
                name = name ? name : 'openWindow';
                window.open(
                    url,
                    name,
                    'screenX='+(screen.width-width)/2+',screenY='+(screen.height-height)/2+',width='+width+',height='+height+','+options
                )
            }
    </script>';


And then in your button code you also need add the scriptrul to call it..EXAMPLE For the default theme

   $chatPath = str_replace("index.php", "chat/index.php", $scripturl);
   $num = (empty($modSettings['enableChatButtonNo'])) ? 0 : count(chatOnlineUsers());
   echo $context['browser']['is_ie4'] ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '', '
      <td valign="top" class="maintab_back">
         <a href="', $chatPath, '"', empty($modSettings['chatPopUp']) ? 'target="_blank"' : ' onclick="openWindow(this.href);this.blur();return false;"', '>', $txt['chat'], ($num > 0) ?  ('('.$num.')') : '' , '</a>
      </td>';


@ Mrtrc266 Tnks for your reply. Guess I miss some information, in my default theme the popup works just fine, but in my custom theme I can't use the same code because the button don´t fit in the up button ruler  configuration. If I use the same code, it's there and the popup works, but it stays very ugly.  :(

mrtrc266

Quote from: Kat-2 on April 21, 2009, 11:52:10 PM
Quote from: mrtrc266 on April 21, 2009, 06:59:54 PM
Ok Kat please don't kill me  :P  but this will work 99.9% sure ;)

Find

/* Dilber Theme*/

Replace with
@import url(../../shoutBox/css/shoutbox.css);
/* Dilber Theme*/


You can see it working here and this is your index template also.

My Test Site





:-[  I am not sure where you mean for me to find/put this???

(I do see it on your test site)


If you mean the index.template.php  I can't find it in there...

You'll find that in yourforum/Themes/dilbermc/style.css

mrtrc266

Quote from: 4T3IG0 on April 22, 2009, 05:59:31 AM
Quote from: mrtrc266 on April 21, 2009, 10:10:16 PM
@ Mrtrc266 Tnks for your reply. Guess I miss some information, in my default theme the popup works just fine, but in my custom theme I can't use the same code because the button don´t fit in the up button ruler  configuration. If I use the same code, it's there and the popup works, but it stays very ugly.  :(

Replace the whole chat bottun code with this
// the [chat] button
if (!empty($modSettings['chatPopUp']))
  echo '    <script type="text/javascript">
            function openWindow(url,width,height,options,name) {
                width = width ? width : 800;
                height = height ? height : 600;
                options = options ? options : \'resizable=yes\';
                name = name ? name : \'openWindow\';
                window.open(
                    url,
                    name,
                    \'screenX=\'+(screen.width-width)/2+\',screenY=\'+(screen.height-height)/2+\',width=\'+width+\',height=\'+height+\',\'+options
                )
            }
    </script>';
 
$chatPath = str_replace("index.php", "chat/index.php", $scripturl);
$num = (empty($modSettings['enableChatButtonNo'])) ? 0 : count(chatOnlineUsers());
echo $context['browser']['is_ie4'] ? '<div class="maintab_active_' . $first . '">&nbsp;</div>' : '', '
  <div class="maintab_back">
   <a href="', $chatPath, '"', empty($modSettings['chatPopUp']) ? 'target="_blank"' : ' onclick="openWindow(this.href);this.blur();return false;"', '>', $txt['chat'], ($num > 0) ?  ('('.$num.')') : '' , '</a>
  </div>';


4T3IG0

Quote from: mrtrc266 on April 22, 2009, 09:59:39 AM
Quote from: 4T3IG0 on April 22, 2009, 05:59:31 AM
Quote from: mrtrc266 on April 21, 2009, 10:10:16 PM
@ Mrtrc266 Tnks for your reply. Guess I miss some information, in my default theme the popup works just fine, but in my custom theme I can't use the same code because the button don´t fit in the up button ruler  configuration. If I use the same code, it's there and the popup works, but it stays very ugly.  :(

Replace the whole chat bottun code with this
// the [chat] button
if (!empty($modSettings['chatPopUp']))
  echo '    <script type="text/javascript">
            function openWindow(url,width,height,options,name) {
                width = width ? width : 800;
                height = height ? height : 600;
                options = options ? options : \'resizable=yes\';
                name = name ? name : \'openWindow\';
                window.open(
                    url,
                    name,
                    \'screenX=\'+(screen.width-width)/2+\',screenY=\'+(screen.height-height)/2+\',width=\'+width+\',height=\'+height+\',\'+options
                )
            }
    </script>';
 
$chatPath = str_replace("index.php", "chat/index.php", $scripturl);
$num = (empty($modSettings['enableChatButtonNo'])) ? 0 : count(chatOnlineUsers());
echo $context['browser']['is_ie4'] ? '<div class="maintab_active_' . $first . '">&nbsp;</div>' : '', '
  <div class="maintab_back">
   <a href="', $chatPath, '"', empty($modSettings['chatPopUp']) ? 'target="_blank"' : ' onclick="openWindow(this.href);this.blur();return false;"', '>', $txt['chat'], ($num > 0) ?  ('('.$num.')') : '' , '</a>
  </div>';


Tnks a lot Mrtrc266 almost perfect, you only miss the separate line between the two buttons  ;D

Here's the complete code in case anyone else need it:

// the [chat] button
if (!empty($modSettings['chatPopUp']))
  echo '    <script type="text/javascript">
            function openWindow(url,width,height,options,name) {
                width = width ? width : 800;
                height = height ? height : 600;
                options = options ? options : \'resizable=yes\';
                name = name ? name : \'openWindow\';
                window.open(
                    url,
                    name,
                    \'screenX=\'+(screen.width-width)/2+\',screenY=\'+(screen.height-height)/2+\',width=\'+width+\',height=\'+height+\',\'+options
                )
            }
    </script>';
 
$chatPath = str_replace("index.php", "chat/index.php", $scripturl);
$num = (empty($modSettings['enableChatButtonNo'])) ? 0 : count(chatOnlineUsers());
echo $context['browser']['is_ie4'] ? '<div class="maintab_active_' . $first . '">&nbsp;</div>' : '', '
  <div class="maintab_back">
   <a href="', $chatPath, '"', empty($modSettings['chatPopUp']) ? 'target="_blank"' : ' onclick="openWindow(this.href);this.blur();return false;"', '>', $txt['chat'], ($num > 0) ?  ('('.$num.')') : '' , '</a>
</div>' , $current_action == 'chat' ? '<div class="seperator"><!--no content--></div>' : '<div class="seperator"><!--no content--></div>';


What about Smileys??  More dificult, isn't it??


Kat-2

Quote from: mrtrc266 on April 22, 2009, 08:57:06 AM
Quote from: Kat-2 on April 21, 2009, 11:52:10 PM
Quote from: mrtrc266 on April 21, 2009, 06:59:54 PM
Ok Kat please don't kill me  :P  but this will work 99.9% sure ;)

Find

/* Dilber Theme*/

Replace with
@import url(../../shoutBox/css/shoutbox.css);
/* Dilber Theme*/


You can see it working here and this is your index template also.

My Test Site





:-[  I am not sure where you mean for me to find/put this???

(I do see it on your test site)


If you mean the index.template.php  I can't find it in there...

You'll find that in yourforum/Themes/dilbermc/style.css


That did the trick!  :D :D  :-* :-*

Now are you going to kill me if I can't get it right on my main site??  :P

4T3IG0

Quote from: Kat-2 on April 22, 2009, 03:15:54 PM
Quote from: mrtrc266 on April 22, 2009, 08:57:06 AM
Quote from: Kat-2 on April 21, 2009, 11:52:10 PM
Quote from: mrtrc266 on April 21, 2009, 06:59:54 PM
Ok Kat please don't kill me  :P  but this will work 99.9% sure ;)

Find

/* Dilber Theme*/

Replace with
@import url(../../shoutBox/css/shoutbox.css);
/* Dilber Theme*/


You can see it working here and this is your index template also.

My Test Site





:-[  I am not sure where you mean for me to find/put this???

(I do see it on your test site)


If you mean the index.template.php  I can't find it in there...

You'll find that in yourforum/Themes/dilbermc/style.css


That did the trick!  :D :D  :-* :-*

Now are you going to kill me if I can't get it right on my main site??  :P

Hi...  If he doesn't...  I will   :D 


Kat-2

Quote from: 4T3IG0 on April 22, 2009, 03:45:25 PM
Quote from: Kat-2 on April 22, 2009, 03:15:54 PM
Quote from: mrtrc266 on April 22, 2009, 08:57:06 AM
Quote from: Kat-2 on April 21, 2009, 11:52:10 PM
Quote from: mrtrc266 on April 21, 2009, 06:59:54 PM
Ok Kat please don't kill me  :P  but this will work 99.9% sure ;)

Find

/* Dilber Theme*/

Replace with
@import url(../../shoutBox/css/shoutbox.css);
/* Dilber Theme*/


You can see it working here and this is your index template also.

My Test Site





:-[  I am not sure where you mean for me to find/put this???

(I do see it on your test site)


If you mean the index.template.php  I can't find it in there...

You'll find that in yourforum/Themes/dilbermc/style.css


That did the trick!  :D :D  :-* :-*

Now are you going to kill me if I can't get it right on my main site??  :P

Hi...  If he doesn't...  I will   :D 





LOL! Hey now..be nice. ;D

And..yup..it is on my main site..and working great.

I do need to fix those sounds though....and I also have other themes..

*runs*

p3rlphr33k

ok, so i did a clean install of SMF 2.0 and immediately applied the AJAXChat Integration Mod. Everything seems flawless, then I uploaded a theme and apply, no avail. I went through and applied all the theme modifications and the --- channel came back. It does not happen on the defailt SMF theme only with a third pary theme. Is this somthing you could look into if i posted the theme files?

dzinerfusion

omg still not working can you please help? I chmoded all my files to 755. But i still get the '''CONNECTION STATUS 0'' not connection status 500! Ill include my 3 files that i had to edit and hope you can tell me what i did wrong!

mrtrc266

#1431
@ 4T3IG0  Glad you got it sorted, enjoy the Mod I'm sure you and your members will love it!

Yes adding the Smileys a little more difficult. I did a tutorial on adding some Smileys with a small Pop Up feature and adds all the BBC Buttons. Here is the Post

BUT....This was for the AJAX Chat Intergration 2.5 NOT 3.0

I do have it working for 3.0 but I just haven't had the time to post it. There are some differences but if you want to take a look and play around with it, it might get you started in the right direction.

mrtrc266

#1432
QuoteLOL! Hey now..be nice. ;D

And..yup..it is on my main site..and working great.

I do need to fix those sounds though....and I also have other themes..

*runs*


And you better run fast!!! LOL Just kidding :P  I'm glad you got it going Kat.

There was a post about 50 pages back about getting rid of the sounds. I will track it down and get it figure it out.

Just post the link to whatever other themes you have and we'll get those sorted too. Enjoy the Mod.  :-* :-*  back at ya ;)

mrtrc266

Quote from: bluesinjid on April 22, 2009, 06:22:18 PM
omg still not working can you please help? I chmoded all my files to 755. But i still get the '''CONNECTION STATUS 0'' not connection status 500! Ill include my 3 files that i had to edit and hope you can tell me what i did wrong!

This might be a server issue, there have been a slight few with the same probs but it didn't hurt to go through all the motions first just incase. Hopefully this will be fixed in the next version

mrtrc266

#1434
Quote from: p3rlphr33k on April 22, 2009, 04:32:27 PM
ok, so i did a clean install of SMF 2.0 and immediately applied the AJAXChat Integration Mod. Everything seems flawless, then I uploaded a theme and apply, no avail. I went through and applied all the theme modifications and the --- channel came back. It does not happen on the defailt SMF theme only with a third pary theme. Is this somthing you could look into if i posted the theme files?

A couple posts ago someone pointed out that if your board has a 's in it then it will through the invalid channel error. EXAMPLE General Board's will throw the error.

If you're saying that you did edit the channels and then installed a theme and the channels came back then that is odd as the channel edits will have nothing to do with the theme.

If you want create a dummy account and post the username and PW I will take a look.

Kat-2

Quote from: mrtrc266 on April 23, 2009, 12:58:36 AM
QuoteLOL! Hey now..be nice. ;D

And..yup..it is on my main site..and working great.

I do need to fix those sounds though....and I also have other themes..

*runs*


And you better run fast!!! LOL Just kidding :P  I'm glad you got it going Kat.

There was a post about 50 pages back about getting rid of the sounds. I will track it down and get it figure it out.

Just post the link to whatever other themes you have and we'll get those sorted too. Enjoy the Mod.  :-* :-*  back at ya ;)


Ahh..I have done a little searching to find out how to get rid of the sound, but everything I have tried so far, has not worked.
I don't care about the sound in the chatroom/box, those I can turn off. It is the shout box I am concerned about.

As for other themes, I have about decided to leave it as it is..2 themes, default, and Dilber.
That is enough for now.


I checked your test site for the smiley and BBC. I like! Am interested in doing that as soon as you are able to put out the hack.

You're a sweetie..  ;D

mrtrc266

@ Kat, according to a post @ Sourceforge I think this will solve your sound issues, this should disable the sound for the shoutbox only and the users will control the sound in the chatroom...

In /yourforum/chat/lib/template/shoutbox.html

Find
ajaxChatConfig.nonPersistentSettings.push('autoFocus','wordWrap','maxWordLength','blink');

Replace with
ajaxChatConfig.settings.audio = false;
ajaxChatConfig.nonPersistentSettings.push('autoFocus','wordWrap','maxWordLength','blink','audio');


Cross fingers ;)

UkGangsta

#1437
okay works fine on my forum awsome mod.

but chat button is fine.

when chat is on forum index the forum is black hence the chat font is black and u carnt see what any one is typing but smileys etc show fine.

what file is it to change font colour for chat to say white or red, im guessing its style.css but what exact file is it i need to alter and.................... were what file please.

thankyou lookiing forward to your replys

anshar

ShoutBox is not properly auto-refreshing itselfs. Sometimes it does, but usualy I have to refresh the page manualy. My users have same issue. What went wrong?

SMF 2.0 RC1 on default theme and the latest script version.

Praatwurst

Is it possible to let the ChatBot talk back, if you say something?   :D

it would be very nice  ;D

Advertisement: