News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

AjaxChat Integration (latest version 3.2.1)

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

Previous topic - Next topic

ai_yazawa

Quote from: mrtrc266 on May 05, 2009, 10:45:52 AM
Quote from: ai_yazawa on May 05, 2009, 10:05:49 AM
hi..

i tried to install this but test failed on these 2 files:

ModSettings.php
index.template.php

i've attached the files here. can someone help me?

Proceed with the install, and then upload these

Back up of course

thanx! i got it installed perfectly but then i got this error:

ChatBot: Error: Connection status: 0

a friend who's also an admin tested it and got this:

ChatBot: Error: Connection status: 12029

and

ChatBot: Error: Connection status: 12031

i'm using SMF 1.1.8

mrtrc266

@ John

Sorrry but I used your files on my site and tried every possible combinations of setting and can't replicate your error.

Is your tempeval still turned off?
http://sleepy-arcade.ath.cx/sleepy/index.php?topic=612.msg2981#msg2981

Also does this happen if you change it to the default theme?

mrtrc266

Please try setting your file permissions explained here, event though your not getting the 500 error make sure your chat/index.php and shoutbox.index.php are set to 755.

~~~AJAX Chat Intergration FAQ's & Tips-N-Tricks~~~


12029 - A connection with the server could not be established
12031 - The connection with the server was reset


ɔɔɔɔɔɔuɥoɾ

Quote from: mrtrc266 on May 05, 2009, 11:54:52 AM
@ John

Sorrry but I used your files on my site and tried every possible combinations of setting and can't replicate your error.

Is your tempeval still turned off?
http://sleepy-arcade.ath.cx/sleepy/index.php?topic=612.msg2981#msg2981

Also does this happen if you change it to the default theme?

the eval is off.
I just changed to default theme, getting the same error.

8: Undefined index: enableChatBelowPM

can you explain this error in abit moredetail for me, whats happening, whats the forum trying to do to cause this error?


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

mrtrc266

When you you go to Admin/Modifications/Chat and check "Show online users below total logged in time section?" it shows # of online chat users below total time logged in section.

That's the function of the chatbelowPM, I'm scouring through all the files to see if I can see what the heck is causing it.

ɔɔɔɔɔɔuɥoɾ

whoa..

I just enabled the " Show online users below total logged in time section?" option

there errors have stopped, what the ****

hove u been testing with the option on or off?

well it dont really matter no more, as long as there are no errors, im good :)

thanks :)


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

mrtrc266

Quote from: johncccccc on May 05, 2009, 12:55:05 PM
whoa..

I just enabled the " Show online users below total logged in time section?" option

there errors have stopped, what the ****

hove u been testing with the option on or off?

well it dont really matter no more, as long as there are no errors, im good :)

thanks :)

LOL I told you to enable the wrong thing 10 pages ago HERE, I copied the wrong line ROTF!!!

Glad you got it sorted...it's been fun :P

Enjoy the Mod!

ɔɔɔɔɔɔuɥoɾ

I tried it before though, It did not work, unless maybe, I forgot to clear the error log lmao lol..


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

Paracelsus

Quote from: mrtrc266 on May 05, 2009, 10:37:46 AM
Quote from: Paracelsus on May 05, 2009, 05:02:21 AM
Sorry if this has been asked before...

Is it possible to have the ShoutBox visible to everybody but still only allow certain membergroups to actually write on it?

I don't think so, there is only the option to give them access to it which will give them access to chat.

Tkx. My problem now is around customizing the shoutbox itself... The shoutbox seems to acquire the default style.css and doesn't really gets affected by changes is with shoutbox.css. Any ideas?

mrtrc266

@ Paracelsus

edit your chat/css/shoutbox.css file

Raoden

Can I put a max limit, or a scroll on this?
I installed the mod and works, but if i write (or others) the chat keep getting longer and longer...

How I can fix this?

blanix

Quote from: mrtrc266 on May 05, 2009, 03:41:50 PM
@ Paracelsus

edit your chat/css/shoutbox.css file

ähm or "shoutbox/css/shoutbox.css file"
My SMF: 1.1.9

mrtrc266

Quote from: Raoden on May 05, 2009, 06:34:15 PM
Can I put a max limit, or a scroll on this?
I installed the mod and works, but if i write (or others) the chat keep getting longer and longer...

How I can fix this?

If you're on the default theme just type in about 12 messages then refresh your screen.

If you have custom theme please see the link on my signature and do the edits for your theme.

Paracelsus

Quote from: blanix on May 05, 2009, 06:47:17 PM
Quote from: mrtrc266 on May 05, 2009, 03:41:50 PM
@ Paracelsus

edit your chat/css/shoutbox.css file

ähm or "shoutbox/css/shoutbox.css file"

That's what I've done but no effect at all... and for example I can't shut down the sound when sending a shout... it's always on, even when putting "false" in config.js both in chat and shoutbox directory.

MUSTAfaINE

can anyone send me the tables of this mod, i couldnt work the Tables_1.1.X.php..

or can anyone write the sql for me ?


primetime

LEt me try this question here...

I have  silentwave theme installed. the shoutbox works fine the chat works fine. The problem I have is that the chatbox does not popup in a new window like it does in the default theme. Can anyone point me in the right direction. I have made the edits per the instructions but have not had any luck.

Silentwave theme does not have boardindex,template.php. It does have index.template.php.

Here is that file..
<?php
// Version: 2.0 RC1; index

/* This template is, perhaps, the most important template in the theme. It
contains the main template layer that displays the header and footer of
the forum, namely with main_above and main_below. It also contains the
menu sub template, which appropriately displays the menu; the init sub
template, which is there to set the theme up; (init can be missing.) and
the linktree sub template, which sorts out the link tree.

The init sub template should load any data and set any hardcoded options.

The main_above sub template is what is shown above the main content, and
should contain anything that should be shown up there.

The main_below sub template, conversely, is shown after the main content.
It should probably contain the copyright statement and some other things.

The linktree sub template should display the link tree, using the data
in the $context['linktree'] variable.

The menu sub template should display all the relevant buttons the user
wants and or needs.

For more information on the templating system, please see the site at:
http://www.simplemachines.org/
*/

// Initialize the template... mainly little settings.
function template_init()
{
global $context$settings$options$txt;

/* Use images from default theme when using templates from the default theme?
if this is 'always', images from the default theme will be used.
if this is 'defaults', images from the default theme will only be used with default templates.
if this is 'never' or isn't set at all, images from the default theme will not be used. */
$settings['use_default_images'] = 'never';

/* What document type definition is being used? (for font size and other issues.)
'xhtml' for an XHTML 1.0 document type definition.
'html' for an HTML 4.01 document type definition. */
$settings['doctype'] = 'xhtml';

/* The version this template/theme is for.
This should probably be the version of SMF it was created for. */
$settings['theme_version'] = '2.0 RC1';

/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = true;

/* Use plain buttons - as oppossed to text buttons? */
$settings['use_buttons'] = true;

/* Show sticky and lock status separate from topic icons? */
$settings['separate_sticky_lock'] = true;

/* Does this theme use the strict doctype? */
$settings['strict_doctype'] = false;

/* Does this theme use post previews on the message index? */
$settings['message_index_preview'] = false;

/* Set the following variable to true if this theme requires the optional theme strings file to be loaded. */
$settings['require_theme_strings'] = false;
}

