Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2013-12-06 13:04:21

j0nr
Member
Registered: 2013-12-06
Posts: 10

How Do I Use ign_password_protect?

Hi all,

Sorry if this is a basic and naive question, but I am a new user of Textpattern and my first and main issue I need to resolve is the ability to have a public and private section.

So I have a basic TP installation working, just as it is out the box. I have installed the ign_password_protect plugin.

But I am not understanding the documentation for the plugin at all… TBH, for n00bs, its not explained very well.

Can someone please break it down a bit for me as to where I am supopsed to be putting the ign_* tags so that I can have a public section (kinda already there by default) and a ‘private’ section, only VISIBLE and accessible by logged in users.

Also, I need to actually prevent all visibility of the private section from the public (so if you didn’t know it was there, you couldn’t find it).

Thanks in advance.

Jon

Offline

#2 2013-12-06 17:11:50

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,315

Re: How Do I Use ign_password_protect?

Hi, Jon, and welcome to the forum!

I assume you’d know where to apply changes to your templates (Admin > Pages, Admin > Forms), so it will be really the help text that doesn’t help you. There’s also cbe_frontauth which does the same job more or less, is extensible with a members module and is still being actively maintained, in case you have to ask questions about the help text ;)

Unfortunately, I’ve not used any of these so can’t help you more specifically.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#3 2013-12-07 16:17:04

j0nr
Member
Registered: 2013-12-06
Posts: 10

Re: How Do I Use ign_password_protect?

Hi uli,

Thanks for the reply. cbe_frontauth looks good too like ti should do what I want it to do but, like ign_password_protect, I can’t make heads nor tails of the documentation. All the documentation for both seems to assume you already know a lot about working with TXP. Unfortunately, I don’t.

I am not totally naive to setting things like this up. I write my own basic PHP applications and have managed a Drupal site and many other ‘apps’ before…but this one is a bit tricky. At least so far, I am sure when I get into the swing of it I’ll be fine, just seem to be getting stuck at the first hurdle.

Offline

#4 2013-12-07 16:44:34

springworks
Member
Registered: 2005-01-06
Posts: 172
Website

Re: How Do I Use ign_password_protect?

Hi Jon,

I’ve used ign_password_protect before so perhaps I can help.

Essentially, all I did was to wrap the part of the page I wanted to be visible to members only around <txp:ign_if_logged_in> tags, so my page looked a bit like this:

<txp:ign_if_logged_in>

[protected section of page here for logged in members only]

<txp:else />

<p>Please log in to view the members' section. If you don't have a username and password, please <a href="/contact/" title="contact us">contact us</a> to request one.</p>

<txp:ign_show_login />

</txp:ign_if_logged_in>

This is working on a site running Textpattern 4.5.4 and ign_password_protect 0.5b9.

I’m using a separate members database for the front-end members of the site to the main Textpattern users database table, and all front-end only members have privileges set to none.

Let us know how you get on.

Offline

#5 2013-12-07 17:32:20

j0nr
Member
Registered: 2013-12-06
Posts: 10

Re: How Do I Use ign_password_protect?

Hi Springworks,

Thanks for the reply. Yes I have managed to get hidden content to work…

What I am struggling with is the concept of having a whole section invisible unless logged in… we’ll come back to that.

What I have also tried doing is putting the log out link in the right toolbar. When I click log out, it does log me out…but if I then click onto another section (using navbar) I am then somehow magically logged back in again…

I think if I can get it to reliably be either ‘logged in’ or ‘loggged out’ then I could start surrounding section related items with the <txp:ign_logged_user /><txp:else /></txp:ign_logged_user /> business…but this not being logged in or out properly is the first hurdle.

Thanks.

Offline

#6 2013-12-07 17:41:20

springworks
Member
Registered: 2005-01-06
Posts: 172
Website

Re: How Do I Use ign_password_protect?

Are you testing using different tabs of the same browser whilst you are logged into the backend?

Also, are you using ign_password_protect with the option of authenticating against the txp_users table ticked?

It could be that your backend login is trumping the logout by ign_password_protect. In which case I would try testing using a different browser than you normally use for development to make sure that any Textpattern cookies for you logged into the backend aren’t causing any issues with ign_password_protect.

Offline

#7 2013-12-07 18:04:21

j0nr
Member
Registered: 2013-12-06
Posts: 10

Re: How Do I Use ign_password_protect?

Right, starting from scratch, fresh install…all I would like to do is verify that a user is either logged in or not. If not, offer a login form (maybe in the right column).

Is it just me or does the “help” from the admin>plugin page contain a single large block of badly formatted text?

Offline

#8 2013-12-07 18:20:43

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,315

Re: How Do I Use ign_password_protect?

j0nr wrote:

Is it just me or does the “help” from the admin>plugin page contain a single large block of badly formatted text?

No, it’s not just you, I’ve tried it and also got the garbled Textile version.
I’ve saved the plugin with ied_plugin_composer and uploaded it to TXP Resources. Seems to display now like it should. Have fun :)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#9 2013-12-07 19:10:16

j0nr
Member
Registered: 2013-12-06
Posts: 10

Re: How Do I Use ign_password_protect?

Ahh brilliant uli! That makes SO MUCH difference :-)

Thanks.

Offline

Board footer

Powered by FluxBB