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

planethax

Can anyone help with this?

Quote from: planethax on August 04, 2009, 05:36:01 PM
Ok, I have 2 issues I need help with, both are very similar.

Ajax Chat is integrated into SMF and my SMF is integrated into PHPIzabi.

I also have the shoutbox (copy/pasted code into footer) on every page.

My first issue is, when I goto my site, I goto chat it will not let me access, I have to goto SMF forum page first, then to chat,
Similarly, when using shoutbox, the username does not show(shows just a number) until I visit SMF forum, then the username is there until session has expired.


I hope this makes sense and someone can help out with this.

Thanx so much!

Bernard T.

#3381
Quote from: Wiskycoo on August 05, 2009, 03:48:39 PM
did i ask wrong? did i miss a solution perhaps, that one of you could point me in the direction of so i could try it? its just a connection 500 error and the permission files were changed to 775...but still not working...

try 755 or 750 or 644 (this way down)

Quote from: planethax on August 05, 2009, 03:54:32 PM
Ajax Chat is integrated into SMF and my SMF is integrated into PHPIzabi.

This sounds like an obvious issue with the bridge PHPIzabi <> SMF. I supose there is just "session" opened within PHPIzabi and SMF just looks into PHPIzabis sessions to check if user is already logged in. So, AJAX Chat looks only to SMF open "sessions" for the user, but there is none, as mentioned before, it is open with PHPIzabi.
So, you have to either find a bridge PHPIzabi <> AJAX Chat or try to find a solution with the PHPIzabi <> SMF bridge programmers..
://#  Orion | Federation Servers | Info Sector

ScottDB

QuoteQuote from: ScottDB on Today at 12:22:38 PMI have just upgraded to SMF 2.0 rc 1.2 from 1.1.10.
Scott, you've should uninstall all mods prior to upgrade! Now if you only need to uninstall the AJAX Chat mod go and reverse the changes listed in parsed installation instructions (if still found in files)...                                                                                                                     
Thanks for the reply. That's what I thought I should do. Just wanted to make sure. By the way I thought I had read the instructions for the upgrade completely and I didn't see anywhere saying to delete all mods. Maybe that should be in the instructions?
Thank you,
Scott

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

Wiskycoo

Quote from: Bernard T. on August 05, 2009, 04:10:04 PM

try 755 or 750 or 644 (this way down)

750 did the trick!  Thanks so much! Brilliant!

Bernard T.

#3384
Here is a extended version of SunKing's Post Notification tweak for SMF 1.1.X only


1.) changes to the database are the same:
Quote from: SunKing on May 19, 2009, 12:23:29 PM
The first step is to change a value for one of the database entries, so make backups! I think this could be made a permanent change without ill consequences maybe in future releases. ;)

The dateTime field of ajax_chat_messages needs the type changed to timestamp.


2.) Open /Sources/Post.php and search for
notifyMembersBoard();

and replace it with:

// ***** Ajax Chat New Topic Notification *****
{
notifyMembersBoard();

global $user_info, $board, $scripturl, $boardName, $topic;

    db_query("INSERT INTO `smf_ajaxchat_messages` (`userID` ,`userName` ,`userRole` ,`channel` ,`ip` ,`text`)
VALUES (".$posterOptions['id']." , '".$txt['chatbot_name']."' , 4 , 0 , '".$posterOptions['ip']."', '[b]".$user_info['name']."[/b] [i]" . $txt['chatbot_msg_new_topic'] . " [url=".$scripturl . "?topic=" . $topic . ".new#new"."]".html_entity_decode($_POST['subject'])."[/url][/b][/color][/i]')", __FILE__, __LINE__);
  }
    // ******* End Ajax Chat New Topic Notification *******
   



Also search for:
sendNotifications($topic, 'reply');

replace it with:


// ****** Ajax Chat New Reply Notification ******
{
sendNotifications($topic, 'reply');

global $user_info, $board, $scripturl, $boardName, $topic;
    db_query("INSERT INTO `smf_ajaxchat_messages` (`userID` ,`userName` ,`userRole` ,`channel` ,`ip` ,`text`)
       VALUES (".$posterOptions['id']." , '".$txt['chatbot_name']."' , 4 , 0 , '".$posterOptions['ip']."', '[b]".$user_info['name']."[/b] [i]" . $txt['chatbot_msg_new_reply'] . " [url=".$scripturl . "?topic=" . $topic . ".new;topicseen#new"."]".html_entity_decode($_POST['subject'])."[/url][/b][/color][/i]')", __FILE__, __LINE__);

     }
// ***** End Ajax Chat New Reply Notification




3.) Open /Themes/default/languages/Modifications.english.php (for english language) and add this code immediately before ending ?>

//Start AjaxChat Post Notification
$txt['chatbot_name'] = 'ChatBot';
$txt['chatbot_msg_new_topic'] = 'has just published a [color=red][b]new topic:';
$txt['chatbot_msg_new_reply'] = 'has just published a [color=red][b]new reply to topic:';
//End AjaxChat Post Notification


That's it. Now, every time someone posts, a nice notification will popup in the chat/shoutbox displaying a link to the new post/reply.

The extended features of this tweak are:
- chat posts are made by ChatBot (that you can name as you like), and not as from admin like in origina
- all language strings are separated to language files
- added some coloring...
- I'm sure I forgot something so check it out ;)

Thanks and credits go to Sunking and all the others he mentioned in his original post.

Enjoy!

P.S. I hope the maintainer of this modification could integrate this tweak into next standard version, I'm sure many would be happy with such function...
://#  Orion | Federation Servers | Info Sector

REGNARTS_

#3385
Ok, so I have another problem. Can someone help me understand this problem better? This error below only shows up under some users. I'm using the SMF 2.0 RC1.2 with the outline theme by dzinerstudios. The error is:


8: Undefined index: chat
File: /xxx/htdocs/forum/cache/lang_SPortal_english_outline_20rc1.php (eval?)
Line: 45


I thought it was something in the cache so I also emptied out the cache but every time the same users log on and I check the error log, I always get the error.

TheListener

Quote from: Wiskycoo on August 05, 2009, 03:48:39 PM
did i ask wrong? did i miss a solution perhaps, that one of you could point me in the direction of so i could try it? its just a connection 500 error and the permission files were changed to 775...but still not working...anyway, hopefully someone can shed some light on it for me.

Thanks.

The files should be 755 not 775

drav

#3387
Quote from: Lunny
Installed it, edited the files that had to be edited and it's working smooth.

A few questions to those that use it:

1. How can i stop people from joining private channels. I want em all to be in /public channel?
2. How can i stop them changing nicknames in chat?

Lunny, glad you got it going.

Did you check out this http://www.simplemachines.org/community/index.php?topic=257973.msg1981766#msg1981766

All your answers are in there. You need to make a few changes in ./chat/lib/config.php. To stop users changing their nicknames you need to find

// Allow/Disallow users to change their userName (Nickname):
$config['allowNickChange'] = true;


And change true to false. For the private channel issue, you simply need to find

// Enable/Disable private Channels:
$config['allowPrivateChannels'] = true;


And change true to false.
Naturally you'll have to download the config.php file through FTP and then upload the edited version to overwrite the old one.

To have just one channel, you'll need to delete all your other channels. Check out that thread to do that. The answer is there, as I used it to remove some channels and edit the names of some others.

ClassicX

#3388
EDIT:

Well I just upgraded to version 3.2.1, the little circle is green, but it's just me in here for now, gonna wait till more people join to see if I still get 503 error.

EDIT2:

Actually I still get the 503 error.

What could it be? It's not write permissions because its set at 755.

Bernard T.

Quote from: TheListener on August 05, 2009, 07:16:25 PM
Quote from: Wiskycoo on August 05, 2009, 03:48:39 PM
its just a connection 500 error and the permission files were changed to 775...

The files should be 755 not 775

Quote from: Wiskycoo on August 05, 2009, 04:41:20 PM
Quote from: Bernard T. on August 05, 2009, 04:10:04 PM

try 755 or 750 or 644 (this way down)
750 did the trick!  Thanks so much! Brilliant!

750 is always better than 755 ;)  ... (it means only owner and group can read, noone else on the server, and it also means the server is in this segment properly configured)


Quote from: ClassicX on August 05, 2009, 10:18:45 PM
Actually I still get the 503 error.

What could it be? It's not write permissions because its set at 755.

no, it is not permissions, HTTP Error 503 is "Service Unavailable", this means server is overloaded or under maintenance... contact your host about it for assistance
://#  Orion | Federation Servers | Info Sector

Bigjim

Hey Guys,

Installed this great mod on our new forum and although its running great its chucking loads of errors up
Running
SMF 2.0 RC1.2
Add IP2Location to Track IP 1.2
SimplePortal 2.2.2
AjaxChat Integration 3.2.1
SMF Classifieds 1.2.25a

