AJAX Chat 2.0 Beta bbcodes and smilies

Misc MOD Downloads for phpBB3 -- Any MOD that does not fit into any other category
Forum rules
Image Please feel free to download any MOD's here, support for each MOD is located it's own thread.

To post your own MOD, please first read the MOD Guidelines

AJAX Chat 2.0 Beta bbcodes and smilies

Postby clight77 » 28 Aug 2008, 20:10

Here is mine for ProSilver.

You will have to sustitute your own image for delete.......

Spoiler:
<!-- 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">

<div class="content">{chatrow.MESSAGE}</div>
</div>
<dl class="postprofile" id="profile{postrow.POST_ID}">
<p class="author">&nbsp;{chatrow.USERNAME_FULL}&nbsp;-&nbsp;{chatrow.TIME} </p>

</dl>

<!-- IF U_ACP or U_MCP -->

<a href="javascript:delete_post('{chatrow.MESSAGE_ID}')" title="{L_DELETE_POST}"><input type="image" src="http://www.101uses.com/images/mine/delete2.gif"></a>

<!-- 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">
// <![CDATA[
var form_name = 'postform';
var text_name = 'message';
// ]]>
<!--
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.postform.message.value != '')
{
type = 'send';
for(var i = 0; i < f.elements.length; i++)
{
elem = f.elements[i];
param += '&' + elem.name + '=' + encodeURIComponent(elem.value);
}
document.postform.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.';
}
}
function addText(instext)
{
var mess = document.getElementById('message');
//IE support
if (document.selection)
{
mess.focus();
sel = document.selection.createRange();
sel.text = instext;
document.message.focus();
}
//MOZILLA/NETSCAPE support
else if (mess.selectionStart || mess.selectionStart == "0")
{
var startPos = mess.selectionStart;
var endPos = mess.selectionEnd;
var chaine = mess.value;
mess.value = chaine.substring(0, startPos) + instext + chaine.substring(endPos, chaine.length);
mess.selectionStart = startPos + instext.length;
mess.selectionEnd = endPos + instext.length;
mess.focus();
}
else
{
mess.value += instext;
mess.focus();
}
}
-->
</script>
<style type="text/css">
<!--
#act_indicator {
visibility:hidden;
}
.shouts {
width: 85%;
height:200px;
overflow:auto;
float:left;
}
#chat {
width: 100%;
text-align:left;
}
#chat * {
margin:0px;
padding:0px;
min-height:0px;


}
.postprofile {
min-height: 5px !important;
}
.chatform {
width: 90%;
text-align:center;
}
.onlinelist {
width: 14.5%;
overflow:auto;
height:200px;
}
.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:right;
}
-->
</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>
<!-- INCLUDE posting_buttons.html -->
</form>

<!-- IF S_SMILIES_ALLOWED and .smiley -->
<!-- BEGIN smiley -->
<a href="#" onclick="insert_text('{smiley.A_SMILEY_CODE}', true); return false;"><img src="{smiley.SMILEY_IMG}" width="{smiley.SMILEY_WIDTH}" height="{smiley.SMILEY_HEIGHT}" alt="{smiley.SMILEY_CODE}" title="{smiley.SMILEY_DESC}" /></a>
<!-- END smiley -->
<!-- ENDIF -->

<form name="postform" id="postform" method="post" action="javascript:void(0);" onsubmit="handle_send('add', this)" autocomplete="off">
<strong style="color: white;">{L_MESSAGE}:<!--*Feel free to join the chat.*--></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 />
</div>
<span class="corners-bottom"><span></span></span>
</div>
</div>
</form>
<!-- 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">
<div class="content">{chatrow.MESSAGE}</div>
</div>
<dl class="postprofile" id="profile{postrow.POST_ID}">
<p class="author">&nbsp;{chatrow.USERNAME_FULL}&nbsp;-&nbsp;{chatrow.TIME} </p>
</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}')"></a>
</li>
</ul>-->
<a href="javascript:delete_post('{chatrow.MESSAGE_ID}')" title="{L_DELETE_POST}"><input type="image" src="http://www.101uses.com/images/mine/delete2.gif"></a>

<!-- 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>-->
<br />
<!-- IF S_CHAT -->
<!-- INCLUDE overall_footer.html -->
<!-- ENDIF -->
<!-- ENDIF -->
Attachments
orange smiles dark BG.zip
I used this smiles for Prodark to eliminate pixelation.
(19.71 KiB) Downloaded 868 times
shout.rar
Index: shout.php
(2.21 KiB) Downloaded 1068 times
chat.rar
Index: chat.php
(3.08 KiB) Downloaded 1188 times
ProSilver.jpg
ProSilver
posting_buttons.rar
Posting buttons
(1.43 KiB) Downloaded 1028 times
clight77
Supporter
Supporter
 
Posts: 66
Joined: 06 Jul 2007, 21:40
Gender: Male


Re: AJAX Chat 2.0 Beta bbcodes and smilies

Postby terryzx » 01 Sep 2008, 17:23

My box will not use colored type or bold or italics etc

Is that normal?

When I try to add any it accepts it but nothing appears at all

Also my base install shows no BBcode bar
terryzx    
Supporter
Supporter
 
Posts: 164
Joined: 09 Aug 2008, 21:26
Gender: Male
phpBB Knowledge: 4

Re: AJAX Chat 2.0 Beta bbcodes and smilies

Postby clight77 » 15 Sep 2008, 13:47

terryzx wrote:My box will not use colored type or bold or italics etc

Is that normal?

When I try to add any it accepts it but nothing appears at all

Also my base install shows no BBcode bar


Is this in chat_body.html

<form>
<!-- INCLUDE posting_buttons.html -->
</form>

Not like this
<!-- INCLUDE posting_buttons.html -->
clight77
Supporter
Supporter
 
Posts: 66
Joined: 06 Jul 2007, 21:40
Gender: Male

Re: AJAX Chat 2.0 Beta bbcodes and smilies

Postby terryzx » 23 Sep 2008, 14:47

Thanx

Sorry for the late reply as I was not subscribed for some reason :hello:


Even after adding :

<form>
<!-- INCLUDE posting_buttons.html -->
</form>


The entire line just disappears when I click to post it

I did find a chat_posting_buttons.html and have added that also but the BBcode still doses not work right
terryzx    
Supporter
Supporter
 
Posts: 164
Joined: 09 Aug 2008, 21:26
Gender: Male
phpBB Knowledge: 4

Re: AJAX Chat 2.0 Beta bbcodes and smilies

Postby Sniper_E » 23 Sep 2008, 16:07

So, you added it like:

<form>
<!-- INCLUDE chat_posting_buttons.html -->
</form>

?
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
User avatar
Sniper_E    
STG Jedi Master
STG Jedi Master
 
Posts: 7009
Joined: 31 May 2006, 06:29
Location: Shreveport, LA
Favorite Team: The STG Team
Gender: Male
phpBB Knowledge: 6

Re: AJAX Chat 2.0 Beta bbcodes and smilies

Postby terryzx » 23 Sep 2008, 17:30

Yes, I tried adding near the top and when that didn?t work, then at the bottom and any text that was added in code brackets just disappeared when clicked
terryzx    
Supporter
Supporter
 
Posts: 164
Joined: 09 Aug 2008, 21:26
Gender: Male
phpBB Knowledge: 4

Re: AJAX Chat 2.0 Beta bbcodes and smilies

Postby Pietje15 » 10 Oct 2008, 08:55

Hello,

Now I can use BBCode, but when I push a BBCode button like BOLD, the code doesn't appear, but when i type something and select the text and then push a button is does work. So if i just type the code it works, but if I push B the code doesn't show up.

What's wrong? :)
Pietje15
Cadet II
Cadet II
 
Posts: 29
Joined: 08 Oct 2008, 06:13
Gender: Male
phpBB Knowledge: 7

Re: AJAX Chat 2.0 Beta bbcodes and smilies

Postby shahinavthal » 10 Oct 2008, 15:41

Works perfectly...for Greengrass (as its based on prosilver)

A few questions though.

1. How can i increase the width of my chat box?
2. How can i hide the BBcodes from my users as i need the smilies only and maybe only a few bbcodes like (fontcolor,size,bold and italics) Can i hide the rest?
3. What should i do to have a icon or post for the delete post button


And 1 suggestion as well...

Please make the instructions for the spoiler as well...as noobs like me sometimes wouldnt understand why you have provided the spoiler :grin:

Thanks a lot for this :)

Edit:

I think i found the answer to question 3 when i went thru your html file..i replaced the 101 linking to my link..it works..just need to confirm if the delete function is still working or not...Thanks :D
shahinavthal    
Supporter
Supporter
 
Posts: 32
Joined: 29 Aug 2008, 10:00
Gender: Male
phpBB Knowledge: 4

Re: AJAX Chat 2.0 Beta bbcodes and smilies

Postby Pietje15 » 12 Oct 2008, 09:20

Pietje15 wrote:Hello,

Now I can use BBCode, but when I push a BBCode button like BOLD, the code doesn't appear, but when i type something and select the text and then push a button is does work. So if i just type the code it works, but if I push B the code doesn't show up.

What's wrong? :)


Bumb :bye:
Pietje15
Cadet II
Cadet II
 
Posts: 29
Joined: 08 Oct 2008, 06:13
Gender: Male
phpBB Knowledge: 7

Re: AJAX Chat 2.0 Beta bbcodes and smilies

Postby Jaymie1989 » 14 Oct 2008, 03:50

Thanks for this, Couple of questions.

How can i add the URL button in there?
How can i change the time of the post to what it was e.g. Today, 09:11 and not Tue Oct 14, 2008 9:40 am ?
How can i get the delete button back instead of that bin?

This is probably more advanced I have alot of smilies on my board and i would like to just have a link to all my smilies like you do in a post when you click on 'View more smiles' How can i do that with this but also make it like the posts ones where you just click on the smiley and it adds it to the post/message as well.
  Not to picky am i?  
:glare:
Jaymie1989    
Supporter
Supporter
 
Posts: 1370
Joined: 30 Sep 2007, 15:51
Location: Some where in phpbb_users table
Favorite Team: Liverpool FC
Gender: Male
phpBB Knowledge: 5

Next

Return to Miscellaneous MODs, Hacks and Downloads

Who is online

Users browsing this forum: EasouSpider and 8 guests