| | Chatbox @ Removal Tutorial | |
| | Author | Message |
---|
Guest Guest
| Subject: Chatbox @ Removal Tutorial Tue Feb 17, 2015 5:22 pm | |
| A new interesting feature has been released for the Chatbox. Once again, JScript has released one of his Chatbox mods with Javascrip and this time he has made the @ of Mods/Admins dissapear and display the staff members without the @ like the Chatbox offered by IPB. Below this the instructions and codes for this tutorial. Instructions: ACP > Modules > Javascript Management > New JS > Name: (Whatever you wish) > Placement (In the Home Page) Result: Entire code:
/************************************************************************** * Module: Remove the '@' from mods in chatbox! * Description: Need?! * Author: Made and Optimizations by JScript - 2015/02/17 ***************************************************************************/
// 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 src="/chatbox/index.forum?archives=1" id="frame_chatbox" scrolling="no" width="100%" height="100%" marginwidth="0" marginheight="0" frameborder="0"></iframe>';
$('#frame_chatbox').load(function(){ var oIframe = (document.getElementById("frame_chatbox").contentWindow || document.getElementById("frame_chatbox").contentDocument), script = oIframe.document.createElement("script");
script.type = "text/javascript"; script.innerHTML = 'Chatbox.prototype.refresh = function(data) {\n' + ' if (data.error) {\n' + ' $("body").html(data.error)\n' + ' } else {\n' + ' if (this.connected && !this.archives) {\n' + ' $("#chatbox_footer").css("display", "block");\n' + ' $("#chatbox_messenger_form").css("display", "block");\n' + ' $("#chatbox_messenger_form").css("visibility", "visible")\n' + ' } else {\n' + ' $("#chatbox_footer").css("display", "none");\n' + ' $("#chatbox_messenger_form").css("display", "none");\n' + ' $("#chatbox_messenger_form").css("visibility", "hidden")\n' + ' }\n' + ' if (this.connected) {\n' + ' $("#chatbox_display_archives").show();\n' + ' $("#chatbox_option_co").hide();\n' + ' $("#chatbox_option_disco, #chatbox_footer").show();\n' + ' $(".format-message").each(function() {\n' + ' var name = $(this).attr("name");\n' + ' var value = my_getcookie("CB_" + name);\n' + ' $(this).prop("checked", parseInt(value) ? true : false)\n' + ' });\n' + ' this.format();\n' + ' if (data.lastModified) {\n' + ' this.listenParams.lastModified = data.lastModified\n' + ' }\n' + ' } else {\n' + ' $("#chatbox_option_co").show();\n' + ' $("#chatbox_option_disco, #chatbox_footer").hide()\n' + ' $("#chatbox_display_archives").hide()\n' + ' }\n' + ' if (data.users) {\n' + ' this.users = [];\n' + ' $(".online-users, .away-users").empty();\n' + ' $(".member-title").hide();\n' + ' for (var i in data.users) {\n' + ' var user = data.users[i];\n' + ' this.users[user.id] = user;\n' + ' var username = "<span style=\'color:" + user.color + "\'>" + "<span class=\'chatbox-username chatbox-user-username\' data-user=\'" + user.id + "\' >" + user.username + "</span></span>";\n' + ' var list = user.online ? ".online-users" : ".away-users";\n' + ' $(list).append("<li>" + username + "</li>")\n' + ' }\n' + ' if (!$(".online-users").is(":empty")) {\n' + ' $(".member-title.online").show()\n' + ' }\n' + ' if (!$(".away-users").is(":empty")) {\n' + ' $(".member-title.away").show()\n' + ' }\n' + ' }\n' + ' if (data.messages) {\n' + ' var scroll = !this.messages || this.messages.length != data.messages.length;\n' + ' this.messages = data.messages;\n' + ' $("#chatbox").empty();\n' + ' if (this.messages) {\n' + ' var cb_content = "",\n' + ' message = "",\n' + ' html = "",\n' + ' msg = "";\n' + ' for (var j = 0, len = this.messages.length; j < len; j++) {\n' + ' message = this.messages[j];\n' + ' html = "<p class=\'chatbox_row_" + (j % 2 == 1 ? 2 : 1) + " clearfix\'><span class=\'right desc\'><span class=\'date-and-time\' title=\'" + message.date + "\'>(" + message.datetime + ")</span></span>";\n' + ' if (message.userId == -10) {\n' + ' html += "<span class=\'msg\'><span style=\'color:" + message.msgColor + "\'><strong> " + message.msg + "</strong></span></span>"\n' + ' } else {\n' + ' html +=\n' + ' "<span class=\'user-msg\'>";\n' + ' if (this.avatar) {\n' + ' html += " <span class=\'cb-avatar\'><img src=\'" + message.user.avatar + "\' /></span>";\n' + ' }\n' + ' html +=\n' + ' "<span class=\'user\' style=\'color:" + message.user.color + "\'>" +\n' + ' "<strong> " + \n' + ' "<span class=\'chatbox-username chatbox-message-username\' data-user=\'" + message.userId + "\' >" + message.username + "</span> : " +\n' + ' "</strong>" +\n' + ' "<span class=\'msg\'>" + message.msg + "</span>" +\n' + ' "</span>"\n' + ' "</span>";\n' + ' }\n' + ' html += "</p>";\n' + ' cb_content += html;\n' + ' }\n' + ' $("#chatbox").append(cb_content);\n' + ' if (scroll) {\n' + ' $("#chatbox")[0].scrollTop = $("#chatbox").prop("scrollHeight") * 2\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + '};'; oIframe.document.getElementsByTagName("head")[0].appendChild(script); }); }
|
| | | Eugeo Ayano
Posts : 13 Points : 16692 Reputation : 0 Join date : 2015-02-09 Age : 32 Location : Support Forum
| Subject: Re: Chatbox @ Removal Tutorial Tue Feb 17, 2015 5:48 pm | |
| Lol Jscript and his mods. Still I like it very much and I see you implemented it in SMA. Good work | |
| | | bugatti boy
Posts : 17 Points : 16728 Reputation : 0 Join date : 2015-02-03
| Subject: Re: Chatbox @ Removal Tutorial Tue Feb 17, 2015 6:11 pm | |
| Fire, if you will be reading this, DO not and I repeat DO not add this code at all, It will mess up the chatbox up and the chatbox is already messed up as it already is and it will make users think, there is is no admin at all and others would not be satisfied with this change at all ever. | |
| | | Guest Guest
| Subject: Re: Chatbox @ Removal Tutorial Tue Feb 17, 2015 6:28 pm | |
| The old saying goes: If you have nothing to say, do not say it at all
And if you have proof this messes up the chatbox feel free to submit your proof to the support forum, even you're even still active there.
The Chat box all forums currently use was made by Jscript, so please do not doubt his work. |
| | | Eugeo Ayano
Posts : 13 Points : 16692 Reputation : 0 Join date : 2015-02-09 Age : 32 Location : Support Forum
| Subject: Re: Chatbox @ Removal Tutorial Tue Feb 17, 2015 6:32 pm | |
| Talks bad about it in this forum. Has no problem complementing it in the support Forum | |
| | | Guest Guest
| Subject: Re: Chatbox @ Removal Tutorial Tue Feb 17, 2015 6:48 pm | |
| |
| | | bugatti boy
Posts : 17 Points : 16728 Reputation : 0 Join date : 2015-02-03
| Subject: Re: Chatbox @ Removal Tutorial Tue Feb 17, 2015 7:02 pm | |
| Who is Worst Nightmare, Fire do not implement this code at all, it is soo bad for the site and it will mess up the chatbox for good | |
| | | Guest Guest
| Subject: Re: Chatbox @ Removal Tutorial Tue Feb 17, 2015 7:04 pm | |
| Why are you being redundant and saying what you have already said before? |
| | | Rebecca Igvalt
Posts : 2 Points : 16652 Reputation : 0 Join date : 2015-02-13 Age : 24
| Subject: Re: Chatbox @ Removal Tutorial Tue Feb 17, 2015 7:08 pm | |
| Worst Nightmare is you. You half assed Fuck And here's THE EXACT SAME SCREENSHOT POSTED THERE PROVING IT'S YOU LOL!!! http://prntscr.com/64vi4r | |
| | | bugatti boy
Posts : 17 Points : 16728 Reputation : 0 Join date : 2015-02-03
| Subject: Re: Chatbox @ Removal Tutorial Tue Feb 17, 2015 7:14 pm | |
| i Never heard of worst nightmare at all | |
| | | Rebecca Igvalt
Posts : 2 Points : 16652 Reputation : 0 Join date : 2015-02-13 Age : 24
| Subject: Re: Chatbox @ Removal Tutorial Tue Feb 17, 2015 7:18 pm | |
| with that proof you can't deny it. Or Shall I also provide the the proof of Ange Tuteur confirming it's you? | |
| | | Guest Guest
| Subject: Re: Chatbox @ Removal Tutorial Tue Feb 17, 2015 7:21 pm | |
| He's trolling you but.....calling DJ a troll is just offensive the Honest trolls of the internet. |
| | | Firebreath HeadMaster
Posts : 171 Points : 23550 Reputation : 1 Join date : 2014-05-07 Age : 24
| Subject: Re: Chatbox @ Removal Tutorial Tue Feb 17, 2015 7:25 pm | |
| | |
| | | Sponsored content
| Subject: Re: Chatbox @ Removal Tutorial | |
| |
| | | | Chatbox @ Removal Tutorial | |
|
Similar topics | |
|
| Permissions in this forum: | You cannot reply to topics in this forum
| |
| |
| Word Count |
Word Length: 0
|
|