ign_password_protect
I had a need for password protection for a project I’ve been working on, and the limited functionality of Textpattern’s existing <txp:password_protect /> simply wasn’t cutting it for me.
I reused a lot of the existing authentication code, tweaking it to meet my needs, so a big thanks goes out to Dean et al, for making this easier to knock out. Currently this authenticates users against the txp_users table, so users are created in the site_admin tab. For users that shouldn’t have admin access at all, simply use Privilege level “none” (the default).
This features the following tags: ign_password_protect and ign_logged_user
ign_password_protect – use to password protect part or all of a txp website against users in the txp_user database (on the site_admin tab). can be used in page or form templates, or even directly within an article.
Accepted parameters:
privs: comma separated list of privilege levels to compare against. If omitted, plugin simply
checks for account existence (including privs = None).
err_msg: replaces error message on bad logins
login_msg: use this to set the greeting message that is displayed above the form
class: use this to set the class assigned to the div containing the form; default value is ign_login
remember: boolean to display checkbox for “remember me”, set to 1 or true to display check box (and set persistent cookie)
set to anything else or omit entirely to disable.
ign_logged_user – displays logged in user name with link to log out if logged in.
Accepted parameters:
logged_msg: replaces default “not logged in” message.
Example usage:
<txp:ign_password_protect privs="1,2,3,4,7" login_msg="Please log in to view this resource" remember="true">
Some content to protect here
</txp:ign_password_protect>
Version 0.4.2c features:
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
Download the beta – ign_password_protect_0.5b4.txt









If there is a comment form at the Information URL, you may want to leave your comments/questions there or at the Forum thread for quicker feedback. Otherwise, comment away:
Commented (13)
Where has the file gone?
Thank you very much for this great plugin.
Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you very much for this excellent plugin.
The download link seems to be broken again. Help…
The plugin seems to be available here http://www.igneramos.com/txp/txp-plugin-ign_password_protect
Does anyone know how to add to this the “I forgot my password” entry so that a user can add either their email or username and get sent their pasword?
Hi There, I have installed the plugin and seems to be working on the site. But when I go to “Extentions” > “ign_user_mgmt” I am getting a lot of “Notice:” errors. Has anyone else experienced this? Under “Diagnostics” I am getting the following message under preflight check “The following PHP functions (which may be necessary to run Textpattern) are disabled on your server: disk_total_space, diskfreespace”. Will this have anything to do with the errors I am getting? Thanks for any help in advanced.
What would I have to type in to simply password protect an article?
Hi, I’m researching various cms solutions, including textpattern.
Sorry if I didn’t get it right from your description – but I need to be able to create multiple groups of users with different privs, mainly to read, comment and upload.
We need to be able to reach quite a diversed group of people in rather different language styles, though all of them interested in the subject and topics of the site.
As I understand it, yours and others password plugins, only distinguish between two groups of users: with or without a password, e.g. two types of content.
Please excuse me if I’m completely mistaking.
Hope it can be done, textpattern seems like a really slick and nice cms.
tk
Subscribe to this article's comments RSS feed. [ ? ] View Recent Comments across the site. Get a Gravatar.
Would you care to write a comment or visit the forum discussion?