 |
 |
 |
 |
 |
| Author |
Message |
x-byte
Joined: 14 Nov 2005 Posts: 170
|
|
Password protection on unapproved articles |
|
What about a plugin that will force an unregistered user to insert a password to see the unapproved news? Like it is now, a user can see the articles if he knows the path.
|
|
| Wed Jan 16, 2008 9:22 pm |
|
 |
Guest
|
|
|
Please login to hide the ads.
|
|
|
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2668 Location: Germany |
|
|
|
In inc/show.news.php try to change this:
 |  | if ($title){
$where[] = "url = $title";
} elseif ($time){
$where[] = "date = $time";
} elseif ($id){
$where[] = "id = $id";
} |
to this:
 |  | if ($title){
$where[] = "url = $title";
} elseif ($time){
$where[] = "date = $time";
} elseif ($id){
$where[] = "id = $id";
}
$where[] = 'and';
$where[] = 'hidden = 0'; |
|
|
| Thu Jan 17, 2008 6:38 pm |
|
 |
nam

Joined: 23 Dec 2006 Posts: 67
|
|
|
|
This works but 2 problems:
1- It shows the message "post not found" while it should say "you are not autorized ...."
2- Now administrator also can't view the message and gets the same message. It should check if admin is logged in, then he should be able to view the post.
|
|
| Sun May 25, 2008 1:27 am |
|
 |
flyboy17
Joined: 21 Feb 2007 Posts: 47
|
|
|
|
yes that would be a better solution (if possible)
Also; sometime "unapproved" or "news with a date in the future " are visible in the archive and in the categories.
thanks already for your time FI-DD
|
|
| Sun Jun 22, 2008 5:12 pm |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|
 |
 |
 |
|