|
Post by deadlyassassin on Feb 3, 2006 11:44:38 GMT -5
If you have a board only for viewing and you have set it to not have any members posting or replying, then what the following code does is it allow you to put a special icon next to the board notifying the user that it is a locked board. Global Footers<script type="text/javascript"> <!-- /* Locked Board Icons, By {XF}Äs$@§sîñ™, www.xf-clan.net Code from www.utopiangfx.proboards56.com/index.cgi */
// Edit Locked Icon var lockedIcon = "URL OF IMAGE";
function lockBoard(boardID) { var td = document.getElementsByTagName('td'); for (i=0; i<td.length; i++) { var bTarget = td.item(i).getElementsByTagName('a').item(0); if (td.item(i).width == "66%" && bTarget.href.match(new RegExp('board=' + boardID + '$', 'i'))) { var cTarget = td.item(i).previousSibling.getElementsByTagName('img').item(0); cTarget.setAttribute("src", lockedIcon); } } }
if(!location.href.match(/action/) || location.href.match(/com\/?((index\.cgi)?\??(action=(home|logout))?(#\w+)?)?$/)) { lockBoard('boardID'); lockBoard('boardID'); lockBoard('boardID'); } //--> </script>
|
|