// The main sub template above the content.
function template_html_above()
{
global $context$settings$options$scripturl$txt$modSettings;

// Show right to left and the character set for ease of translating.
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"'
$context['right_to_left'] ? ' dir="rtl"' '''><head>
<meta http-equiv="Content-Type" content="text/html; charset='
$context['character_set'], '" />
<meta name="description" content="'
$context['page_title_html_safe'], '" />
<meta name="keywords" content="'
$context['meta_keywords'], '" />
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/scripts/script.js?rc1"></script>
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/scripts/theme.js?rc1"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "'
$settings['theme_url'], '";
var smf_default_theme_url = "'
$settings['default_theme_url'], '";
var smf_images_url = "'
$settings['images_url'], '";
var smf_scripturl = "'
$scripturl'";
var smf_iso_case_folding = '
$context['server']['iso_case_folding'] ? 'true' 'false'';
var smf_charset = "'
$context['character_set'], '";'$context['show_pm_popup'] ? '
if (confirm("' 
$txt['show_personal_messages'] . '"))
window.open(smf_prepareScriptUrl(smf_scripturl) + "action=pm");' 
'''
var ajax_notification_text = "'
$txt['ajax_in_progress'], '";
var ajax_notification_cancel_text = "'
$txt['modify_cancel'], '";
// ]]></script>
<title>'
$context['page_title_html_safe'], '</title>';

// Please don't index these Mr Robot.
if (!empty($context['robot_no_index']))
echo '
<meta name="robots" content="noindex" />'
;

// The ?rc1 part of this link is just here to make sure browsers don't cache it wrongly.
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/style'$context['theme_variant'], '.css?rc1" />';

echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/css/print.css?rc1" media="print" />';

// IE7 needs some fixes for styles.
if ($context['browser']['is_ie7'])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/css/ie7.css" />';
// ..and IE6!
elseif ($context['browser']['is_ie6'])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/css/ie6.css" />';
// Firefox - all versions - too!
elseif ($context['browser']['is_firefox'])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/css/ff.css" />';

// RTL languages require an additional stylesheet.
if ($context['right_to_left'])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/css/rtl.css" />';

// Show all the relative links, such as help, search, contents, and the like.
echo '
<link rel="help" href="'
$scripturl'?action=help" />
<link rel="search" href="' 
$scripturl '?action=search" />
<link rel="contents" href="'
$scripturl'" />';

// If RSS feeds are enabled, advertise the presence of one.
if (!empty($modSettings['xmlnews_enable']))
echo '
<link rel="alternate" type="application/rss+xml" title="'
$context['forum_name_html_safe'], ' - RSS" href="'$scripturl'?type=rss;action=.xml" />';

// If we're viewing a topic, these should be the previous and next topics, respectively.
if (!empty($context['current_topic']))
echo '
<link rel="prev" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=prev" />
<link rel="next" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=next" />';

// If we're in a board, or a topic for that matter, the index will be the board's index.
if (!empty($context['current_board']))
echo '
<link rel="index" href="'
$scripturl'?board='$context['current_board'], '.0" />';

// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
{
$options['collapse_header'] = !empty($_COOKIE['upshrink']);
$options['collapse_header_ic'] = !empty($_COOKIE['upshrinkIC']);
}

// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
// Create the main header object.
var mainHeader = new smfToggle("upshrink", '
, empty($options['collapse_header']) ? 'false' 'true'');
mainHeader.useCookie('
$context['user']['is_guest'] ? 0');
mainHeader.setOptions("collapse_header", "'
$context['session_id'], '");
mainHeader.addToggleImage("upshrink", "/upshrink.gif", "/upshrink2.gif");
mainHeader.addTogglePanel("user_section");
mainHeader.addTogglePanel("news_section");
// ]]></script>'
;

echo '
</head>
<body>'
;
}

function 
template_body_above()
{
global $context$settings$options$scripturl$txt$modSettings;

echo 
'
<div id="wrapper">
<div id="header">
<div id="welcome">'
;
if ($context['user']['is_logged'])
{
echo '
<b>'
$txt['hello_member_ndt'], ' '$context['user']['name'], '</b><br />';

// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo $txt['msg_alert_you_have'], ' <a href="'$scripturl'?action=pm">'$context['user']['messages'], ' '$context['user']['messages'] != $txt['msg_alert_messages'] : $txt['message_lowercase'], '</a>'$txt['newmessages4'], ' '$context['user']['unread_messages'], ' '$context['user']['unread_messages'] == $txt['newmessages0'] : $txt['newmessages1'] , '.<br />';

echo '
<a href="'
$scripturl'?action=unread">'$txt['unread_since_visit'], '</a><br />
<a href="'
$scripturl'?action=unreadreplies">'$txt['show_unread_replies'], '</a><br />';
}

// Otherwise they're a guest - so politely ask them to register or login.
else
{
echo sprintf($txt['welcome_guest'], $txt['guest_title']);

echo '
<br />'
$context['current_time'],'<br />';
}

echo '
</div>
<!--a href="'
.$scripturl.'" title=""><span id="logo"> </span></a-->';
echo '
</div>
<div id="toolbar">
<div id="nav">
'
,template_menu(),'
</div>
</div>
<div id="mainarea">'
;
//added by rickC for theme fix
//shoutBox
if (!empty($modSettings['enableShoutBox'])){
if (allowedTo('shout_access')){
// We'll have to use the cookie to remember the shoutBox header...
if ($context['user']['is_guest'])
$options['sb_collapsed'] = !empty($_COOKIE['sb_collapsed']);

echo '
<script language="JavaScript" type="text/javascript">
var sb_current_header = '
, empty($options['sb_collapsed']) ? 'false' 'true'';

function ajax_shoutBox_collapse(mode)
{'
;

if ($context['user']['is_guest'])
echo '
document.cookie = "sb_collapsed=" + (mode ? 1 : 0);'
;
else
echo '
smf_setThemeOption("sb_collapsed", mode ? 1 : 0, null, "'
$context['session_id'], '");';

echo '
document.getElementById("ajax_shoutbox_collapse").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");

document.getElementById("ShoutBox").style.display = mode ? "none" : "";

sb_current_header = mode;
}
</script>'
;

if (!empty($modSettings['anyPageShoutBox']) || isset($context['chat_isHome'])){
echo'
<div class="tborder" style="margin: 10px 0 10px 0;">
<div class="catbg" style="padding: 5px 15px 5px 10px;margin:0 auto;">
<a rel="nofollow" href="#" onclick="ajax_shoutBox_collapse(!sb_current_header)"><img id="ajax_shoutbox_collapse" src="'
$settings['images_url'], empty($options['sb_collapsed']) ? '/collapse.gif' '/expand.gif','" alt="*" style="margin-right: 5px;"  /></a>'$txt['shoutBox'], '
</div>
<div id="ShoutBox"'
, empty($options['sb_collapsed']) ? '' ' style="display: none;"''>
'
getShoutBoxContent() ,'
</div>
</div>'
;
}
}
}
//end of rickC add
// Show the navigation tree.
theme_linktree();

}

function 
template_body_below()
{
global $context$settings$options$scripturl$txt;

echo '
</div>'
;

// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '
<div id="footer">
<span class="smalltext">'
theme_copyright(), '
<br />Theme by <a href="http://www.dzinerstudio.com" target="_blank">DzinerStudio</a>'
;

// Show the load time?
if ($context['show_load_time'])
echo '<br />'$txt['page_created'], $context['load_time'], $txt['seconds_with'], $context['load_queries'], $txt['queries'], '</span>';

echo '
</div>
</div>'
;
}

function 
template_html_below()
{
global $context$settings$options$scripturl$txt$modSettings;

echo 
'
</body></html>'
;
}

// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree($force_show false)
{
global $context$settings$options$shown_linktree;

// If linktree is empty, just return - also allow an override.
if (empty($context['linktree']) || (!empty($context['dont_default_linktree']) && !$force_show))
return;

//!!! Temporarily don't do it twice.
if (!empty($shown_linktree))
return;
$shown_linktree true;

echo '
<ul id="linktree">'
;

// Each tree item has a URL and name. Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
echo '
<li'
, ($link_num == count($context['linktree']) - 1) ? ' class="last"' '''>';
// Show something before the link?
if (isset($tree['extra_before']))
echo $tree['extra_before'];

// Show the link, including a URL if it should have one.
echo $settings['linktree_link'] && isset($tree['url']) ? '
<a href="' 
$tree['url'] . '"><span>' $tree['name'] . '</span></a>' '<span>' $tree['name'] .'</span>';

// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];

// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
echo ' >';

echo '
</li>'
;
}
echo '
</ul>'
;
}

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context$settings$options$scripturl$txt;

echo '
<ul>'
;
foreach ($context['menu_buttons'] as $act => $button)
echo '<li><a '$button['active_button'] ? ' class="current"' '' ' href="'$button['href'], '"><span>'$button['title'], '</span></a></li>';
// Added by rickC for the chat
if ($modSettings['enableChatBelowPM']){
$count count(chatOnlineUsers());
if ($count == )
echo '<br />' $txt['chat_no_user'];
elseif ($count == )
  echo '<br />  1' $txt['chat_aUser']. '.<br />';
else
  echo '<br /> ' $count$txt['chat_users']. '<br />';
}
$num = ($modSettings['enableChatButtonNo']) ? $count 0;
$context['menu_buttons']['chat']['title'] .= ($num 0) ?  ('('.$num.')') : '';
if ($modSettings['chatPopUp']){
$context['menu_buttons']['chat']['href'] .= '" onclick="openWindow(this.href);this.blur();return false;';
echo '
<script type="text/javascript">
 function openWindow(url,width,height,options,name) {
 width = width ? width : 800;
height = height ? height : 600;
  options = options ? options : \'resizable=yes\';
  name = name ? name : \'openWindow\';
  window.open(
  url,
  name,
  \'screenX=\'+(screen.width-width)/2+\',screenY=\'+(screen.height-height)/2+\',width=\'+width+\',height=\'+height+\',\'+options
  )
 }
</script>'
;
}
 
// end of add by rickC




echo '
</ul>'
;

}

// Generate a strip of buttons.
function template_button_strip($button_strip$direction 'top'$force_reset false$custom_td '')
{
global $settings$context$txt$scripturl;

// Create the buttons...
$buttons = array();
foreach ($button_strip as $key => $value)
{
if (!isset($value['test']) || !empty($context[$value['test']]))
$buttons[] = '<a href="' $value['url'] . '" ' . (isset($value['custom']) ? $value['custom'] : '') . '><span>' $txt[$value['text']] . '</span></a>';
}

if (empty($buttons))
return '';

// Make the last one, as easy as possible.
$buttons[count($buttons) - 1] = str_replace('<span>''<span class="last">'$buttons[count($buttons) - 1]);

echo '
<div class="buttonlist'
$direction != 'top' '_bottom' '''">
<ul class="clearfix">
<li>'
implode('</li><li>'$buttons), '</li>
</ul>
</div>'
;

}

?>

MUSTAfaINE

thanks primetime but i cant working the setting database files.. when i open it i see a white page i think i ve a problem but i dont know why, if you send me the tables from phpmyadmin i can set the mod, thanks


Atheo

Hello,

I have changed the file permissions and done everything suggested (I think) but I am still getting an "Internal Server Error" when clicking the chat button. The shoutbox works fine.

primetime

Quote from: MUSTAfaINE on May 07, 2009, 04:12:52 AM
thanks primetime but i cant working the setting database files.. when i open it i see a white page i think i ve a problem but i dont know why, if you send me the tables from phpmyadmin i can set the mod, thanks

Im not sure what you are asking here. Can you explain it to a newb please?

MUSTAfaINE

i`am  wanting to sqls in php my admin about this chat mod because the install.php file is not working in my site..

if anybody download it who has the mod i can upload the tables in my php admin


Advertisement: