Post by CrAzY_J on Jan 2, 2006 20:39:48 GMT -8
Description: This code will add a option in each user's profile to show/not show the "hey x you have x messages x are new" message.
Creator: CrAzY_J
Placement: Global Footers
<script type='text/javascript'>
/* Remove welcome message option in profile
code created by CrAzY_J
do not redistribute this code without the creator's permission*/
if( document.modifyForm && document.modifyForm.user.value == pb_username )
{
var RowS = document.modifyForm.showimages.parentNode.parentNode.parentNode;
var iRow = RowS.parentNode.insertRow( RowS.parentNode.rows.length );
var iCell1 = iRow.insertCell(0);
var iCell2 = iRow.insertCell(1);
var iCell3 = iRow.insertCell(2);
var aFont1 = document.createElement('font');
var aFont2 = aFont1.cloneNode(false);
var aFont3 = aFont1.cloneNode(false);
var aSelect = document.createElement('select');
aSelect.id = 'messageshowchooser';
aSelect.options[0] = new Option('Yes','yes');
aSelect.options[1] = new Option('No','no');
aSelect.selectedIndex = ( document.cookie.match('showelcome=yes') )? 0:1;
aFont1.size = '-1';
aFont2.size = '-1';
aFont3.size = '-2';
aFont1.appendChild( document.createTextNode('Show welcome message:') );
aFont2.appendChild( aSelect );
aFont3.appendChild( document.createTextNode('If you do not want the welcome message in the top table to appear, choose "yes" else choose "no".') );
iCell1.appendChild( aFont1 );
iCell2.appendChild( aFont2 );
iCell3.appendChild( aFont3 );
document.modifyForm.profileaction[0].onclick = function()
{
{
var d = new Date();
d.setYear( d.getFullYear() + 5 );
var thesuperlongid = document.getElementById('messageshowchooser');
document.cookie = 'showelcome='+thesuperlongid.options[thesuperlongid.selectedIndex].value+';expires='+d;
}
}
}
if( document.cookie.match('showelcome=yes') )
document.getElementsByTagName('td')[2].style.display = 'none';
</script>
Creator: CrAzY_J
Placement: Global Footers
<script type='text/javascript'>
/* Remove welcome message option in profile
code created by CrAzY_J
do not redistribute this code without the creator's permission*/
if( document.modifyForm && document.modifyForm.user.value == pb_username )
{
var RowS = document.modifyForm.showimages.parentNode.parentNode.parentNode;
var iRow = RowS.parentNode.insertRow( RowS.parentNode.rows.length );
var iCell1 = iRow.insertCell(0);
var iCell2 = iRow.insertCell(1);
var iCell3 = iRow.insertCell(2);
var aFont1 = document.createElement('font');
var aFont2 = aFont1.cloneNode(false);
var aFont3 = aFont1.cloneNode(false);
var aSelect = document.createElement('select');
aSelect.id = 'messageshowchooser';
aSelect.options[0] = new Option('Yes','yes');
aSelect.options[1] = new Option('No','no');
aSelect.selectedIndex = ( document.cookie.match('showelcome=yes') )? 0:1;
aFont1.size = '-1';
aFont2.size = '-1';
aFont3.size = '-2';
aFont1.appendChild( document.createTextNode('Show welcome message:') );
aFont2.appendChild( aSelect );
aFont3.appendChild( document.createTextNode('If you do not want the welcome message in the top table to appear, choose "yes" else choose "no".') );
iCell1.appendChild( aFont1 );
iCell2.appendChild( aFont2 );
iCell3.appendChild( aFont3 );
document.modifyForm.profileaction[0].onclick = function()
{
{
var d = new Date();
d.setYear( d.getFullYear() + 5 );
var thesuperlongid = document.getElementById('messageshowchooser');
document.cookie = 'showelcome='+thesuperlongid.options[thesuperlongid.selectedIndex].value+';expires='+d;
}
}
}
if( document.cookie.match('showelcome=yes') )
document.getElementsByTagName('td')[2].style.display = 'none';
</script>