Post by Samus on Nov 3, 2007 12:05:31 GMT -5
When a Guest attempts to view a Profile, it replaces the Profile with a Message instead. Like so - Preview
Source: Closed
Main Footer
Source: Closed
Main Footer
<script type="text/javascript">
<!--
/* Stop Guests from Viewing Profiles
By Samus - http://exdat.proboards44.com
Do NOT RIP nor REPOST nor CLAIM AS YOUR OWN */
// No edity
var sC = document.getElementsByTagName('td');
var fCa = document.getElementsByTagName('font')[2].getElementsByTagName('a');
if(location.href.match(/action=viewprofile/) && pb_username == 'Guest'){
for(var a=5;a<sC.length-1;a++){
if(sC[a].className.match(/titlebg/i) && sC[a].firstChild.innerHTML.match(/View\sProfile:/i)){
sC[a].colSpan = '1';
sC[a].firstChild.style.display='none';
var newF = document.createElement('font');
newF.setAttribute('size','-1');
newF.appendChild(document.createTextNode('An Error Has Occurred'));
sC[a].appendChild(newF);
var tsc = document.createElement('td');
tsc.className = 'windowbg';
tsc.appendChild(document.createTextNode('Sorry, but you do not have permission to view this users profile.'));
tsc.appendChild(document.createElement('br'));
tsc.appendChild(document.createTextNode('Please '));
tsc.appendChild(fCa[0].cloneNode(true));
tsc.appendChild(document.createTextNode(' or '));
tsc.appendChild(fCa[1].cloneNode(true));
tsc.appendChild(document.createTextNode(' to use this feature.'));
tsc2 = document.createElement('tr');
tsc2.appendChild(tsc);
sC[a].parentNode.parentNode.insertBefore(tsc2,sC[a].parentNode.nextSibling);
sC[a].parentNode.nextSibling.nextSibling.style.display='none';
var dt = document.title;
document.title = dt.replace(/View\sProfile:\s(.+?)$/i,'An Error Has Occurred');
}else if(sC[a].width.match(/100%/) && sC[a].vAlign == 'top'){
sC[a].innerHTML = sC[a].innerHTML.replace(/:: View Profile:\s(.+?)</i,':: An Error Has Occurred<');
}
}
}
//-->
</script>