Current date/time is February 27th 2020, 3:26 am

Search found 3 matches for 222222

Deletes are chat history.

After some time everything written in the chat will be deleted.How to fix it not to erase the history of chat.
I use a modified chat @JScript.

/*** * Application: chatbox8 - Edit Messages * Description: Support for editing messages in chat box! * Version: 0.05072015-jq1.9.1 * RC1 (Release candidate 1!) - Mahabharata * Author: JScript - 2015-05-07 * Copyright (c) 2015 JScript <jscriptbrasil at live dot com> * This work is free. You can redistribute it and/or modify it * under the terms of the WTFPL, Version 2 */ // Redefine function! function insertChatBox(chatbox_id, chatbox_url) { return insertChatBoxNew(chatbox_id, chatbox_url); } // Redefine function! function insertChatBoxNew(chatbox_id, chatbox_url) { // Put the chat box on top of widgets! //$('#' + chatbox_id).parent().detach().prependTo('#wrapper'); document.getElementById(chatbox_id).innerHTML = '<iframe style="visibility: hidden;" src="/chatbox/index.forum?archives=1" id="frame_chatbox" scrolling="no" width="100%" height="100%" marginwidth="0" marginheight="0" frameborder="0"></iframe>'; // Loader 1 var iFrame = document.getElementById('frame_chatbox').contentWindow; var frame_chatbox_document = setInterval(function() { try { if (iFrame.jQuery) { clearInterval(frame_chatbox_document); chat_edit(); } } catch (e) {} }, 50); } // Loader 2 $(function() { if (_userdata.session_logged_in) { $('#frame_chatbox').load(function() { if (typeof document.getElementById('frame_chatbox').contentWindow['chatEdit'] == 'undefined') { chat_edit(); } }); } }); function chat_edit() { var oIframe = (document.getElementById("frame_chatbox").contentWindow.document || document.getElementById("frame_chatbox").contentDocument), script = oIframe.createElement("script"), chatbox_script = function() { window.chatEdit = { locale: { Remove: "Сигурни ли сте, че искате да премахнете това съобщение?", Save: "Запази", Cancel: "Откажи", }, config: { // Change your chatbox title, default is "" = (locale title!) Title: "", // ligns "joined" and "logged off": 1 = Remove Notice: 0, // Change the moderator prefix Prefix: "@", // Automatic login: 0 = Disable autoLogin: 1, // Limit the amount of messages to show, default is 60 limitOfMsg: 60, // Open "smiles" in a pop up window? Default is 0 = no pop up! smilePopUp: 0, /*** * New Chatbox pseudo commands (Beta test and staff only!) * Command Explanation * ------------------------------------------------------------------------------- * /shake "Username" shook the chat window to catch everyone's attention! */ shakeMsg: "agitou a janela de bate-papo para chamar a atenção de todos!" }, interval: 0, isStorage: (typeof(Storage) == "undefined") ? 0 : 1, oBBCode: { patt: [ /\[b](.*?)\[\/b]/gi, /\[i](.*?)\[\/i]/gi, /\[u](.*?)\[\/u]/gi, /\[s](.*?)\[\/s]/gi, /\[center](.*?)\[\/center]/gi, /\[size=(.*?)](.*?)\[\/size]/gi, /\[url](.*?)\[\/url]/gi, /\[url=(.*?)](.*?)\[\/url]/gi, /\[color=(.*?)](.*?)\[\/color]/gi, /\[img](.*?)\[\/img]/gi, /\[spoiler](.*?)\[\/spoiler]/gi, /\[code](.*?)\[\/code]/gi, /\[quote](.*?)\[\/quote]/gi ], html: [ "<strong>$1</strong>", "<i>$1</i>", "<span style='text-decoration:underline;'>$1</span>", "<span style='text-decoration:line-through'>$1</span>", "<div style='margin:auto;text-align:center;width:100%'>$1</div>", "<span style='font-size: $1;'>$2</span>", "<a rel='nofollow' target='_blank' href='$1'>$1</a>", "<a rel='nofollow' target='_blank' href='$1'>$2</a>", "<span style='color: $1'>$2</span>", "<img src='$1' style='max-width:120px;max-height:120px;'/>", "<dl class='codebox spoiler'><dt style='cursor: pointer;'>Spoiler:</dt><dd><div class='spoiler_content'>$1</div></dd></dl>", "<dl class='codebox'><dt>Code:</dt><dd class='cont_code'><code>$1</code></dd></dl>", "<blockquote><div>$1</div></blockquote>" ] }, oHTML: { patt: [ /<strong>(.*?)<\/strong>/gi, /<i>(.*?)<\/i>/gi, /<span style="text-decoration:underline;">(.*?)<\/span>/gi, /<span style="text-decoration:line-through;">(.*?)<\/span>/gi, /<div style="margin:auto;text-align:center;width:100%">(.*?)<\/div>/gi, /<span style="font-size: (.*?);">(.*?)<\/span>/gi, /<a href="(.*?)"><\/a>/gi, /<a href="(.*?)">(.*?)<\/a>/gi, /<span style="color: (.*?)">(.*?)<\/span>/gi, ///<img(?:.*)src="(.*?)"(?:.*)>/gi, /<dl class="codebox spoiler"><dt style="cursor: pointer;">Spoiler:<\/dt><dd><div class="spoiler_content">(.*?)<\/div><\/dd><\/dl>/gi, /<dl class="codebox"><dt>Code:<\/dt><dd class="cont_code"><code>(.*?)<\/code><\/dd><\/dl>/gi, /<blockquote><div>(.*?)<\/div><\/blockquote>/gi ], bbcode: [ '[b]$1[/b]', '[i]$1[/i]', '[u]$1[/u]', '[s]$1[/s]', '[center]$1[/center]', '[size=$1]$2[/size]', '[url]"$1"[/url]', '[url="$1:
$2[/url]', '[color:32ba=$1]$2', //'Topics tagged under 222222 on The forum of the forums $1', '
Spoiler:
$1
', '
Code:
$1
', '
$1
' ] }, loadSmile: function() { if (chatEdit.config.smilePopUp) { return false; } $("#divsmilies").unbind("click").bind("click", function (event) { chatEdit.showSmile(event); }); jQuery.ajax({ url: "/post?mode=smilies", cache: true, type: "get", dataType: "text", success: function(response, status, xhr) { if (xhr.status == 200) { var htmlSmile = $("<div>" + response + "</div>"); htmlSmile.find("#smilies_categ, p, span").remove(); htmlSmile.html(htmlSmile.html().replace(/insert_chatboxsmilie/g, "chatEdit.insertSmile")); var oTarget = htmlSmile.find("a"), oThis, patt, regex; for (var i = 0, len = oTarget.length; i < len; i++) { oThis = $(oTarget[i]); patt = /\('(.*?)'\)/i.exec(oThis.attr("href"))[1]; regex = new RegExp('<img[^>]+?' + oThis.find('img').attr('src') + '[^>]*>', "gi"); chatEdit.oHTML.patt.push(regex); chatEdit.oHTML.bbcode.push(patt.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\^\$\|]/g, "\\$&")); /*oThis.attr({ href: "#", onclick: "chatEdit.insertSmile('" + patt + "');return false;" });*/ } /*var aSmiles = [ "&phone;", "&starf;", "&hearts;", "&sung;", "&check;", "&boxbox;", "©", "&Jscr;&Sscr;", "&block;", "&blk34;", "&xcirc;", "&star;", "&clubs;", "&cross;", "&Fscr;&Mscr;" ], sSmiles = "<p>"; for (var i = 0, len = aSmiles.length; i < len; i++) { sSmiles += "<a href='#' onclick='chatEdit.insertSmile(\"" + aSmiles[i] + "\");return false;'>" + aSmiles[i] + "</a>"; }*/ jQuery("#chat-smiles-show").html( htmlSmile.find("#simple-wrap, tbody:last").html() ); } } }); jQuery("head").append( "<style type='text/css'>" + "#chat-smiles-show {" + " background: none no-repeat scroll center center rgb(255, 255, 255);" + " border: 2px solid #d2d2d2;" + " height: 250px;" + " overflow: auto;" + " padding-top: 6px;" + " position: absolute;" + " width: 225px;" + " z-index: 99999;" + "}" + "#chat-smiles-show > p {" + " margin: 0;" + "}" + "#chat-smiles-show p a {" + " margin-bottom: 14px;" + "}" + "#chat-smiles-show a {" + " display: inline-block;" + " font-size: 18px;" + " margin-bottom: 5px;" + " margin-left: 10px;" + " text-decoration: none;" + "}" + "</style>" ); jQuery("body").append("<div id='chat-smiles-show' style='display: none;'></div>"); }, showSmile: function(event) { var elenPos = jQuery("#divsmilies"), target = jQuery("#chat-smiles-show"); target.css({ "left": (elenPos.offset().left + elenPos.outerWidth()) - target.outerWidth(), "top": elenPos.offset().top - target.outerHeight() }); return (target[0].style.display == "none") ? target.fadeIn("fast") : target.fadeOut("fast"); }, insertSmile: function(smile) { var id = document.getElementById("message"); id.focus(); id.value += " " + smile + " "; document.getElementById("chat-smiles-show").style.display = "none"; }, parseBBCode: function(data) { data = data.replace(/%0A|%5Cn/gi, "<br>"); for (var i = 0, len = chatEdit.oBBCode.patt.length; i < len; i++) { data = data.replace(chatEdit.oBBCode.patt[i], chatEdit.oBBCode.html[i]); } return data }, parseHTML: function(data) { data = data.replace(/<br>/gi, "%0A"); for (var i = 0, len = chatEdit.oHTML.patt.length; i < len; i++) { data = data.replace(chatEdit.oHTML.patt[i], chatEdit.oHTML.bbcode[i]); } return data }, editShout: function(ID, num, oThis) { var oShout = $("#chatbox .shout-" + ID), oEditor = oShout.find('.date-and-time'), oMsg = oShout.find('span.msg'); try { var sMsg = chatEdit.parseHTML(oMsg.children('span')[0].innerHTML); } catch (e) { // For unknown reasons, the above line fails for lack of span tag! var sMsg = chatEdit.parseHTML(oMsg[0].innerHTML); } if (num == 0) { var sHtml = '<span>' + ' <textarea id="edit-' + ID + '" style="width: ' + (oMsg.width() - oEditor.width()) + 'px; height: ' + oMsg.height() + 'px;vertical-align: middle;font-family: inherit;font-size: inherit;margin-top: 4px;">' + sMsg + '</textarea>' + ' <input type="submit" style="cursor: pointer;margin-right: 4px;" onclick="chatEdit.submitEdit(' + ID + ', 0, this);" value="' + chatEdit.locale.Save + '" class="button2">' + ' <a title="' + chatEdit.locale.Cancel + '" style="cursor: pointer;" href="javascript:void(0);" onclick="chatEdit.submitEdit(' + ID + ', -1, this);">' + chatEdit.locale.Cancel + '</a>' + ' </span>'; oEditor.hide(); oMsg.hide().before(sHtml); } else if (num == 1 && chatEdit.iConfirm(chatEdit.locale.Remove + "\n\n" + sMsg) == 1) { chatEdit.submitEdit(ID, 1, oThis); } }, submitEdit: function(ID, num, oThis) { var p = $(oThis).closest('p'); if (num == 0) { var value = $('#edit-' + ID).val(); $('#message').val('/edit' + ID + '&Mu;' + value); p.find('span.msg > span').html(chatEdit.parseBBCode(value)).show(); window.chatbox.send(); } else if (num == 1) { $('#message').val('/del' + ID + '&Mu;'); $("#chatbox .shout-" + ID).remove(); window.chatbox.send(); } p.find('.date-and-time').show().end().find('span.msg').show(); $(oThis).parent().remove(); }, shake: function() { var iFrame = parent.$("#frame_chatbox"), interval = 70, distance = 10, times = 4; iFrame.css('position','relative'); for(var iter = 0; iter < (times + 1); iter++){ iFrame.animate({ left:((iter%2 == 0 ? distance : distance*-1)) }, interval); } iFrame.animate({ left: 0}, interval); }, async: function(mode) { jQuery.ajaxSetup({ async: mode }); }, iConfirm: function(text) { return (confirm(text) == true) ? true : false; } }; // "For" asynchronous loop, faster and does not lock the browser interface when you have many messages! (function($) { $.assyncFor = function(arr, limitOfMsg, callback) { var max_len = (arr.length > limitOfMsg) ? (arr.length - limitOfMsg) : 0; if (max_len < 0) { max_len = 0; } for (var i = max_len, len = arr.length; i < len; ++i) { var boundCallback = callback.bind(null, i, arr[i]); setTimeout(boundCallback, i); } return this; }; }(jQuery)); Chatbox.prototype.send = function(params) { var self = this, isCMD = null, message = $('#message').val().trim(), aArray = ['/id', '/edit', '/del', '/shake', '/abs', '/away', '/clear', '/cls', '/kick', '/ban', '/unban', '/me', '/exit', '/mod', '/unmod']; for (var i = 0, len = aArray.length; i < len; ++i) { if (message.indexOf(aArray[i]) == 0) { isCMD = aArray[i]; } } switch (isCMD) { case null: $('#message').val('/id' + (Math.random() + "000000000").substr(2, 10) + '&Mu;' + message); break; case '/shake': if ((chatEdit.isStorage) && (parent._userdata.user_level > 0)) { $('#message').val('/shake' + parent._userdata.user_id + '&Mu;'); } break; } if (!params) { params = $('form[name=\'post\']').serialize() } var data = params + '&method=send&archives=' + this.archives; $('#message').val('').focus(); $.ajax({ url: this.actionsUrl, type: 'post', data: data, dataType: 'json', cache: false, success: function(response) { self.refresh(response) } }) }; Chatbox.prototype.refresh = function(data) { if (data.error) { $("body").html(data.error) } else { /* if (this.connected && !this.archives) { $("#chatbox_footer").css("display", "block"); $("#chatbox_messenger_form").css("display", "block"); $("#chatbox_messenger_form").css("visibility", "visible") } else { $("#chatbox_footer").css("display", "none"); $("#chatbox_messenger_form").css("display", "none"); $("#chatbox_messenger_form").css("visibility", "hidden") } */ if (this.connected) { $("#chatbox_display_archives").show(); $("#chatbox_option_co").hide(); $("#chatbox_option_disco, #chatbox_footer").show(); $("#chatbox_messenger_form").css('display', 'block'); $("#chatbox_messenger_form").css('visibility', 'visible'); $(".format-message").each(function() { var name = $(this).attr("name"); var value = my_getcookie("CB_" + name); $(this).prop("checked", parseInt(value) ? true : false) }); this.format(); if (data.lastModified) { this.listenParams.lastModified = data.lastModified } if (!chatEdit.interval) { $("#chatbox").empty(); chatEdit.interval = setInterval(function() { chatbox.get(); }, 5000); if (document.getElementById("chat-smiles-show") == null) { chatEdit.loadSmile(); } } } else { if (chatEdit.interval) { clearInterval(chatEdit.interval); chatEdit.interval = 0; $("#chatbox").empty(); } $("#chatbox_option_co").show(); $("#chatbox_option_disco, #chatbox_footer").hide(); $("#chatbox_display_archives").hide(); $("#chatbox_messenger_form").css('display', 'none'); $("#chatbox_messenger_form").css('visibility', 'hidden'); } if (data.users) { this.users = []; $(".online-users, .away-users").empty(); $(".member-title").hide(); for (var i in data.users) { var user = data.users[i]; this.users[user.id] = user; //var username = "<span style='color:" + user.color + "'>" + (user.admin ? "@ " : "") + "<span class='chatbox-username chatbox-user-username' data-user='" + user.id + "' >" + user.username + "</span></span>"; var username = ""; for (var j in data.messages) { var message = data.messages[j]; if (message.userId == user.id) { if (message.user.avatar) { username = "<span class='cb-avatar'><img src='" + message.user.avatar + "' style='height: 24px; width: 24px; margin-right: 4px;'/></span>"; } } } username += "<span style='color:" + user.color + "'>" + (user.admin ? "@ " : "") + "<span class='chatbox-username chatbox-user-username' data-user='" + user.id + "' >" + user.username + "</span></span>"; var list = user.online ? ".online-users" : ".away-users"; $(list).append("<li>" + username + "</li>") } if (!$(".online-users").is(":empty")) { $(".member-title.online").show() } if (!$(".away-users").is(":empty")) { $(".member-title.away").show() } } if (data.messages) { var scroll = !this.messages || this.messages.length != data.messages.length; this.messages = data.messages; if ( (scroll && data.messages.length == 1) || !data.connected) { $("#chatbox").empty(); } if (this.messages) { var oThis = this, // Here we save the current "this" for use inside "For" asynchronous loop! html = ""; $.assyncFor(oThis.messages, chatEdit.config.limitOfMsg, function(index, message) { // The "For" asynchronous loop... // CMD and UID... var CMD = null, UID = null; if (message.userId > 0) { CMD = message.msg.match(/([^]+)(\/[a-z]+)([0-9]+)&Mu;([^]+)/); } else { UID = index; } // Checks for message editions... if (CMD !== null) { /* Example: Match 1: <span style="color: #222222">/edit9125922055&Mu;chatbox8 - Edit Messages!</span> Group 1: <span style="color: #222222"> Group 2: /edit Group 3: 9125922055 Group 4: chatbox8 - Edit Messages!</span> */ switch (CMD[2]) { case '/del': $(".shout-" + CMD[3]).remove(); break; case '/edit': $(".shout-" + CMD[3]).find('span.msg').html(CMD[1] + CMD[4]); break; case '/shake': if ( ((index + 1) == oThis.messages.length) && scroll && $('#chatbox_members span[data-user="' + message.userId + '"]').length) { if (parent._userdata.user_id !== Number(message.userId)) { setTimeout(function(){ chatEdit.shake() }, 500); } html = "<p class='chatbox_row_" + (index % 2 == 1 ? 2 : 1) + " clearfix shout-" + index + "'>" + " <span class='date-and-time' title='" + message.date + "'>(" + message.datetime + ")</span>" + " <span class='msg'><img src='https://7img.net/users/1917/43/09/52/smiles/18952631.png' />" + " <span style='color:" + message.user.color + "'><strong> " + message.username + " <span style='color: red'>&nbsp;" + chatEdit.config.shakeMsg + "</span></strong>" + " </span>" + " </span>" + "</p>"; $("#chatbox").append(html); } break; default: UID = CMD[3]; message.msg = CMD[1] + CMD[4]; CMD = null; // Reset CMD! break } } if (CMD == null) { // Here checks if there is already a message in the DOM, if already, not need to process the same message! if ( $("#chatbox .shout-" + UID).length || (chatEdit.config.Notice && message.userId == -10) ) { return false; } // Processes the message content |ClassName index| html = "<p class='chatbox_row_" + (index % 2 == 1 ? 2 : 1) + " clearfix shout-" + UID + "'>" + " <span class='date-and-time' title='" + message.date + "'>(" + message.datetime + ")"; if (message.userId == -10) { html += "</span>" + "<span class='msg'><span style='color:" + message.msgColor + "'><strong> " + message.msg + "</strong></span></span>" } else { if ((parent._userdata.username == message.username) || (parent._userdata.user_level > 0)) { html += " <span class='editor'>" + " &nbsp;<img alt='Edit' style='cursor: pointer;' onclick='chatEdit.editShout(\"" + UID + "\", 0, this);' src='https://i.servimg.com/u/f59/18/17/62/92/commen10.png'>&nbsp;" + " <img alt='Remove' style='cursor: pointer;' onclick='chatEdit.editShout(\"" + UID + "\", 1, this);' src='https://i.servimg.com/u/f59/18/17/62/92/delete10.png'>" + " </span>"; } html += "</span>" + " <span class='user-msg'>"; if (oThis.avatar) { html += "<span class='cb-avatar'><img src='" + message.user.avatar + "' /></span>"; } html += " <span class='user' style='color:" + message.user.color + "'>" + " <strong> " + (message.user.admin ? chatEdit.config.Prefix + " " : "") + " <span class='chatbox-username chatbox-message-username' data-user='" + message.userId + "' >" + message.username + "</span>&nbsp;:&nbsp;" + " </strong>" + " </span>" + " <span class='msg'>" + message.msg + "</span>" + " </span>"; } html += "</p>"; /** * Here the "append" will not make slow the code execution since it is not within a synchronous loop, * but instead in an asynchronous loop that schedules the execution later! */ $("#chatbox").append(html); } if ((index + 1) == oThis.messages.length) { if (scroll) { $("#chatbox")[0].scrollTop = $("#chatbox").prop("scrollHeight") * 2 } } }); } } } }; if (chatEdit.config.Title.length) { $("a.chat-title").text(chatEdit.config.Title); } $("#chatbox_option_co, #chatbox_option_disco").bind("click", function() { $("#chatbox").empty(); }); /*if ($('#chatbox_option_disco:visible')) { chatEdit.async(false); chatbox.get(); chatEdit.async(true); }*/ parent.document.getElementById('frame_chatbox').style.visibility='visible'; if (chatEdit.config.autoLogin) { // && chatbox.connected == false) { setTimeout(function() { $('#chatbox_option_co:visible').click() // chatbox.connect(); }, 1000); } }; script.type = "text/javascript"; script.innerHTML = "$(function() { (" + chatbox_script.toString() + ")(); });"; oIframe.getElementsByTagName("head")[0].appendChild(script); };"]
by smurfavr
on March 18th 2016, 10:58 am
 
Search in: Garbage
Topic: Deletes are chat history.
Replies: 15
Views: 1449

Requesting a full kit images

Creation Type : Forum Kit images
Dimensions : ---
Primary Colors : [You must be registered and logged in to see this link.]
Secondary Colors : [You must be registered and logged in to see this link.]
Images to include :
Images:
N/A

Text to insert : ---
Font : ---
Font Color : [You must be registered and logged in to see this link.]
Link to my Forumotion forum : [You must be registered and logged in to see this link.]
Username on the forum : Admin
Link to last graphic request : ---
Detail description : Hello dear Designers,

I would like to request a kit with images for my forum. I need some buttons and icons for my forum if you may. If possible i don't want any images in the buttons but only the text. Only the forum icons i would like somehow special and more 'inspiring' if you like to attract my members.
The images i would like to have are:
  • Category No-New (as an image) - preferably as a circle and with color [You must be registered and logged in to see this link.]
  • Category New (as an image) - circle colored [You must be registered and logged in to see this link.]
  • Category Locked (as an image) - circle colored [You must be registered and logged in to see this link.]
  • Topic Hot (as an image) - circle colored gold-ish
  • New Topic
  • Post Reply
  • Locked (text with red color please)
  • New PM
  • Quote
  • Edit
  • Thanks
  • Thanked (less opacity)
  • X (for delete)
  • ? (for IP)
  • ! (send a report)
  • ! (report sent with less opacity)
  • a figure (for profile icon)
  • PM (for pms)
  • folder (for email)
  • globe (for website)


You have as much time as you need!

I am not in a hurry!

Thanks a lot for whoever takes time and completes my request!
Much appreciated,
Luffy

by TheCrow
on November 26th 2015, 2:46 pm
 
Search in: Completed Graphic Requests
Topic: Requesting a full kit images
Replies: 20
Views: 869

Chat box: problems with HTML!

Hello everybody!

I posted the following message in the chat:
Tag code test: [ code]if (_userdata.session_logged_in) { console.log('Ok!') };[/ code]

And the result is in the picture below:
Topics tagged under 222222 on The forum of the forums 36ZvsZm

Note that the HTML of BBCode is outside of the block <span style = "color: #222222"> </ span>

I noticed this problem on various forums, not only on my forum, this also happens with a test forum that I have without any JavaScript added!

The correct way should look like this:
Topics tagged under 222222 on The forum of the forums ZaSZVOj

For reference, here's the JSON returned in the message:
Code:

<span style="color: #222222">Tag code test:
    <dl class="codebox contcode">
        <dt>Code:</dt>
        <dd>
            <code>if (_userdata.session_logged_in) { console.log(&apos;Ok!&apos;) }</code>
        </dd>
    </dl>
</span>

Topics tagged under 222222 on The forum of the forums BStInH3

JS
by JScript
on May 13th 2015, 3:10 am
 
Search in: Garbage
Topic: Chat box: problems with HTML!
Replies: 13
Views: 1025

Back to top

Jump to: