News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

AjaxChat Integration (latest version 3.2.1)

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

Previous topic - Next topic

mrtrc266

Put that at the very top (first line) of your .htaccess file

RewriteRule ^chat/?$   ./chat/index.php [L,QSA]
# PRETTYURLS MOD BEGINS
# Pretty URLs mod
#   http://code.google.com/p/prettyurls/
# .htaccess file generated   automatically on: May 5, 2010, 7:48

RewriteEngine on
RewriteBase /

#   Rules for: actions
RewriteRule   ^(activate|admin|announce|attachapprove|buddy|calendar|clock|collapse)/?$   ./index.php?pretty;action=$1 [L,QSA]
RewriteRule   ^(coppa|credits|deletemsg|display|dlattach|editpoll|editpoll2|emailuser)/?$   ./index.php?pretty;action=$1 [L,QSA]
RewriteRule   ^(findmember|forum|portal|groups|help|helpadmin|im|jseditor)/?$   ./index.php?pretty;action=$1 [L,QSA]
RewriteRule   ^(jsmodify|jsoption|lock|lockvoting|login|login2|logout|markasread)/?$   ./index.php?pretty;action=$1 [L,QSA]
RewriteRule   ^(mergetopics|mlist|moderate|modifycat|modifykarma|movetopic|movetopic2|notify)/?$   ./index.php?pretty;action=$1 [L,QSA]
RewriteRule   ^(notifyboard|openidreturn|pm|post|post2|printpage|profile|quotefast)/?$   ./index.php?pretty;action=$1 [L,QSA]
RewriteRule   ^(quickmod|quickmod2|recent|register|register2|reminder|removepoll|removetopic2)/?$   ./index.php?pretty;action=$1 [L,QSA]
RewriteRule   ^(reporttm|requestmembers|restoretopic|search|search2|sendtopic|sitemap|smstats)/?$   ./index.php?pretty;action=$1 [L,QSA]
RewriteRule   ^(suggest|spellcheck|splittopics|stats|sticky|theme|trackip|about:mozilla)/?$   ./index.php?pretty;action=$1 [L,QSA]
RewriteRule   ^(about:unknown|unread|unreadreplies|verificationcode|viewprofile|vote|viewquery|viewsmfile)/?$   ./index.php?pretty;action=$1 [L,QSA]
RewriteRule   ^(who|\.xml|xmlhttp)/?$ ./index.php?pretty;action=$1 [L,QSA]

