[ABD] AJAX Chat/Shoutbox MOD 2.0.0 Beta 8

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
zagor256
Registered User
Posts: 60
Joined: Sun Aug 03, 2008 2:04 pm
Contact:

Re: [Beta] AJAX Chat/Shoutbox MOD 2.0.0 Beta 8

Post by zagor256 »

I tried this mod and I found that I have problems on my board with some characters.

č, Đ, đ, Đ and also Ł

When I enter shout that have these characters, nothing shows.

So I cannot use shoutbox normally because of this :(

Anyone knows where coud be the problem?

Thanx
jimcarrel
Registered User
Posts: 671
Joined: Fri Jul 27, 2007 10:49 pm
Location: Oklahoma City, Oklahoma

Re: [Beta] AJAX Chat/Shoutbox MOD 2.0.0 Beta 8

Post by jimcarrel »

Mahi wrote:
Mahi wrote:Could anyone direct me to where I go to turn this off?
Anyone have an answer?
Sorry about re asking, but I need it in some matter of urgency.
Just like when you installed it, remember those edits you did to install it?

on index_body.html
take out, or comment out this line that you added where you wanted the chat to show

Code: Select all

<!-- INCLUDE chat_body.html -->
Grace--Getting what I don't deserve
Mercy--Not getting what I do deserve
jimcarrel
Registered User
Posts: 671
Joined: Fri Jul 27, 2007 10:49 pm
Location: Oklahoma City, Oklahoma

Re: [Beta] AJAX Chat/Shoutbox MOD 2.0.0 Beta 8

Post by jimcarrel »

Deathly Hallow wrote:Hello,

I use a Christmas style proChristmas, but the chatbox isn't like how it has to be. In proglass he's perfect..

http://www.forums.pokeplace.nl

At the bottom of the page you see the chatbox, does anyone know how I can get it a normal form?
I don't know what your style is based on, did you try both prosilver and subsilver edits?
the one you are using now you might try playing with font-size and line-height
Line-height should be the extra padding that makes the posting box so large, I think.

Code: Select all

.user {
			width: 95%;
			font-size: 1.1em;
			font-family:Verdana, Arial, Helvetica, sans-serif;
			line-height: 1.4em;
		}
Grace--Getting what I don't deserve
Mercy--Not getting what I do deserve
Deathly Hallow
Registered User
Posts: 277
Joined: Mon Apr 21, 2008 11:58 am
Location: Netherlands

Re: [Beta] AJAX Chat/Shoutbox MOD 2.0.0 Beta 8

Post by Deathly Hallow »

It's prosilver based. I'm gonna try it.
User avatar
whoisit
Registered User
Posts: 283
Joined: Sat Feb 02, 2008 10:12 am

Re: [Beta] AJAX Chat/Shoutbox MOD 2.0.0 Beta 8

Post by whoisit »

Hi
This all works OK but I have three questions please
  1. How do I make the line where messages are posted thinner?
  2. There is a white line under where I enter my messages, what is it?
  3. Can smilies be added so that I can just click to have them added in the message?
    [/]list

    My board is http://www.poem-n-verse.co.uk

    Thanks
duyusa
Registered User
Posts: 1
Joined: Fri Jan 02, 2009 9:49 am

Re: [Beta] AJAX Chat/Shoutbox MOD 2.0.0 Beta 8

Post by duyusa »

Hi,
I installed ajax chat/shoutbox on my class forum, I am using phpbb3 3.0.4 subsilver2. The chat section's working like a charm. However, I did not see the shoutbox on my index page. The install package I download have subsilver chat_body not subsilver2. I think that is the source of problem. Or I need to modified something to make it work with this style. In fact, I tried to search and read before posting here since I don't want to bother people if someone else already asked the same question before. But I did not find the answer to work my case out. Therefore, if anyone can answer or give me some suggestions, I would appreciate.

My chat_body.html

Code: Select all

<!-- IF S_GET_CHAT -->
	<!-- IF S_READ or S_ADD -->
		<!-- BEGIN chatrow -->
			<div id="p{chatrow.MESSAGE_ID}">
				<table class="tablebg" cellpadding="6" cellspacing="0" width="100%">
					<tr class="row{chatrow.CLASS}">
						<td>
							<!-- IF U_ACP or U_MCP --><a href="javascript:void({chatrow.MESSAGE_ID})" title="{L_DELETE_POST}" onclick="delete_post('{chatrow.MESSAGE_ID}')"><img src="{T_IMAGESET_LANG_PATH}/icon_post_delete.gif" /></a> <!-- ENDIF -->
							 <b class="postauthor">{chatrow.USERNAME_FULL}</b> « {chatrow.TIME} » &nbsp; <span class="postbody">{chatrow.MESSAGE}</span>
						</td>
					</tr>
					
				</table>
			</div>
		<!-- END chatrow -->---{LAST_ID}
	<!-- IF S_WHOISONLINE -->---
			<!-- BEGIN whoisrow -->
				<div><img src="{T_IMAGESET_PATH}/{whoisrow.USER_STATUS}.png" class="online_img" /> {whoisrow.USERNAME_FULL}</div>
			<!-- END whoisrow -->---{LAST_TIME}---{DELAY}---{LAST_POST}
		<!-- ENDIF -->
	<!-- ENDIF -->
<!-- ELSE -->
	<!-- IF S_CHAT -->
		<!-- INCLUDE overall_header.html -->
	<!-- ENDIF -->
	<script type="text/javascript">
	<!--
	var fieldname = 'chat';
	var last_time = 0;
	var xmlHttp = http_object();
	var last_id = {LAST_ID};
	var type = 'receive';
	var post_time = {TIME};
	var read_interval = 15000;
	var interval = setInterval('handle_send("read", last_id);', read_interval);

	function handle_send(mode, f)
	{
		if (xmlHttp.readyState == 4 || xmlHttp.readyState == 0)
		{
			indicator_switch('on');
			type = 'receive';
			param = 'mode=' + mode;	
			param += '&last_id=' + last_id;
			param += '&last_time=' + last_time;			
			param += '&last_post=' + post_time;			
			param += '&read_interval=' + read_interval;			
	
			if (mode == 'add' && document.text.message.value != '')
			{
				type = 'send';
				for(var i = 0; i < f.elements.length; i++)
				{ 
					elem = f.elements[i]; 
					param += '&' + elem.name + '=' + encodeURIComponent(elem.value); 
				}
				document.text.message.value = '';
			}
			else if (mode == 'delete')
			{
				type = 'delete';
				param += '&chat_id=' + f;
			}
			xmlHttp.open("POST", '{FILENAME}', true);
			xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
			xmlHttp.onreadystatechange = handle_return;
			xmlHttp.send(param);
		}
	}
	
	function handle_return()
	{
		if (xmlHttp.readyState == 4)
		{
			if (type != 'delete')
			{
				results = xmlHttp.responseText.split('---');
				if (results[1])
				{
					if (last_id == 0)
					{
						document.getElementById(fieldname).innerHTML = results[0];
					}
					else
					{
						document.getElementById(fieldname).innerHTML = results[0] + document.getElementById(fieldname).innerHTML;
					}
					last_id = results[1];
					if (results[2])
					{
						document.getElementById('whois_online').innerHTML = results[2];
						last_time = results[3];
						if (results[4] != read_interval * 1000)
						{
							window.clearInterval(interval);
							read_interval = results[4] * 1000;
							interval = setInterval('handle_send("read", last_id);', read_interval);
							document.getElementById('update_seconds').innerHTML = results[4];
						}
						post_time = results[5];
					}
				}
			}
			indicator_switch('off');
		}
	}
	
	function delete_post(chatid)
	{
		document.getElementById('p' + chatid).style.display = 'none';
		handle_send('delete', chatid);
	}
	
	function indicator_switch(mode)
	{
		if(document.getElementById("act_indicator"))
		{
			var img = document.getElementById("act_indicator");	
			if(img.style.visibility == "hidden" && mode == 'on') 
			{
				img.style.visibility = "visible";
			}
			else if (mode == 'off')
			{
				img.style.visibility = "hidden"
			}	
		}
	}
	
	function http_object()
	{
		if (window.XMLHttpRequest)
		{
			return new XMLHttpRequest();
		}
		else if(window.ActiveXObject)
		{
			return new ActiveXObject("Microsoft.XMLHTTP");
		}
		else
		{
			document.getElementById('p_status').innerHTML = 'Status: Cound not create XmlHttpRequest Object.  Consider upgrading your browser.';
		}
	}
	-->
	</script>
	<style type="text/css">
	<!--
		.box
		{
			width: 95%;
			margin-left: auto;
			margin-right: auto;
		}
		.shouts {
			width: 100%;
			height:300px;
			overflow:auto;
		}
		#chat {
			width: 100%;
			text-align:left;
		}
		#message {
			width: 65%;
		}
		#whois_online{
			vertical-align:text-top;
			text-align:left;
		}
		.online_img {
			vertical-align:middle;
		}	
		#act_indicator {
			visibility:hidden;
		}
	-->
	</style>
	<div class="box">
		<table class="tablebg" cellspacing="1" width="100%">
				<tr>
					<th align="center" colspan="2">{SITENAME} {L_CHAT}</th>
				</tr>
			<!-- IF S_USER_LOGGED_IN -->
				<tr>
					<td align="center" class="cat nav" width="85%">
						<form name="text" id="text" method="post" action="javascript:void(0);" onsubmit="handle_send('add', this)" autocomplete="off">{L_MESSAGE}: 
							<input type="text" tabindex="1" name="message" id="message" class="inputbox" size="28" />
							<input class="button1" type="submit" name="submit" value="{L_SUBMIT}" />
						</form>
					</td>
					<td align="center" class="cat nav" width="15%">{L_ONLINE_LIST}</td>
			<!-- ENDIF -->
			<tr>
				<td class="row3" style="text-align:left;" height="220">
					<div class="shouts">
						<div id="chat">
							<!-- BEGIN chatrow -->
								<div id="p{chatrow.MESSAGE_ID}">
									<table class="tablebg" cellpadding="6" cellspacing="0" width="100%">
										<tr class="row{chatrow.CLASS}">
											<td>
												<!-- IF U_ACP or U_MCP -->
													<a href="javascript:void({chatrow.MESSAGE_ID})" title="{L_DELETE_POST}" onclick="delete_post('{chatrow.MESSAGE_ID}')">
														<img src="{T_IMAGESET_LANG_PATH}/icon_post_delete.gif" />
													</a> 
												<!-- ENDIF -->
												<b class="postauthor">{chatrow.USERNAME_FULL}</b> « {chatrow.TIME} » &nbsp; <span class="postbody">{chatrow.MESSAGE}</span>
											</td>
										</tr>
										
									</table>
								</div>
							<!-- END chatrow -->
						</div>
					</div>
				</td>
				<td class="row1" nowrap="nowrap">
					<div class="shouts">
						<div id="whois_online">
							<!-- BEGIN whoisrow -->
								<div><img src="{T_IMAGESET_PATH}/{whoisrow.USER_STATUS}.png" class="online_img" /> {whoisrow.USERNAME_FULL}</div>
							<!-- END whoisrow -->
						</div>
					</div>
				</td>
			</tr>
			<tr>
				<td class="cat" colspan="2" align="center">
					{L_DETAILS}
					<img src="{T_IMAGESET_PATH}/act_indicator.gif" id="act_indicator" />
					<strong>• {L_UPDATES} <span id="update_seconds">{DELAY}</span> {L_UNIT}</strong>
				</td>
			</tr>
		</table>
	</div>
	<!-- IF S_CHAT -->
		<!-- INCLUDE overall_footer.html -->
	<!-- ENDIF -->
