Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-03-12 15:00:59

valpc
Member
Registered: 2007-03-01
Posts: 18

ign_password_protect to password protect a section

I am using ign_password_protect plugin to password protect a section on my site. When I click the section name I want to be prompted with the browser login dialog but all I get is a page that says “Authorisation required”. Is this the correct behaviour ? I am using FF2 and IE6. If I do login to the site (using login form) I can see the relevant section, so that functionality works. Any help greatly appreciated.

Offline

#2 2007-03-19 15:36:16

valpc
Member
Registered: 2007-03-01
Posts: 18

Re: ign_password_protect to password protect a section

Anybody have any ideas on this?

Offline

#3 2007-03-19 16:48:16

Niconemo
Member
From: Rhône-Alpes, France
Registered: 2005-04-18
Posts: 557

Re: ign_password_protect to password protect a section

It’s not a browser login dialog, it the plugin’s XHTML form :
A private section

The txp:ign_password_protect tag must where the dialog is supposed to be (between <body> and </body>)

My txp:ign_password_protect is set in my main content div in the form that is associated to the private section

Last edited by Niconemo (2007-03-19 16:53:13)


Nico

Offline

#4 2007-03-19 17:34:52

valpc
Member
Registered: 2007-03-01
Posts: 18

Re: ign_password_protect to password protect a section

thanks for the reply.

if it is not possible to use the browser prompt, is it possible to customize the error page that says “Authorisation Required”. I looked through the plugin code but I couldn’t see it. All I can see is ;

header(‘WWW-Authenticate: Basic realm=“Private”’);
header(‘HTTP/1.0 401 Unauthorized’);
exit(gTxt(‘auth_required’));

I am new to txp and to php so I apologise in advance if this seems like a simple question.

Last edited by valpc (2007-03-19 17:37:07)

Offline

#5 2007-03-20 19:00:06

Niconemo
Member
From: Rhône-Alpes, France
Registered: 2005-04-18
Posts: 557

Re: ign_password_protect to password protect a section

You should have a look at the plugin documentation to see all tags and parameters… ;-)
Here it is :
http://www.*your-site.com*/textpattern/?event=plugin&step=plugin_help&name=ign_password_protect
(replace “your-site.com”)

And here is an Example of how to use parameters (as the help is not made for txp newbies, I must admit) :

<txp:ign_password_protect err_msg='Wrong login or password man! Try again!' login_msg='Hey ! Why don't you connect ?' remember='1' >

Almost all plugins works that way :
I mean one or several <txp:tags /> or <txp:tags></txp:tags> and parametters used like this inside the tag : parameter="setting"

Last edited by Niconemo (2007-03-20 19:07:00)


Nico

Offline

Board footer

Powered by FluxBB