#   Rules for: boards
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/?$   ./index.php?pretty;board=$1.0 [L,QSA]
RewriteRule   ^([-_!~*'()$a-zA-Z0-9]+)/([0-9]*)/?$ ./index.php?pretty;board=$1.$2   [L,QSA]

# Rules for: topics
RewriteRule   ^([-_!~*'()$a-zA-Z0-9]+)/([-_!~*'()$a-zA-Z0-9]+)/?$   ./index.php?pretty;board=$1;topic=$2.0 [L,QSA]
RewriteRule   ^([-_!~*'()$a-zA-Z0-9]+)/([-_!~*'()$a-zA-Z0-9]+)/([0-9]*|msg[0-9]*|new)/?$   ./index.php?pretty;board=$1;topic=$2.$3 [L,QSA]

# PRETTYURLS MOD   ENDS

# Sitemap
RewriteRule ^sitemap.xml$   /forum/index.php?action=sitemap;xml

# Redirecional error
ErrorDocument   400 /index.php
ErrorDocument 404 /index.php[L,QSA]

Alyen

Quote from: mrtrc266 on May 25, 2010, 01:40:10 PM
Put that at the very top (first line) of your .htaccess file

RewriteRule ^chat/?$   ./chat/index.php [L,QSA]
# PRETTYURLS MOD BEGINS
# Pretty URLs mod
#   http://code.google.com/p/prettyurls/
# .htaccess file generated   automatically on: May 5, 2010, 7:48

RewriteEngine on
RewriteBase /

#   Rules for: actions
RewriteRule   ^(activate|admin|announce|attachapprove|buddy|calendar|clock|collapse)/?$   ./index.php?pretty;action=$1 [L,QSA]
RewriteRule   ^(coppa|credits|deletemsg|display|dlattach|editpoll|editpoll2|emailuser)/?$   ./index.php?pretty;action=$1 [L,QSA]
RewriteRule   ^(findmember|forum|portal|groups|help|helpadmin|im|jseditor)/?$   ./index.php?pretty;action=$1 [L,QSA]
RewriteRule   ^(jsmodify|jsoption|lock|lockvoting|login|login2|logout|markasread)/?$   ./index.php?pretty;action=$1 [L,QSA]
RewriteRule   ^(mergetopics|mlist|moderate|modifycat|modifykarma|movetopic|movetopic2|notify)/?$   ./index.php?pretty;action=$1 [L,QSA]
RewriteRule   ^(notifyboard|openidreturn|pm|post|post2|printpage|profile|quotefast)/?$   ./index.php?pretty;action=$1 [L,QSA]
RewriteRule   ^(quickmod|quickmod2|recent|register|register2|reminder|removepoll|removetopic2)/?$   ./index.php?pretty;action=$1 [L,QSA]
RewriteRule   ^(reporttm|requestmembers|restoretopic|search|search2|sendtopic|sitemap|smstats)/?$   ./index.php?pretty;action=$1 [L,QSA]
RewriteRule   ^(suggest|spellcheck|splittopics|stats|sticky|theme|trackip|about:mozilla)/?$   ./index.php?pretty;action=$1 [L,QSA]
RewriteRule   ^(about:unknown|unread|unreadreplies|verificationcode|viewprofile|vote|viewquery|viewsmfile)/?$   ./index.php?pretty;action=$1 [L,QSA]
RewriteRule   ^(who|\.xml|xmlhttp)/?$ ./index.php?pretty;action=$1 [L,QSA]

#   Rules for: boards
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/?$   ./index.php?pretty;board=$1.0 [L,QSA]
RewriteRule   ^([-_!~*'()$a-zA-Z0-9]+)/([0-9]*)/?$ ./index.php?pretty;board=$1.$2   [L,QSA]

# Rules for: topics
RewriteRule   ^([-_!~*'()$a-zA-Z0-9]+)/([-_!~*'()$a-zA-Z0-9]+)/?$   ./index.php?pretty;board=$1;topic=$2.0 [L,QSA]
RewriteRule   ^([-_!~*'()$a-zA-Z0-9]+)/([-_!~*'()$a-zA-Z0-9]+)/([0-9]*|msg[0-9]*|new)/?$   ./index.php?pretty;board=$1;topic=$2.$3 [L,QSA]

# PRETTYURLS MOD   ENDS

# Sitemap
RewriteRule ^sitemap.xml$   /forum/index.php?action=sitemap;xml

# Redirecional error
ErrorDocument   400 /index.php
ErrorDocument 404 /index.php[L,QSA]


to being equal, when I click on Shout goes blank table of messages.

if you can by in a list of files that have 777 permissions ter so you can review.

My Forum: www.xpzone.net

mrtrc266

It 755 for /chat/index.php and /shoutBox/index.php

Change your language to English and see what happens.

If you like you can send me a temp admin account and temp FTP details and I'll take a look.

Lam0ter0

Quote from: mrtrc266 on May 25, 2010, 10:37:52 AM
Quote from: Lam0ter0 on May 25, 2010, 04:40:20 AM
Sir i have a problem, i have already installed AjaxChat successfully but i got this error


I'm using smf 2.0 RC3
what should i do now?.. Thanks. .

1 page back another user had the same problem, a simply uninstall / re-install seemed to fix it for some reason.

I've already uninstall / re-install it sir, but still there is an error
Fetal error:blah.. blah... blah...


i don't know how to fix it..

mrtrc266

@ Lam0ter0

This might be an issue with your free host?

If you like you can send me a temp admin account and temp FTP details   and I'll take a look.

Lam0ter0

#6345
ok sir i'll just PM you..

Edit:Sir mrtrc266 do you receive my private message?


mrtrc266

@ Lam
It's seems something is seriously wrong with your site.

1. I can see that you have mods installed (See pic package_list)

2. There are no mods in your package manager. (See pic installed_packages)

3. For some reason the chat folder won't upload any of the necessary folders (See pic chat_folder) and notice the file size 0, those are all supposed to be folders containing the files required to run the chat.

4. You might wanna contact your host or try a different Free Host

5. I used http://xtreemhost.com/ for quite some time and still do on a couple test sites, never had any probs.

Lou69


mrtrc266


I have seen asked before how to clear histories and have not seen an answer to the question. After searching SourceForge

http://sourceforge.net/projects/ajax-chat/forums/forum/774132/topic/3344083

it looks like the below can be entered via phpMyAdmin and you can clear the histories of chat and shout.


You have to run a MySQL query on the ajax_chat_messages table in your selected database.

Run the following query to clear all chat messages.

TRUNCATE TABLE `ajax_chat_messages`;
ALTER TABLE `ajax_chat_messages` AUTO_INCREMENT = 1


Are there functions within SMF that will accomplish the same without needing to go to phpMyAdmin? Can SMF be made to clear the chat and shout histories?

Best regards,

Lou

:)

Lou69



mrtrc266,

After digging into the bowels of SourceForge for a while and then playing with the phpMyAdmin, which is found in the CP, the following when entered in the box of the SQL tab, will clear the shout histories and rebuild its table. At least for Ajax 3.2.1 for RC 3.

Go to phpMyAdmin

Position on the smf_ajaxshout_messages table first, select the SQL tab, clear the box and then enter the following

TRUNCATE TABLE `smf_ajaxshout_messages`;
ALTER TABLE `smf_ajaxshout_messages` AUTO_INCREMENT = 1

and then click on 'Go'

While I did not try this on the chat messages, I will guess that the same would hold true for the chat histories but use the table named: smf_ajaxchat_messages

and enter the following into the box of the SQL tab

TRUNCATE TABLE `smf_ajaxchat_messages`;
ALTER TABLE `smf_ajaxchat_messages` AUTO_INCREMENT = 1


Do you see any issues with clearing the history this way. Can this be done in SMF and have a click button assigned to perform the function?


Best regards,

Lou   :)

okae

Quote from: mrtrc266 on May 24, 2010, 10:22:42 AM
@ stkee
Did you make sure that membergroup has all the proper permissions?

@ okae
It does refresh in real time, this setting is to save the load on your server especially if you have a very active chat. They way it works is you you cursor is out of the input field to more than 2 minutes you are timed out from the chat so you won't see the updates but everyone that's still chatting will.

Change the 2 to a higher number so you will see the updated messages for a longer period of time.



thx, now i understand how it works.

mrtrc266

#6351
@ Lou
Yes,  you can run that query in phpMyadmin and it will clear the chat.
It would be nice to make a custom /clear command but I'm not sure how?

Also there is a setting in /chat/lib/config.php that will purge your history every X amount of days, change true to false and set for however many days you want.
// Defines if old messages are purged from the database:
$config['logsPurgeLogs'] = false;
// Max time difference in days for old messages before they are purged from the database:
$config['logsPurgeTimeDiff'] = 365;


@ okae
Glad you got it going, Enjoy :)

ptmuldoon

I'm sure this should be possibly either through the css or a template edit.  But is it possible increase the height of input area to be multiple lines/text area?  I was able to search and add size="100" to increase the input width, but unsure on the the height.

<input id="ajaxChatInputField" type="text" maxlength="[MESSAGE_TEXT_MAX_LENGTH/]" onkeypress="ajaxChat.handleInputFieldKeyPress(event);" size="200"/>

kkattfish

smf 2.0 rc3 with ajax chat 3.2.1 installed

sometimes users and myself will type in a shout and hit enter and nothing goes into the shoutbox but if you type it again it will usually show up in the sb.  sometimes you have to type it 3 or 4 times.  any idea what could be causing this?
also i have changed the default time to display messages and the timeout already so that members can see more shouts. 
i only use the shoutbox the chat is not used.

Shankirili

Quote from: mrtrc266 on May 12, 2010, 11:00:31 AM
Quote from: Shankirili on May 12, 2010, 03:32:05 AM
Thanks for the link, it seems to be exactly what I was looking for! I'll give it a try and tell you if it work!

EDIT : I gave it a quick try and it's not working but the thread is a bit old and it should work with some updates, I'll try to make it work and get you the workaround!

Cool, post it if you get it going and I'll add it to ~AJAX Chat Integration FAQ's   & Tips-N-Tricks~

I finally had some time to make it work!

I simplified the existing solution and cut off the popup box functionality.

In the end it's almost exactly what I was looking for :
   − multiple code for the same smiley
   − shown and hidden (but still usable) smileys
   
Modifications:

In config.js

Before: // Defines the available sounds loaded on chat start:"
Add:
   // Defines whether the associated emoticon will display (1 will display, 0 is hidden):
emoticonDisplay: new Array(
0,
1,
0,
0,
1,
...
1,
0
),

   
This array defines a smiley should be shown (1) or hidden (0) : you have to define one number for each smiley in the emoticonCodes array.

If you want to have multiple code for the same smiley


Find:

// Defines the list of allowed emoticon codes:

emoticonCodes: new Array(

and

// Defines the list of emoticon files associated with the emoticon codes:

emoticonFiles: new Array(


in these arrays you have the codes (in emoticonCodes) and the files (in emoticonFiles) for each smiley, if you want to have multiple codes for one smiley, add each code and file in the arrays.
A quick example: I have the smiley 'grin.png' associated with the code ':D' and I want it to be associated to ':D', ':−D', ':−d' and ':d'
emoticonCodes array is changed to this:

// Defines the list of allowed emoticon codes:

emoticonCodes: new Array(
...
':D',
':−D',
':−d',
':d',
...

and emoticonFiles to :

// Defines the list of emoticon files associated with the emoticon codes:

emoticonFiles: new Array(
...
'grin.png',
'grin.png',
'grin.png',
'grin.png',
...



END OF If you want to have multiple code for the same smiley

In chat.js

After: emoticonFiles: null,
Add: emoticonDisplay: null,

After: this.emoticonFiles = config['emoticonFiles'];

Add:   this.emoticonDisplay = config['emoticonDisplay'];

Find:
   initEmoticons: function() {
for(var i=0; i<this.emoticonCodes.length; i++) {
// Replace specials characters in emoticon codes:
this.emoticonCodes[i] = this.encodeSpecialChars(this.emoticonCodes[i]);
if(this.dom['emoticonsContainer']) {
this.updateDOM(
'emoticonsContainer',
'<a href="javascript:ajaxChat.insertText(\''
+ this.scriptLinkEncode(this.emoticonCodes[i])
+ '\');"><img src="'
+ this.dirs['emoticons']
+ this.emoticonFiles[i]
+ '" alt="'
+ this.emoticonCodes[i]
+ '" title="'
+ this.emoticonCodes[i]
+ '"/></a>'
);
}
}
},

   
Replace by:
   initEmoticons: function() {
for(var i=0; i<this.emoticonCodes.length; i++) {
// Replace specials characters in emoticon codes:
this.emoticonCodes[i] = this.encodeSpecialChars(this.emoticonCodes[i]);
if(this.emoticonDisplay[i] == 1){
if(this.dom['emoticonsContainer']) {
this.updateDOM(
'emoticonsContainer',
'<a href="javascript:ajaxChat.insertText(\''
+ this.scriptLinkEncode(this.emoticonCodes[i])
+ '\');"><img src="'
+ this.dirs['emoticons']
+ this.emoticonFiles[i]
+ '" alt="'
+ this.emoticonCodes[i]
+ '" title="'
+ this.emoticonCodes[i]
+ '"/></a>'
);
}
}
}
},

   
If you want to add space between smileys, you can change
+ '"/></a>'
by
+ '"/></a>&nbsp;'

And that should be ok! Tell me if there is any problem with that!

mrtrc266

@ ptmuldoon

Try add a height here, /Themes/default/css/index.css
input, button, select, textarea {

@kkattfish
Does this happen after you've been logged in for awhile or does it do it right away?

@
Shankirili
THAT'S AWESOME! I haven't played with it but I will as soon as I get home from work, it will also be added to the FAQ's

Thank you very much for your contributions.

Now....if you could just get the smileys to integrate with SMF's smileys you would be GOD! ;) LOL

kkattfish

Quote from: mrtrc266 on May 27, 2010, 11:44:15 AM
@kkattfish
Does this happen after you've been logged in for awhile or does it do it right away?


i guess usually after i have been logged in for a while since i never log out of my forum really.  for instance when i go to the forum in the morning, i will type and it will usually make me shout twice before showing up.  then later in the day i will get into a conversation and sometimes during that chat i will have to type the shout twice, but most of the time it will go on the first try.  its multiple users as well not just myself. 

netjerk

I am running SMF V2 RC2 with Curve Black theme. Tried install below but getting errors as shown below. Can anyone help to guide me how to resolve this? Should I go ahead with installation? Thanks

AjaxChat Integration 3.2.1
The package you are trying to download or install is either corrupt or not compatible with this version of SMF.

AjaxChat Integration 3.2.1 (modified for SMF 2 RC3)
Error in Package Installation
Detail
7.     Execute Modification     ./Sources/Subs.php     Test failed
      1.    Add After    ./Sources/Subs.php             Test successful
      2.    Add After    ./Sources/Subs.php             Test failed

Install in Other Themes
Core Theme
      Execute Modification    ./Themes/core/BoardIndex.template.php    Test failed
               1.    Add Before    ./Themes/core/BoardIndex.template.php    Test failed
      Execute Modification    ./Themes/core/index.template.php    Test failed
              1.    Replace    ./Themes/core/index.template.php    Test successful
              2.    Add Before    ./Themes/core/index.template.php    Test failed
CurveBlack
      Execute Modification    ./Themes/Curve_Black/index.template.php    Test successful

Shankirili

Quote from: mrtrc266 on May 27, 2010, 11:44:15 AM
Thank you very much for your contributions.

Now....if you could just get the smileys to integrate with SMF's smileys you would be GOD! ;) LOL

You're welcome, I'm glad to help, especially because this topic had already help me a lot!

For the SMF's smiley integration it has to be possible but I won't try to do so, I made what I wanted to and that's ok for me!

mem1988

hello,
i just installed this mod.
it only shows 10 posts in shoutbox.
how can i make that it shows more than 10 posts?

Advertisement: