Post by Jordan on Jan 17, 2007 16:03:57 GMT -8
Unlike all the other codes that hide boards, this one simply "creates" a board that you can have link to a hidden board. It's like this so if people disable Javascript they still won't be able to see the board.
Main Footers (Instructions Below)
<script type="text/javascript"><!--
// Hidden Board for Individual Members v1 - Triad
var all = ['admin','username','username'];
var tcell = "<br /><br /><br />";
function insertBoard(pos,name,text,link,user){
var td = document.getElementsByTagName("td");
var table = document.getElementsByTagName("table");
if(location.href.match(/\.com(\/|.+cgi(\?|#.+|\?\w+=home)?)?$/i)){
for(a=0;a<all.length;a++){
if(pb_username.match(new RegExp("^("+user+"|"+all+")$","i"))){
for(t=0;t<td.length;t++){
if(td[t].width=="66%"){
var pic = td[t].parentNode.firstChild;
var board = td[t].parentNode.firstChild.nextSibling;
var posts = td[t].parentNode.firstChild.nextSibling.nextSibling;
var threads = td[t].parentNode.lastChild.previousSibling;
var last = td[t].parentNode.lastChild;
break;
}
}
for(i=3;i<table.length;i++){
if(table[i].cellPadding=="4" && table[i].firstChild.innerHTML.match(/forum\sname/i)){
var iRow = table[i].insertRow(pos);
var a = board.cloneNode(true); a.innerHTML = "<font size='2'><b><a href='/index.cgi?board="+link+"'>"+name+"</a></b></font><br /><font size='1'>"+text+"</font>";
a.onclick = function(){location.href='/index.cgi?board='+link;}
var b = posts.cloneNode(true); b.innerHTML = "<font size='2'>&n"+"bsp;</font>";
var c = threads.cloneNode(true); c.innerHTML = "<font size='2'>&n"+"bsp;</font>";
var d = last.cloneNode(true); d.innerHTML = "<font size='1'>"+tcell+"</font>";
iRow.appendChild(pic.cloneNode(true));
iRow.appendChild(a);
iRow.appendChild(b);
iRow.appendChild(c);
iRow.appendChild(d);
}
}
for(x=0;x<td.length;x++){
if(td[x].colSpan=="5" && td[x].getElementsByTagName("a")[0].href.match(/action=markallboardsread/i)){
td[x].parentNode.parentNode.appendChild(td[x].parentNode);
}
}
}
}
}
}
insertBoard("Position","Board Name","Board Description","Board ID","(user|user|user)");
insertBoard("-1","Hidden Board","If you can see this board you are special","hiddenboard","as");
//--></script>
Editing (Top to Bottom)
» Anyone in the var all can see all the hidden boards.
» The var tcell is the last post cell. The <br /> is just spacing it out, but you can put whatever in it.
» The function: (You can have more than one)
insertBoard("-1","Hidden Board","If you can see this board you are special","hiddenboard","user");
Main Footers (Instructions Below)
<script type="text/javascript"><!--
// Hidden Board for Individual Members v1 - Triad
var all = ['admin','username','username'];
var tcell = "<br /><br /><br />";
function insertBoard(pos,name,text,link,user){
var td = document.getElementsByTagName("td");
var table = document.getElementsByTagName("table");
if(location.href.match(/\.com(\/|.+cgi(\?|#.+|\?\w+=home)?)?$/i)){
for(a=0;a<all.length;a++){
if(pb_username.match(new RegExp("^("+user+"|"+all+")$","i"))){
for(t=0;t<td.length;t++){
if(td[t].width=="66%"){
var pic = td[t].parentNode.firstChild;
var board = td[t].parentNode.firstChild.nextSibling;
var posts = td[t].parentNode.firstChild.nextSibling.nextSibling;
var threads = td[t].parentNode.lastChild.previousSibling;
var last = td[t].parentNode.lastChild;
break;
}
}
for(i=3;i<table.length;i++){
if(table[i].cellPadding=="4" && table[i].firstChild.innerHTML.match(/forum\sname/i)){
var iRow = table[i].insertRow(pos);
var a = board.cloneNode(true); a.innerHTML = "<font size='2'><b><a href='/index.cgi?board="+link+"'>"+name+"</a></b></font><br /><font size='1'>"+text+"</font>";
a.onclick = function(){location.href='/index.cgi?board='+link;}
var b = posts.cloneNode(true); b.innerHTML = "<font size='2'>&n"+"bsp;</font>";
var c = threads.cloneNode(true); c.innerHTML = "<font size='2'>&n"+"bsp;</font>";
var d = last.cloneNode(true); d.innerHTML = "<font size='1'>"+tcell+"</font>";
iRow.appendChild(pic.cloneNode(true));
iRow.appendChild(a);
iRow.appendChild(b);
iRow.appendChild(c);
iRow.appendChild(d);
}
}
for(x=0;x<td.length;x++){
if(td[x].colSpan=="5" && td[x].getElementsByTagName("a")[0].href.match(/action=markallboardsread/i)){
td[x].parentNode.parentNode.appendChild(td[x].parentNode);
}
}
}
}
}
}
insertBoard("Position","Board Name","Board Description","Board ID","(user|user|user)");
insertBoard("-1","Hidden Board","If you can see this board you are special","hiddenboard","as");
//--></script>
Editing (Top to Bottom)
» Anyone in the var all can see all the hidden boards.
» The var tcell is the last post cell. The <br /> is just spacing it out, but you can put whatever in it.
» The function: (You can have more than one)
insertBoard("-1","Hidden Board","If you can see this board you are special","hiddenboard","user");
1. -1 is the position. -1 will put the board at the very bottom, but 0 and up (0, 1, 2, etc.) will position from the top down. You can place your board almost anywhere. (0 is a lot of fun, but -1 recommended).Thanks to (¯`•DregondRahl•._) for helping me.
2. Board Name
3. Board Desciption
4. Do not put the whole URL of your board. Only put the id. So if the URL was support.proboards.com/index.cgi?board=pbgt, you would only put pbgt. Also, link this to your hidden board. Admin > Create/Modify board > Hide Board
5. This is for the users who can access the board. If you only have one user, only put "username" around their name. If you have more than one do this. "(user|user|user)"