Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2005-02-03 17:24:02
- Rufnex
- Archived Plugin Author
- From: Germany, Munich (Bavaria)
- Registered: 2004-06-23
- Posts: 51
[plugin] [ORPHAN] jgp_authpass - save your content
Hello,
there is already a password protection tag inside textpattern, but you can only have on user with it. so i desided to write a plugin for mulitple user support (get inspired from alice_c) . here it is .. my first version:
Usage
<pre>
<txp:jgp_authpass parameter />
</pre>
Parameter
This parameters are required
<strong>user</strong>
A commata separated list of users.
<strong>pass</strong>
A commata separated list of passwords (must corespondent with userlist).
This parameters are optional
<p><strong>realm</strong>
Welcome message of your protectionscreen. If not set it will print out ‘Private’.
<strong>msg</strong>
Message of the unauthorized site. If not set it will print out ‘auth_required’.
Examples
<pre>
<txp:jgp_authpass user=“tester” pass=“secret” />
<txp:jgp_authpass user=“tester,tester2” pass=“secret,secret2” />
<txp:jgp_authpass realm=“Who are you?” msg=“Go away!” user=“tester” pass=“secret” />
</pre>
Exclude Article from RSS-Feed
1. Open /publish/rss.php
2. Go to Line #65 $Body = htmlspecialchars($Body,ENT_NOQUOTES);
3. After add: if (preg_match(
Last edited by Rufnex (2005-02-04 09:44:05)
Offline
#2 2005-02-03 19:43:59
- Rufnex
- Archived Plugin Author
- From: Germany, Munich (Bavaria)
- Registered: 2004-06-23
- Posts: 51
Re: [plugin] [ORPHAN] jgp_authpass - save your content
>> does this plugin stop people from viewing your protected content through your RSS feed?
good question .. i think not .. but i will cover this topic for my next roundup ;o)
Oki .. i think this could be the solution:
1. Open /publish/rss.php
2. Go to Line #65 $Body = htmlspecialchars($Body,ENT_NOQUOTES);
3. After add: if (preg_match(“/jgp_authpass/i”,$Body)) continue;
4. Save
This will exclude the password protected topic from the rss feed.
Let me now if it works ;o)
Rufnex
Last edited by Rufnex (2005-02-03 20:42:17)
Offline
Re: [plugin] [ORPHAN] jgp_authpass - save your content
Thanks for this… but I’m having problems with RC3…
Just to clarify, does the tag go in the page code or at the top of the article?
Either way, at the moment it doesn’t seem to do anything… ;-)
EDIT: Is this due to my server running PHP as CGI?
Thanks
Last edited by NeilA (2005-03-29 11:07:48)
Offline
Re: [plugin] [ORPHAN] jgp_authpass - save your content
I am not getting any functionallity on this for some reason. It’s on rc1. Is there rc1 support?
Thanks
Jamie
Offline
Re: [plugin] [ORPHAN] jgp_authpass - save your content
Sorry the forums broke and I can’t edit any posts. I am still playing with this. Do I use this on an article by article basis or can I use this on a whole section? Where on the page should I place the tag? Right now I have it above the article to be protected.
Thanks
Offline
Re: [plugin] [ORPHAN] jgp_authpass - save your content
Is there a way by which i can add users dynamically (eg. users can register themselves, or adding users through a form)?
“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
Re: [plugin] [ORPHAN] jgp_authpass - save your content
Hi Rufnex, thanks for the plugin!
Anyone knows it is possible to redirect the user to another page when the login fails? Something like adding an extra parameter that points to a url.
Thanks,
webloggin’ from Spain with Textpattern
Offline
Re: [plugin] [ORPHAN] jgp_authpass - save your content
I would love to get this working period. I still can’t seem to get any funtionality out of it on rc1 or rc3 and I don’t know what I am doing wrong.
Offline
Re: [plugin] [ORPHAN] jgp_authpass - save your content
> soulship wrote:
> Sorry the forums broke and I can’t edit any posts. I am still playing with this. Do I use this on an article by article basis or can I use this on a whole section? Where on the page should I place the tag? Right now I have it above the article to be protected.
From my own experience it seems that this plugin doesn’t work when used on a page template, only on an article, what it’s a shame because protection an entire section could be easily done placing the tag on a page template…
Last edited by multiverso (2005-05-11 15:22:58)
webloggin’ from Spain with Textpattern
Offline
Re: [plugin] [ORPHAN] jgp_authpass - save your content
Oh well that explains it. I have been trying to get this wrapped around a sections page. Thanks for the info.
Offline
#11 2005-08-15 09:33:31
- faust
- New Member
- Registered: 2005-07-28
- Posts: 3
Re: [plugin] [ORPHAN] jgp_authpass - save your content
Hello,
Thanks for the great plugin!
But i have a question about users.
Is that possible to include an existing password file, which is created by the “htpasswd” command of apache server ?
I’m using a passwords file right now, and thus i have to key in all ID/PASS into < user=“x,x,x” pass=“y,y,y” >
Can i modify the plugin to include an existing password file ?
Thank you very much!!!
Offline