login in order to see custom site

Hello,

I created a custom .php file, which I pop up in a page created with the Pages builder in Admin section. However, as it is now, anyone can see this file without being a member if they know the direct URL for it.

Is it possible add a piece of code to my file, which checks if the user is logged in to my community before allowing the user to see the content?

Quote · 1 Jun 2009

Anyone who can help me?

Quote · 7 Jun 2009

You can set who can view (guest/member) in the blocks on the new page  ..... 
Admin > settings > Builders > Pages Builder .....

HTH
.

Quote · 7 Jun 2009

I am aware of that, yes. But it's not the page I created in Pages Builder I want to password protect. It is the .php-file I created for my popup window. I want to make sure that people can only view this file if they are logged in to my community even though this file is not actually a part of the Dolphin code.

Quote · 8 Jun 2009

You can try this, edit green code to what you will have there

 

 

<?
if(  $logged['member'] = (int)$_COOKIE['memberID'] ) { 

 

?>
<div align="center">
<table border="2" bgcolor="#e8e8e8" width="39%" cellpadding="2" cellspacing="0" bordercolor="#cc0000" style="border-collapse: collapse" id="table1">
<tbody>
<tr>
<td>
<p align="center"><b><span style="color: #000000;"><br />Your members code will be here.<br /><br /></span></b></p>
</td>
</tr>
</tbody>
</table>
</div>
<?

 

} else {

 

?>
<div align="center">
<table border="2" bgcolor="#e8e8e8" width="39%" cellpadding="2" cellspacing="0" bordercolor="#cc0000" style="border-collapse: collapse" id="table1">
<tbody>
<tr>
<td>
<p align="center"><b><span style="color: #cc0000;"><br />Sorry, you need to login before you can see this page.<br /><br /></span></b></p>
</td>
</tr>
</tbody>
</table>
</div>
<?

 

}
?>

Quote · 8 Jun 2009

This will force members to login if they click on for example: Browse Members", they are redirected to the login page.

Add this to the php file you would redirected to login:

$logged['member'] = member_auth( 0 );

Place code towards the top of page usally under these values:

$_page

$_page_cont

Hope this helps..

Quote · 8 Jun 2009

Thanks a bunch, guys! I'll be trying this out as soon as I have some free time to test everything.

You help is much appreciated :D

Quote · 11 Jun 2009

I am trying to put

__hello_member__ section in different site, so users can login to my main domain from a different site.

Any expert here?

Quote · 13 Jun 2009

In extension of my previous question, I'd like to prevent "standard members" from seeing this custom page so only my paying members will be able to do this.

Any of you guys who have a sollution to this?

Quote · 9 Jul 2009

Yes, add the page to your Admin Panels section for membership levels and set it there. 

Quote · 10 Jul 2009

Yes, add the page to your Admin Panels section for membership levels and set it there.

How do I do that? I don't see that option anywhere?

Quote · 10 Jul 2009
 
 
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.