Register My Account Search Members F.A.Q. Admin  
Support Forums  


Post new topic Post reply
Author Message
Sage

Member
Posts: 1040
Registered: Feb 2004
 
 Posted March 14th, 2010 10:18 PM   IP           Reply with quote Edit Post Delete post
This hides the View profile page from guests, Only Members can view.

Preview:
- Registered
- Guests

Control Panel > Custom Templates > Page Header

First add this Directly after {headerinsert}
Quote:

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

var bId = "{boardid}";

//-->
</script>



Custom Templates > Feature Settings > Footer
Quote:

<script type="text/JavaScript">
<!--
//Hide "View Profile" From Guests
//Written by Dranew

var cPage = location.href.toString();

var iTd = document.getElementsByTagName('td');

var build = {

hidePro:function() {
if(cPage.match(/user.php/)) {
if(document.cookie.match(/ckusr/) && document.cookie.match(bId)) {
var lUs = document.cookie.split("ckusr["+bId+"]")[1];
var lSp = lUs.split("=")[1];
var lUser = lSp.split(";")[0];
} else {
var lUser = "Guest";
}
if(lUser == "Guest")
for(a=0;a<iTd.length;a++) {
if(iTd.item(a).className == "Heading" && iTd.item(a).colSpan == "3" && iTd.item(a).innerHTML.match(/Viewing user:/)) {
var nTd = iTd.item(a).parentNode.parentNode.getElementsByTagName('td');
for(b=0;b<nTd.length;b++) {
if(nTd.item(b).className == "FirstAlt" && nTd.item(b).colSpan == "3" && nTd.item(b).innerHTML.match(/(Email:|Updated:|Comment)/)) {
var gView = "<tr><td width='100%' class='Heading'>"+iTd.item(a).innerHTML+"</td></tr>";
gView += "<tr><td width='100%' class='FirstAlt'>";
gView += "<span class='NormalText'>Only Registered Users May View Profiles</span>";
nTd.item(b).parentNode.parentNode.innerHTML = gView+"</td></tr>";
}
}
}
}
}
}
}

//Build
build.hidePro();

//-->
</script>

- More Scripts and Mods at indexOf('ExCo')
ripped glutes

Member
Posts: 236
Registered: Sep 2006
 
 Posted March 20th, 2010 02:43 PM   IP           Reply with quote Edit Post Delete post
thats a great idea sage...i keep my board closed to non members anyway...but ide def add this if i had it open..


www.rippedglutes.net



Posts:
Registered:

 Posted    IP           Reply with quote Edit Post Delete post
Mark all forums read
Logout
All times are EST
Forum jump:

Thread Options: Delete thread / Open/Close thread / Rename thread / Stick thread / Move thread / Merge thread
Post new topic Post reply

< Previous thread | Next thread > | Subscribe to thread |