How to Restrict Pages to Members Only?

noman posted 28th of May 2008 in Community Voice. 15 comments.

Hi there,
I am trying to only allow my members to access the tabs for pages (such as Events, Classifieds, etc) so that it functions like the chat feature where the page prompts the user to log in or register before accessing the page. Is that possible?

I'm currently using 6.0.0005 so I would appreciate instructions for 6.0.0005 as well as 6.1.1 (which I plan to upgrade to within the next several weeks).

Thank you!!!

 
Comments
·Oldest
·Top
Please login to post a comment.
tango3d
Admin/ settings/ memebr levels free mode off
yossi
Very simple..go to admin pannel and then to navigation menu and then click on your desire item. You'll have the option of guest/member.
gkcgautam
Well...some code modifications are required to do what you are asking for...i would work on it and get back to you soon...please be patient...n ya...it wud be free!
noman
Not quite what I was looking for as neither one of these methods fully restricts a non-member from accessing the links. Any other ideas? :)
noman
I posted that before refreshing my post to see gkcgautam's post! Whoops! Thanks, gkcgautam!
LHAdmin
Add this to each page after the check login line:

if ( !( $logged['admin'] = member_auth( 1, false ) ) )
if ( !( $logged['member'] = member_auth( 0, true ) ) )
if ( !( $logged['aff'] = member_auth( 2, false )) )
$logged['moderator'] = member_auth( 3, false );

Works for all but Forums.
noman
That did it! Thanks, LHAdmin!
LHAdmin
You're welcome. Let me know if you figure out how to do it for Forums.
DosDawg
that fix was actually posted over on expertzzz.com i applied that fix to 6.0.0005 and it worked beautifully. i was there today digging around looking for it. i am pretty sure its was done the same way. also, i have the forums restricted or did have prior to 6.1.1 update. will have to get back in there and dig around.

later,
DosDawg
Stuart038
Does this:
Add this to each page after the check login line:

if ( !( $logged['admin'] = member_auth( 1, false ) ) )
if ( !( $logged['member'] = member_auth( 0, true ) ) )
if ( !( $logged['aff'] = member_auth( 2, false )) )
$logged['moderator'] = member_auth( 3, false );

Works for all but Forums.

Work for 6.1.1. ?

Thanks
praveenkv1988
For 6.1.1 add this line.

$logged['member'] = member_auth( 0 );
Vespen
I don't understand where i need to insert this one...
Some php files or somewhere in admin panel?
Plz, specify more clearly.
ratansingh
go to your file manager & edite .php page
like articel.php, browemusic.php,event.php
What about restricting content by membership type instead of just generic "membership". For example I have a membership type that I want them to be able see private videos, but another membership type could not, is that possible?
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.
PET:0.072359085083008