Post by zando on Aug 4, 2006 19:51:47 GMT -8
Alright. This code will create a drop down menu in member's profile. From this menu they will able to select if they want the news fader to appear on the main page.
Clickies 4 Preview
Main Footers
Cross Browser: IE & FF
<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=="650" && tbl[z].cellPadding=="2" && tbl[z].border=="0" && tbl[z].rows[0].cells[0].innerHTML.match(/Show Age/)){
var zRow=tbl[z].insertRow(7);var zCell=zRow.insertCell(0);
var zCell2=zRow.insertCell(1);var zCell3=zRow.insertCell(2);
zCell.width="160";zCell2.width="245";zCell3.width="245";
zCell.vAlign="top";zCell2.vAlign="top";zCell3.vAlign="top";
zCell.innerHTML='<font size="2">Show News Fader:</font>';
zCell2.innerHTML='<select name="zFader" onChange="zCook()"><option selected="1">---</option><option value="3">Yes</option><option value="1">No</option></select>';
zCell3.innerHTML='<font size="-2">Choosing "No" will disable the News Fader from displaying on the main page.</font>';
}
}
function zCook(){
var Decider=document.getElementsByTagName("select")
for(a=0;a<Decider.length;a++){
if(Decider.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.rows[0].cells[0].className.match(/newstitlebg/)){
tbl[a-1].style.display="none";
}
}
}
//-->
</script>
Clickies 4 Preview
Main Footers
Cross Browser: IE & FF
<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=="650" && tbl[z].cellPadding=="2" && tbl[z].border=="0" && tbl[z].rows[0].cells[0].innerHTML.match(/Show Age/)){
var zRow=tbl[z].insertRow(7);var zCell=zRow.insertCell(0);
var zCell2=zRow.insertCell(1);var zCell3=zRow.insertCell(2);
zCell.width="160";zCell2.width="245";zCell3.width="245";
zCell.vAlign="top";zCell2.vAlign="top";zCell3.vAlign="top";
zCell.innerHTML='<font size="2">Show News Fader:</font>';
zCell2.innerHTML='<select name="zFader" onChange="zCook()"><option selected="1">---</option><option value="3">Yes</option><option value="1">No</option></select>';
zCell3.innerHTML='<font size="-2">Choosing "No" will disable the News Fader from displaying on the main page.</font>';
}
}
function zCook(){
var Decider=document.getElementsByTagName("select")
for(a=0;a<Decider.length;a++){
if(Decider.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.rows[0].cells[0].className.match(/newstitlebg/)){
tbl[a-1].style.display="none";
}
}
}
//-->
</script>