Post by (¯`•DregondRahl•._) on Feb 23, 2007 8:55:31 GMT -8
People sometimes want to remove sections of the info center, this code does it. Its nothing complicated.
iTitle can be any of these:
Forum Statistics
Events This Month
Today's Birthdays
Users Online
Active Users In The Past 24 Hours
If a section is added to the info center directly, you just add its name as needed. For example
iTitle = "Users Online Today";
Fore multiple sections:
iTitle = "(Events This Month|Today's Birthdays)";
MAIN FOOTER
<script type="text/javascript">
<!--
// remove InfoCenter section- Dre
iTitle = "Today's Birthdays";
if(location.href.match(/action=home$/i) || !location.href.match(/(action|board)=/i)){
var td = document.getElementsByTagName('td');
for(i = 0; i < td.length; i ++){
if(td.item(i).className == "catbg" && td.item(i).colSpan == "2" && td.item(i).innerHTML.match(iTitle)){
td.item(i).parentNode.style.display = "none";
td.item(i).parentNode.nextSibling.style.display = "none";
}
}
}
//-->
</script>
What? want to remove it only for guests? okay then use this instead
MAIN FOOTER
<script type="text/javascript">
<!--
// remove InfoCenter section for guests
iTitle = "Today's Birthdays";
if(pb_username.match(/guest/i)){
if(location.href.match(/action=home$/i) || !location.href.match(/(action|board)=/i)){
var td = document.getElementsByTagName('td');
for(i = 0; i < td.length; i ++){
if(td.item(i).className == "catbg" && td.item(i).colSpan == "2" && td.item(i).innerHTML.match(iTitle)){
td.item(i).parentNode.style.display = "none";
td.item(i).parentNode.nextSibling.style.display = "none";
}
}
}
}
//-->
</script>
If you want it removed for specific members and guests just modify the part in blue
(/(guest|user1|user2)/i)
Okay, now go dance
iTitle can be any of these:
Forum Statistics
Events This Month
Today's Birthdays
Users Online
Active Users In The Past 24 Hours
If a section is added to the info center directly, you just add its name as needed. For example
iTitle = "Users Online Today";
Fore multiple sections:
iTitle = "(Events This Month|Today's Birthdays)";
MAIN FOOTER
<script type="text/javascript">
<!--
// remove InfoCenter section- Dre
iTitle = "Today's Birthdays";
if(location.href.match(/action=home$/i) || !location.href.match(/(action|board)=/i)){
var td = document.getElementsByTagName('td');
for(i = 0; i < td.length; i ++){
if(td.item(i).className == "catbg" && td.item(i).colSpan == "2" && td.item(i).innerHTML.match(iTitle)){
td.item(i).parentNode.style.display = "none";
td.item(i).parentNode.nextSibling.style.display = "none";
}
}
}
//-->
</script>
What? want to remove it only for guests? okay then use this instead
MAIN FOOTER
<script type="text/javascript">
<!--
// remove InfoCenter section for guests
iTitle = "Today's Birthdays";
if(pb_username.match(/guest/i)){
if(location.href.match(/action=home$/i) || !location.href.match(/(action|board)=/i)){
var td = document.getElementsByTagName('td');
for(i = 0; i < td.length; i ++){
if(td.item(i).className == "catbg" && td.item(i).colSpan == "2" && td.item(i).innerHTML.match(iTitle)){
td.item(i).parentNode.style.display = "none";
td.item(i).parentNode.nextSibling.style.display = "none";
}
}
}
}
//-->
</script>
If you want it removed for specific members and guests just modify the part in blue
(/(guest|user1|user2)/i)
Okay, now go dance