Board Logo

 Username:    Password:    Stay logged in: Welcome Guest. Please Login or Register.  May 23rd, 2017, 12:05pm


Board Hacks
Important News
Please read the notes posted with any codes carefully, as they will usually tell you where they need to go.
Welcome to the Conforums Hacks Board!

All codes here have been tested but we accept no responsibility if these codes do not work on your board, or have an adverse effect when used in combination with other codes.

This board is read only. Any queries or requests for codes should be made on the Coding Forum

Helpful sites
Google
Dynamic Drive

The Staff
Roger
Dave
GIzzy



« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Option to disable news fader  (Read 3056 times)
Garet
Conforums Elite
Senior Member


member is offline

Avatar




Homepage PM

Gender: Male
Posts: 2073
xx Option to disable news fader
« Thread started on: Aug 19th, 2006, 03:11am »

Alrighty, this will allow each member to select from their profile if they want the news fader to appear on the main page.
Clickies 4 Preview

Cross Browser: IE & FF
Main Footers


Submitted by: Zando


<script type="text/javascript">
<!--

/*Option for Members to Disable News Fader In their Profile, by Zando*/

var tbl=document.getElementsByTagName("table")
for(z=0;z<tbl.length;z++){
if(tbl[z].width=="100%" && tbl[z].cellPadding=="3" && tbl[z].border=="0" && tbl[z].rows[0].cells[0].innerHTML.match(/Password Reminder:/)){
var zRow=tbl[z].insertRow(3);var zCell=zRow.insertCell(0);
var zCell2=zRow.insertCell(1);zCell.width="320";
zCell.innerHTML='<font size="2"><b>Show News Fader:</b></font><b'+'r><font size="1">Choosing "No" will disable the News Fader from displaying on the main page.</font>';
zCell2.innerHTML='<select name="zFader" onChange="zCook()"><option selected="1">---</option><option value="3">Yes</option><option value="1">No</option></select>';
}
}
function zCook(){
var Decider=document.getElementsByTagName("select")
for(a=0;a<Decider.length;a++){
if(Decider[a].value.match(/1/)){
document.cookie ='zNews=disabled;expires=Sat, 20 Jan 3000 12:12:12 UTC; path=/;';
}
}
var Sel=document.getElementsByTagName("select")
for(d=0;d<Sel.length;d++){
if(Sel[d].value.match(/3/)){
document.cookie ='zNews=disZabled;expires=Sat, 20 Jan 3000 12:12:12 UTC; path=/;';
}
}
}
if(document.cookie.match(/disabled/) && !document.cookie.match(/disZabled/)){
for(a=0;a<tbl.length;a++){
if(tbl[a].rows[0].cells[0].innerHTML.match(/News/) && tbl[a].rows[0].cells[0].className.match(/titlebg/) && tbl[a].rows[0].cells[0].align=="center"){
tbl[a-1].style.display="none";
}
}
}

//-->
</script>










Note: This code relies on Cookies.
« Last Edit: Aug 19th, 2006, 03:12am by Garet » User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Back To Top
Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls