Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#121 2005-10-14 14:05:43

jpdupont
Member
Registered: 2004-10-01
Posts: 752

Re: ign_password_protect

0.4.1

I use mem_self_register 0.6.2. Here when I use the self_register_form template to put some users in the database, I get the “array” error (see the mem_self_register forum thread).

Offline

#122 2005-10-15 00:00:09

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: ign_password_protect

Is there anyway this or another plugin can detect which user has logged in and then send them to given section. I’d like to have individual client areas accessed by a login.

Cheers, Lee

Offline

#123 2005-10-20 17:52:36

darrepac
Member
Registered: 2005-09-26
Posts: 64
Website

Re: ign_password_protect

I have the impression this plugin is really powerful and could help me…but, as a beginner, I have really some difficulty to understand the powerful function it has…I do not see example to create and use alternative user database for example…
I have succeed to limit access to my “future projects” section, quite easy, but I would like after be able to give access to some people to some catgegory inside this section :
user1 can read category1, category3 of section future projects
user2 can read category2 of future projects

Is it too complex to handle that?

Thanks a lot for any help or guideline
Pascal

Offline

#124 2005-10-20 18:22:11

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

Re: ign_password_protect

lee – sorry, missed your post earlier. um, right now this can’t do what you’re looking for, but I could potentially be persuaded to build that functionality in down the road.

darrepac – the alternate database option can be found under extensions->ign_user_mgmt (note that the extensions tab will not be visible while on the plugins tab). when you enable the alternate database, then the tab will also have basic user management fields. As far as password protecting different sections for different users, you’ll need to use the privs attribute for the elements you want to protect. If no privs are set in the tag, any existing account is allowed access. In your scenario above, set user1’s privileges to level 1, and user2’s to level 2. Then on the pages you want only user1 to be able to access, you’d use <txp:ign_password_protect privs='1'>, on the category1 and 3 pages, <txp:ign_password_protect privs='2'> on the category2 page.

Make sense?

Last edited by igner (2005-10-20 18:23:01)


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

Offline

#125 2005-10-20 18:58:58

darrepac
Member
Registered: 2005-09-26
Posts: 64
Website

Re: ign_password_protect

yeah!…I will give a try and I will see if it really makes sense to me ;-)
thanks!

Offline

#126 2005-10-20 19:18:58

darrepac
Member
Registered: 2005-09-26
Posts: 64
Website

Re: ign_password_protect

mmmm….how and where can I limit access for category (user1 a only able to read the category where he has the right for a dedicated section)…in the pages? I do not see how…

Offline

#127 2005-10-20 19:26:18

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

Re: ign_password_protect

if you’re limiting by category, you’ll have to make use of if_category in addition to the password protect tag. for example:

<code>
<txp:if_category name=“category1”>
<txp:ign_password_protect privs=“1”>
protected stuff here
</txp:ign_password_protect>
</txp:if_category name=“category1”>
</code>

obviously more complex solutions are possible…you’ll just have to use some imagination :)

Last edited by igner (2005-10-20 19:53:40)


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

Offline

#128 2005-10-20 19:50:07

darrepac
Member
Registered: 2005-09-26
Posts: 64
Website

Re: ign_password_protect

I have to admit….I am a very beginner! and have done such thing on my pages without success :

<code>
<txp:if_category name=“Finlande”>
<txp:ign_password_protect privs=“1,2”>

<txp:article />
<txp:if_individual_article>
<p>
<txp:link_to_prev><txp:prev_title /></txp:link_to_prev>
<txp:link_to_next><txp:next_title /></txp:link_to_next>
</p>
</txp:if_individual_article>
<txp:if_article_list>
<p>
<txp:older>Previous</txp:older>
<txp:newer>Next</txp:newer>
</p>
</txp:if_article_list>

</txp:ign_password_protect privs=“1,2”>
</txp:if_category>
</code>

The goal was to give access to articles list and viewing to only privs 1 and 2.

Last edited by darrepac (2005-10-20 19:52:36)

Offline

#129 2005-10-20 20:27:57

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

Re: ign_password_protect

um, yeah, that was my mistake. I don’t know what I was thinking, the privs attribute shouldn’t be in the closing tag. so it should be </txp:ign_password_protect> – that may have prevented the closing tag from being identified. Let me know if that does the trick.


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

Offline

#130 2005-10-20 20:40:35

darrepac
Member
Registered: 2005-09-26
Posts: 64
Website

Re: ign_password_protect

yeah it seems….the only problem I have is when I am at the section level : nothing is displayed (I have to select a category to see something) but I would prefer to see articles which the user can see

Offline

#131 2005-10-20 21:29:05

darrepac
Member
Registered: 2005-09-26
Posts: 64
Website

Re: ign_password_protect

Thinking it could be better, I have done the trick in a new form I have created…but same results…

Offline

#132 2005-10-21 20:22:14

darrepac
Member
Registered: 2005-09-26
Posts: 64
Website

Re: ign_password_protect

after trials and trials, I start to have something I like ;-)
Just to mention I have following errors when I reset an user (from separated db):
Notice: Undefined index: ign_login in /textpattern/lib/txplib_misc.php(429) : eval()’d code on line 825

Notice: Undefined offset: 2 in /textpattern/lib/txplib_misc.php(429) : eval()’d code on line 825

In fact the user receive the password but I do not think it is so good to have such errors! ;-)

Last edited by darrepac (2005-10-21 20:23:17)

Offline

Board footer

Powered by FluxBB