Protected posts

Download plugins, language packs and stuff.

Protected posts

Postby FI-DD » Wed Apr 04, 2007 7:16 pm

This plugin let's you set a password when adding/editing a post. On your news page you will only see a login field instead of the story. As soon as you enter the correct password you will be able to see the story.


Installation:

1. Upload the plugin and activate it.

2. In inc/show.news.php change this:
Code: Select all
if (!$cache = cute_cache($row['id'], $cache_uniq, $post.($page > 1 ? '.'.$page : ''))){


to this:
Code: Select all
if ((!$cache = cute_cache($row['id'], $cache_uniq, $post.($page > 1 ? '.'.$page : ''))) or ($row['pass'] != '' and $_COOKIE['protected_'.md5x($row['id'])] != md5x($row['pass']))){




(Based on the code from Strawberry 1.1.1)
Attachments
protected-posts.zip
(1.09 KiB) Downloaded 313 times
Last edited by FI-DD on Tue Jul 31, 2007 10:59 pm, edited 1 time in total.
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Postby munin » Thu Jun 14, 2007 4:22 pm

I've been looking forward to this for the longest! Too bad it doesn't work for me. =/

It looks like it works fine, but when I put in the correct password and try to see the protected story. nothing shows up.
munin
 
Posts: 27
Joined: Sun May 07, 2006 5:12 am

Postby x-byte » Fri Jun 22, 2007 8:49 am

Doesn't work for me either. Also it appeares on both short story and full story. Any way to fix this so it's only one input field?

But I like the idea behind this. Would like a working version :)


edit:

Also. Is it possible to add a master password? So that all post not published is protected? My site often have articles that is under work that I don't want guest to see. Thanks in advance!
x-byte
 
Posts: 170
Joined: Mon Nov 14, 2005 6:31 am

Postby x-byte » Sat Jul 07, 2007 10:13 am

x-byte wrote:Doesn't work for me either. Also it appeares on both short story and full story. Any way to fix this so it's only one input field?

But I like the idea behind this. Would like a working version :)


edit:

Also. Is it possible to add a master password? So that all post not published is protected? My site often have articles that is under work that I don't want guest to see. Thanks in advance!

bump
x-byte
 
Posts: 170
Joined: Mon Nov 14, 2005 6:31 am

How to restrict a post to registered users ?

Postby afxback » Mon Jul 09, 2007 11:03 pm

Hello,
Thank you for this good plugin. But I am asking if there is possiblity to protect a post to registered users only. I mean, in fullstory, users insert there registered passwords to view the fullstory?
I need this possibllity. It will be different from this plugin ,ofcourse.
afxback
 
Posts: 134
Joined: Fri Nov 11, 2005 4:59 pm

Warning!

Postby afxback » Wed Oct 03, 2007 2:31 pm

This plugin returns this warning and stops me from viewing article when I want to view it with the password given:

Warning: Cannot modify header information - headers already sent by (output started at /home/journal/public_html/articles/fullstory.php:1) in /home/journal/public_html/articles/plugins/protected-posts.php on line 78
And fullstory.php is my news page instead of "home" in "link=home/post".
If remove the line 78 then just a white page appears.

EDIT:
It seems this warning has something with php or mysql version. It works well on my local host but returns this warning on server in all of cute installations!
any help / instructions?
afxback
 
Posts: 134
Joined: Fri Nov 11, 2005 4:59 pm


Return to Additional Downloads



Who is online

Users browsing this forum: No registered users and 0 guests

cron