Part of the EllisLab Network
pMachine Pro has been replaced by ExpressionEngine, our full featured web publishing solution. Please consider upgrading.
You can download pMachine Pro here: Download pMachine Pro  |  Download Language Packs
   
 
Members-Only pages still show to non-members.
Posted: 17 March 2005 10:49 PM   [ Ignore ]  
Summer Student
Total Posts:  19
Joined  2002-06-04

I’m building a private group journal that will be shared between my wife and her sisters. I’m adding the members-only code to each page of the journal. I’ve tried adding the if-then code shown in the manual to the top of the pages, just beneath the php include line. When I’m logged in, I see the page and the correct example text from the manual appears along the top of the page above my content. When I’m logged out, it shows the correct “logged-out” text along the top of the page, but I still see the full page of the journal.

Since the code seems to be triggering the correct text, I’m guessing I’m screwing something up. Any idea why the pages still show with the members-only code on the page?

Profile
 
 
Posted: 17 March 2005 10:57 PM   [ Ignore ]   [ # 1 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  9868
Joined  2002-06-19

Are you putting the “restricted” content inside the tags where the “logged in” text is?  What you’re doing is wrapping your content with those tags.

 Signature 

Chris Curtis
chriscurtis.org

Profile
 
 
Posted: 19 March 2005 10:10 PM   [ Ignore ]   [ # 2 ]  
Summer Student
Total Posts:  19
Joined  2002-06-04

I was just adding the tag at the top, Chris. I’ll give this another shot. Thanks!

Profile
 
 
Posted: 21 March 2005 02:42 PM   [ Ignore ]   [ # 3 ]  
Summer Student
Total Posts:  16
Joined  2002-11-11

Hi Chris

I’d like to add a wrinkle to the above question. I’m running a public and a private blog. I can get the permissions tags (for members only) working fine when I login on the public page and then go “direct” (ie., in Safari - keying in the private page’s URL) to the private page. It will display the private info.

However, when I try to go from my login page (after the “you are logged in” messages page) to a page created outside of pmachine using a link statement in the messages page, the page where I should have unrestricted access now says I need to login.

I’ve included the*** <?php include(“pm_inc.php”); ?>*** statement at the top (and also added the permissions tags) to this restricted page (that is in the same directory as the other pmachine generated pages), this new page doesn’t recognize the login and tells me I’m restricted.

So—after that convoluted description—if one creates php pages outside of pmachine, adds the “include” statement at the top, and restrictions tags (if one wants) and places them in the same directory as the pmachine pages on their server, will those pages interact properly with the pmachine generated pages. - ie., properly show that one is logged in or allow one access to the full page if they have the proper admin. privileges, etc.? (My pblocks, etc. work fine on these pages but the access privileges don’t. Even though I logged in earlier, the login information seems to be ignored or reset when I get to a ‘non-pmachine page’).

Is there something I could be doing or adding or missing that is causing this problem?

Profile
 
 
Posted: 21 March 2005 06:44 PM   [ Ignore ]   [ # 4 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  9868
Joined  2002-06-19

> will those pages interact properly with the pmachine generated pages

Yes, they should.

The first thing I would suggest is to make sure you have the $cookie_domain variable set in your “config.php” file.  i.e. set to “.yourdomain.com” with the period in front.  That’s very important since otherwise “www.example.com” and “example.com” are considered to be two different sites as far as the cookie is concerned.

So, once you have that variable set make sure you log out and remove your pMachine cookies.  Then try logging in again and see if that fixes things for you.


Providing a link to your site (and a temporary testing account username/password) so that we can observe this behavior would be useful, too.

 Signature 

Chris Curtis
chriscurtis.org

Profile
 
 
Posted: 21 March 2005 07:25 PM   [ Ignore ]   [ # 5 ]  
Summer Student
Total Posts:  16
Joined  2002-11-11

Thanks Chris

I’ll check out your suggestion and report back.

Profile
 
 
Posted: 21 March 2005 09:23 PM   [ Ignore ]   [ # 6 ]  
Summer Student
Total Posts:  16
Joined  2002-11-11

Chris

All I can say is “OMG”. I won’t tell you how many hours I have spent going over everything on the site to try and solve the above problem. Your suggestion has solved it within 30 seconds of making the config.php alteration. Thank you Thank you. It works splendidly as I had hoped.

Now, because I’m one of those people who used to love to say to clients RTFM, is this tip in the help files somewhere? If not, should be.

Thanks again. I’ll upgrade to EE soon.

Profile
 
 
Posted: 30 March 2005 04:19 AM   [ Ignore ]   [ # 7 ]  
Summer Student
Total Posts:  19
Joined  2002-06-04

Just a quick note to say thanks for your patience and explanation for my original post here, Chris. The members-only content code works great. It escapes me why I always seem to do this stuff late at night when my brain is fried.  smile

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 233, on December 18, 2007 12:04 AM
Total Registered Members: 64510 Total Logged-in Users: 0
Total Topics: 81069 Total Anonymous Users: 0
Total Replies: 436299 Total Guests: 20
Total Posts: 517368    
Members ( View Memberlist )
Active Members: