Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Archives
  3. » ign_password_protect

#73 2005-09-03 02:47:59

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

Re: ign_password_protect

aslsw66 – what you’re describing is a little outside the scope of what I was envisioning. I was thinking more in terms of a typical community profile information.

I think long-term you’d be better off tweaking the custom user table and building some custom forms to manage the data. Feel free to email me and we can discuss it further.


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

Offline

#74 2005-09-03 04:26:05

variaas
Plugin Author
From: Chicago
Registered: 2005-01-16
Posts: 402
Website

Re: ign_password_protect

igner,

Thanks for that quick reply! For another feature that I’m sure has been mentioned:

If I am already logged into the backend of TXP, I would like it if the plugin would automatically detect that on the frontend. I know that the cookie is for txp_login is set in textpattern/ but I wonder if this is something that could be manuvered.

Just a thought…Thanks again for an amazing plugin!

Offline

#75 2005-09-03 11:28:04

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

Re: ign_password_protect

variaas wrote:
bq. If I am already logged into the backend of TXP, I would like it if the plugin would automatically detect that on the frontend. I know that the cookie is for txp_login is set in textpattern/ but I wonder if this is something that could be manuvered.

I looked at doing that when I started with the plugin – but the cookie that gets set for the back-end can’t be accessed from the front end, but if you set remember='true' on ign_show_login or ign_password_protect then you won’t be prompted for the password on subsequent visits.


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

Offline

#76 2005-09-04 18:10:53

variaas
Plugin Author
From: Chicago
Registered: 2005-01-16
Posts: 402
Website

Re: ign_password_protect

> Anton wrote:

> hi, any ETA for the 0.4 version..? i’m so eager to try it out..also, do anyone have an idea of how to make just a selection of articles password protected? e.g if i want to have some articles subscribers-only and some not, how do i do it? all within the same section i mean. (override form..? but that destroys the listing/individual difference, doesn’t it?)

Anton…so I’m not sure if you got this one figured out, but like what others say…just create another form exactly like the one you use on the section, but just put the ign_password_protect tag around it. The only problem I’ve hit so far is that if you enable search, even though the article is password protected, it still comes up in the search results. I’m trying to figure out how to get around this, let me know if you manged to figure out this issue, or on that note if anyone else has got that one figured out.

Offline

#77 2005-09-04 19:01:53

Anton
Plugin Author
From: Alingsås, Sweden
Registered: 2004-11-16
Posts: 138
Website

Re: ign_password_protect

hi variaas, i think i’ll go with the category idea, that is having a category called “secret” or similar and use that to filter out/display one form or another.

Offline

#78 2005-09-05 00:32:48

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

Re: ign_password_protect

I’ve mostly got it sorted out – was gonna write it up sometime this weekend, since some of the solution is dependent on features in the 0.4 release, most notably conditionals for logged / not logged state (though this can be partially emulated with the current version).

Assuming you’re using the protection tag at the section level (i.e. in the page template) here’s the solution in a nutshell -

in the search_results form use the following:

<blockquote><code>
<txp:if_section name=“name”>
<txp:ign_if_logged_in>
search output
<txp:else />
alternate output (or omit the else tag above to not output anything)
</txp:ign_if_logged_in>
<txp:else /> <!— else condition for if_section —>
search output
</txp:if_section>
</code></blockquote>

Of course, this only works if you’re protecting a single section. If you want to protect more than a single section, you’ll have to modify how if_section works…there’s a thread on how to do this on the forum if you search on it.


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

Offline

#79 2005-09-06 09:26:09

davidm
Member
From: Paris, France
Registered: 2004-04-27
Posts: 719

Re: ign_password_protect

I don’t know if this is adressed, but the DL link on textpattern.org is broken…


.: Retired :.

Offline

#80 2005-09-07 14:00:59

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

Re: ign_password_protect

@davidm – fixed the dl link, thanks for the head’s up.

Anyway…after much teeth gnashing, late night coding, and many, many, many bugs squashed, others created and (hopefully) squashed once again…version 0.4 of ign_password_protect is hereby released to the world.

Download it here.

This version features a significantly re-written authentication mechanism, and more importantly, support for an alternate database. In addition, this version features a number of new tags:

<txp:ign_if_logged_in></txp:ign_if_logged_in> – conditional to test the state of the login, includes support for <txp:else />.
Accepts one parameter, privs.

<txp:ign_self_edit /> – displays a form to allow logged-in users to change their password.

Accepts the following parameters: class, title, onClick, size, tab, id

<txp:ign_page_privs /> – use at the top of a page to set page-wide privilege levels. Useful for enforcing privilege levels across multiple protected elements on a page, as opposed to specifiying privs on each element. Privs set on individual elements will override these global privs.
Accepts one parameter: privs

As always, any input is welcome.

[Edit]: Forgot to include the disclaimer:

This plugin is provided as is; side effects are generally mild. Test subjects complained of symptoms similar to those on sugar pills. Consult your webmaster before using this plugin. Frequent use of this plugin may cause the developer sleeplessness, headaches, and nausea.
Any similarity between this plugin and any other plugin, living or otherwise, is likely the result of blatant plagiarism.
And just like Carolyn Wheeler’s Birthday Present, this plugin is made entirely from the skins of dead Jim Morrisons.

Last edited by igner (2005-09-07 14:27:55)


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

Offline

#81 2005-09-07 15:43:01

variaas
Plugin Author
From: Chicago
Registered: 2005-01-16
Posts: 402
Website

Re: ign_password_protect

Igner…great job! I’m really looking forward to getting this plugin set up on my site!

Offline

#82 2005-09-07 18:21:24

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

Re: ign_password_protect

Amazing!! Works flawlessley! An absolute “Dream Come True” ALL the way.

@the disclaimer- Crystal :)


“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

#83 2005-09-07 19:31:23

variaas
Plugin Author
From: Chicago
Registered: 2005-01-16
Posts: 402
Website

Re: ign_password_protect

anton, just out of curiosity….if you put the posts in a category called “secret” how would you prevent if from showing up in search results or rss feeds if the section that article is in has both of those activated?

Offline

#84 2005-09-07 19:51:58

Anton
Plugin Author
From: Alingsås, Sweden
Registered: 2004-11-16
Posts: 138
Website

Re: ign_password_protect

variaas: it’s already been mentioned here in this thread. :) haven’t gotten the time to test it myself yet though..

Offline

  1. Index
  2. » Archives
  3. » ign_password_protect

Board footer

Powered by FluxBB