Welcome Guest [Log In] [Register]
Search Members Calendar | Rules ZB Code Index IF Code Index
ZBCode
  • Navigation
  • ZBCode
  • Coding Support
  • InvisionFree and Zetaboards Support
  • [ZB] Conflicting codes
Hey, welcome to ZBCode, the premier coding forum for ZB. Here you fill find some of the best Invisionfree and Zetaboards Codes on the network! Unfortunately, you're sorta hovering around in guest mode at the moment; why not join in on the fun? Register an account and you can start accessing the wealth of resources we have available here. Enjoy your stay at ZBCode, and remember to tell all your friends about us; the more members, the more codes available. ;)

Interested in joining? Click here.


If you are already a member of ZBCode, feel free to login right here:

Username:   Password:
Locked Topic
[ZB] Conflicting codes
Tweet Topic Started: Jun 7 2011, 08:46 AM (394 Views)
RaF Jun 7 2011, 08:46 AM Post #1
Member Avatar


Posts:
1
Group:
Member
Member
#4,122
Joined:
Jun 7, 2011
I have added multiple codes to my board and it seems that one of them is causing another one not to work.

The code that should make the Inbox button flash whenever there is an unread PM doesn't work, and the small popup that should show up when you recieve a new PM doesn't always work.
Here is my board template so that you can find the problem:

Javascripts:

Code:
 
<style type='text/css'>
#shoutbox {
height: 300px !important;
}
div#pmtoast {
display: block !important;
}
</style>
<script type="text/javascript">

(function(window,$) {
function wrap_each(fn) {
return (function(index, element) {
fn($(element));
});
}

function edit (selector, fn) {
$(function() {
$(selector).each(wrap_each(fn));
});
}



// script to add links to rs display name
edit("dl.user_profile dd[class!=spacer]",(function(element) {
var displayName = element.text();
element.html("")// whips current contents
.append($("<a>")//creates link
.attr("href","http://services.runescape.com/m=adventurers-log/display_player_profile.ws?searchName="+displayName.replace(' ', '-'))
.attr("target","_blank")
.attr("rel","nofollow")
.text(displayName)
);// end appended
}));
}(window,window.$));
</script>


Below the Board:

Code:
 
<!-- zEdit 2.0 -->
<script type='text/javascript' src='http://z3.ifrm.com/313/104/0/p222004/zedit_v2.0.js'></script>

<script type="text/javascript" src="http://z3.ifrm.com/10/53/0/f567824/advancedmultipm.js"></script>



<center>All RuneScape images are property of Jagex Ltd.</center>

<div id="store" style="display:none;"></div>
<script type='text/javascript'>
var href = window.location.href.toString();
if (href.indexOf("/index/") != -1) {
var url = href.split("index/")[0] + "stats/top_posters/";
var ajax = new XMLHttpRequest();
ajax.open("GET", url, true);
ajax.send(null);
ajax.onreadystatechange = function () {
if (ajax.readyState == 4) {
var b = ajax.responseText, n = document.createElement('div');
n.innerHTML = b;
var c = n.getElementsByTagName("TD");
for (var a = 0; a <= c.length; a++) {
if (c[a].innerHTML.match(/Total posts/i)) {
var d = parseInt(c[a].innerHTML.split(":")[1]);
var e = document.getElementsByTagName("TD");
for (var i = 0; i <= e.length; i++) {
if (e[i].innerHTML.match(/Total Forum Posts/i)) {
d = d == 0 ? "None" : d;
e[i].getElementsByTagName("STRONG")[0].innerHTML += " (" + d + " today)"
}
}
break
}
}
}
}
}
</script>

<script type='text/javascript'>
/* <![CDATA[ */
$(function() {
if ($("#shoutbox").html()) {
$("#shoutrefresh").unbind("click").click(function(e) {
if (e.preventDefault) e.preventDefault();
e.returnValue = false;
MoarShoutsR();
});

$("#shoutpost").unbind("submit").submit(function(e) {
if (e.preventDefault) e.preventDefault();
e.returnValue = false;
var msg = $("input[name=post]").val();
var xc = $("#shoutxss").val();
$.post(main_url+"tasks/",{"task":9,"msg":msg,"xc":xc},function(data) { MoarShoutsS(data);},"json");
});

MoarShoutsR();
}
});

var MoarShout;
function MoarShoutsR() {
$.get(main_url+"stats/shout_archive",function(d) {
MoarShout = "";
$("#sbx_archive tbody tr",d).not(":has('th')").each(function(i) {
if (i>-1&&i<20) {
MoarShout = MoarShout + "<li><dl><dt>"+$(this).children('td:eq(0)').children('small').html()+"</dt><dd><a class='member' href='"+$(this).children('td:eq(0)').children('a.member').attr('href')+"'>"+$(this).children('td:eq(0)').children('a.member').html()+"</a>: "+$(this).children('td:eq(1)').html()+"</dd></dl></li>";
}
});
$("#shoutbox").html(MoarShout);
$("#shoutbox li:odd").addClass("odd");
MoarShoutsD();
});
}

function MoarShoutsS(json) {
if (json.error) {
alert(json.error);
} else {
$("input[name=post]").val("");
MoarShoutsR();
}
}

function MoarShoutsD() {

$var = $("ul#shoutbox dd:contains('[qf]')");

for ( i = 0; i < $var.length; i = i+1)
{

$QFstring = $var[i].textContent.substring($var[i].textContent.indexOf("[qf]"),($var[i].textContent.indexOf("[/qf]")+5));

$QFstring2 = $QFstring.replace("[qf]","");
$QFstring2 = $QFstring2.replace("[/qf]","");
$QFstring2 = $QFstring2.replace(/-/g,",");
if ( $QFstring2.length >5)
{
$QFstring2 = "http://services.runescape.com/m=forum/forums.ws?" + $QFstring2;
$var[i].innerHTML = $var[i].innerHTML.replace($QFstring,"<a href="+ $QFstring2 + " target=\"_blank\" rel=\"nofollow\">" + $QFstring2 + "</a>");
}
}

$("a[href="+main_url+"stats/shout_archive/]:contains(\(X\))").each(function() {
if ($(this).attr("onclick")) {
$(this).attr("onclick").toString().match(/\((\d*?)\)/);
var id = RegExp.$1;
$(this).unbind("click").removeAttr("onclick").click(function(e) {
if (e.preventDefault) e.preventDefault();
e.returnValue = false;
var xc = $("#shoutxss").val();
$.post(main_url+"tasks/",{"task":10,"id":id,"xc":xc},function(data) {
if (data.error) {
alert(data.error);
} else {
MoarShoutsR();
}
});
});;
}
});
}
/* ]]> */
</script>


Above the copyright:

Code:
 
<!-- Spoiler -->
<script type='text/javascript'>
// <![CDATA[
$(function(){
setTimeout(function(){
$('div.spoiler_toggle').unbind('click').bind('click', function(){
$(this).next().slideToggle();
});
}, 1500);
});
// ]]>
</script>


<script type='text/javascript'>
// <![CDATA[
var seconds_refresh = 30, refresh_timer, can_refresh = true;

function set_refresh_timer() {
refresh_timer = setInterval(function() {
if (can_refresh)
$('#shoutrefresh').click();
}, seconds_refresh * 1000);
}

if ($('#shoutbox').length) {
set_refresh_timer();
$('#shoutpost').submit(function() {
clearInterval(refresh_timer);
can_refresh = false;
setTimeout(function() {
$('#shoutrefresh').click();
set_refresh_timer();
can_refresh = true;
}, seconds_refresh * 1000);
});
}
// ]]>
</script>

<script type='text/javascript'>
/* <![CDATA[ */
$('#sbx').insertBefore('div.category:first');
// ]]>
</script>



<script type='text/javascript'>
(function () {
var e = $('#shoutpost').parent();
e.parent().after("<tr id='new_shoutpost'></tr>");
e.prependTo('#new_shoutpost').css('width', 'auto').find('input[name=shouttext]').attr('size', '110');
e.find('p:first').append(" " + e.find('p:eq(1)').remove().html() + " ").append("(" + $('#shoutopts').remove().html() + ")");
})();
</script>




<script type="text/javascript" src="http://z2.ifrm.com/10710/37/0/p1007553/dr.js"></script>
<script type="text/javascript" src="http://z3.ifrm.com/28018/30/0/f535519/sbxemotes.js"></script>



<script type="text/javascript">
$('#shoutpost p:first').prepend('<div style="margin-bottom: 5px"><button onclick="ZetaTag(\'B\')" accesskey="b" name="B" type="button"><strong>B</strong></button><button onclick="ZetaTag(\'I\')" accesskey="i" name="I" type="button"><em>I</em></button><button onclick="ZetaTag(\'U\')" accesskey="u" name="U" type="button"><u>U</u></button><button onclick="ZetaTag(\'S\')" accesskey="s" name="S" type="button"><del>S</del></button><button onclick="ZetaTag(\'QF\')" accesskey="qf" name="QF" type="button">QF</button><select onchange="ZetaSelect(this,\'COLOR\')" name="fcolor"><option value="" selected="selected">Color</option><option value="#000">Black</option><option value="#fff">White</option><option value="#ee4a2d">Red</option><option value="#fb8a00">Orange</option><option value="#fe0">Gold</option><option value="#090">Green</option><option value="#80a0ff">Light Blue</option><option value="#5a70b3">Blue</option><option value="#9300C4">Purple</option></select></div>');
$('input[name=shouttext]').attr('name', 'post').closest('form').attr('name', 'posting');
</script>


<!-- "View Full Image" -->
<script type="text/javascript">
$.getScript("http://z4.ifrm.com/12402/111/0/p1010867/ViewFullImage.js");
</script>


<script type="text/javascript">
////////////////////////////////////
// Inbox Flasher 1.0 //
// By Choco of ZB Support //
// June 4th, 2008 //
///////////////////////////////////

color = [];
interval = 300; //Flash rate in milliseconds
color[0] = "white"; //Color one
color[1] = "red"; //Color two -- script flashes between these two

l=0;function flash() {z=$("#menu_pm a")[0];$(z).css("color",color[l]);l=(0-l)+1;}
$(function(){$("#menu_pm a").each(function() {x=$(this).html();if(x.match(/small\>(\d+)</gi)) {y=RegExp.$1;if(y>0){q=setInterval("flash()",interval);$(this).attr("id","flash");}}});});
</script>


Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · InvisionFree and Zetaboards Support · Next Topic »
Locked Topic

Track Topic · E-mail Topic Time: 3:36 AM Jul 11
Hosted for free by ZetaBoards · Privacy Policy