Post by Former Member on Mar 6, 2016 12:02:05 GMT -8
hi
I got this code made so my shoutbox only accepts our sites thread links and its conflicting with a plugin here but ulises says i have 2 options, either remove it which i cant becuase i need it, or get it updated so it will allow ulises 'shoutbox tags alerts' plugin.
im sorry iv looked to try find the code guy who made it but i cant seem to find it in my threads sorry.
could someone do this pls goldenbeatz.uk
<script>
$(function(){
(function(){
return {
hostname: new RegExp(location.host),
init: function(){
this.parse_old_shouts();
this.monitor_shoutbox();
},
parse_old_shouts: function(){
var shouts = $(".shoutbox_messages div.shoutbox-post");
this.parse_shouts(shouts);
},
monitor_shoutbox: function(){
var self = this;
$.ajaxPrefilter(function(opts, orig_opts){
if(orig_opts.url == proboards.data("shoutbox_update_url")){
var orig_success = orig_opts.success;
opts.success = function(){
orig_success.apply(this, self.parse_realtime_shouts.apply(self, arguments));
};
}
});
},
parse_realtime_shouts: function(){
if(arguments && arguments.length && arguments[0].shoutbox_post){
var container = $("<span />").html(arguments[0].shoutbox_post);
var posts = container.find("div.shoutbox-post");
this.parse_shouts(posts);
arguments[0].shoutbox_post = container.html();
}
return arguments || [];
},
parse_shouts: function(shouts){
var self = this;
shouts.each(function(){
var message = $(this).find("span.message");
message.find("a").each(function(){
if(!self.hostname.test($(this).attr("href"))){
$(this).replaceWith("<em>[GOLDENBEATZ THREAD LINKS ONLY]</em>");
}
});
});
}
};
})().init();
});
</script>
thank you
I got this code made so my shoutbox only accepts our sites thread links and its conflicting with a plugin here but ulises says i have 2 options, either remove it which i cant becuase i need it, or get it updated so it will allow ulises 'shoutbox tags alerts' plugin.
im sorry iv looked to try find the code guy who made it but i cant seem to find it in my threads sorry.
could someone do this pls goldenbeatz.uk
<script>
$(function(){
(function(){
return {
hostname: new RegExp(location.host),
init: function(){
this.parse_old_shouts();
this.monitor_shoutbox();
},
parse_old_shouts: function(){
var shouts = $(".shoutbox_messages div.shoutbox-post");
this.parse_shouts(shouts);
},
monitor_shoutbox: function(){
var self = this;
$.ajaxPrefilter(function(opts, orig_opts){
if(orig_opts.url == proboards.data("shoutbox_update_url")){
var orig_success = orig_opts.success;
opts.success = function(){
orig_success.apply(this, self.parse_realtime_shouts.apply(self, arguments));
};
}
});
},
parse_realtime_shouts: function(){
if(arguments && arguments.length && arguments[0].shoutbox_post){
var container = $("<span />").html(arguments[0].shoutbox_post);
var posts = container.find("div.shoutbox-post");
this.parse_shouts(posts);
arguments[0].shoutbox_post = container.html();
}
return arguments || [];
},
parse_shouts: function(shouts){
var self = this;
shouts.each(function(){
var message = $(this).find("span.message");
message.find("a").each(function(){
if(!self.hostname.test($(this).attr("href"))){
$(this).replaceWith("<em>[GOLDENBEATZ THREAD LINKS ONLY]</em>");
}
});
});
}
};
})().init();
});
</script>
thank you