The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

chatbox java doesnt work

View previous topic View next topic Go down

Solved chatbox java doesnt work

Post by h4d3z on July 2nd 2016, 12:31 am

So i tried adding some java code i found here but it doenst do anything.
Im a doing something wrong ?
there are 2 codes :

$(window).load(function() {
var chatbox_script = function() {
var overrided = Chatbox.prototype.refresh;
Chatbox.prototype.refresh = function(data) {
overrided.call(this, data);
$('.chatbox-username').each(function(){
this.previousSibling&&$.trim(this.previousSibling.nodeValue)=="@"&&$(this.previousSibling).replaceWith('<img src="http://i.imgur.com/zICIAne.png" /> ')
})
};
};
var s=document.createElement('script');s.text="("+chatbox_script.toString()+")();";$('object[data^="/chatbox/index.forum"],iframe[src^="/chatbox/index.forum"]').each(function(){try{$(this.contentDocument||this.contentWindow.document).find("#chatbox").closest("html").find("head").first().each(function(){this.appendChild(s.cloneNode(true))})}catch(a){}})
});




And :

$(window).load(function() {
var chatbox_script = function() {
$('#chatbox > p > .msg > span').filter('[style="color"],[style="color"]').closest('p').remove();
var overrided = Chatbox.prototype.refresh;
Chatbox.prototype.refresh = function(data) {
if (data.messages && data.messages.length) {
data.messages = $.grep(data.messages, function(v) {
return v.userId != -10 || $.inArray(v.msgColor, ["red", "green"]) == -1;
});
}
overrided.call(this, data);
};
};

var
s=document.createElement('script');s.text="("+chatbox_script.toString()+")();";$('object[data^="/chatbox/index.forum"],iframe[src^="/chatbox/index.forum"]').each(function(){try{$(this.contentDocument||this.contentWindow.document).find("#chatbox").closest("html").find("head").first().each(function(){this.appendChild(s.cloneNode(true))})}catch(a){}})
});


They are the crown replace for @
and the login / logout removal


Last edited by h4d3z on July 2nd 2016, 1:03 am; edited 1 time in total

h4d3z
New Member

Posts : 10
Reputation : 1
Language : Dutch

http://red-illusion.userboard.net

Back to top Go down

Solved Re: chatbox java doesnt work

Post by Nemo on July 2nd 2016, 12:37 am

Hey,

What's your forum's URL?

Hello

Nemo
Support Moderator
Support Moderator

Male Posts : 1080
Reputation : 113
Language : Greek, English, French

http://www.helpgr.forumgreek.com

Back to top Go down

Solved Re: chatbox java doesnt work

Post by h4d3z on July 2nd 2016, 12:38 am


h4d3z
New Member

Posts : 10
Reputation : 1
Language : Dutch

http://red-illusion.userboard.net

Back to top Go down

Solved Re: chatbox java doesnt work

Post by SLGray on July 2nd 2016, 12:41 am

Please use the BBCode code tags when you post coding.
Code:
[code][/code]


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 36639
Reputation : 2441
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

Solved Re: chatbox java doesnt work

Post by Nemo on July 2nd 2016, 12:43 am

Hey,

Have you enabled the JavaScript management via your ACP?

Hello

Nemo
Support Moderator
Support Moderator

Male Posts : 1080
Reputation : 113
Language : Greek, English, French

http://www.helpgr.forumgreek.com

Back to top Go down

Solved Re: chatbox java doesnt work

Post by h4d3z on July 2nd 2016, 12:44 am

sry, il will use code and /code

i did enable the java script

h4d3z
New Member

Posts : 10
Reputation : 1
Language : Dutch

http://red-illusion.userboard.net

Back to top Go down

Solved Re: chatbox java doesnt work

Post by h4d3z on July 2nd 2016, 12:47 am

omg it worked now lol,
dont now why

h4d3z
New Member

Posts : 10
Reputation : 1
Language : Dutch

http://red-illusion.userboard.net

Back to top Go down

Solved Re: chatbox java doesnt work

Post by APE on July 2nd 2016, 1:03 am

is this now solved
If yes please hit the big green solved button on the top of your first post

thank you.




APE
Manager
Manager

Male Posts : 8609
Reputation : 748
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

Solved Re: chatbox java doesnt work

Post by Nemo on July 2nd 2016, 9:53 am

Problem solved & topic archived.
Please read our forum rules: ESF General Rules

Nemo
Support Moderator
Support Moderator

Male Posts : 1080
Reputation : 113
Language : Greek, English, French

http://www.helpgr.forumgreek.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum