Textpattern CMS support forum

You are not logged in. Register | Login | Help

#41 2005-08-07 11:53:44

creativesplash
Member
From: Coimbatore, India
Registered: 2005-01-19
Posts: 283
Website

Re: ign_password_protect

Hello Jeremy,

I am facing yet another problem. I have multiple password protected posts for different previleges within a single page. For eg..

<code>
<body>
<txp:ign_password_protect privs=“21”>Article 1<txp:ign_password_protect>
<txp:ign_password_protect privs=“22”>Article 2<txp:ign_password_protect>
<txp:ign_password_protect privs=“23”>Article 3<txp:ign_password_protect>
</body>
</code>

If I logon with the privilege 21, I can see article 1. But Article 2 and 3 display their login forms simultaneously. i.e, Two login forms in the same page. I dont want the logged in user to see “login forms” once he has logged (even if there are other security zones in the same page). How do I do it?


“Take a point, stretch it into a line, curl it into a circle, twist it into a sphere, and punch through the sphere.”

— Albert Einstein

Offline

#42 2005-08-07 12:31:51

igner
Plugin Author
Registered: 2004-06-03
Posts: 337

Re: ign_password_protect

<txp:ign_password_protect hide_login="true"> ought to do what you want.


And then my dog ate my badger, and the love was lost.

Offline

#43 2005-08-08 13:48:30

june
Member
Registered: 2005-06-02
Posts: 47

Re: ign_password_protect

the download link for this plugin doesn’t seem to be working for me. can anyone send me this plugin?

thanks!

june

Offline

#44 2005-08-08 14:05:47

igner
Plugin Author
Registered: 2004-06-03
Posts: 337

Re: ign_password_protect

sorry ‘bout that. links are fixed – you can get version 0.3b1 here

Working on a whole slew of improvements for version 0.4, including:

  • minimizing number of db queries
  • additional flexibility in output options
  • streamlined privilege verification for multiple items
  • optional alternate user database (to separate site users from admin users, with varying permissions)
  • admin preferences to set default error messages etc.
  • end-user password reset and user profile functionality (when using alternate database)

Last edited by igner (2005-08-09 14:47:36)


And then my dog ate my badger, and the love was lost.

Offline

#45 2005-08-09 14:06:50

creativesplash
Member
From: Coimbatore, India
Registered: 2005-01-19
Posts: 283
Website

Re: ign_password_protect

Wow. Those are some really cool features. I’m looking forward for the next update.

<code><txp:ign_password_protect hide_login=“true”></code>
That worked super! Thanx!

Last edited by creativesplash (2005-08-09 14:56:07)


“Take a point, stretch it into a line, curl it into a circle, twist it into a sphere, and punch through the sphere.”

— Albert Einstein

Offline

#46 2005-08-09 14:51:32

igner
Plugin Author
Registered: 2004-06-03
Posts: 337

Re: ign_password_protect

yeah, well let’s just hope I find the time to pull it off, and not break anything in the process :)


And then my dog ate my badger, and the love was lost.

Offline

#47 2005-08-09 19:40:25

june
Member
Registered: 2005-06-02
Posts: 47

Re: ign_password_protect

Those additions do sound good. Is there a way to protect content that is not sandwiched in the ign_password_protect tag? Or is that what you referring to when you said “additional flexibility in output options”

I basically want to protect an entire section but I want the login form to appear in the right column. I have a three column layout. The password protect tag is in the right column so it can’t encompas the article tag in the center column of the page template.

any ideas?

thanks!

june

Offline

#48 2005-08-09 20:00:11

igner
Plugin Author
Registered: 2004-06-03
Posts: 337

Re: ign_password_protect

no – by additional flexibility in output options, I was specifically referring to incorporating a variation of creativesplash’s hack earlier in this thread – in the case of <code><txp:ign_show_logged_user /></code> there will be a verbose mode, and a terse mode. The verbose mode will display “Logged in as: username” (with the message customizable in prefs), terse mode will simply display the username.

as for your immediate need: don’t put the password protect tag in the sidebar. use <code><txp:ign_password_protect hide_login=“true”>stuff to hide goes here</txp:ign_password_protect></code> to protect the stuff you want to hide, and use the <code><txp:ign_show_login /></code> tag where you want the login form to appear. that should do the trick, if I’ve understood you properly.

If not, let me know.

Last edited by igner (2005-08-09 20:27:09)


And then my dog ate my badger, and the love was lost.

Offline

#49 2005-08-09 20:20:50

june
Member
Registered: 2005-06-02
Posts: 47

Re: ign_password_protect

> no – by additional flexibility in output options, I was specifically referring to incorporating a variation >of “creativesplash’s hack”

oh, ok.

>as for your immediate need: don’t put the password protect tag in the sidebar. use ><code><txp:ign_password_protect hide_login=“true”>stuff to hide goes >here</txp:ign_password_protect></code> to protect the stuff you want to hide, and use ><txp:ign_show_login /> tag where you want the login form to appear. that should do the trick, if I’ve >understood you properly.

So the login form would have to appear in the center content. right? And once they are logged in they will just see the page content …they won’t see your “logged in as…” and a logout link?

I wanted to be able to put the login form in the right column because that is where I have all of my other widgets. And I do like being able to see “logged in as” and the “logout” link…but I would want those to appear in the right column too. I guess I’ll just use the hide option for now…but if you ever figure out how to password protect something in a different area of the page, that would be swell. :)

Actually maybe I can somehow use your plugin with the ptv_if plugin. I’ll have to look into that.

-june

Offline

#50 2005-08-09 20:30:52

igner
Plugin Author
Registered: 2004-06-03
Posts: 337

Re: ign_password_protect

sorry – I forgot a <code>code</code> tag, so the second tag didn’t show up.

Look at my previous post again, then look at the following…

Example:
<code><div id=“right_col”> <txp:ign_show_login />
</div>
<div id=“center_col”>
<txp:ign_password_protect hide_login=“true”>
stuff you want hidden goes here
</txp:ign_password_protect>
</div>
</code>

Oversimplified, but that’ll get you what you want. Login form in right_col, protected content in center_col.

Last edited by igner (2005-08-09 20:33:24)


And then my dog ate my badger, and the love was lost.

Offline

Board footer

Powered by FluxBB