Yeah, I'm on a shared saver! ajax chat works, but no success in shoutbox!
(2011-02-02, 09:32 AM)Leefish Wrote: [ -> ]It sure does work - link to an english language site >>
http://www.leefish.nl/mybb/thread-766.html
However, I should warn you that if you are on a shared server then you MAY get problems with your host using this as a chat.
where the file in Ajax Chatbox on Portal? ( in that URL?)
Yes, you can download it - its NOT the chat - its the modification. Same as above. You need to do all that the post above your first post says. Install php in templates, make the portal.php changes.
thanks a lot dude...
it works... great...
(2011-02-02, 07:52 AM)behnam9856 Wrote: [ -> ] (2009-11-20, 03:58 PM)ows Wrote: [ -> ] (2009-07-10, 09:31 PM)ecanikajo Wrote: [ -> ]I would like to insert the Ajax chat on the index page as Shoutbox.
(2009-07-29, 11:41 PM)gimmezell Wrote: [ -> ]I'm interested in using this as a shoutbox too.
First of all ... install and activate this plugin to enable php-code in templates.
Open your themes "global.css" in advanced mode and add this code on top:
@import url("./chat/css/shoutbox.css");
Create a new file with this code:
<?php
function getShoutBoxContent() {
// URL to the chat directory:
if(!defined('AJAX_CHAT_URL')) {
define('AJAX_CHAT_URL', './chat/');
}
// Path to the chat directory:
if(!defined('AJAX_CHAT_PATH')) {
define('AJAX_CHAT_PATH', realpath(dirname($_SERVER['SCRIPT_FILENAME']).'/chat').'/');
}
// Validate the path to the chat:
if(@is_file(AJAX_CHAT_PATH.'lib/classes.php')) {
// Include Class libraries:
require_once(AJAX_CHAT_PATH.'lib/classes.php');
// Initialize the shoutbox:
$ajaxChat = new CustomAJAXChatShoutBox();
// Parse and return the shoutbox template content:
return $ajaxChat->getShoutBoxContent();
}
return null;
}
?>
and save it as "shoutbox.php" in your forums root directory.
Edit your MyBB-Forums "index.php", search for (~line 27)
// Load global language phrases
$lang->load("index");
AFTER add:
// START Shoutbox-Code
ob_start();
include("shoutbox.php");
$shoutbox = ob_get_contents();
ob_end_clean();
// END Shoutbox-Code
Edit your themes template "Index Page Templates --> index". Search for
{$header}
AFTER add:
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" width="100%" class="tborder">
<thead>
<tr>
<td class="thead">
<div class="expcolimage">
<img src="{$theme['imgdir']}/collapse{$collapsedimg['shoutbox']}.gif" id="shoutbox_img" class="expander" alt="[-]" title="[-]" />
</div>
<div><strong>Shoutbox</strong></div>
</td>
</tr>
</thead>
<tbody style="{$collapsed['shoutbox_e']}" id="shoutbox_e">
<tr>
<td class="trow1"><div style="width:100%;"><?php echo getShoutBoxContent(); ?></div></td>
</tr>
</tbody>
</table>
<br />
Youre done
Demo-Link (sorry, german only)
Nothing happens?
1. Check the path to your chat-directory in "global.css" and "shoutbox.php" (lines 5 and 10)!
2. Activate Output template start/end comments? in Admin-CP --> Configuration --> Settings --> Server and Optimization Options
I made changes carefully. All's ok. but its doesnt work!!!
I'm using MyBB 1.6
help please?
I have made a plugin based on this, so you don't need to hack the mybb core code anymore.
See:
http://community.mybb.com/thread-87126.html
I have made changes and now my Shoutbox works. but its available for all persons! i want to disable it for guests! i want make availabe it for my members only! what should i to do?
(2011-02-02, 02:13 PM)behnam9856 Wrote: [ -> ]I have made changes and now my Shoutbox works. but its available for all persons! i want to disable it for guests! i want make availabe it for my members only! what should i to do?
Just take a look into inc/config.php inside your ajaxchat installation.
thx a lot...
sorry but i've a question: how can i show online chat users in stats?
(2011-02-02, 05:05 PM)behnam9856 Wrote: [ -> ]sorry but i've a question: how can i show online chat users in stats?
No idea?
Where is the tutorial on how to integrate this into mybb?
(2011-02-04, 02:35 AM)nadlerz Wrote: [ -> ]Where is the tutorial on how to integrate this into mybb?
Just download the ajax_chat-0.8.3_MyBB.zip from
here and install it like it is described inside the readme