Advertisement:

Author Topic: AjaxChat Integration (latest version 3.2.1)  (Read 1354310 times)

Offline bfeo

  • Jr. Member
  • **
  • Posts: 189
Re: AjaxChat Integration
« Reply #20 on: September 06, 2008, 03:33:45 PM »
I installed the chat, and I get this above the chat area, and I'm also not able to log in.  It tells me that my username is invalid. 

Code: [Select]
Warning: mysqli::mysqli() [function.mysqli-mysqli]: (28000/1045): Access denied for user 'root'@'localhost' (using password: NO) in /home/bfeo/public_html/forum/chat/lib/class/AJAXChatMySQLiDataBase.php on line 29

Warning: mysqli::select_db() [function.mysqli-select-db]: Couldn't fetch mysqli in /home/bfeo/public_html/forum/chat/lib/class/AJAXChatMySQLiDataBase.php on line 40

Warning: AJAXChatDataBaseMySQLi::select() [function.AJAXChatDataBaseMySQLi-select]: Couldn't fetch mysqli in /home/bfeo/public_html/forum/chat/lib/class/AJAXChatMySQLiDataBase.php on line 41

Warning: AJAXChatDataBaseMySQLi::select() [function.AJAXChatDataBaseMySQLi-select]: Couldn't fetch mysqli in /home/bfeo/public_html/forum/chat/lib/class/AJAXChatMySQLiDataBase.php on line 42

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/bfeo/public_html/forum/chat/lib/class/AJAXChatMySQLiDataBase.php:29) in /home/bfeo/public_html/forum/chat/lib/class/AJAXChat.php on line 2466

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/bfeo/public_html/forum/chat/lib/class/AJAXChatMySQLiDataBase.php:29) in /home/bfeo/public_html/forum/chat/lib/class/AJAXChat.php on line 2466

Warning: Cannot modify header information - headers already sent by (output started at /home/bfeo/public_html/forum/chat/lib/class/AJAXChatMySQLiDataBase.php:29) in /home/bfeo/public_html/forum/chat/lib/class/AJAXChatHTTPHeader.php on line 36

Warning: Cannot modify header information - headers already sent by (output started at /home/bfeo/public_html/forum/chat/lib/class/AJAXChatMySQLiDataBase.php:29) in /home/bfeo/public_html/forum/chat/lib/class/AJAXChatHTTPHeader.php on line 37

Warning: Cannot modify header information - headers already sent by (output started at /home/bfeo/public_html/forum/chat/lib/class/AJAXChatMySQLiDataBase.php:29) in /home/bfeo/public_html/forum/chat/lib/class/AJAXChatHTTPHeader.php on line 41

Warning: Cannot modify header information - headers already sent by (output started at /home/bfeo/public_html/forum/chat/lib/class/AJAXChatMySQLiDataBase.php:29) in /home/bfeo/public_html/forum/chat/lib/class/AJAXChatHTTPHeader.php on line 45

The Saviour

  • Guest
Re: AjaxChat Integration
« Reply #21 on: September 06, 2008, 08:11:12 PM »
the irc is nice and might be the way to go to alleviate bandwidth issues, but bear in mind you might want to set up a permanent bot in the room you create in IRC  to keep peeps from stealing the room from you and what have ya.

 Alternatively, FlashChat integration is pretty simple and from what I can see works great. Works just like IRC chat with more control. You can set up private rooms with passwords, you can set it up as a customer service type chat with a que. Also it pulls all the user data from your site so when people click the chat button, it logs them in no problem ... or they can log in separately with the login and password they already have within the site. Transfers admins in too!!  :D , and little bandwidth usage.... so far. Its $5 buck to obtain and sometimes you can find it floating out there on the internet too....  ;D .... come on tho.... $5 bucks.... thats a steal in itself. I had mine up and running in no time, and it can be integrated right into the theme of your site ......Highly recommend it.

I'd also recommend FlashChat over this mod...due to the Admin settings and integration within SMF...as well as the button added to navigation and the number of users in chat.

This mod has a way to go before it can be ranked up there with the big boys.

FlashChat...$5...can't beat it!

Offline bfeo

  • Jr. Member
  • **
  • Posts: 189
Re: AjaxChat Integration
« Reply #22 on: September 07, 2008, 11:05:26 PM »
Nice to see my support inquiry be entirely ignored over a subject that makes little difference.  Either one will put some strain on your forums.  It's really aesthetic preference.

Offline bfeo

  • Jr. Member
  • **
  • Posts: 189
Re: AjaxChat Integration
« Reply #23 on: September 08, 2008, 08:52:44 AM »
This error isn't from the package, it's from the ajax chat, which installed perfectly fine on my brother's site.  I'm not gonna install this mod if I can't get the bat working...

Offline bfeo

  • Jr. Member
  • **
  • Posts: 189
Re: AjaxChat Integration
« Reply #24 on: September 08, 2008, 02:45:05 PM »
Mind directing me to a support forum specifically for the chat?  I've tried directly contacting the authors, but it has been a month and no reply has been made.

Offline edi67

  • SMF Hero
  • ******
  • Posts: 1,528
  • Gender: Male
  • Italian Supporter
    • CrazyZone
Re: AjaxChat Integration
« Reply #25 on: September 11, 2008, 05:58:25 AM »
I added code in index.template.php too for view the user in chat under menu, everything work ok but i have a lot of these errors:
Code: [Select]
8: Undefined index: users_in_chat_links
Riga: 555

this is line 555:     if(count($context['users_in_chat_links'])==0)

some solution ? i think is missing this part that i have in boardindex.php:
Code: [Select]
//users in chat
$result = db_query("SELECT userID,userName FROM ajax_chat_online WHERE NOW() <= DATE_ADD(dateTime, interval 2 MINUTE)", __FILE__, __LINE__);
$context['users_in_chat_links'] = array();
while ($row = mysql_fetch_assoc($result))
{
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['userID'] ;
if(isset($context['online_groups'][$row['userID']]['color'])){
$link.= '" style="color: ' . $context['online_groups'][$row['userID']]['color'];
}
$link.= '">' . $row['userName'] . '</a>';
    array_push($context['users_in_chat_links'], $link);
}
mysql_free_result($result);

some solution?
« Last Edit: September 11, 2008, 06:06:11 AM by edi67 »
CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

Offline TC Carl

  • Semi-Newbie
  • *
  • Posts: 74
    • Treasure Coast Voices
Re: AjaxChat Integration
« Reply #26 on: September 12, 2008, 11:12:29 AM »
I've fooled around with this mod package as well, trying to get the 'users in chat information' up in the top header for every page. It worked when clicking the HOME button but returned "No users in chat" for all other operations, and also loaded up the error log as described earlier.

Since we are a small site, and would not have more than 10 users in chat at any time, this package works well for me. All I'd like to do is get the users information moved from the bottom of the home screen, up into the header where it can be seen at all times.

Rereading this thread, it seems doable, and many of us seem to be close, but I haven't seen the right solution yet. I know enough about programming to understand the scoping of variables, but not enough about php in general. I don't mind hacking along until I either get lucky or discover what I need to know, although I have other, more pressing issues to deal with, outside of this.

If any of the more regular coders want to provide some details on this enhancement, it would be appreciated by at least one of us, and likely several more. As usual with my requests, time is not of the essence, we're up and running and doing just fine, thanks to the stability of SMF in general.

Carl


Offline .HuNTeR.

  • Jr. Member
  • **
  • Posts: 207
  • Gender: Male
Re: AjaxChat Integration
« Reply #27 on: September 14, 2008, 04:35:48 AM »
edi67 please attach your BoardIndex.template.php and BoardIndex.php
i think you missed something
and TC Carl i should see your code too

Offline TC Carl

  • Semi-Newbie
  • *
  • Posts: 74
    • Treasure Coast Voices
Re: AjaxChat Integration
« Reply #28 on: September 14, 2008, 09:40:22 AM »
Basically, I lifted the code from this modification, the first part that was supposed to be in BoardIndex.template.php (which puts the data at the bottom of the screen) and copied it into the default theme's index.template.php --  my addition is clearly marked:


Code: [Select]
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo ' </span>
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/sha1.js"></script>

<form action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" class="middletext" style="margin: 3px 1ex 1px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
<select name="cookielength">
<option value="60">', $txt['smf53'], '</option>
<option value="1440">', $txt['smf47'], '</option>
<option value="10080">', $txt['smf48'], '</option>
<option value="43200">', $txt['smf49'], '</option>
<option value="-1" selected="selected">', $txt['smf50'], '</option>
</select>
<input type="submit" value="', $txt[34], '" /><br />
<span class="middletext">', $txt['smf52'], '</span>
<input type="hidden" name="hash_passwrd" value="" />
</form>';
}

// begin TC CARL mod move chat data up here

// users in chat
  if(count($context['users_in_chat_links'])==0)
  {
  echo '<br />' . $txt['no_user_in_chat'];
  }elseif(count($context['users_in_chat_links'])==1)
  {
  echo '<br />  1' . $txt['user_in_chat']. '<br />', implode($context['users_in_chat_links']);
  }else
  {
  echo '<br /> ' . count($context['users_in_chat_links']). $txt['users_in_chat']. '<br />', implode(', ', $context['users_in_chat_links']);
  }

// end TC CARL mod move chat data up here


echo '
</td>';
//Welcome Ads
if (function_exists("show_welcomeAds"))
{
$ads = show_welcomeAds();


The error I get in the forum error log is:

8: Undefined index: users_in_chat_links
File: /forum/Themes/default/Packages.template.php (eval?)
Line: 340

The file listed changes, it can be

File: /forum/Themes/default/Admin.template.php (eval?)
File: /forum/Themes/default/Errors.template.php (eval?)
File: /forum/Themes/default/Login.template.php (eval?)
File: /forum/Themes/default/Recent.template.php (eval?)



This was a cheap attempt to get the chat user data up into the header, and probably violates a boxful of rules. Maybe this is just a variable scoping issue, I seem to know enough to get myself in trouble, so I do all of this on a "practice" simulator site first.  This might be the only sensible thing I do!

Carl



Offline bfeo

  • Jr. Member
  • **
  • Posts: 189
Re: AjaxChat Integration
« Reply #29 on: September 18, 2008, 10:26:46 AM »
Any ways of speeding the chat up some?  Some members are complaining about the 3 second delay.

Offline bfeo

  • Jr. Member
  • **
  • Posts: 189
Re: AjaxChat Integration
« Reply #30 on: September 18, 2008, 10:33:39 AM »
nvm.  modified

  // The time in ms between update calls to retrieve new chat messages:
   timerRate: 2000,

in config.js

2000=2 seconds and is default.  I changed to 500, half a sec, 4x as fast, and it seems to have greatly increased speed.  Causes larger load on server, but if you can handle it, you could make this ridiculously fast.

Offline Running With Scissors

  • Semi-Newbie
  • *
  • Posts: 60
  • Gender: Male
    • Traxck
Re: AjaxChat Integration
« Reply #31 on: September 18, 2008, 01:42:02 PM »
Is there any way to make this work with 2.0 beta 4?
A site for runners: http://www.traxck.com

Offline DSollick

  • Semi-Newbie
  • *
  • Posts: 13
Re: AjaxChat Integration
« Reply #32 on: September 20, 2008, 11:25:49 AM »
I installed it succefully but In the forum index page i have this error:
Table 'myBD.ajax_chat_online' doesn't exist
Archivo: /home/myFTP/public_html/foro/Sources/BoardIndex.php
Línea: 346

I've had the same issue -- any idea on a fix?  I've poked around in BoardIndex.php and parsed the package and I don't even see a query to make the table in question, which makes me wonder how anybody ever got it to work :P

Error is showing up in the database query in the beginning here.

Code: [Select]
//users in chat
$result = db_query("SELECT userID,userName FROM ajax_chat_online WHERE NOW() <= DATE_ADD(dateTime, interval 2 MINUTE)", __FILE__, __LINE__);
$context['users_in_chat_links'] = array();
while ($row = mysql_fetch_assoc($result))
{
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['userID'] ;
if(isset($context['online_groups'][$row['userID']]['color'])){
$link.= '" style="color: ' . $context['online_groups'][$row['userID']]['color'];
}
$link.= '">' . $row['userName'] . '</a>';
    array_push($context['users_in_chat_links'], $link);
}
mysql_free_result($result);

On a mildly related note, is it worth trying to get this to work at all?  Reading through, I'm just wondering if there are not better packages for integrated chat [I have AChat right now but it's ancient and works poorly].

