[Plugin] Protected posts

« Is there a social comments /facebook comments plugin? :: BB Code Plugin »
Author Message
sam2kb
Posted: Thu Oct 2, 2008 05:06     Topic subject: [Plugin] Protected posts

This plugin allows you to password protect your posts, and visitors would have to enter correct password in order to view post content and comments.
All passwords are stored in cookies (optional) and visitors don't have to enter them every time.

This plugin works in b2evolution v2, 3, 4, and 5

Please note:
- it doesn't hide post comments from [index.php?disp=comments page]
- don't rely on this plugin, use other methods if possible (protected directories, require users to log in, etc).

Download v1.0.0
http://www.sonorth.com/travel/download/GEEBUF1RP9

Short instructions

All you need is upload the plugin in /plugins directory on your website, then in control panel navigate to Global settings > Plugins and install it.

Once installed, you will see a new field "Set password" in post edit screen. Create and use the password to access the post, each post may have unique password with up to 255 chars.

Back to top
 
noname
Posted: Thu Oct 2, 2008 11:49

thx sam2kb..

good work!!

you are the best!!

Back to top
 
chris_of_arabia
Posted: Sat Apr 24, 2010 17:32

Just a quick question on this one, but does it prevent RSS feeds going out once a password has been set?

Back to top
 
sam2kb
Posted: Sat Apr 24, 2010 20:20

It protects both RSS and regular blog posts

Back to top
 
chris_of_arabia
Posted: Mon Apr 26, 2010 21:41

Thanks Sam :>>

Back to top
 
sam2kb
Posted: Tue Apr 27, 2010 02:51

no problem :)

Back to top
 
loobyloo
Posted: Thu Jul 15, 2010 17:45

Hi Sam, I don't suppose there's any chance of a quick readme or install guide is there? This sounds just what I've been looking for rather than all the other ways of password protection which require individual users' login details.

Back to top
 
sam2kb
Posted: Thu Jul 15, 2010 17:50

All you need is upload the plugin in /plugins directory on your website, then in control panel navigate to Global settings > Plugins and install it.

Once installed, you will see a new field "Post password" or alike in post edit screen. Create and use the password to access the post, each post may have unique password.

Back to top
 
loobyloo
Posted: Thu Jul 15, 2010 18:25

That is brilliant, just what I was looking for and better than htaccess for our group's purposes. Thank you very much for the effort you've put into that.

Back to top
 
sam2kb
Posted: Thu Jul 15, 2010 18:25

No problem :)

Back to top
 
loobyloo
Posted: Sun Jul 25, 2010 12:28

Sam - this is working very well and is really helpful. I was wondering - would it be possible to get it to protect the comments too? At the moment the post are protected but anyone can see the comments. I was wondering if the password protector could apply to the comments URL as well.

Back to top
 
sam2kb
Posted: Tue Jul 27, 2010 08:34

I agree, it would be a good feature... Sorry, but I'm not planning new releases in the near future.

Back to top
 
loobyloo
Posted: Tue Jul 27, 2010 10:00

OK, fair enough, thanks anyway.

Back to top
 
achillis
Posted: Tue Jan 24, 2012 14:12

Hey, using this the enter password prompt appear in my skin header instead of the post. How can I fix this?

Back to top
 
sam2kb
Posted: Tue Jan 24, 2012 14:29

You must be doing something wrong. Can you post or PM me a link to your blog?

Back to top
 
achillis
Posted: Thu Jan 26, 2012 16:07

You were correct, broken plugin. Fixed it. Working now.

Back to top
 
sam2kb
Posted: Sat Jul 28, 2012 16:46

Plugin updated to v1.0.0

- new: protect post comments *
- new: hashed passwords in cookies
- added support for b2evolution v4 and 5
- code clean-up
- bug fixes

* WARNING: Visitors can still view comments on index.php?disp=comments page! Delete or edit /skins/_comments.disp.php

As always, don't rely on this plugin very much.

Back to top
 
achillis
Posted: Fri Oct 11, 2013 16:26

This plugin doesn't seem to work in v5.0.6.

can someone please confirm?

Back to top
 
mgsolipa
Posted: Fri Oct 11, 2013 22:06

Hi @achillis,

I confirm this. Protected post doesn't work as supposed on any of the b2evo v5 series.

According to the @sam2kb post, the last release of this plugin was four month before of the v5.0.0-alpha-4 release.

Back to top
 
sam2kb
Posted: Fri Oct 11, 2013 23:47

Well the latest version of b2evo 5 simply breaks older rendering plugins. See if you can get it to work using this workaround
http://forums.b2evolution.net/plugin-rendering-setting-is-lost-on-b2evo-upgrade#c99513

Back to top
 
achillis
Posted: Sun Oct 13, 2013 13:25

The solution (workaround) you gave me worked. I had to set "Apply rendering to posts: [Always]" in

Code

Dashboard > Blog > Settings > Blog specific plugin settings

btw, it seems there is a bug. If you set the same password for two different posts it results in an error.

Code

MySQL error!
 
Duplicate entry '5b852f2b4f2d8b38130f940823ba5242' for key 'pass_hash'(Errno=1062)
 
Your query:
 
INSERT INTO evo_plugin_protected_posts_22_pass (post_id, pass, pass_hash)
 
VALUES ('24', "qwerty", "5b852f2b4f2d8b38130f940823ba5242")
Back to top
 
achillis
Posted: Fri Oct 18, 2013 19:42

Protected posts

This plugin allows you to password protect your posts, and visitors would have to enter correct password in order to view post content and comments.

All passwords are stored in cookies (optional) and visitors don't have to enter them every time.

This plugin works in b2evolution v2, 3, 4, and 5

updates:

- It creates/installs the file [_comments.disp.php] automatically into the required skins folder (Normal & Mobile/Table (if any)).
- with the created _comments.disp.php file, protected posts will remain hidden from the public [index.php?disp=comments]
- Bug fix * (duplicate entries error) for password creation.

Install Instructions

1) Upload the plugin in /plugins directory on your website.
2) Navigate to (/admin.php?ctrl=plugins) : Dashboard > System ? > Plugin configuration, and install it.
3) Navigate here: Dashboard > Blog > Settings > Blog specific plugin settings and set Apply rendering to posts to (Always) & Apply rendering to comments to (Always).
4) Once installed, you will see a new field "Set password" in post edit screen. Create and use the password to access the post, each post may have unique password with up to 255 chars.

Download v1.0.1
www.midnightstudios.co.za/downloads/protected_posts_plugin.zip

Back to top
 
sam2kb
Posted: Sat Oct 19, 2013 00:33

The plugin now silently overwrites existing _comments.disp.php files. There must be at least a warning on the install screen.
An even better solution would be to check if the file exists and then add the needed bits of code with preg_replace()

Also, please create a new thread, it would be easier for you to update the head post with new info and download link.
I would close this old thread then.

Back to top
 
achillis
Posted: Sat Oct 19, 2013 01:13

Thanks Sam will look into it and update whereafter I will create a new thread. Thanks for your help.

Back to top
 
achillis
Posted: Mon Oct 21, 2013 17:23

@sam2kb

I published the updated version. http://forums.b2evolution.net/protected-posts-plugin

Thanks for your input!

Back to top