vForums Support Banner



 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Code Requests & Support :: [F] [Marc] Support Please - View Topic
Topic Rating: *****
Printable View
CåñåÐå™
Full Member
***

[Avatar]

Posts: 427
Status: Offline
Gender: Male
Location: Toronto Ontario
Joined:  
Reputation: 7%  


pmwww
[F] [Marc] Support Please (6th Apr 08 at 3:31pm UTC)
On Code : Stop Guest From Viewing Profile
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:
 
  1. <script>
  2. <!--
  3. /* Stop Guests From Viewing Profiles */
  4.  
  5. var tbl = get('table','tag');
  6. if(location.href.match(/action\/view_profile\//) || location.search.match(/action=view_profile/)){
  7.     for(t=6;t<tbl.length;t++){
  8.         tbl[t].style.display = 'none';
  9.     }
  10.     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>');
  11. }
  12. //-->
  13. </script>
  14.  
 

Image
click here We have 15 Different Skins/Templates for your vForum
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: [Marc] Support Please (6th Apr 08 at 3:36pm UTC)
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>
CåñåÐå™
Full Member
***

[Avatar]

Posts: 427
Status: Offline
Gender: Male
Location: Toronto Ontario
Joined:  
Reputation: 7%  


pmwww
Re: [Marc] Support Please (6th Apr 08 at 3:42pm UTC)
That worked Wrighty thank you {Grin} .

Image
click here We have 15 Different Skins/Templates for your vForum
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: [Marc] Support Please (6th Apr 08 at 4:07pm UTC)
{Smile}
Glad to help! ^_^
Marc
vChat Developer
*****
I <3 Rossy

Posts: 3,388
Status: Offline
Gender: Male
Location: Ontario, Canada
Age: 33
Joined:  

Additional Groups:
Coding Team
***


Reputation: 40%  


pmwww
Re: [F] [Marc] Support Please (7th Apr 08 at 2:15am UTC)
Oops, I forgot to do a username check! {Tongue Out}

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. {Wink}

rroll.to— Shorten a link, rickroll your friends.
 Printable View

All times are GMT+0 :: The current time is 3:30am
Page generated in 0.3139 seconds
This Forum is Powered By vForums (v2.4)
Create a Forum for Free | Find Forums