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

DVDRiper

Quote from: Jiveturkey on March 31, 2009, 03:03:54 PM
I added this piece of code to the SMF htaccess file

RewriteRule ^chat/?$ ./chat/index.php [L,QSA]

I added under the actions set of rules.  Everything works perfectly now.  If anyone else has a problem like mine feel free to shoot me a note and I'll help out.

I cant find htacces in my root?

RoyalMess


in5d

I tried using Pretty URLs with the Chat and obviously, the chat didn't work.  I tried using the  "fix" that was suggested on the SMF forum by creating a ".htaccess"  and chmoding the permissions to 755.  That obviously didn't work, so I deleted the .htaccess. file, then got rid of Pretty URLs.

The chat still wasn't working so I deleted the chat and was gonna reinstall it.  There was one file that wouldn't delete and I didn't think it was a big deal so I deleted the chat anyhow and now I received the following message:

Fatal error: Call to undefined function chatOnlineUsers() in /home/tokyoban/public_html/maya12-21-2012/2012forum/Sources/Load.php(1748) : eval()'d code on line 301

I did backup the forum beforehand, but the file is too big to import on phpmyadmin

any suggestions?
<a href="http://www.in5d.com/">in5d</a>

[unplugged]

Quote from: in5d on February 27, 2010, 07:28:51 PM
I tried using Pretty URLs with the Chat and obviously, the chat didn't work.  I tried using the  "fix" that was suggested on the SMF forum by creating a ".htaccess"  and chmoding the permissions to 755.  That obviously didn't work, so I deleted the .htaccess. file, then got rid of Pretty URLs.

The chat still wasn't working so I deleted the chat and was gonna reinstall it.  There was one file that wouldn't delete and I didn't think it was a big deal so I deleted the chat anyhow and now I received the following message:

Fatal error: Call to undefined function chatOnlineUsers() in /home/tokyoban/public_html/maya12-21-2012/2012forum/Sources/Load.php(1748) : eval()'d code on line 301

I did backup the forum beforehand, but the file is too big to import on phpmyadmin

any suggestions?

Quick fix for you:
Open either index.template.php or BoardIndex.template.php (I forget which) and search for chatOnlineUsers() on line 301 (don't worry about it saying that it's in the Load.php - that's just where it's being called from). Once you've found that, put a // in front of it. Save. Upload. Enjoy.
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



in5d

thanks for the reply.  I tried what you said on the BoardIndex.php but I'm still getting the same error.

I wasn't exactly sure where you meant when you said in front, so I tried it in two places, to no avail.

//$userIDs = chatOnlineUsers();

and

$userIDs = //chatOnlineUsers();

any other ideas?
<a href="http://www.in5d.com/">in5d</a>

[unplugged]

BoardIndex.php or BoardIndex.template.php?

and the // go at the very beginning of the line like in your first example.
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



in5d

I appreciate your help.  I went to Themes/default and searched within BoardIndex.template.php but there wasn't anything in there named chatOnlineUsers();

Out of curiosity, I checked line 301 and it was for my calendar
<a href="http://www.in5d.com/">in5d</a>

[unplugged]

Sorry about all of the run-around, but I haven't used this mod in quite a while. I went through the parser and I think I have found the part that needs to be commented out.

Open index.template.php and find:if (!empty($modSettings['enableChatBelowPM'])){
$count = count(chatOnlineUsers());
if ($count == 0 )
echo '<li>' . $txt['chat_no_user'] . '</li>';
elseif ($count == 1 )
  echo '<li>1' . $txt['chat_aUser'] . '</li>';
else
  echo '<li> ' . $count . $txt['chat_users'] . '.</li>';
}


add a /* before and a */ after so it looks like:/*if (!empty($modSettings['enableChatBelowPM'])){
$count = count(chatOnlineUsers());
if ($count == 0 )
echo '<li>' . $txt['chat_no_user'] . '</li>';
elseif ($count == 1 )
  echo '<li>1' . $txt['chat_aUser'] . '</li>';
else
  echo '<li> ' . $count . $txt['chat_users'] . '.</li>';
}*/


See if that clears that error out for you.
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



in5d

That made it worse...now, I'm getting a white page with a warning:

Template Parse Error!
There was a problem loading the /Themes/default/index.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.
--------------------------------------------------------------------------------

syntax error, unexpected $end
<a href="http://www.in5d.com/">in5d</a>

in5d

I backed up my forum beforehand, but the file is too big to upload on phpmyadmin

perhaps if you, or anyone who knows how,  could tell me how to upload an oversized backup, that would clear the problem?
<a href="http://www.in5d.com/">in5d</a>

[unplugged]

You don't need to redo the database. You simply need to undo the changes made to the files by the mod. Do you have other mods installed? If not, you could just upload fresh copies of the files this mod changed.

Attach your BoardIndex.php, BoardIndex.template.php and index.template.php here please. We'll get you back on track.
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



in5d

#5231
thanks again for your help!

I have a lot of other mods on my forum.
<a href="http://www.in5d.com/">in5d</a>

[unplugged]

I still need your index.template.php from your theme folder. ;)
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »




[unplugged]

Upload these. I have removed all of the Chat mod changes. That should fix it, but if not, we'll go from there.
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



in5d

Board Index:

Error
There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem

ERROR: Unknown Punctuation String @ 1
STR: <?
SQL: <?php

Board Index Template:

There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem

ERROR: Unknown Punctuation String @ 1
STR: <?
SQL: <?php

Index Template

Error
There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem

ERROR: Unknown Punctuation String @ 1
STR: <?
SQL: <?php
<a href="http://www.in5d.com/">in5d</a>

[unplugged]

Those are being caused by something causing everything to be on 1 line. Hmmmm.....

wait....SQL??

Those files just need to be uploaded to their corresponding folders...

« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



in5d

I uploaded them with phpmyadmin the first time...I'm pretty much a novice at this.  The 2nd time, I uploaded them to the appropriate folders with my File Manager, and I'm still getting the same message:

Template Parse Error!
There was a problem loading the /Themes/default/index.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.
--------------------------------------------------------------------------------

syntax error, unexpected $end
<a href="http://www.in5d.com/">in5d</a>

[unplugged]

Here you go. The } was mistakenly removed along with the ChatUsers block.  :o
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



in5d

that did it, my friend.

many, many thanks to you, your help is greatly appreciated by all of my members and guests!!!
'
should I be able to add chat again at this point?
<a href="http://www.in5d.com/">in5d</a>

Advertisement: