This code will replace the forum description of ANY forum you choose with a "You are not logged in, so you cannot view this forum" message of your choice.
It will also make that forum redirect to the Login page.
To make a forum Registered Only, just put "[reg]" (with the brackets, without the quotes) somewhere in it's Forum Description.
Here's the code:
<script language="JavaScript" type="text/JavaScript">
/* Registered Only Forums code created by IceMetalPunk */
errorcode="
Error Message Here, All HTML Allowed";
tds=document.getElementsByTagName("td");
for (i=0; i<tds.length; i++) {
if (tds[i].getElementsByTagName("span").length>0 && tds[i].getElementsByTagName("span")[0].className=="desc" && tds[i].getElementsByTagName("span")[0].innerHTML.indexOf("[reg]")!=-1) {
if (document.getElementById("userlinks").innerHTML.in dexOf("Logged in as")==-1) {
tds[i].getElementsByTagName("a")[0].href="
Board_URL?act=Login&CODE=00";
tds[i+3].getElementsByTagName("a")[0].href="
Board_URL?act=Login&CODE=00";
tds[i+3].getElementsByTagName("a")[1].href="
Board_URL?act=Login&CODE=00";
tds[i].getElementsByTagName("span")[0].innerHTML=errorcode;
}
else {
tds[i].getElementsByTagName("span")[0].innerHTML=tds[i].getElementsByTagName("span")[0].innerHTML.split("[reg]").join("");
}
}
}
</script>
Replace the parts in RED appropriately.
Preview:
Regdforumstest
Go there as a guest, and look at the "Reg'd Only" forum. Note the description, and try to go into it. Then log in, and note how the description has changed, and note that you can get into the forum.
Also note that wherever the [reg] tag is in the description, it is removed from it when the message (or normal description) is displayed, so no members will actually see the tag. It is only there to let the script know which forums to change.
Code by IcemetalPunk
I dont know if the html code work for Vbulletion
But if they allow html in vbulletion i guess you can try