News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

AjaxChat Integration (latest version 3.2.1)

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

Previous topic - Next topic

Swayforth

#3780
*****EDIT ANSWER FOUND**** http://sourceforge.net/apps/mediawiki/ajax-chat/index.php?title=Slashes_before_apostrophes

I am having an issue after moving to a new host. I copied all files via ftp and used bigdump.php to load the database. I used repair_settings.php and fixed a few odd things here and there. The one issue i can not find a fix for is in chat.

Anytime someone uses a single quote, quote or slash, it prints a \ (slash) before every ', " and \. Anyone have a clue whats going on with it?

eg= when i type the work didn't it shows up in chat as didn\'t
(12:02:22) Swayforth: \' <==single quote
(12:02:24) Swayforth: \" <==quote
(12:02:43) Swayforth: \\ <==slash


Running SMF 1.1.10 heavily modded
AjaxChat Integration      3.2.1

works fine with my old host, but has this issue on the new host. no errors in the host logs or smf logs

NEW HOST
MySQL client version: 5.0.81
MySQL charset: UTF-8 Unicode (utf8)


OLD HOST
Server version: 4.1.22
MySQL charset:  UTF-8 Unicode (utf8)


any help would be appreciated as it would help prevent my hair from being pulled out :/

ScottDB

Quote
  Quote from: ScottDB on September 03, 2009, 11:22:36 AM My chat and shoutbox seem to be working ok. The only problem is that my log is getting cluttered by an error message every time someone uses the chat or shoutbox. Here is the error
Quote Undefined index:  chat
File: /home/scott/public_html/newbiescentral.com/Sources/Subs.php
Line: 3716Any ideas?

ScottDB,

When it says, "Undefined index: chat", that means there is an array that is being passed 'chat' as the index, and it doesn't exist.

This is most likely the culprit of another issue I found and fixed with this Mod, that I completely forgot to mention above. 

While this mod will set some language strings for the shoutbox, it does not do so for the chat.  Open up your Modifications.english.php in your Themes/default/language directory, (or Modifications.german.php, or whatever language you're needing this for), and add to the list:
Code: [Select] $txt['chat'] = 'Chat';

This will be the text that appears on your menu button.  That's why it seems to fail pretty much every time someone displays a page.

Do that somewhere on a new line before the final '?>' in the file.

That will fix the problem.


I edited the Modifications.english.php and I am still getting the same error message. I placed the code right before the end '?>'.
Thank you,
Scott

If at first you don't succeed. post and post again.

ErnieB

I got it installed ok but i did notice in the list it had "skipping this file" for 2 things and then nothing at all for everything listed under that. All those files above these two "tested successfully".

When i goto the admin backend, there is NO text next to any of the check boxes related to the chat mod. None in the layout section and none in the permissions section. I was able to find what i think are the 6 things suppose to be for the layout options check boxes ( i hope they were listed in the right order lol ) but no clue for the permissions check boxes.

I do have a ton of errors in the log ( i just checked ) these seem to be the main ones repeated

Unable to load the 'Shout.english-utf8' language file.

8: Undefined index: chat
File: /home/nanovor1/public_html/forum/Themes/default/Display.template.php (main_above sub template - eval?)
Line: 606

8: Undefined index: shoutBox
File: /home/nanovor1/public_html/forum/Themes/default/Display.template.php (shout_above sub template - eval?)
Line: 45

8: Undefined index: chat_aUser
File: /home/nanovor1/public_html/forum/Themes/default/MessageIndex.template.php (main_above sub template - eval?)
Line: 278


Additionally, on the forum index page in the links above, it shows the number of those in chat "(2)" for example but doesnt display the word "chat" which i thought it was suppose to.

Thanks for any help

TheListener

Quote from: danielwmoore on September 04, 2009, 10:59:16 AM
@ishaan

Your chat button doesn't check for permissions before it displays.  I assume this was ok with you.

Find the code in the file you displayed that matches the following:

  // the [Chat] button
   $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>' : '', '
      <class="maintab_back">
         <a href="', $chatPath, '"', empty($modSettings['chatPopUp']) ? 'target="_blank"' : ' onclick="openWindow(this.href);this.blur();return false;"', '><span>Chat</span></a>
      </td>';   


Replace that code with the following:

// the [Chat] button
$chatPath = str_replace("index.php", "chat/index.php", $scripturl);
$num = (empty($modSettings['enableChatButtonNo'])) ? 0 : count(chatOnlineUsers());
$chatnum = $num>0 ? '('.$num.')' : '';
echo '<li><a href="', $chatPath, '"', empty($modSettings['chatPopUp']) ? 'target="_blank"' : ' onclick="openWindow(this.href);this.blur();return false;"', '><span>Chat',$chatnum,'</span></a></li>


This will not only place your chat button in the right format, but will also give you the number of users in chat if chat is not empty.

Hope this is helpful.

This may help where the button is concerned.

ErnieB

What is the file path to the file that is to be edited?

shortchange

#3785
Anyone know how to make the username use the color from the MemberGroup in chat?

Thank you.

TheListener

Quote from: shortchange on September 08, 2009, 11:20:40 AM
Anyone know how to make the username use the color from the MemberGroup in chat?

Thank you.

Unfortunately the only membergroups at present whom can use a color in chat are the admin and global mods.


ishaan

Hello friends.. How to add some more smileys on chat box   :)

TheListener

Quote from: ishaan on September 08, 2009, 11:29:46 PM
Hello friends.. How to add some more smileys on chat box   :)

To the best of my knowledge the number of smileys is preset.

However you can add different smileys to chat if preferred.

ishaan

QuoteTo the best of my knowledge the number of smileys is preset.

However you can add different smileys to chat if preferred.


Brother plzz tell me how to edit it..

i have only little bit  knowledge of smf

TheListener

Give me a couple of days then pm me if don't post a reply back.


.HuNTeR.

@ishaan
open:
chat/js/config.js
find:

emoticonCodes: new Array(
':)',
':(',
';)',
':P',
':D',
':|',
':O',
':?',
'8)',
'8o',
'B)',
':-)',
':-(',
':-*',
'O:-D',
'>:-D',
':o)',
':idea:',
':important:',
':help:',
':error:',
':warning:',
':favorite:'
),

// Defines the list of emoticon files associated with the emoticon codes:
emoticonFiles: new Array(
'smile.png',
'sad.png',
'wink.png',
'razz.png',
'grin.png',
'plain.png',
'surprise.png',
'confused.png',
'glasses.png',
'eek.png',
'cool.png',
'smile-big.png',
'crying.png',
'kiss.png',
'angel.png',
'devilish.png',
'monkey.png',
'idea.png',
'important.png',
'help.png',
'error.png',
'warning.png',
'favorite.png'
),

and replace it with your new smileys
and then upload the images to chat\img\emoticons

TheListener


bbq-pepper

.... It is working after reinstallation using the same config. ???

Regards, Peter

chucklebutte

thelistener here are those files.


I believe they are correct but im not too sure.

TheListener


TheListener



Danpotter

#3798
i installed in my dilbermc theme....i can see shoutbox but when im typing..i cant see my typed matter and it is saying

ChatBot: Error: Connection status: 0

cat farmer

#3799
I have seen a few posts in here about the permission labels not being set. the check boxes are there and it all seems? to work, but I have no idea what they do.
I've checked all the modifications to PHP from the manual install instructions and all seems OK. running SMF1.1.10. Is there a solution out there for this?

I figured it out- set language to from UTF8english to english. Thanks for making this intagration easy!

Advertisement: