Post Levels is a Wordpress plugin which allows you to restrict access to posts based upon the user level. Wordpress 1.3/1.5 or greater required.
Version 0.1 is available for download: Post Levels Plugin v0.1
Install
- Unzip the
post-levels.zipfile into yourwp-content/plugins/directory - Activate the plugin within Wordpress in the “Plugins” section
Use
- Set the Post Status to “Private”: This ensures your post will not be shown if the plugin is accidentally disabled
- Add a Custom Field named
post_level - Set the value of
post_levelto a number between 1 and 10: Only registered users with a level greater than or equal to thepost_levelwill be able to see your post.
Known Issues
- Archive and Category Post listings do not include private posts
81 Comments
Like the View Levels plugin, only much much hotter?
http://www.furbona.org/viewlevel.html
Like the View Levels plugin, only much much hotter?
http://www.furbona.org/viewlevel.html
Yes, the Post Levels is a bit faster and ensures that posts aren’t shown if the plugin is disabled; however, it doesn’t work in WP 1.2
Yes, the Post Levels is a bit faster and ensures that posts aren’t shown if the plugin is disabled; however, it doesn’t work in WP 1.2
I have tried to install this several times, each time I activate it all it does is show at the top of every page all the coding. It there somthing else that has to be done?
I have tried to install this several times, each time I activate it all it does is show at the top of every page all the coding. It there somthing else that has to be done?
I’ve never seen the error, but here’s a guess: Have you made renamed the file to post-level.php? You have to make sure there isn’t an “s” at the end of the file extension.
If that’s not the case, which version of WordPress are you using? This plugin doesn’t work with version 1.2, but it shouldn’t show the source code.
I’ve never seen the error, but here’s a guess: Have you made renamed the file to post-level.php? You have to make sure there isn’t an “s” at the end of the file extension.
If that’s not the case, which version of WordPress are you using? This plugin doesn’t work with version 1.2, but it shouldn’t show the source code.
Nevermind, I found the issue — saving the phps file directly actually gives you an HTML document [php's automatic source color coding]. You can either copy-paste the file contents, or re-download the plugin (I’ve removed the color coding).
Nevermind, I found the issue — saving the phps file directly actually gives you an HTML document [php's automatic source color coding]. You can either copy-paste the file contents, or re-download the plugin (I’ve removed the color coding).
Are you working on getting the Archive / Category listing to show the posts? Also anyways to make protected posts SHOW they are protected eg. with the little padlock like “View Levels plugin” .. other than that sweet plugin thanks and keep up the good work
Are you working on getting the Archive / Category listing to show the posts? Also anyways to make protected posts SHOW they are protected eg. with the little padlock like “View Levels plugin” .. other than that sweet plugin thanks and keep up the good work
Unfortunately, Wordpress doesn’t provide the right hooks to fix the Archive / Category listing, which makes it difficult to incorporate that within a plugin.
I’ll add support for displaying a “private” icon in the next version of the plugin.
Unfortunately, Wordpress doesn’t provide the right hooks to fix the Archive / Category listing, which makes it difficult to incorporate that within a plugin.
I’ll add support for displaying a “private” icon in the next version of the plugin.
Man that sucks with Wordpress. And I will be looking forward to the next version, thanks again and keep up the good work.
Man that sucks with Wordpress. And I will be looking forward to the next version, thanks again and keep up the good work.
Man that sucks with Wordpress. And I will be looking forward to the next version, thanks again and keep up the good work.
Man that sucks with Wordpress. And I will be looking forward to the next version, thanks again and keep up the good work.
hello and thanks for releasing this into the wild … however I’ve noticed that the entries that I’ve marked private and also set a post_level, these entries still appear on RSS-feed lists.. any idea how to fix that? :-)
hello and thanks for releasing this into the wild … however I’ve noticed that the entries that I’ve marked private and also set a post_level, these entries still appear on RSS-feed lists.. any idea how to fix that? :-)
Actually, they only appear in the RSS feed if the feedreader you’re using is either an in-browser one, or somehow uses your cookies. Try logging out of your browser (or using a different one) and visiting the feed URL, and you’ll notice that the private posts are not shown.
Actually, they only appear in the RSS feed if the feedreader you’re using is either an in-browser one, or somehow uses your cookies. Try logging out of your browser (or using a different one) and visiting the feed URL, and you’ll notice that the private posts are not shown.
oops, I spoke to soon. the posts don’t show up in the RSS feed if I do what I’m supposed to. I published my posts, instead of saving them as private.
Thanks again :-)
oops, I spoke to soon. the posts don’t show up in the RSS feed if I do what I’m supposed to. I published my posts, instead of saving them as private.
Thanks again :-)
FYI, Post Levels 1.0 and Batch Categories 0.91 are not compatible when both installed and activated in WordPress v1.5 (final). I installed, activated and tested Post Levels first, and everything was fine. I installed Batch Categories next, and upon activation I got several PHP errors at the top of the Manage Plugins page itself, as well as every other page (have removed full path info from errors):
—
Warning: Cannot modify header information - headers already sent by (output started at /home/.[...]/wp-content/plugins/batch-access.php:11) in /home/.[...]/wp-admin/admin.php on line 6
Warning: Cannot modify header information - headers already sent by (output started at /home/.[...]/wp-content/plugins/batch-access.php:11) in /home/.[...]/wp-admin/admin.php on line 7
Warning: Cannot modify header information - headers already sent by (output started at /home/.[...]/wp-content/plugins/batch-access.php:11) in /home/.[...]/wp-admin/admin.php on line 8
Warning: Cannot modify header information - headers already sent by (output started at /home/.[...]/wp-content/plugins/batch-access.php:11) in /home/.[...]/wp-admin/admin.php on line 9
—
Errors stopped as soon as I deactivated Batch Categories and refreshed the page.
Would be extremely nice if you and the Batch Categories author could collaborate on a fix so both plugins will co-exist on one WP installation. Thanks!
FYI, Post Levels 1.0 and Batch Categories 0.91 are not compatible when both installed and activated in WordPress v1.5 (final). I installed, activated and tested Post Levels first, and everything was fine. I installed Batch Categories next, and upon activation I got several PHP errors at the top of the Manage Plugins page itself, as well as every other page (have removed full path info from errors):
—
Warning: Cannot modify header information - headers already sent by (output started at /home/.[...]/wp-content/plugins/batch-access.php:11) in /home/.[...]/wp-admin/admin.php on line 6
Warning: Cannot modify header information - headers already sent by (output started at /home/.[...]/wp-content/plugins/batch-access.php:11) in /home/.[...]/wp-admin/admin.php on line 7
Warning: Cannot modify header information - headers already sent by (output started at /home/.[...]/wp-content/plugins/batch-access.php:11) in /home/.[...]/wp-admin/admin.php on line 8
Warning: Cannot modify header information - headers already sent by (output started at /home/.[...]/wp-content/plugins/batch-access.php:11) in /home/.[...]/wp-admin/admin.php on line 9
—
Errors stopped as soon as I deactivated Batch Categories and refreshed the page.
Would be extremely nice if you and the Batch Categories author could collaborate on a fix so both plugins will co-exist on one WP installation. Thanks!
What you’re describing is an issue with the Batch Categories plugin. You need to contact the author, there’s nothing I can do about the error you’re seeing (try using Batch Categories without Post Levels, and you’ll see the same error).
What you’re describing is an issue with the Batch Categories plugin. You need to contact the author, there’s nothing I can do about the error you’re seeing (try using Batch Categories without Post Levels, and you’ll see the same error).
Back again :) Ok I did what you suggested and it now longer shows the php code however now it bring this error up :(
Warning: Cannot modify header information - headers already sent by (output started at /home/omiogazz/public_html/wp-content/plugins/post-levels.php:77) in /home/omiogazz/public_html/wp-admin/admin.php on line 6
Warning: Cannot modify header information - headers already sent by (output started at /home/omiogazz/public_html/wp-content/plugins/post-levels.php:77) in /home/omiogazz/public_html/wp-admin/admin.php on line 7
Warning: Cannot modify header information - headers already sent by (output started at /home/omiogazz/public_html/wp-content/plugins/post-levels.php:77) in /home/omiogazz/public_html/wp-admin/admin.php on line 8
Warning: Cannot modify header information - headers already sent by (output started at /home/omiogazz/public_html/wp-content/plugins/post-levels.php:77) in /home/omiogazz/public_html/wp-admin/admin.php on line 9
Back again :) Ok I did what you suggested and it now longer shows the php code however now it bring this error up :(
Warning: Cannot modify header information - headers already sent by (output started at /home/omiogazz/public_html/wp-content/plugins/post-levels.php:77) in /home/omiogazz/public_html/wp-admin/admin.php on line 6
Warning: Cannot modify header information - headers already sent by (output started at /home/omiogazz/public_html/wp-content/plugins/post-levels.php:77) in /home/omiogazz/public_html/wp-admin/admin.php on line 7
Warning: Cannot modify header information - headers already sent by (output started at /home/omiogazz/public_html/wp-content/plugins/post-levels.php:77) in /home/omiogazz/public_html/wp-admin/admin.php on line 8
Warning: Cannot modify header information - headers already sent by (output started at /home/omiogazz/public_html/wp-content/plugins/post-levels.php:77) in /home/omiogazz/public_html/wp-admin/admin.php on line 9
aha worked it out !! Just had to remove spaces from the end of the php code
aha worked it out !! Just had to remove spaces from the end of the php code
Ok now its all installed but it shows the post even when I havethe level set high :( Wsa there another step I missed?
Ok now its all installed but it shows the post even when I havethe level set high :( Wsa there another step I missed?
You have to make sure you’ve set the post status to Private (not Published).
You have to make sure you’ve set the post status to Private (not Published).
Is there any way to make the user level option a little more friendly? I used a hack that had a drop down menu to establish the user level. Thanks. :)
Is there any way to make the user level option a little more friendly? I used a hack that had a drop down menu to establish the user level. Thanks. :)
where do I add the
(private)
…
where do I add the
(private)
…
nut i meant the PHP code for it…
nut i meant the PHP code for it…
Carla: The next version of the plugin will have a friendlier UI.
Shelby: You can add the sample PHP code anywhere within the loop. I’ve added mine next to the post title.
Carla: The next version of the plugin will have a friendlier UI.
Shelby: You can add the sample PHP code anywhere within the loop. I’ve added mine next to the post title.
Nevermind I got it.. .sorry about that
Nevermind I got it.. .sorry about that
is it possible that even though the post is private it pops up a comment post saying ..
[normal post layout]
this post is private please log in to view it ?
[end]
is it possible that even though the post is private it pops up a comment post saying ..
[normal post layout]
this post is private please log in to view it ?
[end]
The sample PHP code for (private) works like a charm. What I would really like though, is to be able to display who can read what according to a certain level. What I mean is, that when I set a post to for instance post-level 2, it displays (Only Josh and Cindy can read this) and when I set a level 3, it displays (Only Josh can read this)
I’ve tried this with the is_post_level ($level) function, but it doesn’t work. What I did is this:
if (function_exists(’is_post_level($level)’) && is_post_level(’2′)) : ?>
(Only x and y can read this)
Where’s the catch?
The sample PHP code for (private) works like a charm. What I would really like though, is to be able to display who can read what according to a certain level. What I mean is, that when I set a post to for instance post-level 2, it displays (Only Josh and Cindy can read this) and when I set a level 3, it displays (Only Josh can read this)
I’ve tried this with the is_post_level ($level) function, but it doesn’t work. What I did is this:
if (function_exists(’is_post_level($level)’) && is_post_level(’2′)) : ?>
(Only x and y can read this)
Where’s the catch?
Lyanna: The plug-in isn’t set up to do what I think you’re looking to do, because the plug-in works in such a way that private posts are never retrieved if the user doesn’t have access to the post. This means you can’t currently let the user know that there’s a post they cannot see.
I’ll add this type of functionality as a request for future versions.
Lyanna: The plug-in isn’t set up to do what I think you’re looking to do, because the plug-in works in such a way that private posts are never retrieved if the user doesn’t have access to the post. This means you can’t currently let the user know that there’s a post they cannot see.
I’ll add this type of functionality as a request for future versions.
hi fil. i’m glad someone is working on the “private-posts” front.
quick question: from a glance, it seems that the minimum “private” level for a post is 1. is there a way to make it 0, without breaking everything?
i want the least private of the private posts to be readable by registered users (user_level 0), without having to give them posting access (user_level 1+).
hi fil. i’m glad someone is working on the “private-posts” front.
quick question: from a glance, it seems that the minimum “private” level for a post is 1. is there a way to make it 0, without breaking everything?
i want the least private of the private posts to be readable by registered users (user_level 0), without having to give them posting access (user_level 1+).
In response to #25, the php function “function_exists” takes the NAME of a function only. So, your code should read:
if (function_exists(’is_post_level’) && is_post_level(’2′))
In response to #25, the php function “function_exists” takes the NAME of a function only. So, your code should read:
if (function_exists(’is_post_level’) && is_post_level(’2′))
I have the plugin working fine. I love it. Thanks for putting forth the effort on this.
Do you know if there is a way to use a post_level of “2″ by default? I’m building a wordpress site that I want the entire thing protected and would love to not have to remember to add a level of 2 to each post. (this will be used for a team that might not be diligent with the details of making sure all the posts are protected.)
(I have one post not protected that says, “You need to be logged in to see this stuff…”)
I have the plugin working fine. I love it. Thanks for putting forth the effort on this.
Do you know if there is a way to use a post_level of “2″ by default? I’m building a wordpress site that I want the entire thing protected and would love to not have to remember to add a level of 2 to each post. (this will be used for a team that might not be diligent with the details of making sure all the posts are protected.)
(I have one post not protected that says, “You need to be logged in to see this stuff…”)
perfect for my needs. Thank-you
perfect for my needs. Thank-you
This is a great plugin! it seems that if the Post Status defaulted to Private & the Publish button was eliminated this would be foolproof. anyone have a hack for that? thanks!
This is a great plugin! it seems that if the Post Status defaulted to Private & the Publish button was eliminated this would be foolproof. anyone have a hack for that? thanks!
I noticed that if a post is marked as Private, even when someone is logged in with the sufficient level to see the post, it is excluded from the Counts for the given category. Is this a bug in functionality, or inteded functionality as part of Private posts.
Additonally, is it possible to display (in red?) PRIVATE POST so those who have permissions to see it know that they are seeing someting special?
I noticed that if a post is marked as Private, even when someone is logged in with the sufficient level to see the post, it is excluded from the Counts for the given category. Is this a bug in functionality, or inteded functionality as part of Private posts.
Additonally, is it possible to display (in red?) PRIVATE POST so those who have permissions to see it know that they are seeing someting special?
Hey, how can one make the post not private once it’s private - Like publish it
Hey, how can one make the post not private once it’s private - Like publish it
Ludwig: Just set the post’s status to “Publish”
Ludwig: Just set the post’s status to “Publish”
[...]
April 25, 2005
Post Levels - Category: Lyrics
http://fortes.com/2005/01/22/introducingpostlevels Lovely little plugin for wordpress. Lets you set custom levels for each post, and thus blocking un [...]
[...]
April 25, 2005
Post Levels - Category: Lyrics
http://fortes.com/2005/01/22/introducingpostlevels Lovely little plugin for wordpress. Lets you set custom levels for each post, and thus blocking un [...]
[...] tag”> Yutakaã?•ã‚“ã?®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã?«ã‚ˆã‚Š detlogã?§ã‚‚紹介ã?•れã?¦ã?„ã?ŸPost Levelsを入れã?¦ã?¿ã?¾ã?—ã?Ÿã€‚ã?“れã?¯æŠ•稿ã?™ã‚‹ãƒ?ストをã?‚らã? [...]
[...] tag”> Yutakaã?•ã‚“ã?®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã?«ã‚ˆã‚Š detlogã?§ã‚‚紹介ã?•れã?¦ã?„ã?ŸPost Levelsを入れã?¦ã?¿ã?¾ã?—ã?Ÿã€‚ã?“れã?¯æŠ•稿ã?™ã‚‹ãƒ?ストをã?‚らã? [...]
Great plug-in! I’ve implemented it on my site and it works like a charm!
Thanks again,
Marie (aka Cosmo GRRL!)
Great plug-in! I’ve implemented it on my site and it works like a charm!
Thanks again,
Marie (aka Cosmo GRRL!)
Hmmm. Perhaps I am one of the dim ones, but i have some questions: 1) How do I “Add a custom field”? and 2) how do I set the value of post_level to between 1 and 10? Also, after enabling the plug-in, I don’t see a place to set post status to private. So 3) how do I set post status? (Should this be a menu option on the “Write” page, or is this also something that I need to change in the code?)
Thanks for any help.
Hmmm. Perhaps I am one of the dim ones, but i have some questions: 1) How do I “Add a custom field”? and 2) how do I set the value of post_level to between 1 and 10? Also, after enabling the plug-in, I don’t see a place to set post status to private. So 3) how do I set post status? (Should this be a menu option on the “Write” page, or is this also something that I need to change in the code?)
Thanks for any help.
ok–figured it out. A drop down menu, like Skippy’s User-Level Post plug-in had would be nice.
ok–figured it out. A drop down menu, like Skippy’s User-Level Post plug-in had would be nice.
Thanks for your hard work on creating this plugin. I’m sure issues like the user interface will easily be solved in the next release. However I have one concerne.
Because posts on my site use the “custom fields” (metadata) for other information, for example I list key words related to that post using the custom fields. As you can probably figure out when you view the post the “post_view: 1″ gets shown inside the meta data. And is shown on the post. Which is ugly and slightly confusing to those that don’t know what it does.
Is there a quick way of solving this? I did think perhaps you could hide it using CSS, but there is no way of seperating it from the other metadata elements.
Thanks again.
I love this plugin! However I was wondering is there any way for a registered user with sufficient level to view my posts on my website to subscribe to my rss feed in a way that those posts are available? Thanks.
´ó¼ÒºÃѽ£¬£¬Ð¡µÜµ½Ð©Ò»ÓΣ¬£¬£¬¾õµÃ±¾Õ¾×öµÃ²»´í£¬£¬Áô¸öÑÔ£¬Õ¾³¤Å¬Á¦Å¶£¡