Please login or register. Welcome to the Studio, guest!


Quick Links:


newBookmarkLockedFalling

Chris

Chris Avatar

******
Head Coder

19,519


June 2005
Error: missing } in compound statement
Source file: cdmod.proboards.com/index.cgi
Line: 273, Column: 5
Source code:
//-->


You're missing an end bracket somewhere. I highly recommend getting Firefox and using it to track down these syntax errors.

ǻñî§ђ™

ǻñî§ђ™ Avatar
Always in disguise!

*
Banned

64


March 2009
Yes! :D Your the beast Chris :-* I also added the break becuase ive seen a few with them.
But the Brithday section isnt working, what did i do wrong there? I think its the [a+2] But i dont get how you work out what number that has to be :P but like i said everything else is working :)
<script type="text/javascript">
<!--
var fTitle = "Forum Title"; // Forum Title
var group = [];
group[0] = ["Administrators","700000"];
group[1] = ["Global Moderators","000070"];
group[2] = ["Moderators","007000"];

if(!location.href.match(/action/) || location.href.match(/action=home/)){
var td = document.getElementsByTagName("td");
var table = document.getElementsByTagName('table');
for(a=0;a<td.length;a++){
if(td.className == "catbg" && td.innerHTML.match(/Forum Statistics/)) {
var totalposts = (td[a+2].innerHTML.match(/Total Posts: (\d+)(,\d+)?<br/i)) ? RegExp.$1+RegExp.$2: '';
var totaltopics = (td[a+2].innerHTML.match(/Total Topics: (\d+)(,\d+)? &/i)) ? RegExp.$1+RegExp.$2: '';
var totalmembs = (td[a+2].innerHTML.match(/Total Members: (.+?)<br/i)) ? RegExp.$1: '';
var newmemb = (td[a+2].innerHTML.match(/Newest Member: (.+?)<\/a>/i)) ? RegExp.$1+'</a>': '';
var lastpost = (td[a+2].innerHTML.match(/Last Updated Topic: (.+?) by/i)) ? RegExp.$1: 'n/a';
var lastuser = (td[a+2].innerHTML.match(/by (.+?) \(/i)) ? RegExp.$1: 'n/a';
}
if(td
.className == "catbg" && td.innerHTML.match(/Users Online/)) {
var mostonline = (td[a+4].innerHTML.split(/Most\susers\s/)[1].split(/, /i)[0].split(/<br/i)[0]);
var nowonline = (td[a+4].innerHTML.split(/<br>/i)[1]);
var staffonline = (td[a+4].innerHTML.match(/(\d+) Staff/i)) ? RegExp.$1: '0';
var usersonline = (td[a+4].innerHTML.match(/(\d+) Member/i)) ? RegExp.$1: '0';
var guestsonline = (td[a+4].innerHTML.match(/(\d+) Guest/i)) ? RegExp.$1: '0';
}
if(td
.className == "catbg" && td.innerHTML.match(/Today's Birthdays/)) {
var totalBday = (td[a+2].innerHTML.match(/(\d+) birthday/i)) ? RegExp.$1: '0';
var bdaylist = (td[a+2].innerHTML.split(/<br>/i)[1]);

}
var legend = new String();
for(var b=0;b<group.length;b++){
legend += '<font color='+group[1]+'>'+group[0]+'</font><br/>';
}
if(staffonline=="0" && usersonline=="0"){
var nowonline = "<i>No members online!</i>";
}
if(totalBday=="0"){
var bdaylist = "<i>No birthdays today!</i>";
}
}
for(a=0;a<table.length;a++){
if(table
.width == "100%" && table.cellPadding == "4" && table.innerHTML.match(/Info Center/i)) {
table
.parentNode.innerHTML = '<table cellspacing="1" cellpadding="4" class="bordercolor" width="92%" align="center" vAlign="top"><tr><td class="titlebg" align="center" width="100%" colspan="3"><b>Info Center</b></td></tr><tr><td class="windowbg" align="center" colspan="1" width="33%">'+fTitle+' would like to welcome '+newmemb+' to the forum. We now have a grand total of '+totalmembs+'!<br/></td><td class="windowbg" align="left" colspan="1" width="33%"><b>Last Topic:</b> '+lastpost+'<br/><b>Updated By:</b> '+lastuser+'</td><td class="windowbg" align="center" colspan="1" width="33%"> We have a grand total of <b>'+totalposts+'</b> posts in <b>'+totaltopics+'</b> topics!</td></tr><tr><td class="windowbg" align="left" colspan="1" width="33%" rowspan="2">'+legend+'</td><td class="catbg" align="left" colspan="2" width="67%"><div style="float:left;">'+staffonline+' Staff, '+usersonline+' Members, and '+guestsonline+' Guests></div><div style="float:right">Most users ever '+mostonline+'</div></td></tr><tr><td class="windowbg" align="left" colspan="2" width="67%">'+nowonline+'</td></tr><tr><td class="windowbg" align="left" colspan="3" width="100%">'+bdaylist+'<br/>'+fTitle+' would like to wish these people a very Happy Birthday!</td></tr></table>';
break;
}
}
}
//-->
</script>



Last Edit: Nov 16, 2009 18:53:41 GMT by ǻñî§ђ™

Chris

Chris Avatar

******
Head Coder

19,519


June 2005
You need to look at the source code to figure that out really. :) Here's the (not-spaced) version of the source for the birthdays section:

<tr><td class="catbg" bgcolor="c8d7de" colspan="2"> <table cellpadding="0" cellspacing="0" width="100%"><tr><td align="left" valign="center"><font size="2" class="cattext" color="57717F"><b>Today's Birthdays</b></font></td><td align="right" valign="center"><a href="/index.cgi?action=changevisibility&type=birthdays"><img src="http://s1.images.proboards.com/hide.gif" alt="Hide" border="0"/></a></font></td></tr></table></td></tr><tr><td class="windowbg" bgcolor="" width="20" valign="middle" align="center"><img src="http://s1.images.proboards.com/bdaycake.gif" alt="birthdays" border="0"/></td><td class="windowbg2" bgcolor="edf2f3" valign="top"><table width="98%" cellpadding="3" align="center"><tr><td valign="top" align="left"><font size="1">6 birthdays today.<br/><a href="/index.cgi?action=viewprofile&user=kunaiflame" class="group0" onclick="pb_bubble=1">Kunaiflame</a>, <a href="/index.cgi?action=viewprofile&user=furian" class="group0" onclick="pb_bubble=1">The Furian</a>, <a href="/index.cgi?action=viewprofile&user=drnapalm" class="group0" onclick="pb_bubble=1">drnapalm</a>, <a href="/index.cgi?action=viewprofile&user=jknife" class="group0" onclick="pb_bubble=1">jknife</a>, <a href="/index.cgi?action=viewprofile&user=skillion" class="group0" onclick="pb_bubble=1">skillion</a>, <a href="/index.cgi?action=viewprofile&user=zomgwtf" class="group12" onclick="pb_bubble=1">zomgwtf</a></font></td></tr></table></td></tr>

ǻñî§ђ™

ǻñî§ђ™ Avatar
Always in disguise!

*
Banned

64


March 2009
Chris Avatar
You need to look at the source code to figure that out really. :) Here's the (not-spaced) version of the source for the birthdays section:

<tr><td class="catbg" bgcolor="c8d7de" colspan="2"> <table cellpadding="0" cellspacing="0" width="100%"><tr><td align="left" valign="center"><font size="2" class="cattext" color="57717F"><b>Today's Birthdays</b></font></td><td align="right" valign="center"><a href="/index.cgi?action=changevisibility&type=birthdays"><img src="http://s1.images.proboards.com/hide.gif" alt="Hide" border="0"/></a></font></td></tr></table></td></tr><tr><td class="windowbg" bgcolor="" width="20" valign="middle" align="center"><img src="http://s1.images.proboards.com/bdaycake.gif" alt="birthdays" border="0"/></td><td class="windowbg2" bgcolor="edf2f3" valign="top"><table width="98%" cellpadding="3" align="center"><tr><td valign="top" align="left"><font size="1">6 birthdays today.<br/><a href="/index.cgi?action=viewprofile&user=kunaiflame" class="group0" onclick="pb_bubble=1">Kunaiflame</a>, <a href="/index.cgi?action=viewprofile&user=furian" class="group0" onclick="pb_bubble=1">The Furian</a>, <a href="/index.cgi?action=viewprofile&user=drnapalm" class="group0" onclick="pb_bubble=1">drnapalm</a>, <a href="/index.cgi?action=viewprofile&user=jknife" class="group0" onclick="pb_bubble=1">jknife</a>, <a href="/index.cgi?action=viewprofile&user=skillion" class="group0" onclick="pb_bubble=1">skillion</a>, <a href="/index.cgi?action=viewprofile&user=zomgwtf" class="group12" onclick="pb_bubble=1">zomgwtf</a></font></td></tr></table></td></tr>


OK, i hope i can do this :D Thanks Chris :)

ǻñî§ђ™

ǻñî§ђ™ Avatar
Always in disguise!

*
Banned

64


March 2009
This is so annoying >:(
I cant get the birthdays this to work but i cant get the Active users bit to work properly wither. I think ive messed the nowonline bit becuase everything after that doesnt work in the html bit :(

<script type="text/javascript">
<!--

if(!location.href.match(/action/) || location.href.match(/action=home/)){
var td = document.getElementsByTagName("td");
var table = document.getElementsByTagName('table');
for(a=0;a<td.length;a++){
if(td.className == "catbg" && td.innerHTML.match(/Forum Statistics/)) {
var totalposts = (td[a+2].innerHTML.match(/Total Posts: (\d+)(,\d+)?<br/i)) ? RegExp.$1+RegExp.$2: '';
var totaltopics = (td[a+2].innerHTML.match(/Total Topics: (\d+)(,\d+)? &/i)) ? RegExp.$1+RegExp.$2: '';
var totalmembs = (td[a+2].innerHTML.match(/Total Members: (.+?)<br/i)) ? RegExp.$1: '';
var newmemb = (td[a+2].innerHTML.match(/Newest Member: (.+?)<\/a>/i)) ? RegExp.$1+'</a>': '';
var lastpost = (td[a+2].innerHTML.match(/Last Updated Topic: (.+?) by/i)) ? RegExp.$1: 'n/a';
var lastuser = (td[a+2].innerHTML.match(/by (.+?) \(/i)) ? RegExp.$1: 'n/a';
}
if(td
.className == "catbg" && td.innerHTML.match(/Users Online/)) {
var mostonline = (td[a+4].innerHTML.split(/Most\susers\s/)[1].split(/, /i)[0].split(/<br/i)[0]);
var nowonline = (td[a+4].innerHTML.split(/<br>/i)[1]);
var staffonline = (td[a+4].innerHTML.match(/(\d+) Staff/i)) ? RegExp.$1: '0';
var usersonline = (td[a+4].innerHTML.match(/(\d+) Member/i)) ? RegExp.$1: '0';
var guestsonline = (td[a+4].innerHTML.match(/(\d+) Guest/i)) ? RegExp.$1: '0';
}
if(td
.className == "catbg" && td.innerHTML.match(/Active Users/)) {
var onlinetoday = (td[a+4].innerHTML.split(/<br>/i)[1]);
var staffonlinetoday = (td[a+4].innerHTML.match(/(\d+) Staff/i)) ? RegExp.$1: '0';
var usersonlinetoday = (td[a+4].innerHTML.match(/(\d+) Member/i)) ? RegExp.$1: '0';
var guestsonlinetoday = (td[a+4].innerHTML.match(/(\d+) Guest/i)) ? RegExp.$1: '0';

}
if(td
.className == "catbg" && td.innerHTML.match(/Today's Birthdays/)) {
var totalBday = (td[a+2].innerHTML.match(/(\d+) birthday/i)) ? RegExp.$1: '0';
var bdaylist = (td[a+2].innerHTML.split(/<br>/i)[1]);
}
if(staffonline=="0" && usersonline=="0"){
var nowonline = "<i>No members online!</i>";
}
if(staffonlinetoday=="0" && usersonlinetoday=="0"){
var onlinetoday = "<i>No members online!</i>";
}
if(totalBday=="0"){
var bdaylist = "<i>No birthdays today!</i>";
}
}
for(a=0;a<table.length;a++){
if(table
.width == "100%" && table.cellPadding == "4" && table.innerHTML.match(/Info Center/i)) {
table
.parentNode.innerHTML = '<table border="0" width="92%" cellpadding="4" cellspacing="1" class="bordercolor" align="center"><tr><td class="titlebg" align="center" width="100%" colspan="4"><b>Forum Statistics</b></td></tr><td class="windowbg" align="center" width="25%"><font size="1">The Members of Digital Data have made <b>'+totalposts+'</b> in <b>'+totaltopics+'</b> topics!</font></td><td class="windowbg" align="left" width="25%"><font size="1"><b>Welcome to Digital Data!</b><br/><b>Newest Member:</b> '+newmemb+'<br/><b>Total Members:</b> '+totalmembs+'</font></td><td class="windowbg" align="left" width="25%"><font size="1"><b>Last Post:</b> '+lastpost+'<br/><b>Made By:</b> '+lastuser+'<br/></td><td class="windowbg" align="left" width="25%"><font size="1"><b>Forum News:</b><br/>- None Yet</font></td></tr><tr><td class="titlebg" align="center" width="25%" colspan="1" height="1"><b><font size="1">Members Online</font></b></td><td class="titlebg" align="center" width="50%" colspan="2" height="1"><font size="1">'+staffonline+' Staff, '+usersonline+' Members and '+guestsonline+' Guests are currently online.</font></td><td class="windowbg" align="left" width="25%" clospan="2" rowspan="2"><font color="2B901C" size="1"><b>Administrators</b><br /></font><font color="268fce" size="1"><b>G. Moderators</b></font><br /><font color="4F46B3" size="1"><b>Moderators</b></font></td></tr><tr><td class="windowbg" align="center" width="75%" colspan="3">'+nowonline+'</td></tr><tr><td class="titlebg" align="left" width="400px" colspan="2" ><b><font size="1">Acitve Members In The Past 24 Hours</font></b></td><td class="titlebg" align="left" width="400px" colspan="2" ><font size="1">'+mostonline+'</font></td></tr><tr><td class="windowbg" align="center" width="800px" colspan="4">'+onlinetoday+'</td></tr><tr><td class="windowbg" align="left" width="100%" colspan="4"><font size="1"><b>Todays Birthdays:</b> '+bdaylist+'<br/><br/><b>Digital Data wishes these people a ver happy birthday!</font></td></tr></table>';
break;
}
}
}
//--></script>


Chris

Chris Avatar

******
Head Coder

19,519


June 2005
you're going to need to change the +2 to a different number for birthdays. The issue is the visibility changing button that appears for birthdays.

newBookmarkLockedFalling