Post by CrAzY_J on Jan 6, 2006 11:51:41 GMT -8
Code description: This code gives you the ability to hide profiles from certain members or from guests.
Code creator: CrAzY_J
Code placement: Main Footers
Cross browsercheck: Firefox 1.0 & Internet Explorer 6.0
Code instructions:
In the code you will see some colored lines, the red colored line is the message which will be displayed for the members who are not allowed to view profiles.
The orange part is the HEX color for the message (in case you want to change it)
And the remaining colors are the usernames who are not allowed to view the profiles, "Guest" is for guests. You can add more usernames if you want, but they have to be in single quotes and seperated by commas.
<script type='text/javascript'>
/* Hide profiles from certain members
created by crAzY_J
do not redistribute this code without the creator's permission*/
var Message = 'Guests are not allowed to view profiles';
var MessageColor = '#ffffff';
var Members = ['Guest','username1','username2'];
if( this.location.href.match(/viewprofile/i) )
{
for( var c = 0 ; c < Members.length ; c ++ )
{
if( pb_username.match( new RegExp('^'+Members[c]+'$') ))
{
var gTables = document.body.getElementsByTagName('table');
for( var t = 4 ; t < gTables.length ; t ++ )
gTables[t].style.display = 'none';
var Center = document.createElement('center');
var Font = document.createElement('font');
Font.align = 'center';
Font.color = MessageColor
Font.appendChild( document.createTextNode( Message ) );
Center.appendChild( Font );
document.body.appendChild( Center );
document.body.appendChild( document.createElement('br') )
}
}
}
</script>
Enjoy
Code creator: CrAzY_J
Code placement: Main Footers
Cross browsercheck: Firefox 1.0 & Internet Explorer 6.0
Code instructions:
In the code you will see some colored lines, the red colored line is the message which will be displayed for the members who are not allowed to view profiles.
The orange part is the HEX color for the message (in case you want to change it)
And the remaining colors are the usernames who are not allowed to view the profiles, "Guest" is for guests. You can add more usernames if you want, but they have to be in single quotes and seperated by commas.
<script type='text/javascript'>
/* Hide profiles from certain members
created by crAzY_J
do not redistribute this code without the creator's permission*/
var Message = 'Guests are not allowed to view profiles';
var MessageColor = '#ffffff';
var Members = ['Guest','username1','username2'];
if( this.location.href.match(/viewprofile/i) )
{
for( var c = 0 ; c < Members.length ; c ++ )
{
if( pb_username.match( new RegExp('^'+Members[c]+'$') ))
{
var gTables = document.body.getElementsByTagName('table');
for( var t = 4 ; t < gTables.length ; t ++ )
gTables[t].style.display = 'none';
var Center = document.createElement('center');
var Font = document.createElement('font');
Font.align = 'center';
Font.color = MessageColor
Font.appendChild( document.createTextNode( Message ) );
Center.appendChild( Font );
document.body.appendChild( Center );
document.body.appendChild( document.createElement('br') )
}
}
}
</script>
Enjoy