vForums Support Banner



 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Code Requests & Support :: Guests can't view profiles - View Topic
Topic Rating: *****
Printable View
skindstad
Junior Member
**

[Avatar]

Posts: 41
Status: Offline
Gender: Female
Location: Denmark
Joined:  
Reputation: 4%  


pmwwwtwittermsnyahoovForum
Guests can't view profiles (20th Apr 10 at 3:44pm UTC)
Resolved
Yes, it's me again {Grin} Two things, if it's possible. Otherwise the first is most important {Grin}

I'm in need of a code, so guests can't view members profile. I can't seem to find one around here and since my coding skills are pretty much zero in making new, then I'm totally lost. So any help will be greatly appreaciated {Grin}

And another thing. I've discovered some problems with some of my boards, where I can't open the threads. It's basically the two top boards I've got on my forum. I think it's when I use colours and font sizes and other fancy stuff in the posts, the thread won't open when I want to enter it. Thought it had something to do with a code I had added, but one of the other members had trouble with it before I had added the code, so I don't know.

Image
dog199200
Guest
Re: Guests can't view profiles (20th Apr 10 at 5:47pm UTC)
Ok about the second thing, report it to ross in the bug reports board. As for the first, umm let me see what i can do, I might be able to drag something up fairly easy.
Michael
Moderator
*****

[Avatar]
Recoding the future

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

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Guests can't view profiles (21st Apr 10 at 10:35am UTC)
Bugs Boards - Please report the 2nd issue in there... and Ross will be able to resolve it for you fairly quickly. Just sounds like a problem with the UBBC parser. {Smile} (Make sure to post direct links to the threads).

If Broken doesn't get part 1 done, I'll do it later {Smile}
dog199200
Guest
Re: Guests can't view profiles (21st Apr 10 at 3:25pm UTC)
I wont be able to, something came up this morning and I have to go out of town for a few days.
Michael
Moderator
*****

[Avatar]
Recoding the future

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

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Guests can't view profiles (23rd Apr 10 at 5:50am UTC)
Try this:

Main Header:
<table align="center" width="0" cellspacing="1" cellpadding="3" class="border" id="guest_error" style="display:none;"><tr><td class="title1"><b>An Error has Occurred</b></td></tr><tr><td class="window1"><font size="2">Guests are not allowed to view member profiles. Please <a href = './action/login'>Login</a> or <a href = './action/register'>Register</a>.</font></td></tr></table>
<script type = 'text/javascript'>
if(location.href.match(/\/profile\/(.+?)($|\/)/) && vf_username == 'guest'){
     document.write('<div style = "display: none;">');
     get('guest_error', 'id').style.display = '';
     get('guest_error', 'id).width = get('table', 'tag')[0].width;
}
</script>


Main Footer:
<script type = 'text/javascript'>
if(location.href.match(/\/profile\/(.+?)($|\/)/) && vf_username == 'guest')
     document.write('</div>');
</script>


Nick
Very Senior Member
*****

[Avatar]

Posts: 3,012
Status: Offline
Gender: Male
Location: vForums
Age: 34
Joined:  
Reputation: 62%  


pmwww
Re: Guests can't view profiles (24th Apr 10 at 12:21am UTC)
It works, but it's not the width of the forum it's longer than the forum.
Michael
Moderator
*****

[Avatar]
Recoding the future

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

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Guests can't view profiles (24th Apr 10 at 7:14am UTC)
Altered the code. {Smile}
skindstad
Junior Member
**

[Avatar]

Posts: 41
Status: Offline
Gender: Female
Location: Denmark
Joined:  
Reputation: 4%  


pmwwwtwittermsnyahoovForum
Re: Guests can't view profiles (26th Apr 10 at 9:45am UTC)
It doesn't work in my end. I can still see the members profiles, when I'm not logged in.

Edit: Nevermind, found the mistake.

There was missing a '
in
get('guest_error', 'id').width = get('table', 'tag')[0].width

And now it works {Grin} Thanks a bunch for the help {Smile} {Kiss}

Image
Nick
Very Senior Member
*****

[Avatar]

Posts: 3,012
Status: Offline
Gender: Male
Location: vForums
Age: 34
Joined:  
Reputation: 62%  


pmwww
Re: Guests can't view profiles (26th Apr 10 at 4:33pm UTC)
Aha, guess I shouldn't edit a forum's code using my iPod. >.< Got completely locked out, but have it fixed now since I got on my computer. and looks good. {Smile} I may have some use for this code later on, depending if this forum falls through later.
Michael
Moderator
*****

[Avatar]
Recoding the future

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

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Guests can't view profiles (26th Apr 10 at 5:10pm UTC)
Woops my bad... I added that line in and didn't test it... Glad it works.

{Smile}
 Printable View

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