<!-- ENDIF -->
My index_body.html

Code: Select all

<!-- INCLUDE overall_header.html -->

<!-- IF U_MCP -->
	<div id="pageheader">
		<p class="linkmcp">[ <a href="{U_MCP}">{L_MCP}</a> ]</p>
	</div>

	<br clear="all" /><br />
<!-- ENDIF -->

<!-- INCLUDE forumlist_body.html -->

<!-- IF not S_IS_BOT or U_TEAM -->
<span class="gensmall"><!-- IF not S_IS_BOT --><a href="{U_DELETE_COOKIES}">{L_DELETE_COOKIES}</a><!-- ENDIF --><!-- IF not S_IS_BOT and U_TEAM --> | <!-- ENDIF --><!-- IF U_TEAM --><a href="{U_TEAM}">{L_THE_TEAM}</a><!-- ENDIF --></span><br />
<!-- ENDIF -->

<br clear="all" />

<!-- INCLUDE breadcrumbs.html -->

<!-- INCLUDE chat_body.html -->
<!-- IF S_DISPLAY_ONLINE_LIST -->
	<br clear="all" />

	<table class="tablebg" width="100%" cellspacing="1">
	<tr>
		<td class="cat" colspan="2"><!-- IF U_VIEWONLINE --><h4><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a></h4><!-- ELSE --><h4>{L_WHO_IS_ONLINE}</h4><!-- ENDIF --></td>
	</tr>
	<tr>
	<!-- IF LEGEND -->
		<td class="row1" rowspan="2" align="center" valign="middle"><img src="{T_THEME_PATH}/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>
	<!-- ELSE -->
		<td class="row1" align="center" valign="middle"><img src="{T_THEME_PATH}/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>
	<!-- ENDIF -->
		<td class="row1" width="100%"><span class="genmed">{TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})<br />{RECORD_USERS}<br /><br />{LOGGED_IN_USER_LIST}</span></td>
	</tr>
	<!-- IF LEGEND -->
		<tr>
			<td class="row1"><b class="gensmall">{L_LEGEND} :: {LEGEND}</b></td>
		</tr>
	<!-- ENDIF -->
	</table>
<!-- ENDIF -->

<!-- IF S_DISPLAY_BIRTHDAY_LIST -->
	<br clear="all" />

	<table class="tablebg" width="100%" cellspacing="1">
	<tr>
		<td class="cat" colspan="2"><h4>{L_BIRTHDAYS}</h4></td>
	</tr>
	<tr>
		<td class="row1" align="center" valign="middle"><img src="{T_THEME_PATH}/images/whosonline.gif" alt="{L_BIRTHDAYS}" /></td>
		<td class="row1" width="100%"><p class="genmed"><!-- IF BIRTHDAY_LIST -->{L_CONGRATULATIONS}: <b>{BIRTHDAY_LIST}</b><!-- ELSE -->{L_NO_BIRTHDAYS}<!-- ENDIF --></p></td>
	</tr>
	</table>
<!-- ENDIF -->

<br clear="all" />

<table class="tablebg" width="100%" cellspacing="1">
<tr>
	<td class="cat" colspan="2"><h4>{L_STATISTICS}</h4></td>
</tr>
<tr>
	<td class="row1"><img src="{T_THEME_PATH}/images/whosonline.gif" alt="{L_STATISTICS}" /></td>
	<td class="row1" width="100%" valign="middle"><p class="genmed">{TOTAL_POSTS} | {TOTAL_TOPICS} | {TOTAL_USERS} | {NEWEST_USER}</p></td>
</tr>
</table>

<!-- IF not S_USER_LOGGED_IN -->
	<br clear="all" />

	<form method="post" action="{S_LOGIN_ACTION}">
	
	<table class="tablebg" width="100%" cellspacing="1">
	<tr>
		<td class="cat"><h4><a href="{U_LOGIN_LOGOUT}">{L_LOGIN_LOGOUT}</a></h4></td>
	</tr>
	<tr>
		<td class="row1" align="center"><span class="genmed">{L_USERNAME}:</span> <input class="post" type="text" name="username" size="10" />&nbsp; <span class="genmed">{L_PASSWORD}:</span> <input class="post" type="password" name="password" size="10" />&nbsp; <!-- IF S_AUTOLOGIN_ENABLED --> <span class="gensmall">{L_LOG_ME_IN}</span> <input type="checkbox" class="radio" name="autologin" /><!-- ENDIF -->&nbsp; <input type="submit" class="btnmain" name="login" value="{L_LOGIN}" /></td>
	</tr>
	</table>
	{S_FORM_TOKEN}
	</form>
<!-- ENDIF -->

<br clear="all" />

<table class="legend">
<tr>
	<td width="20" align="center">{FORUM_NEW_IMG}</td>
	<td><span class="gensmall">{L_NEW_POSTS}</span></td>
	<td>&nbsp;&nbsp;</td>
	<td width="20" align="center">{FORUM_IMG}</td>
	<td><span class="gensmall">{L_NO_NEW_POSTS}</span></td>
	<td>&nbsp;&nbsp;</td>
	<td width="20" align="center">{FORUM_LOCKED_IMG}</td>
	<td><span class="gensmall">{L_FORUM_LOCKED}</span></td>
</tr>
</table>

<!-- INCLUDE overall_footer.html -->
my overall_header

Code: Select all

<!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" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
<head>
<!-- IF S_USER_LANG == 'vi' -->
<script type="text/javascript" src="viet.js"></script>
<!-- ENDIF -->

<meta http-equiv="content-type" content="text/html; charset={S_CONTENT_ENCODING}" />
<meta http-equiv="content-language" content="{S_USER_LANG}" />
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="resource-type" content="document" />
<meta name="distribution" content="global" />
<meta name="copyright" content="2000, 2002, 2005, 2007 phpBB Group" />
<meta name="keywords" content="" />
<meta name="description" content="" />
{META}
<title>{SITENAME} &bull; <!-- IF S_IN_MCP -->{L_MCP} &bull; <!-- ELSEIF S_IN_UCP -->{L_UCP} &bull; <!-- ENDIF -->{PAGE_TITLE}</title>

<link rel="stylesheet" href="{T_STYLESHEET_LINK}" type="text/css" />

<script type="text/javascript">
// <![CDATA[
<!-- IF S_USER_PM_POPUP -->
	if ({S_NEW_PM})
	{
		popup('{UA_POPUP_PM}', 400, 225, '_phpbbprivmsg');
	}
<!-- ENDIF -->

function popup(url, width, height, name)
{
	if (!name)
	{
		name = '_popup';
	}

	window.open(url.replace(/&/g, '&'), name, 'height=' + height + ',resizable=yes,scrollbars=yes,width=' + width);
	return false;
}

function jumpto()
{
	var page = prompt('{LA_JUMP_PAGE}:', '{ON_PAGE}');
	var perpage = '{PER_PAGE}';
	var base_url = '{A_BASE_URL}';

	if (page !== null && !isNaN(page) && page > 0)
	{
		document.location.href = base_url.replace(/&/g, '&') + '&start=' + ((page - 1) * perpage);
	}
}

/**
* Find a member
*/
function find_username(url)
{
	popup(url, 760, 570, '_usersearch');
	return false;
}

/**
* Mark/unmark checklist
* id = ID of parent container, name = name prefix, state = state [true/false]
*/
function marklist(id, name, state)
{
	var parent = document.getElementById(id);
	if (!parent)
	{
		eval('parent = document.' + id);
	}

	if (!parent)
	{
		return;
	}

	var rb = parent.getElementsByTagName('input');
	
	for (var r = 0; r < rb.length; r++)
	{
		if (rb[r].name.substr(0, name.length) == name)
		{
			rb[r].checked = state;
		}
	}
}

<!-- IF ._file -->

	/**
	* Play quicktime file by determining it's width/height
	* from the displayed rectangle area
	*
	* Only defined if there is a file block present.
	*/
	function play_qt_file(obj)
	{
		var rectangle = obj.GetRectangle();

		if (rectangle)
		{
			rectangle = rectangle.split(',')
			var x1 = parseInt(rectangle[0]);
			var x2 = parseInt(rectangle[2]);
			var y1 = parseInt(rectangle[1]);
			var y2 = parseInt(rectangle[3]);

			var width = (x1 < 0) ? (x1 * -1) + x2 : x2 - x1;
			var height = (y1 < 0) ? (y1 * -1) + y2 : y2 - y1;
		}
		else
		{
			var width = 200;
			var height = 0;
		}

		obj.width = width;
		obj.height = height + 16;

		obj.SetControllerVisible(true);

		obj.Play();
	}
<!-- ENDIF -->

// ]]>
</script>
</head>
<body class="{S_CONTENT_DIRECTION}">

<a name="top"></a>

<div id="wrapheader">

	<div id="logodesc">
		<table width="100%" cellspacing="0">
		<tr>
			<td><a href="{U_INDEX}">{SITE_LOGO_IMG}</a></td>
			<td width="100%" align="center"><h1>{SITENAME}</h1><span class="gen">{SITE_DESCRIPTION}</span></td>
		</tr>
		</table>
	</div>

	<div id="menubar">
		<table width="100%" cellspacing="0">
		<tr>
			<td class="genmed">
				<!-- IF not S_IS_BOT --><a href="{U_LOGIN_LOGOUT}"><img src="{T_THEME_PATH}/images/icon_mini_login.gif" width="12" height="13" alt="*" /> {L_LOGIN_LOGOUT}</a>&nbsp;<!-- ENDIF -->
				<!-- IF U_RESTORE_PERMISSIONS --> &nbsp;<a href="{U_RESTORE_PERMISSIONS}"><img src="{T_THEME_PATH}/images/icon_mini_login.gif" width="12" height="13" alt="*" /> {L_RESTORE_PERMISSIONS}</a><!-- ENDIF -->
				<!-- IF S_BOARD_DISABLED and S_USER_LOGGED_IN --> &nbsp;<span style="color: red;">{L_BOARD_DISABLED}</span><!-- ENDIF -->
				<!-- IF not S_IS_BOT -->
					<!-- IF S_USER_LOGGED_IN -->
						<!-- IF S_DISPLAY_PM --> &nbsp;<a href="{U_PRIVATEMSGS}"><img src="{T_THEME_PATH}/images/icon_mini_message.gif" width="12" height="13" alt="*" /> {PRIVATE_MESSAGE_INFO}<!-- IF PRIVATE_MESSAGE_INFO_UNREAD -->, {PRIVATE_MESSAGE_INFO_UNREAD}<!-- ENDIF --></a><!-- ENDIF -->
					<!-- ELSEIF S_REGISTER_ENABLED --> &nbsp;<a href="{U_REGISTER}"><img src="{T_THEME_PATH}/images/icon_mini_register.gif" width="12" height="13" alt="*" /> {L_REGISTER}</a>
					<!-- ENDIF -->
				<!-- ENDIF -->
			</td>
			<td class="genmed" align="{S_CONTENT_FLOW_END}">
				<a href="{U_CHAT}"><img src="{T_THEME_PATH}/images/icon_mini_members.gif" width="12" height="13" alt="*" /> {L_CHAT}</a>&nbsp;&nbsp;
                <a href="{U_FAQ}"><img src="{T_THEME_PATH}/images/icon_mini_faq.gif" width="12" height="13" alt="*" /> {L_FAQ}</a>
				<!-- IF S_DISPLAY_SEARCH -->&nbsp; &nbsp;<a href="{U_SEARCH}"><img src="{T_THEME_PATH}/images/icon_mini_search.gif" width="12" height="13" alt="*" /> {L_SEARCH}</a><!-- ENDIF -->
				<!-- IF not S_IS_BOT -->
					<!-- IF S_DISPLAY_MEMBERLIST -->&nbsp; &nbsp;<a href="{U_MEMBERLIST}"><img src="{T_THEME_PATH}/images/icon_mini_members.gif" width="12" height="13" alt="*" /> {L_MEMBERLIST}</a><!-- ENDIF -->
					<!-- IF S_USER_LOGGED_IN -->&nbsp; &nbsp;<a href="{U_PROFILE}"><img src="{T_THEME_PATH}/images/icon_mini_profile.gif" width="12" height="13" alt="*" /> {L_PROFILE}</a><!-- ENDIF -->
				<!-- ENDIF -->
			</td>
		</tr>
		</table>
	</div>

	<div id="datebar">
		<table width="100%" cellspacing="0">
		<tr>
			<td class="gensmall"><!-- IF S_USER_LOGGED_IN -->{LAST_VISIT_DATE}<!-- ENDIF --></td>
			<td class="gensmall" align="{S_CONTENT_FLOW_END}">{CURRENT_TIME}<br /></td>
		</tr>
		</table>
	</div>

</div>

<div id="wrapcentre">

	<!-- IF S_DISPLAY_SEARCH -->
	<p class="searchbar">
		<span style="float: {S_CONTENT_FLOW_BEGIN};"><a href="{U_SEARCH_UNANSWERED}">{L_SEARCH_UNANSWERED}</a> | <a href="{U_SEARCH_ACTIVE_TOPICS}">{L_SEARCH_ACTIVE_TOPICS}</a></span>
		<!-- IF S_USER_LOGGED_IN -->
		<span style="float: {S_CONTENT_FLOW_END};"><a href="{U_SEARCH_NEW}">{L_SEARCH_NEW}</a> | <a href="{U_SEARCH_SELF}">{L_SEARCH_SELF}</a></span>
		<!-- ENDIF -->
	</p>
	<!-- ENDIF -->

	<br style="clear: both;" />

	<!-- INCLUDE breadcrumbs.html -->

	<br />
my root index.php

Code: Select all

<?php
/**
*
* @package phpBB3
* @version $Id: index.php 8987 2008-10-09 14:17:02Z acydburn $
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
*/

/**
* @ignore
*/
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup('viewforum');
//-- mod : AJAX Chat ----------------------------------------------------
//-- add
include($phpbb_root_path . 'shout/shout.' . $phpEx);
//-- fin mod : AJAX Chat ------------------------------------------------

display_forums('', $config['load_moderators']);

// Set some stats, get posts count from forums data if we... hum... retrieve all forums data
$total_posts	= $config['num_posts'];
$total_topics	= $config['num_topics'];
$total_users	= $config['num_users'];

$l_total_user_s = ($total_users == 0) ? 'TOTAL_USERS_ZERO' : 'TOTAL_USERS_OTHER';
$l_total_post_s = ($total_posts == 0) ? 'TOTAL_POSTS_ZERO' : 'TOTAL_POSTS_OTHER';
$l_total_topic_s = ($total_topics == 0) ? 'TOTAL_TOPICS_ZERO' : 'TOTAL_TOPICS_OTHER';

// Grab group details for legend display
if ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel'))
{
	$sql = 'SELECT group_id, group_name, group_colour, group_type
		FROM ' . GROUPS_TABLE . '
		WHERE group_legend = 1
		ORDER BY group_name ASC';
}
else
{
	$sql = 'SELECT g.group_id, g.group_name, g.group_colour, g.group_type
		FROM ' . GROUPS_TABLE . ' g
		LEFT JOIN ' . USER_GROUP_TABLE . ' ug
			ON (
				g.group_id = ug.group_id
				AND ug.user_id = ' . $user->data['user_id'] . '
				AND ug.user_pending = 0
			)
		WHERE g.group_legend = 1
			AND (g.group_type <> ' . GROUP_HIDDEN . ' OR ug.user_id = ' . $user->data['user_id'] . ')
		ORDER BY g.group_name ASC';
}
$result = $db->sql_query($sql);

$legend = array();
while ($row = $db->sql_fetchrow($result))
{
	$colour_text = ($row['group_colour']) ? ' style="color:#' . $row['group_colour'] . '"' : '';
	$group_name = ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name'];

	if ($row['group_name'] == 'BOTS' || ($user->data['user_id'] != ANONYMOUS && !$auth->acl_get('u_viewprofile')))
	{
		$legend[] = '<span' . $colour_text . '>' . $group_name . '</span>';
	}
	else
	{
		$legend[] = '<a' . $colour_text . ' href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&g=' . $row['group_id']) . '">' . $group_name . '</a>';
	}
}
$db->sql_freeresult($result);

$legend = implode(', ', $legend);

// Generate birthday list if required ...
$birthday_list = '';
if ($config['load_birthdays'] && $config['allow_birthdays'])
{
	$now = getdate(time() + $user->timezone + $user->dst - date('Z'));
	$sql = 'SELECT user_id, username, user_colour, user_birthday
		FROM ' . USERS_TABLE . "
		WHERE user_birthday LIKE '" . $db->sql_escape(sprintf('%2d-%2d-', $now['mday'], $now['mon'])) . "%'
			AND user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')';
	$result = $db->sql_query($sql);

	while ($row = $db->sql_fetchrow($result))
	{
		$birthday_list .= (($birthday_list != '') ? ', ' : '') . get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']);

		if ($age = (int) substr($row['user_birthday'], -4))
		{
			$birthday_list .= ' (' . ($now['year'] - $age) . ')';
		}
	}
	$db->sql_freeresult($result);
}

// Assign index specific vars
$template->assign_vars(array(
	'TOTAL_POSTS'	=> sprintf($user->lang[$l_total_post_s], $total_posts),
	'TOTAL_TOPICS'	=> sprintf($user->lang[$l_total_topic_s], $total_topics),
	'TOTAL_USERS'	=> sprintf($user->lang[$l_total_user_s], $total_users),
	'NEWEST_USER'	=> sprintf($user->lang['NEWEST_USER'], get_username_string('full', $config['newest_user_id'], $config['newest_username'], $config['newest_user_colour'])),

	'LEGEND'		=> $legend,
	'BIRTHDAY_LIST'	=> $birthday_list,

	'FORUM_IMG'				=> $user->img('forum_read', 'NO_NEW_POSTS'),
	'FORUM_NEW_IMG'			=> $user->img('forum_unread', 'NEW_POSTS'),
	'FORUM_LOCKED_IMG'		=> $user->img('forum_read_locked', 'NO_NEW_POSTS_LOCKED'),
	'FORUM_NEW_LOCKED_IMG'	=> $user->img('forum_unread_locked', 'NO_NEW_POSTS_LOCKED'),

	'S_LOGIN_ACTION'			=> append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login'),
	'S_DISPLAY_BIRTHDAY_LIST'	=> ($config['load_birthdays']) ? true : false,

	'U_MARK_FORUMS'		=> ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}index.$phpEx", 'hash=' . generate_link_hash('global') . '&mark=forums') : '',
	'U_MCP'				=> ($auth->acl_get('m_') || $auth->acl_getf_global('m_')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&mode=front', true, $user->session_id) : '')
);

// Output page
page_header($user->lang['INDEX']);

$template->set_filenames(array(
	'body' => 'index_body.html')
);

page_footer();

?>
My class forum website http://www.12a4lhp.info

Again, if anyone can help, I will appreciate it.

Best regards,
soth2k
Registered User
Posts: 38
Joined: Fri Jul 27, 2007 6:04 pm

Re: [Beta] AJAX Chat/Shoutbox MOD 2.0.0 Beta 8

Post by soth2k »

flies wrote:According to question if reverse order is possible (newest on the bottom). Someone told it's not. Actually it is and it's very simple to accomplish:

in shout.php

Code: Select all

	default:
		$sql = 'SELECT * FROM ' . CHAT_TABLE . ' ORDER BY message_id DESC';
		$result = $db->sql_query_limit($sql, 25);
		$rows = $db->sql_fetchrowset($result);
        $ile = sizeof($rows);
        $rows = array_reverse($rows);

		foreach ($rows as $row)
		{
			if ($count++ == $ile)
in chat.php

Code: Select all

	default:
		$sql = 'SELECT * FROM ' . CHAT_TABLE . ' ORDER BY message_id ASC';
		$result = $db->sql_query_limit($sql, 25);
		$rows = $db->sql_fetchrowset($result);
        $ile = sizeof($rows);
        $rows = array_reverse($rows);
        
		foreach ($rows as $row)
		{
			if ($count++ == $ile)

Code: Select all

	case 'read':
		$sql = 'SELECT * FROM ' . CHAT_TABLE . " WHERE message_id > $last_id ORDER BY message_id DESC";
		$result = $db->sql_query_limit($sql, 25);
		$rows = $db->sql_fetchrowset($result);
        $ile = sizeof($rows);
        $rows = array_reverse($rows);

		if (!sizeof($rows) && ((time() - 60) < $last_time))
		{
			exit;
		}
		foreach ($rows as $row)
		{
			if ($count++ == $ile)

Code: Select all

		$sql = 'SELECT * FROM ' . CHAT_TABLE . " WHERE message_id > $last_id ORDER BY message_id DESC";
		$result = $db->sql_query_limit($sql, 25);
		$rows = $db->sql_fetchrowset($result);
                $ile = sizeof($rows);
        $rows = array_reverse($rows);

		if (!sizeof($rows) && ((time() - 60) < $last_time))
		{
			exit;
		}
		foreach ($rows as $row)
		{
			if ($count++ ==$ile)
Enjoy!
this is great news!!! thanks a lot master :D

edit: do you know how to change the default bar position? I mean when the board loads, the default position of the vertical bar is UP, so you can read the old lines instead of DOWN to read the latest lines...
cdnref
Registered User
Posts: 6
Joined: Wed Dec 31, 2008 1:57 pm

Re: [Beta] AJAX Chat/Shoutbox MOD 2.0.0 Beta 8

Post by cdnref »

Hey fellow bb3 coders.

Just wondering if there's a way to make every second post/shout a differernt color other than the dark grey (#1C1C1C) Aswell to make the "online" list a differant color. I think I may be in the wronge forum for this, maybe the styles forum should be a better place for it!

Here's a link to my website.
http://www.kill-on-sight.com/forum/index.php


Many thanks.
cdnref
Registered User
Posts: 6
Joined: Wed Dec 31, 2008 1:57 pm

Re: [Beta] AJAX Chat/Shoutbox MOD 2.0.0 Beta 8

Post by cdnref »

cdnref wrote:Hey fellow bb3 coders.

Just wondering if there's a way to make every second post/shout a differernt color other than the dark grey (#1C1C1C) Aswell to make the "online" list a differant color. I think I may be in the wronge forum for this, maybe the styles forum should be a better place for it!

Here's a link to my website.
http://www.kill-on-sight.com/forum/index.php


Many thanks.
Found my answer while looking for another tweak to the colors.

In case anyone else wants to differentiat their post.

.bg3 will change the bg in the ucp. And by offsetting the colors of bg1 and bg2 you can add more of a differance to posts and in my case the AJAX shout/chat. Works like a charm.

stylesheet.css may be found in commom.css I believe.

Code: Select all

.bg1   {   background-color: #212121; }
.bg2   {   background-color: #1c1c1c; }
.bg3   {   background-color: #101010; }
micsta
Registered User
Posts: 126
Joined: Tue Apr 22, 2008 11:11 am

Re: [Beta] AJAX Chat/Shoutbox MOD 2.0.0 Beta 8

Post by micsta »

I have installed this mod, but have a couple of problems. If anyone can help, it would be greatly appreciated.

I'm using Subsilver2.

1) When I click the "Chat" link in the up next to "FAQ" "MEMBERS" etc, it just reloads the index.php again. But if I manually type http://www.mysite/chat.php it takes me to the chat box and everything works great... I did read a post in this thread about it, but for the life of me I can't find it.
It's weird when on mysite/index.php the "Chat" link loads index.php, but when at mysite/chat.php if I hover over the "Chat" link it loads chat.php :shock:

2) The shoutbox on the index page is not functional and is not displaying the language code correctly. This is what it looks like.

http://img231.imageshack.us/img231/797/chatmodjo1.jpg

I followed the install instructions to the letter (double checked - it is a fairly straight forward MOD), but can not sort out the problems...

Any tips/advice? :oops:

Thanks...
justhk
Registered User
Posts: 163
Joined: Mon Aug 22, 2005 10:47 am
Location: [X]TON3
Contact:

Re: [Beta] AJAX Chat/Shoutbox MOD 2.0.0 Beta 8

Post by justhk »

ok i've changed the Template of my phpbb 3.0.1 so what should i do now Ajaz chat box dosent appear in my new template how many files do i have to edit again ? please i need quick help!
==============================
http://www.xton3.com
==============================
dovla31
Registered User
Posts: 4
Joined: Fri Jan 02, 2009 12:55 am

Re: [Beta] AJAX Chat/Shoutbox MOD 2.0.0 Beta 8

Post by dovla31 »

zagor256 wrote:I tried this mod and I found that I have problems on my board with some characters.

č, Đ, đ, Đ and also Ł

When I enter shout that have these characters, nothing shows.

So I cannot use shoutbox normally because of this :(

Anyone knows where coud be the problem?

Thanx
Solution:
1. Go to PhpMyAdmin and your DataBase
2. Find Table phpbb3_chat (or phpbb_chat), click :)
3. Field message change from latin1_swedish_ci to utf8_bin
4. LogOff and letters š,đ,ž,ć,č now will be in chat box :)
jimcarrel
Registered User
Posts: 671
Joined: Fri Jul 27, 2007 10:49 pm
Location: Oklahoma City, Oklahoma

Re: [Beta] AJAX Chat/Shoutbox MOD 2.0.0 Beta 8

Post by jimcarrel »

justhk wrote:ok i've changed the Template of my phpbb 3.0.1 so what should i do now Ajaz chat box dosent appear in my new template how many files do i have to edit again ? please i need quick help!
Any time you add a new style, all mods have to be added to it. Sooo,, you do all the template edits in the install directions. all common edits, like /includes, /language, etc don't have to be done for every style that is added. But the .html file edits do have to be done.
Grace--Getting what I don't deserve
Mercy--Not getting what I do deserve
zagor256
Registered User
Posts: 60
Joined: Sun Aug 03, 2008 2:04 pm
Contact:

Re: [Beta] AJAX Chat/Shoutbox MOD 2.0.0 Beta 8

Post by zagor256 »

Solution:
1. Go to PhpMyAdmin and your DataBase
2. Find Table phpbb3_chat (or phpbb_chat), click :)
3. Field message change from latin1_swedish_ci to utf8_bin
4. LogOff and letters š,đ,ž,ć,č now will be in chat box :)
Thanx dovla31. That really solved a problem:)
User avatar
jtryptophan
Registered User
Posts: 299
Joined: Wed Apr 09, 2008 5:38 pm
Location: Baltimore, MD
Contact:

Re: [Beta] AJAX Chat/Shoutbox MOD 2.0.0 Beta 8

Post by jtryptophan »

Hi -

So, my server keeps crashing, could this be part of it?

From SQL table:

Code: Select all

phpbb_chat   	Browse  	  Structure  	Search  	  Insert  	Empty  	  Drop  	945,688  	MyISAM  	utf8_bin  	96.5 MiB  


I have very limited SQL knowledge. Should I be purging this table? If so, how often and how to do it.

Thanks.
Locked

Return to “[3.0.x] Abandoned MODs”