Offline jrdollesin

  • Semi-Newbie
  • *
  • Posts: 10
Re: AjaxChat Integration
« Reply #33 on: September 22, 2008, 12:44:20 AM »
I installed this and the ajax chat but don't seem to see how to get a link to the chat to become available.
I have added the lines to the boardindex template and boardindex and language file.
I do see where it says at the bottom of the forum that no one is in chat.
But how in the world do I get something easy for my users to enter the ajax chat?
I am using a theme by Nesianstyles called Blackday which I don't think would make a difference.
Any suggestions on what to do to get this chat going easily for my users?
I tink it is a super mod if I can get it to run from my forum.
I have 1.15 version.
Thanks Ron

you need to download the package first, only then you can rev the mod successfully.

the package is here:

https://blueimp.net/ajax [nofollow]

Offline jrdollesin

  • Semi-Newbie
  • *
  • Posts: 10
Re: AjaxChat Integration
« Reply #34 on: September 22, 2008, 12:47:45 AM »
I installed it succefully but In the forum index page i have this error:
Table 'myBD.ajax_chat_online' doesn't exist
Archivo: /home/myFTP/public_html/foro/Sources/BoardIndex.php
Línea: 346

install the package first then the mod.

that should get you going

Offline DSollick

  • Semi-Newbie
  • *
  • Posts: 13
Re: AjaxChat Integration
« Reply #35 on: September 22, 2008, 12:59:16 AM »
I installed it succefully but In the forum index page i have this error:
Table 'myBD.ajax_chat_online' doesn't exist
Archivo: /home/myFTP/public_html/foro/Sources/BoardIndex.php
Línea: 346

install the package first then the mod.

that should get you going

Erm, the two processes aren't seperate.  o_O  Did you mean something else?

Offline jrdollesin

  • Semi-Newbie
  • *
  • Posts: 10
Re: AjaxChat Integration
« Reply #36 on: September 24, 2008, 04:37:47 AM »
the one you installed is exclusively for smf

the package i'm talking about is the main engine for the chat aside from the smf 'elixir'.

go to where you downloaded AjaxChat Integration, get the main package first aside from what makes it run for smf.

after which, only then you can install the smf module and run it well.

Offline Dhekelian

  • Jr. Member
  • **
  • Posts: 101
Re: AjaxChat Integration
« Reply #37 on: September 24, 2008, 08:08:58 AM »
I'm not to good at php but like having a go. Anyway I'm struggling getting this chat to show up. I have installed the main program and it is working as I went directly there through the browser. I then put the integration mod on and it hasn't done anything that I can see, I cannot get to the chat program from my forum. I assume there is nothing to turn on in the admin so I do not know what is up.

I am using the black & blue theme so this is the only thing I can point to. Any help would be great as I like the look of this.

Offline Dhekelian

  • Jr. Member
  • **
  • Posts: 101
Re: AjaxChat Integration
« Reply #38 on: September 24, 2008, 10:24:02 AM »
Update, before i log on to my forum it says at the bottom 0 users in chat but as soon as i log on it dissappears. Have you got to create a chat button and link it or something?

I am not sure what is wrong and would dearly love to have this as part of the forum but can't see it at all unless i go there via the browser.

Offline Dhekelian

  • Jr. Member
  • **
  • Posts: 101
Re: AjaxChat Integration
« Reply #39 on: September 24, 2008, 02:56:03 PM »
Is there any support at all for this mod?