deadlyassassin
inherit
-492461
0
Nov 22, 2024 20:45:07 GMT -8
deadlyassassin
0
January 1970
GUEST
|
Post by deadlyassassin on Feb 4, 2006 5:47:17 GMT -8
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>
|
|