AjaxChat Integration (latest version 3.2.1)

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

Previous topic - Next topic

TheListener

was working fine earlier but now shoutbox is useable but nothing appears in chat

Road Rash Jr.

Do you think it could be something in the index.php not pointing in the right direction?

<?php
/*
* @package AJAX_Chat
* @author Sebastian Tschan
* @copyright (c) Sebastian Tschan
* @license GNU Affero General Public License
* @link https://blueimp.net/ajax/
*/
if (!$_GET['shoutbox']){
$host  = $_SERVER['HTTP_HOST'];
$uri   = rtrim(dirname(dirname($_SERVER['PHP_SELF'])), '/\\');
$extra = 'chat/index.php';
header("Location: http://$host$uri/$extra");
}
// Show all errors:
error_reporting(E_ALL);
// Path to the chat directory:
define('AJAX_CHAT_PATH', dirname($_SERVER['SCRIPT_FILENAME']).'/');
// Include custom libraries and initialization code:
require(AJAX_CHAT_PATH.'lib/custom.php');
// Include Class libraries:
require(AJAX_CHAT_PATH.'lib/classes.php');
// Initialize the chat:
$ajaxChat = new CustomAJAXChat();
?>
Never argue with an Idiot like myself, they just drag you down to their level then beat you with experience.

Road Rash Jr.

Well if that don't beat all. I swept my hair up off the floor, used some Almers glue, deleted chat, reinstalled and now it works. Check it out before it goes cablewy LOL
http://www.international-star-riders.com/nsg/nsgforum/index.php
Never argue with an Idiot like myself, they just drag you down to their level then beat you with experience.

TheListener


Road Rash Jr.

I can pull the horse shoe outa my butt and send it to ya but don't know if I can overnight it to UK  :P
Never argue with an Idiot like myself, they just drag you down to their level then beat you with experience.

mrtrc266

Quote from: Bionic Rooster on June 26, 2009, 11:46:44 PM
I can pull the horse shoe outa my butt and send it to ya but don't know if I can overnight it to UK  :P

LMAO!!! You never know with this stuff :D

Glad you got it sorted Bionin, don't you just love this stuff? LOL

TheListener


Road Rash Jr.

Yeah it's great alright, so is a kidney tranplant LOL
No If you coulb be so kind and tell me how to stop guests from accessing it?
I have not guests allowed, everyone need to register :)
Never argue with an Idiot like myself, they just drag you down to their level then beat you with experience.

Road Rash Jr.

Richard try removing what you changed to see if it fixes it
Never argue with an Idiot like myself, they just drag you down to their level then beat you with experience.

TheListener

would take me ages to find it again

Road Rash Jr.

I thought this was supposed to have a lot of admin features? Unless I'm looking in the wrong place all I see is Admin>Chat and 6 buttons ::)
Never argue with an Idiot like myself, they just drag you down to their level then beat you with experience.

mrtrc266

Quote from: Bionic Rooster on June 27, 2009, 12:12:59 AM
Yeah it's great alright, so is a kidney tranplant LOL
No If you coulb be so kind and tell me how to stop guests from accessing it?
I have not guests allowed, everyone need to register :)
If you have unchecked guests to have access to chat and shout in your permissions then do this edit
http://www.simplemachines.org/community/index.php?topic=257973.msg2109968#msg2109968

Quote from: Bionic Rooster on June 27, 2009, 12:21:32 AM
I thought this was supposed to have a lot of admin features? Unless I'm looking in the wrong place all I see is Admin>Chat and 6 buttons ::)

Those are the basic settings on how and what you want displayed.

To get full customization please read this~AJAX Chat Intergration FAQ's & Tips-N-Tricks~

Also follow some of the link to Source Forge as there are many more customization tips as well.

Road Rash Jr.

Great, thanks for all your help. Now I have to replicate this on 6 other forums
Never argue with an Idiot like myself, they just drag you down to their level then beat you with experience.

mrtrc266

Quote from: Bionic Rooster on June 27, 2009, 12:34:48 AM
Great, thanks for all your help. Now I have to replicate this on 6 other forums

It usually installs pretty smoothly, after editing the config.php file and any other AJAXCHat files (depending on what edits you do from the FAQ's) you can just upload whatever files you edited to your other 6 forums and they will all have the same settings.

TheListener

When changing the smileys should the png files be deleted?

Road Rash Jr.

Well guys I have no idea what the fupaw was all about cause I just installed 3 more chat rooms in 5 mins when it took hours to get the first one to work. Time for bed ;D
Thanks everyone
Never argue with an Idiot like myself, they just drag you down to their level then beat you with experience.

TheListener


[unplugged]

#2777
@ thread
My ear is ringing......or does that mean I am going to find some money.....

@TheListener
Once you change your dataTime field to "timestamp", you're post notification woes will be a thing of the past.

@wladymeer and any others wanting to restrict guest access:

For SMF 1.1.x, open index.template.php and find the following (or similar):
// 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>' : '', '
<td valign="top" class="maintab_back">
<a href="', $chatPath, '"', empty($modSettings['chatPopUp']) ? 'target="_blank"' : ' onclick="openWindow(this.href);this.blur();return false;"', '>', $txt['chat'], ($num > 0) ?  ('('.$num.')') : '' , '</a>
</td>';


and change it to

// the [chat] button
global $context;
if ($context['user']['is_logged'])
{
$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>' : '', '
<td valign="top" class="maintab_back">
<a href="', $chatPath, '"', empty($modSettings['chatPopUp']) ? 'target="_blank"' : ' onclick="openWindow(this.href);this.blur();return false;"', '>', $txt['chat'], ($num > 0) ?  ('('.$num.')') : '' , '</a>
</td>';
}


For SMF 2.x, open Subs.php and find the following (or similar):

'chat' => array(
'title' => $chatButton,
'href' => $chatLink,
'show' => true,
'sub_buttons' => array(
),
),


and change it to

'chat' => array(
'title' => $chatButton,
'href' => $chatLink,
'show' =>$context['user']['is_logged'],
'sub_buttons' => array(
),
),


That's it. Now guests will not see the chat menu button. This only hides the chat button from guests.

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



TheListener

At the minute we have no way of seeing text in the chat ( only shoutbox) and the post notification isn't working.

Any ideas?

wladymeer

Not working for 2.x - I've found it and change to 'is logged' but I can still see it when I log out.

If you wanna check go to www.gvosh.bb.rs/forum and look for yourself ;)

This is SMF 2.0 RC1-1 version.

Advertisement: