Marc the code works , but when i go to my profile and i Modify it and i go to click Modify Profile it logs me out and it says "You must be logged in to view user profiles" ??
I took the code out to see if it was the code or a vforums System bug And i did the same things i stayed login, it is the code that's logging me out .
I have the code out right now .
Code:
- <script>
- <!--
- /* Stop Guests From Viewing Profiles */
- var tbl = get('table','tag');
- if(location.href.match(/action\/view_profile\//) || location.search.match(/action=view_profile/)){
- for(t=6;t<tbl.length;t++){
- tbl[t].style.display = 'none';
- }
- document.write('<table width="'+vf_width+'" class="border" align="center" cellspacing="1" cellpadding="3"><tr><td align="center" class="title1">An Error Has Occurred</td></tr><tr><td class="window1">You must be logged in to view user profiles.</td></tr></table>');
- }
- //-->
- </script>
try this instead:
<script>
<!--
/* Stop Guests From Viewing Profiles */
var tbl = get('table','tag');
if(location.href.match(/action\/view_profile\//) && vf_username == 'guest'){
for(t=6;t<tbl.length;t++){
tbl[t].style.display = 'none';
}
document.write('<table width="'+vf_width+'" class="border" align="center" cellspacing="1" cellpadding="3"><tr><td align="center" class="title1">An Error Has Occurred</td></tr><tr><td class="window1">You must be logged in to view user profiles.</td></tr></table>');
}
//-->
</script>
That worked Wrighty thank you.
![]()
Glad to help! ^_^
Oops, I forgot to do a username check!![]()
Also, I had non-SEO URL checking in mine which makes it more secure as it can still be accessed using old URL's, Wrighty.![]()