Limited-Use Password Plugin

What is it?
It is an extension to WordPress that allows you to send a SHA-1 token to someone that you know that will allow them to bypass the password protection on a post of yours for a number of times that you specify.


Why would I ever use this?

Three reasons:

  1. You might not want several people to share the same password.
  2. You might need to control how many times a person can read a post.
  3. You might want to record some of the access attempts on your private posts.


How much does it cost?


Nothing.

What versions of WordPress is it made for right now?


2.5 (Still 2.5-SVN as of 10:57PM 3/10/2008)

What license is it released under?


GPL.

Will it improve my sex life?


If you have to ask, then yes.

It ate my homework, shot my dog and ran off with my woman. I want my money back.


There is no warranty. It's free, open source and can be modified by anyone. Caveat Idiotis (or something like that).

Why did you implement a logging mechanism?


Drama. Yes, drama. Many, probably most, bloggers actually use their blogs as online diaries. A lot of girls in particular have a problem with girlfriends sharing gossip, ex-boyfriends, etc. stalking or harassing them. Every access attempt using this plugin is logged. The reason is that I wanted to create a mechanism to allow people to see whether or not they are being stalked or someone is attempting to crack their private post(s).

Where can I download it?


Here.

Release Notes


Version 1.0 - 7/15/2006

  • Disclaimer: this is my first attempt at writing a WordPress plugin.
  • The plugin works on my installation of WordPress 2.0.3. If it doesn't work for you, please report any errors to me by posting a comment below :)
  • While the plugin is activated, it will overwrite your password protection forms with a new form that combines the old one with a new one appropriate for the limited-use passwords.
  • Logging works, but there is no form for viewing the log yet. That's coming in version 2.0.


Version 1.1 - 7/24/2006

  • Bug fixes! Yes, lot's of new error checking code went into this release.
  • Created a separate menu for managing the different panels used by the plugin.
  • Created a new form that allows the user to see statistical information about the access attempts using this plugin's authentication mechanism.
  • Starting to gauge the compatibility with WordPress 2.1.


Version 2.0 RC1 - 3/10/2008
  • Bug fixes!
  • Refactoring!
  • A lot of new features!
  • Works with WordPress 2.5 from subversion as of 10:54PM 3/10/2008!
  • Download here!
  • Are you tired of exclamation marks?!

I can't stress enough that a lot has been changed with the 2.0 series. A lot of code was updated to make it cleaner. To do that, I had to add a lot of code. You will notice that the PHP source code is probably 2-2.5x bigger in version 2.0 compared to 1.1. A lot of the changes had to do with me writing a small library to abstract away the process of generating the HTML for the forms, and creating PHP includes that contain large blocks of variables that hold information about the HTML to be generated. While a lot of code was added, it shouldn't have any impact on performance since most of it is just variable and function declarations from libraries.

16 Comments

[...] WP Plugin: Limited Use Password Send a “limited use” password to a password protected post on your Wordpress blog with this plugin without sharing the actual password. Related Posts from the Past: [...]

[...] Posted in Interesting, Wordpress, Plug-in at 7:05 pm by Patrick Havens Limited-Use Password Plugin This is an extension to WordPress that allows you to send a SHA-1 token to someone that you know that will allow them to bypass the password protection on a post of yours for a number of times that you specify. [...]

[...] Blind Mind’s Eye » Limited-Use Password Plugin [...]

[...] Blind Mind’s Eye » Limited-Use Password Plugin this could be useful for something… (tags: wp-plugins WordPress) [...]

Hello, I recently downloaded your plugin, but I keep on getting these errors:

WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1]
SELECT post_password FROM wp_posts WHERE ID =

Warning: Invalid argument supplied for foreach() in /home/loveju1/public_html/journal/wp-content/plugins/sender.php on line 114


I got this error when I put in a password, and pressed "send" but when I go to "manage" then "allow limited access to a post" it just shows me the invalid argument warning. and I don't know why. :( Can you help me?

I think I have your problem fixed now. There wasn't enough error checking in there before, but now there should be. What version of WordPress are you using? I'm testing off of two installations of WordPress 2.0.3. I have one running on my laptop and obviously this one. The changes work on both and seem to catch pretty much every possible basic error.

Sorry, as I said, this is my first plugin.

I tested it out with a few use cases, and found, among other things, that the error checking didn't go far enough. Tell me if any of these use cases sound like what you were trying to do:

1) Send a token without specify a number of uses.
2) Send a token without selecting a password protected post. Maybe some web browsers don't select one by default. Opera and Firefox do, so I didn't think to check for that.
3) Send a token without specifying a recipient.

As I said, I tried out a lot of different combinations of no data or wrong data being present, and it seems to work fine now. :)

Oh! its alright! :) I'm using wordpress version 2.0.3 (the latest version). Thanks for the fast reply.

Thanks for the fast response.

I have the plugin in my plugin folder but when i go to 'manage' in my dashboard-it doesn't show any options for the plugin in the dashboard. and i'm not sure why. :(

Hmmmm sounds like you didn't activate it yet. You have to go to the Plugin menu and activate it first. All plugins work like that. It's not going to appear in "Manage" until you do that. One other thing. You won't see the "Plug-ins" menu at the top of the WordPress admin console unless you login as the administrator, which is usually named "admin." Good luck :)

[...] My limited-use password plugin is about to have a new release. Thanks to a bug report or two from a user, I have rewritten some of it already and I posted the fixed version Friday. The new version, 1.1 includes some of the missing functionality that I said that I would add later such as a working administrative page for viewing the access attempt logs. I’ve got it working so far on my laptop and internally on my blog. It’s just a matter of refining some things and doing some more testing. [...]

The download link is broken Mike !
Do you tell me where i can download your plug-in
Thanks

I just fixed the download link. You shouldn't have any problems now.

Hi,
I love your plugin but it doesn't work for Wordpress 2.2.x & above.

This is what I have done:
1. Upload the 2 files to wp-content/plugin
2. Activate the plugin
3. Create a Post with password
4. Goto Limited-Use Password Option and key in the information
5. A temporary key was sent to my testing email address.

When I copy and paste the key in the 2nd box (created by your plugin) and press enter, nothing happens (the protected post doesn't show up)

Any advise. Thanks in advance

I don't really have much advice to give you. I think I wrote this plug-in around the time of WordPress 2.0, and WordPress seems to change a lot. To get it to work in the first place, I had to hack away at some stuff in there, as you can probably tell by looking at the code. I may take a stab at it with WordPress 2.3 just for fun when I get some time.

Speaking of WordPress 2.3. Maybe it's just a coincidence, but my wife's blog has had major template breakage since we upgraded hers to WordPress 2.3, so you might want to stay using 2.2 and earlier for a while anyway.

Hi Mike,
I think I got it work. There were 2 files in the zip. One should be placed inside root directory an another : sender.php in plugin folder. Since there was no instruction in your side nor the zip file, I made this mistake. However, there is an instruction inside sender.php.

By the way, is there a way to change the expiry to 3 hours or expire immediately (meaning to say that whenever they want to see the post, they must enter the password until their limit is reached). Currently, when a user key in the password and they can access anytime they want without entering the password again.

Please advise. Thanks in advance

Leave a comment

Google Search

June 2008

Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30          
Powered by Movable Type 4.2rc1-en