Showing "member's only" or login block on a newly defined page

I have put an RSS block on its own page and set it for viewing to members only.  It is a feed from a job site, and everything works fine.  When someone looks at it from the outside though, it just looks like the page has no content.  That is not exactly what I want.  I want visitors to view that page and see a message "members only" so they have an incentive to join.

Actually, even better would be the login form to be displayed for all visitors, similar to what is done in the "member's only" mod.  Where is the code placement for this?   I don't even know where the pages we make are located - could someone help out with this?.

Quote · 20 May 2011

Hi Rob,

Can you not just make another html block visible to guests only on that page?

The new page should be under Builders-Pages Blocks.

To put the login form in a html block just goto yoursite.com/member.php and view the source code to find the html for the login form.

Dave....

Quote · 20 May 2011

Hey LD - nice to see you here again.

I do have the block visible to members only - that isn't the problem.  The problem is I want it to be more obvious to guests that there is some good stuff they are missing so they should join.   The login code I use is:

//Check if Logged In
check_logged();
if(!isLogged()) {
login_form();
exit;
}

Good idea putting the code in an html block, but in this case it is an rss block, so there is no place to put that code.  That means it has to be on the new page I defined, I guess, but I don't know where it is.   Anyone?

 

 

 

 

Quote · 20 May 2011

So if it helps, here is the page I would like to secure:

http://www.caltrade.com/community//page/opportunities

Does anyone at least know the file where I can place the above code, or will I have to mess with the database?

Quote · 20 May 2011

Hi Rob,

So if you can make a block visible to "Guests only" then put in the login form or any other information you want guests to see, would that not have the desired effect?

Dave...

Quote · 20 May 2011

I don't understand what good that would do?  I just showed the block visible to both members and guests - what good would it do to prevent members from seeing the block?

I just switched the block above so that only the "members" block is checked.  Do you see the effect now?  The guests can't see the content, but it also just looks like there isn't any content.

If anyone knows if there is a place where I can place the code above, it would fix this for me.

Quote · 20 May 2011

Maybe I'm missing something here...

If you add a HTML block as well as the RSS Block to that page but make the RSS Block Members only and the HTML Block Guests Only then when a user is logged in they will see the RSS Feed only but when logged out will see the HTML Block only... Of course you can display anything you want to in the HTML Block like a Login Form or Members Only text.... And that is what your Not Logged Guests will see..

Dave...

Quote · 20 May 2011

Ah - I see what you are saying.  I guess I am trying to work too late here and my brain is a bit slow.  I would rather have the login form, but that sounds like a great workaround.   Thanks for the help.

Quote · 20 May 2011

Would it help if you downloaded the php block in page builder mod?

On your newly created page you could drag a php block up and set it to Guest than add your code

//Check if Logged In
check_logged();
if(!isLogged()) {
login_form();
exit;
}

Than below it have your RSS block with Member checked.

This will display just the login form (like you have in the code) and if the user is logged in they would see the RSS feed.

Just a thought Smile

Be a dolphin, be creative in you own way and you will attract a audience
Quote · 20 May 2011

Wolf - I meant to come back here and mention it, but that is exactly what I ended up doing, and it worked really well.  The second block doesn't even need to have "members only" checked - the login block will override.  This is a fairly cool and simple way to secure a page.  

Quote · 27 May 2011

 

Wolf - I meant to come back here and mention it, but that is exactly what I ended up doing, and it worked really well.  The second block doesn't even need to have "members only" checked - the login block will override.  This is a fairly cool and simple way to secure a page.  

 True enough on not needing to check members only.

It does make securing pages painless and the php block module makes it so it's painless.

Be a dolphin, be creative in you own way and you will attract a audience
Quote · 1 Jun 2011
 
 
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.