/smf/index.php?action=post2;board=8;preview;xml
8: Undefined index: chat
File: /home/nessrnet/public_html/smf/Sources/Subs.php
Line: 3718

The top line changes to loads of different things but the file and line are always the same.

This is what was on line 3718 of subs.php

$chatButton = $txt['chat'];

Any ideas guys ?

With Thanks
Jim

mrtrc266

#3391
Hello everyone, sorry for the absense I was without a computer for awhile as I had some serious probs. Now I have a new puter and I'm still restoring data so I should be back in full swing here shortly :D

Thank you very much to everyone who helped support this Mod.

If there has been anything that has been missed please repost, I still have to install the new version so hopefully some of the previous issues have been fixed.

Nice to be back!

TheListener


htgr2001

Hi guys 

I have just started messing about with SMF and i dare say this is a great mod but i have a few small questions if you dont mind.

So thats my current setup:

Version Information:
Forum version: SMF 1.1.10
Current SMF version: SMF 1.1.10
PHP version: 5.2.10
MySQL version: 5.0.84-1
Server version: Apache
GD version: bundled (2.0.34 compatible)


Using the DarkBreak Theme:

http://custom.simplemachines.org/themes/index.php?lemma=486

Problem:

So i have installed the ajax integration chat mod, then went on using the 1.1.10 parse instructions to install it in my custom theme.  First thing i noticed i dont have two files that according to the instructions i should edit in the theme languages folder:

Help.english.php
Modifications.english.php

Also in the file index.template.php i wasnt able replace, has instructed, the following code since it doesnt exist:

// But, let's always show minutes - Time wasted here: 0 minutes ;).
echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], '<br />';
}
echo ' </span>';
}




I did the rest according to instructions and the chat seems to be working great but i have two small issues that i would like your help with.


First the chat tab has a different layout of the rest:



How can i use the same style? also the chat tab also disappears if i change the language from English to a custom one how can i stop that from happening?

Not sure it's the right section of the forum for the questions but thanks for any responses in advance.

Swayforth

I am having trouble with 2 manual entries on my BlackRain V2 theme by crip. (SMF1.1.10 and TPv1.0.6beta2)

Both edits are in the index.template.php (attached)

2. Beside of chat button.
3. Below of total time logged in.

When i put in this edit in get errors.

// But, let's always show minutes - Time wasted here: 0 minutes ;).
echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], '<br />';
}
if (!empty($modSettings['enableChatBelowPM'])){
$count = count(chatOnlineUsers());
if ($count == 0 )
echo '<br />' . $txt['chat_no_user'];
elseif ($count == 1 )
  echo '<br />  1' . $txt['chat_aUser']. '.<br />';
else
  echo '<br /> ' . $count . $txt['chat_users']. '<br />';
}
echo ' </span>';
}


I tried several times and at this point thought i should ask the pros

TheListener

I use the same theme as you.

Instead of tinyportal I use simple portal.

If you want a look click on the signature.

Sorry I am unable to help with the error but there will be someone about.

What does the actual error say?

LC

Quote from: htgr2001 on August 06, 2009, 07:04:09 PM

First the chat tab has a different layout of the rest:



How can i use the same style? also the chat tab also disappears if i change the language from English to a custom one how can i stop that from happening?

Not sure it's the right section of the forum for the questions but thanks for any responses in advance.

It's because your custom theme uses list tabs instead of a table for the navigational menu. I've also had this issue. Check out this thread.

http://www.simplemachines.org/community/index.php?topic=325745.0

Hope it helps.

htgr2001

#3397
Thanks, dont know php at all but the thread had all i needed  ;)

..............


Ok i still have an issue I need help with; I can only login to the chat using the admin account.  I get the following message with the other account: "You can't access the chat."

Checked the configuration file and I found the permission code which seems to be correct:


// If enabled, the chat will only be accessible for the admin:
$config['chatClosed'] = false;


All other settings on the config file are default, anything else i am missing?

bound2bmine

OK I have looked all over this topic for an answer to this. Why do post in shout box sometimes disappear.

Thanks in advance if someone can help me out.

Baloch

My members are unable to log into chat room. while as an admin I am able to login.
www.baask.com/diwwan/chat

Plz advice what to do?

Thanks in advance for your prompt response.

Regards
Raji

Advertisement: