[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.
Locked
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 »

I don't think it's right what's in the file... :S

Or I don;t get it.

Code: Select all

<!-- IF S_GET_CHAT -->
	<!-- IF S_READ or S_ADD -->
		<!-- BEGIN chatrow -->
			<div id="p{chatrow.MESSAGE_ID}" class="post bg{chatrow.CLASS}">
				<div class="inner"><span class="corners-top"><span></span></span>
					<div class="postbody">
						<p class="author">{chatrow.TIME} </p>
						
						<div class="content">{chatrow.MESSAGE}</div>
					</div>
					<dl class="postprofile" id="profile{postrow.POST_ID}">
						<dt>{chatrow.USERNAME_FULL}</dt>
					</dl>
						<!-- IF U_ACP or U_MCP -->
							<ul class="profile-icons postprofile">
								<li class="delete-icon">
									<a href="javascript:void({chatrow.MESSAGE_ID})" title="{L_DELETE_POST}" onclick="delete_post('{chatrow.MESSAGE_ID}')"><span>{L_DELETE_POST}</span></a>
								</li>
							</ul>
						<!-- ENDIF -->
					<span class="corners-bottom"><span></span></span>
				</div>
			</div>
		<!-- END chatrow -->---{LAST_ID}
		<!-- IF S_WHOISONLINE -->---
			<!-- BEGIN whoisrow -->
				<div>
					<div class="inner">
						<div class="user"><img src="{T_IMAGESET_PATH}/{whoisrow.USER_STATUS}.png" class="online_img" /> : {whoisrow.USERNAME_FULL}</div>
					</div>
				</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">
	<!--
		#act_indicator {
			visibility:hidden;
		}
		.shouts {
			width: 85%;
			height:300px;
			overflow:auto;
			float:left;
		}
		#chat {
			width: 100%;
			text-align:left;
		}
		.postprofile {
			min-height: 5px !important;
		}
		.chatform {
			width: 90%;
			text-align:center;
		}
		.onlinelist {
			width: 15%;
			overflow:auto;
			height:300px;
		}
		.users {
			width: 90%;
			text-align: left;
			text-indent: 5px;
			margin-left:auto;
			margin-right:auto;
		}
		.user {
			width: 95%;
			font-size: 1.1em;
			font-family:Verdana, Arial, Helvetica, sans-serif;
			line-height: 1.4em;
		}
		#act_indicator {
			visibility: hidden;
		}
		.chatinput {width: 80% !important;}
		.online_img {
			vertical-align:middle;
		}
	-->
	</style>
	<!-- IF S_USER_LOGGED_IN -->
		<div class="forabg">
			<div class="inner">
				<span class="corners-top"><span></span></span>
				<div class="chatform" align="center">			
					<form name="text" id="text" method="post" action="javascript:void(0);" onsubmit="handle_send('add', this)" autocomplete="off">
						<strong style="color: white;">{L_MESSAGE}:</strong> <input type="text" tabindex="1" name="message" id="message" class="inputbox chatinput" />
						<input type="submit" class="button1" value="{L_SUBMIT}" name="submit" tabindex="6" accesskey="s"/><br />
					</form>
				</div>
				<span class="corners-bottom"><span></span></span>
			</div>
		</div>
	<!-- ENDIF -->
	<div class="forabg" align="left">
		<div class="inner">
			<span class="corners-top"><span></span></span>
			<div class="shouts">
				<div id="chat">
					<!-- BEGIN chatrow -->
						<div id="p{chatrow.MESSAGE_ID}" class="post bg{chatrow.CLASS}">
							<div class="inner"><span class="corners-top"><span></span></span>
								<div class="postbody">
									<p class="author">{chatrow.TIME} </p>
									
									<div class="content">{chatrow.MESSAGE}</div>
								</div>
								<dl class="postprofile" id="profile{postrow.POST_ID}">
									<dt>{chatrow.USERNAME_FULL}</dt>
								</dl>
									<!-- IF U_ACP or U_MCP -->
										<ul class="profile-icons postprofile">
											<li class="delete-icon">
												<a href="javascript:void({chatrow.MESSAGE_ID})" title="{L_DELETE_POST}" onclick="delete_post('{chatrow.MESSAGE_ID}')"><span>{L_DELETE_POST}</span></a>
											</li>
										</ul>
									<!-- ENDIF -->
								<span class="corners-bottom"><span></span></span>
							</div>
						</div>
					<!-- END chatrow -->
				</div>
			</div>
			<div class="onlinelist bg1">
				<div class="users" id="whois_online">
					<!-- BEGIN whoisrow -->
						<div>
							<div class="inner">
								<div class="user"><img src="{T_IMAGESET_PATH}/{whoisrow.USER_STATUS}.png" class="online_img" /> {whoisrow.USERNAME_FULL}</div>
							</div>
						</div>
					<!-- END whoisrow -->
				</div>
			</div>
			<span class="corners-bottom"><span></span></span>
		</div>
	</div>
	<div class="forabg" align="center">
		<div class="inner">
			<span class="corners-top"><span></span></span>
			<div class="post">
				<div id="author">{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>
				</div>
			</div>
			<span class="corners-bottom"><span></span></span>
		</div>
	</div>
	<!-- IF S_CHAT -->
		<!-- INCLUDE overall_footer.html -->
	<!-- ENDIF -->
<!-- ENDIF -->
eleni25
Registered User
Posts: 198
Joined: Wed Apr 26, 2006 10:30 am

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

Post by eleni25 »

i have this problem:

Image

the first page it's not show up/
User avatar
zkaraca
Registered User
Posts: 139
Joined: Wed Jan 30, 2008 7:52 pm

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

Post by zkaraca »

@Deathly Hallow
Try this code. It will fix the IE problem with online list i think.

Code: Select all

    <!-- IF S_GET_CHAT -->
       <!-- IF S_READ or S_ADD -->
          <!-- BEGIN chatrow -->
             <div id="p{chatrow.MESSAGE_ID}" class="post bg{chatrow.CLASS}">
                <div class="inner"><span class="corners-top"><span></span></span>
                   <div class="postbody">
                      <p class="author">{chatrow.TIME} </p>
                      
                      <div class="content">{chatrow.MESSAGE}</div>
                   </div>
                   <dl class="postprofile" id="profile{postrow.POST_ID}">
                      <dt>{chatrow.USERNAME_FULL}</dt>
                   </dl>
                      <!-- IF U_ACP or U_MCP -->
                         <ul class="profile-icons postprofile">
                            <li class="delete-icon">
                               <a href="javascript:void({chatrow.MESSAGE_ID})" title="{L_DELETE_POST}" onclick="delete_post('{chatrow.MESSAGE_ID}')"><span>{L_DELETE_POST}</span></a>
                            </li>
                         </ul>
                      <!-- ENDIF -->
                   <span class="corners-bottom"><span></span></span>
                </div>
             </div>
          <!-- END chatrow -->---{LAST_ID}
          <!-- IF S_WHOISONLINE -->---
             <!-- BEGIN whoisrow -->
                <div>
                   <div class="inner">
                      <div class="user"><img src="{T_IMAGESET_PATH}/{whoisrow.USER_STATUS}.png" class="online_img" /> : {whoisrow.USERNAME_FULL}</div>
                   </div>
                </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">
       <!--
          #act_indicator {
             visibility:hidden;
          }
          .shouts {
             width: 84%;
             height:300px;
             overflow:auto;
             float:left;
          }
          #chat {
             width: 100%;
             text-align:left;
          }
          .postprofile {
             min-height: 5px !important;
          }
          .chatform {
             width: 90%;
             text-align:center;
          }
          .onlinelist {
             width: 15%;
             overflow:auto;
             height:300px;
          }
          .users {
             width: 90%;
             text-align: left;
             text-indent: 5px;
             margin-left:auto;
             margin-right:auto;
          }
          .user {
             width: 95%;
             font-size: 1.1em;
             font-family:Verdana, Arial, Helvetica, sans-serif;
             line-height: 1.4em;
          }
          #act_indicator {
             visibility: hidden;
          }
          .chatinput {width: 80% !important;}
          .online_img {
             vertical-align:middle;
          }
       -->
       </style>
       <!-- IF S_USER_LOGGED_IN -->
          <div class="forabg">
             <div class="inner">
                <span class="corners-top"><span></span></span>
                <div class="chatform" align="center">         
                   <form name="text" id="text" method="post" action="javascript:void(0);" onsubmit="handle_send('add', this)" autocomplete="off">
                      <strong style="color: white;">{L_MESSAGE}:</strong> <input type="text" tabindex="1" name="message" id="message" class="inputbox chatinput" />
                      <input type="submit" class="button1" value="{L_SUBMIT}" name="submit" tabindex="6" accesskey="s"/><br />
                   </form>
                </div>
                <span class="corners-bottom"><span></span></span>
             </div>
          </div>
       <!-- ENDIF -->
       <div class="forabg" align="left">
          <div class="inner">
             <span class="corners-top"><span></span></span>
             <div class="shouts">
                <div id="chat">
                   <!-- BEGIN chatrow -->
                      <div id="p{chatrow.MESSAGE_ID}" class="post bg{chatrow.CLASS}">
                         <div class="inner"><span class="corners-top"><span></span></span>
                            <div class="postbody">
                               <p class="author">{chatrow.TIME} </p>
                               
                               <div class="content">{chatrow.MESSAGE}</div>
                            </div>
                            <dl class="postprofile" id="profile{postrow.POST_ID}">
                               <dt>{chatrow.USERNAME_FULL}</dt>
                            </dl>
                               <!-- IF U_ACP or U_MCP -->
                                  <ul class="profile-icons postprofile">
                                     <li class="delete-icon">
                                        <a href="javascript:void({chatrow.MESSAGE_ID})" title="{L_DELETE_POST}" onclick="delete_post('{chatrow.MESSAGE_ID}')"><span>{L_DELETE_POST}</span></a>
                                     </li>
                                  </ul>
                               <!-- ENDIF -->
                            <span class="corners-bottom"><span></span></span>
                         </div>
                      </div>
                   <!-- END chatrow -->
                </div>
             </div>
             <div class="onlinelist bg1">
                <div class="users" id="whois_online">
                   <!-- BEGIN whoisrow -->
                      <div>
                         <div class="inner">
                            <div class="user"><img src="{T_IMAGESET_PATH}/{whoisrow.USER_STATUS}.png" class="online_img" /> {whoisrow.USERNAME_FULL}</div>
                         </div>
                      </div>
                   <!-- END whoisrow -->
                </div>
             </div>
             <span class="corners-bottom"><span></span></span>
          </div>
       </div>
       <div class="forabg" align="center">
          <div class="inner">
             <span class="corners-top"><span></span></span>
             <div class="post">
                <div id="author">{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>
                </div>
             </div>
             <span class="corners-bottom"><span></span></span>
          </div>
       </div>
       <!-- IF S_CHAT -->
          <!-- INCLUDE overall_footer.html -->
       <!-- ENDIF -->
    <!-- ENDIF -->
Asira.nl * Zeki.nl Just having some fun!
User avatar
KeithR
Former Team Member
Posts: 750
Joined: Mon Jun 16, 2008 6:59 pm
Location: Manchester, UK
Name: Keith R

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

Post by KeithR »

eleni25 wrote:i have this problem:

Image

the first page it's not show up/
That screenshot doesn't look anything like this MOD :?
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 »

zkaraca wrote:@Deathly Hallow
Try this code. It will fix the IE problem with online list i think.

Code: Select all

    <!-- IF S_GET_CHAT -->
       <!-- IF S_READ or S_ADD -->
          <!-- BEGIN chatrow -->
             <div id="p{chatrow.MESSAGE_ID}" class="post bg{chatrow.CLASS}">
                <div class="inner"><span class="corners-top"><span></span></span>
                   <div class="postbody">
                      <p class="author">{chatrow.TIME} </p>
                      
                      <div class="content">{chatrow.MESSAGE}</div>
                   </div>
                   <dl class="postprofile" id="profile{postrow.POST_ID}">
                      <dt>{chatrow.USERNAME_FULL}</dt>
                   </dl>
                      <!-- IF U_ACP or U_MCP -->
                         <ul class="profile-icons postprofile">
                            <li class="delete-icon">
                               <a href="javascript:void({chatrow.MESSAGE_ID})" title="{L_DELETE_POST}" onclick="delete_post('{chatrow.MESSAGE_ID}')"><span>{L_DELETE_POST}</span></a>
                            </li>
                         </ul>
                      <!-- ENDIF -->
                   <span class="corners-bottom"><span></span></span>
                </div>
             </div>
          <!-- END chatrow -->---{LAST_ID}
          <!-- IF S_WHOISONLINE -->---
             <!-- BEGIN whoisrow -->
                <div>
                   <div class="inner">
                      <div class="user"><img src="{T_IMAGESET_PATH}/{whoisrow.USER_STATUS}.png" class="online_img" /> : {whoisrow.USERNAME_FULL}</div>
                   </div>
                </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">
       <!--
          #act_indicator {
             visibility:hidden;
          }
          .shouts {
             width: 84%;
             height:300px;
             overflow:auto;
             float:left;
          }
          #chat {
             width: 100%;
             text-align:left;
          }
          .postprofile {
             min-height: 5px !important;
          }
          .chatform {
             width: 90%;
             text-align:center;
          }
          .onlinelist {
             width: 15%;
             overflow:auto;
             height:300px;
          }
          .users {
             width: 90%;
             text-align: left;
             text-indent: 5px;
             margin-left:auto;
             margin-right:auto;
          }
          .user {
             width: 95%;
             font-size: 1.1em;
             font-family:Verdana, Arial, Helvetica, sans-serif;
             line-height: 1.4em;
          }
          #act_indicator {
             visibility: hidden;
          }
          .chatinput {width: 80% !important;}
          .online_img {
             vertical-align:middle;
          }
       -->
       </style>
       <!-- IF S_USER_LOGGED_IN -->
          <div class="forabg">
             <div class="inner">
                <span class="corners-top"><span></span></span>
                <div class="chatform" align="center">         
                   <form name="text" id="text" method="post" action="javascript:void(0);" onsubmit="handle_send('add', this)" autocomplete="off">
                      <strong style="color: white;">{L_MESSAGE}:</strong> <input type="text" tabindex="1" name="message" id="message" class="inputbox chatinput" />
                      <input type="submit" class="button1" value="{L_SUBMIT}" name="submit" tabindex="6" accesskey="s"/><br />
                   </form>
                </div>
                <span class="corners-bottom"><span></span></span>
             </div>
          </div>
       <!-- ENDIF -->
       <div class="forabg" align="left">
          <div class="inner">
             <span class="corners-top"><span></span></span>
             <div class="shouts">
                <div id="chat">
                   <!-- BEGIN chatrow -->
                      <div id="p{chatrow.MESSAGE_ID}" class="post bg{chatrow.CLASS}">
                         <div class="inner"><span class="corners-top"><span></span></span>
                            <div class="postbody">
                               <p class="author">{chatrow.TIME} </p>
                               
                               <div class="content">{chatrow.MESSAGE}</div>
                            </div>
                            <dl class="postprofile" id="profile{postrow.POST_ID}">
                               <dt>{chatrow.USERNAME_FULL}</dt>
                            </dl>
                               <!-- IF U_ACP or U_MCP -->
                                  <ul class="profile-icons postprofile">
                                     <li class="delete-icon">
                                        <a href="javascript:void({chatrow.MESSAGE_ID})" title="{L_DELETE_POST}" onclick="delete_post('{chatrow.MESSAGE_ID}')"><span>{L_DELETE_POST}</span></a>
                                     </li>
                                  </ul>
                               <!-- ENDIF -->
                            <span class="corners-bottom"><span></span></span>
                         </div>
                      </div>
                   <!-- END chatrow -->
                </div>
             </div>
             <div class="onlinelist bg1">
                <div class="users" id="whois_online">
                   <!-- BEGIN whoisrow -->
                      <div>
                         <div class="inner">
                            <div class="user"><img src="{T_IMAGESET_PATH}/{whoisrow.USER_STATUS}.png" class="online_img" /> {whoisrow.USERNAME_FULL}</div>
                         </div>
                      </div>
                   <!-- END whoisrow -->
                </div>
             </div>
             <span class="corners-bottom"><span></span></span>
          </div>
       </div>
       <div class="forabg" align="center">
          <div class="inner">
             <span class="corners-top"><span></span></span>
             <div class="post">
                <div id="author">{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>
                </div>
             </div>
             <span class="corners-bottom"><span></span></span>
          </div>
       </div>
       <!-- IF S_CHAT -->
          <!-- INCLUDE overall_footer.html -->
       <!-- ENDIF -->
    <!-- ENDIF -->

Yeah, thanks, it's solved!!!

Does anyone know if it is possible to add one or more buttons for bbcodes, and eventually emoticons, it make it a bit easier...
User avatar
Handyman`
Former Team Member
Posts: 1751
Joined: Thu Feb 03, 2005 8:44 pm
Contact:

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

Post by Handyman` »

eleni25 wrote:i have this problem:

Image

the first page it's not show up/
that screenshot is not from this chatbox.
Please ask for support in the topic you downloaded that chatbox from.
http://startrekguide.com My Mod Queue || 1/16/10 Display Posts Anywhere 1.2.0 RC5, Cash MOD 1.0.0 b1, MOD Version Check, AJAX Chat, SEO MOD, AJAX QR, Photo Gallery
MOD Development Manager (version 0.2.0-dev with MODX Generator)
eleni25
Registered User
Posts: 198
Joined: Wed Apr 26, 2006 10:30 am

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

Post by eleni25 »

oh sorry. I confuse the topics. i don't speak very good english.
eleni25
Registered User
Posts: 198
Joined: Wed Apr 26, 2006 10:30 am

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

Post by eleni25 »

ok i install this mod. Very nice. it's possible i have history? Page1 page 2, etc ?
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 »

eleni25 wrote:ok i install this mod. Very nice. it's possible i have history? Page1 page 2, etc ?
you mean to get a log of everything?

I hope the same.
User avatar
KeithR
Former Team Member
Posts: 750
Joined: Mon Jun 16, 2008 6:59 pm
Location: Manchester, UK
Name: Keith R

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

Post by KeithR »

eleni25 wrote:ok i install this mod. Very nice. it's possible i have history? Page1 page 2, etc ?
For that you would need a shoutbox and not this chatbox. If you read through this support topic you may find a way of increasing the number of shouts shown. :)
rapid2008
Registered User
Posts: 151
Joined: Sat Aug 02, 2008 9:35 am

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

Post by rapid2008 »

Hi handyman i need please
i have insalled ajaz chat but the problem is its working on my porsilver but i cant make it work on supsilver 2
and am using x-tream style please can you help me thanks
hayzie
Registered User
Posts: 1
Joined: Fri Aug 08, 2008 2:32 am

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

Post by hayzie »

I've got a problem with global mods and deleting shouts,

The problem is that when someone shouts and it get automatic refreshed a global mod can't see the delete button (not even a X or anything) so they can't delete the shout.

What they need to do is refresh the whole page and then they can see the delete button on the old shouts.
Also they can't see the delete button at all when they are in the "chat only" section.

I removed the <!-- IF U_ACP or U_MCP --> (first one) and it allows global mods and everyone to view the delete button on the live shouts so its very strange :S?


here is my chat_body:

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_PATH}/icon_post_delete.gif" />
								</a> 
								<!-- ENDIF -->
								 <b>[</b>{chatrow.TIME}<b>]</b> <b class="postauthor">{chatrow.USERNAME_FULL}</b>: <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: 100%;
			margin-left: auto;
			margin-right: auto;
		}
		.shouts {
			width: 100%;
			height:200px;
			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_PATH}/icon_post_delete.gif" />
													</a> 
												<!-- ENDIF -->
												 <b>[</b>{chatrow.TIME}<b>]</b> <b class="postauthor">{chatrow.USERNAME_FULL}</b>: <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}			
				</td>
			</tr>
		</table>
	</div>
	<!-- IF S_CHAT -->
		<!-- INCLUDE overall_footer.html -->
	<!-- ENDIF -->
<!-- ENDIF -->
Thanks for any help.
User avatar
santhosh11421
Registered User
Posts: 47
Joined: Tue Jul 29, 2008 4:42 pm
Location: www.labodibo.co.cc
Contact:

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

Post by santhosh11421 »

santhosh11421 wrote:hieeee

i hv installed ajaxchat to my board ...
when guest visits my board they can see the chatbox and messeges in it ..

how can i keep the messege like " you must login to chat " whenever the guests visits our site ...

and one more doubt : is there any mods in ajax chat to do personal chat in between the members just like yahoo

again doubt ;) am the admin for my board when i login to board by setting inivisible am not getting my id on whos is online , but am getting "online" in chatbox how to invisible for the chat box ???

and am using aeroblue template , see this http://biomasti.exofire.net

i hv gone through the all the foums for my board and searched also am not getting solution any where if it is , plzzzz reply me that link

thanQuu byeeeeeeee
Helllooooooooooo Reply anybody for this problem plzzzzzzzz ......
Image
Mysteron71
Registered User
Posts: 83
Joined: Thu Dec 15, 2005 12:01 am

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

Post by Mysteron71 »

Hi, I know so many questions are asked in here but I have basically run out of possibilities and left with no option but to post! I tried to find the solution over at STG reading well over 100 of the 282 page thread before I decided to come here and read all 78 pages and my problem differs slightly to a few others,

I have installed the mod to my forum and it works great from the chat.php side of things with no errors whatsoever ... the problem is with the shoutbox on the index page doesn't have the bbcode buttons or the refresh symbol or the ability to submit a message whilst the chat.php has the bbcode buttons and refresh and ability to submit messages? If I post in the chat it shows up on the shoutbox on the index page but with no way to reply to it without going back to the chat section as when i click submit or just press enter to submit the message on the index it does nothing at all apart from highlight the border of the submit button :D

Also the problem mentioned by a member a few pages back regarding his forum showing within the shoutbox is similar to mine as my smilies box on the index page opens a pop up box with a link to my forum index, yet in the chat.php side I click the smilies box and I get the smilies? I did have the header image problem also but followed the instructions to fix that .. Thanks

I have scoured for the last 3 days since installing this mod and tried all the chat_body.html files available and attempted all the fixes I could think were similar to my own .. but to no avail, the forum index shoutbox has become a headache for me and it's the main reason I installed it :mrgreen: I previously had Pauls shoutbox mod on my forum for a good 1 year but my members were always complaining about the frequent java errors and convinced me to look for another shoutbox and this looked like a great layout and it is 8-)

I just need to figure out what is stopping the shoutbox from being usable on the index and they should be happy I hope ;) I removed all the files associated with Pauls shoutbox manually and found no problems.
This mod I have installed and reinstalled 3 times now but cannot get it to work as others have .. The forum is well modded with everything running well and most of the mods are on the AEROBLUE template and it is the forum default template as I don't want to edit all the templates, AEROBLUE is Subsilver based for quick reference.

I hope there is a simple fix for this as it's the ideal shoutbox for us, If the worst comes to the worst I will just take it off the index and keep the chat.php section and hunt for another seperate shoutbox.
Thanks in advance for any help and apologies for the lengthy post
Regards
Ron.
megalomania
Registered User
Posts: 36
Joined: Fri Aug 15, 2008 5:52 pm

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

Post by megalomania »

Nvm.
Last edited by megalomania on Thu Sep 18, 2008 1:46 pm, edited 1 time in total.
Locked

Return to “[3.0.x] Abandoned MODs”