DISQUS

fortes.com: Post Levels 1.0

  • Drama Queen · 3 years ago
    Thanks for the update - this was one plugin I surely would have missed with WordPress 2.0 - I'll report back with my results :)
  • Drama Queen · 3 years ago
    One other question - usage is still the same as the previous plugin, correct?

    So, if I want to publish a private entry, I list it as "Private" and add "post_level" and to the custom field?
  • Steve · 3 years ago
    @Drama Queen: Correct -- except now there's also a drop down menu in the editing window that you can also use to set the post level.
  • Daisyhead · 3 years ago
    I'm sorry to leave this question on this entry, but comments are closed on the entry I wanted to post it on. I have not upgraded to V2.0 yet as I don't have the time and won't any time soon. In the meantime, I implemented V0.2.1 but I have a question regarding this particular version.

    Is there a way in V0.2.1 to modify something, ANYTHING, so that registered members cannot edit posts or ANYTHING at all on my blog? Even if it means tweaking hard code, I don't mind. This is a really great plugin, but I do not like giving access to my blog to just anyone.

    Thank you!
  • Rocky · 3 years ago
    This is the error I get when I activating the plugin. Do you know what cause this?

    Warning: Cannot modify header information - headers already sent by (output started at /home/rocky/public_html/wp-content/plugins/post-levels.php:772) in /home/rocky/public_html/wp-content/plugins/post-levels.php on line 103

    Warning: Cannot modify header information - headers already sent by (output started at /home/rocky/public_html/wp-content/plugins/post-levels.php:772) in /home/rocky/public_html/wp-content/plugins/post-levels.php on line 104
  • Daisyhead · 3 years ago
    Rocky, make sure you have no whitespace at the beginning or end of the file. See if that helps.
  • Rocky · 3 years ago
    Daisy, you are correct there are two whitespaces in the end of the file which causes the problem error.
    Thanks
  • Steve · 3 years ago
    Thanks for the update! It's working beautifully!
  • Fortes · 3 years ago
    Daisyhead: WP 1.5 didn't make this very easy to do, but it is of course possible if you're willing to update the code.

    I ended up editing the following files:

    * wp-admin/menu.php (change the second parameter for all the menus to 10)
    * wp-admin/profile.php (check for user_level = 10 before showing a user's level)
    * wp-admin/user-edit.php (change it so only user_level = 10 can edit [look for if ($edituser->user_level >= $user_level)]

    That worked reasonably for me, but is probably not foolproof.
  • Joe · 3 years ago
    Does this version fix the problem with the posts not showing up in Catagores/Archives for authorized users?
  • McShelby · 3 years ago
    Great you've provided a version for WP2, but why not using the new role and capability model instead of some selfdefined userlevels?
  • Fortes · 3 years ago
    Joe: No, that issue is not fixed in this version. It's an outstanding bug in WordPress. The fix isn't very tough, I may code it myself -- but since I don't have submit privileges, I can't make the change in WP myself.

    McShelby: I debated trying a role-based implementation, but decided against it for two selfish reasons: 1) My blog is already set up to use integer-based levels (and it works well for me) and 2) that kind of implementation is a little bit trickier and will require more code.

    Feel free to extend the plugin to do so if that fits your needs.
  • Joe · 3 years ago
    Cool. If you can just post a hack seperately from the normal plug-in (just the diff file or instructions on what to change), then i'd be a happy camper.
  • Joe · 3 years ago
    OH yeah. I mean hack because you will have to alter the wordpress files
  • Daisyhead · 3 years ago
    Thanks so much Fil! Your code tweaking worked like a charm. I am upgrading this weekend, but wanted to put this into place now. Thanks again for such a great plugin!
  • thesuperstar · 3 years ago
    can you hide it from non registered, but still show something in the title like , this "this post is only for registerd users" for new people / nonregistered?
  • Tony · 3 years ago
    Could I use this plugin to leave my blog public, but my extra wordpress 'pages' viewable by registered users only?
  • Anonymous · 3 years ago
    Is it possible to change the code so that by default all posts get post_level = 1 ?
  • Daisyhead · 3 years ago
    I'm a bit confused. I just upgrade my WP to 2.0. To me, I see no difference. I have the plugin set so that those with a user level of 1 or above can see the private entries, but anyone with a user level of 1 or above can still create posts on my blog. I don't see any way around this, other than to tweak the files you mentioned above Fil.

    Am I missing something on how this version of the plugin works with the new version of WP?
  • stian · 3 years ago
    Would you consider the possibility to set a default post level for posts to a category? This way I could have a category called private, you get the picture I guess (great for postie posts!).

    Maybe for a future version?

    Thanks for a great plugin, works on www.barmen.nu with wp 2.0 no problems at all!
  • Alex · 3 years ago
    Same Question from me like Tony: Is it possible to use the plugin also for the static pages? I'd like to use it for various Gallerypages which should only be accessable to my friends.
  • Alex · 3 years ago
    Nobody reading the comments? Guys, please, give me at least a headup, I have no clue on how to change it to use it with static pages.
  • igobypaul · 3 years ago
    I think there is a bug in this plugin. If I set 'default post level' to cirtain level, new posts have status Published and no post level is set as a default. So when I write a post I have to remember to set post level manualy.
  • Quartz · 3 years ago
    Same question as Tony and Alex ! I would also be very interested to use the plugin for my static pages !
  • Bryan · 3 years ago
    This is a great extension for Wordpress.

    Can you post a fix to the Wordpress files that corrects the problem of Categories which contain only private posts not appearing for logged in users?

    Many thanks.
  • Deb · 3 years ago
    Thank you for this plug-in - I would not have upgraded to WP2.0 if I hadn't known that Post Levels would work. But it works beautifully - I can do exactly what I want with it. Great :-)
  • Kaitlin · 3 years ago
    I have this plugin installed, but my "private" posts can still be seen by accessing blogurl/wp-rss2.php How can I prevent this?!
  • John · 3 years ago
    Hello & thanks for this great plugin. I just found a small bug:
    The feed links are not rewritten correctly, I get
    /?feed=rss2?http_auth=yes

    There must be something wrong with this function, probably because when it is called, $output is still empty?

    function postlevels_feed_link($output)
    {
    $delim = (strpos('?', $output) === false) ? '?' : '&';
    return $output . $delim . 'http_auth=yes';
    }

    I'm using wp 2.0.

    Any ideas how to fix this?
  • claire Cannon · 3 years ago
    thanks - this works great!
  • Echo · 3 years ago
    Okay, so there is a problem with my user levels plugin and no one so far has been able to help me. People are finding the links to my protected posts in their referrer logs, clicking the links, and reading my protected posts. They don’t even have to be logged in, which is just absolutely crazy. You can’t see the posts unless you are on that user level, but if you have a link, you’re in.

    Also, someone told me that they clicked a link to a protected post once they logged in and were at the dashboard. She was able to read the protected post as well.

    I switched those entries to drafts, but guess what? THEY CAN STILL BE SEEN BY CLICKING THE URL. Even if the person is not logged in.

    HELP!
  • Fortes · 3 years ago
    @Echo: I've never seen this happen (I use the plug in on my site and the hidden posts are hidden even if you know the URL). Are you sure you're not viewing the site somewhere where you're logged in? Have you set the post status to private? Is it this plugin, or some one elses?

    @John: Looks like a bug in my code. I'll fix it in the next release.

    @Kaitlin: Make sure you're not logged in when viewing your RSS -- try it from a different computer even -- you should not see the private posts.
  • Fortes · 3 years ago
    @Daisyhead: Change the roles of your users to "Subscribers" -- that should do what you're looking for.
  • Echo · 3 years ago
    I'm sure it's this one. Here is a entry marked 'draft' whose level is set to 3 or 4: http://www.echoleigh.com/blog/?p=1215

    I can see that after logging out, clearing cookies, and clearing cache.
  • Fortes · 3 years ago
    @Echo: Post Levels only works if you mark the entry as "Private" -- the fact that you can see drafts (regardless of post level) is an issue in WordPress.
  • Echo · 3 years ago
    The others were marked as private, though. Here's one marked as private and set to level three: http://www.echoleigh.com/blog/?p=1218
  • Fortes · 3 years ago
    Echo: I have no idea why you're seeing that behavior since I can't reproduce it on any of my WP test installations.

    Are you using any other plugins? It's hard for me to tell what's going wrong here ...
  • Echo · 3 years ago
    It's adhesive that's causing the problem! I deactivated it and tried to view the post again and this time it is private! I don't use Adhesive much, so I'm just going to uninstall.
  • eyetag · 3 years ago
    hi! since i installed pp 1.0 my feeds are not accessible without logging in (although im the blogs admin, recognised as such by wp by cookie)... rss should be public, only posts with a certain user level should not be included. thanks!
  • Steve · 3 years ago
    @Bob: One of the options let's you control whether the RSS feed links get re-written -- that should fix your problem.

    Fil: You may want to change the default here ...
  • Olli · 3 years ago
    I have little suggestion, something that would help me out somewhat:
    It would be great if you could assign a name or an alias to your postlevels, so that it becomes more clear for the admin who's who :) Great plugin, thanks
  • Mick · 3 years ago
    Great Plugin! Is there any way to get it to control the wordpress static pages as well?
  • franky · 3 years ago
    I am a little confused about how to automately assign a user level. Now my register user (author) is no level at beginning. I have to go to Users->User level to manually assign a level to them. Do I miss sth? thanks.
  • Gina · 3 years ago
    Works perfectly. Thank you!
  • Rich Kolker · 3 years ago
    When I go to the "User levels" tab to set the user levels of various users, all the rows are blank. Am I missing something?
  • eyetag · 3 years ago
    still in trouble with my rss-feeds - they only work after logging in...
    anyone knows about that? please, havin functionable rss is crucial for a good blog! thanks!
  • eyetag · 3 years ago
    me again,
    looking for the right syntax to append something like:
    exclusive
    in the private post prefix/postfix option.
    in this case color won´t be displayed by the output, when i try to append an image by tag, the php gets messed up...
    how could this work?
  • joh · 3 years ago
  • Christopher · 3 years ago
    Like Rocky a while back; I'm getting 'cannot modify headers...103...104' messages. I checked for spaces at the beginning and end, but the messages still remain at the top of my blog when I'm logged in. Do you have any other insights about this?
  • joh · 3 years ago
    one problem :
    i am using the minblog plugin for an asides like feature but for some reason the post levels plug in assigns the Private Post Title Postfix to all the miniblog entries even though these posts are not in fact private and there is actually no way to save the miniblog posts as private...

    i hope miniblog and post levels plug ins are not just simply incompatible because i'd really like to use both :|
  • Shig Unmentionable · 3 years ago
    Hey, I absolutely love this plugin. It means the difference between continuing to use LiveJournal, and switching to my own WordPress blog.

    One question, though: When I try to use html tags in the prefix, it gives me the full post title without any of the html code, followed by an extraneous ' "' , then the full title with html code properly applied. When I try it in the postfix, it does the same thing but with only the postfix sans code, followed by the extraneous characters and the correct post title.

    Is this a bug, or am I doing something wrong? Or are html codes just not fully supported in the prefix/postfix?

    Thanks again, it really is a great plugin.
  • Preston · 3 years ago
    I'm using the Post Levels 1.0 with WordPress 2.0.1, and I'm a little confused. My understanding is that if a post is marked "private" only I can see it - if a post is published and marked with a post level, only users with access to that post level can see it (in effect, it's marked "friends only" or "subscribers only" and requires a login). Is that correct? When I do exactly that (assign a post level to a post and then hit "publish") it appears when I'm logged in but not when I'm logged out.
  • Anonymous · 3 years ago
    i narrowed down the problem of rss login request (see aboe) to firefox, in IE it works normal
  • eyetag · 3 years ago
    hi! anyone still reading?
    in archive template (next post link) will append the private-marking even though next one is not private?
    do you know why?
  • eyetag · 3 years ago
    my mistake about the rss, works fine, sorry, too many things at the same time;)
  • yohyoh · 3 years ago
    so is there a way to make posts in a certain category default to a specified userlevel? that would be cool!
  • Tracy · 3 years ago
    any idea how/when it will be released with a version that lets logged in readers see locked posts in archive list???
  • InfoCynic · 3 years ago
    With the option to rewrite feed links on in WP 2.02, registered users were seeing the feed URL with ?http_auth=yes but it wouldn't take any logins, no matter what we tried, so I had to disable the feature. Anyone else have this problem?
  • Barbara · 3 years ago
    Hi! the plugin works, I'm testing it just now and apart some issue with the rss feed all is fine. Now, I would make all my archives private with a "1" level. Is there a way to do this with a sql query on the db? I tried to set the post_status to 'private' with an update query but this hasn't had any effect on the level. Thank you!!! Barbara
  • pielgrzym · 3 years ago
    Hi,
    great plugin, but it doesn't work properly - no matter how I set privilages (0-10) no registered 'subscriber' can see the post. Only I can see it (like in usual 'private' post). I'm using WP 2.0.2. Is there a way to fix it? :) thanks for help :)
  • pielgrzym · 3 years ago
    It's me again :) I set the private level to 'public', it automatically reset the private level to 0 and suddenly everything started to work ok :) thanks for one of the best WP plugs :)
  • chris · 3 years ago
    Hi, thanks for the nice plugin!

    There is indeed an error in the code that rewrites links to feeds to support HTTP Authentication.
    Line 351 of post-levels.php is
    $delim = (strpos('?', $output) === false) ? '?' : '';

    but in fact it should be
    $delim = (strpos($output,'?') === false) ? '?' : '';

    i.e., the position of the strpos arguments has to be swapped.

    thanks again!
    chris
  • Olli · 3 years ago
    Hey man,

    As somebody else posted before there is an issue with displaying the categories which contain only 'private' posts, they simply won't display in the sidebar, even if that user is logged in (or even if you're the admin). Is there a workaround?
  • WordDiva · 3 years ago
    I LOVE this plugin!! But I have one small problem. I have WP 2.0.1 and Post Levels works great in IE, but I primarily use Firefox. Whenever I try to view my blog, edit an entry, or login to dashboard, I get a pop-up login window. I can hit cancel three times and the blog will appear as normal. Is there a way I can get rid of that login box altogether? Here's my blog: http://www.tiastyle.net/personal/

    Any advice/guidance would be appreciated. Thanks!
  • moonbatty.com · 3 years ago
    A nice feature would be to have the ability to display the number of posts that are above a user level. Ie: "if the logged in user is level 0, count the number of posts that are in all levels above 0, and display a note that says 'there are 102 posts above your user level. Want to see them? Log in!"'
  • Anonymous · 3 years ago
    is there anything still happening with this plugin? any new version thought of? although it is one of the most usefull plugs around private blogging, it still has several flaws. all i can see on this page are unanswered questions...
  • Jacob · 3 years ago
    Well the plugin seems to be working great, for the most part. Using the role manager plugin my friend's new site can keep certain posts hidden. But I tried to subscribe to the RSS feed and it doesn't accept my password. I tried it on Feeddemon and NetNewsWire. Removing the authentication portion of course works fine and no hidden posts are seen. Am I doing something wrong? I know I'm entering the correct username/password. Is this a problem with wordpress or the plugin? I'm not sure. Thanks.
  • Jacob · 3 years ago
    I opened up a forum post on wordpress.org... anybody else experienceing this? I tried logging in with Firefox and still couldn't get it to correctly authenticate my username/password.
    http://wordpress.org/support/topic/75644
  • Jacob · 3 years ago
    did get my credentials through with a little script modification, but it just gives me a 404 error now.

    Thanks!
  • Dave · 3 years ago
    I noticed that even when I'm logged in (with admin level) private posts are omitted from the Category listings and that if all posts in a certain category are private it doesn't even list the category.

    Is that correct or have I got something incorrectly configured? If that is the way it should work, can I suggest that for a next release perhaps you could have it so that this remains so for the non-registered readers but that for logged in users with the appropriate user levels it does list those posts and categories?

    Beyond that though - well done. I'm using it in combination with Owen's Role Manager, since that combo allows me to 'privatize' both my Flickr photos and individual posts without having to give people post abilities.
  • Marcos · 3 years ago
    Well, comment 61 definitely is a necessary fix to make the authenticated RSS urls correct.

    What I find interesting is the regular rss feeds show private posts in Safari if I was logged in already anyway viewing the web page. Safari must use the site's login info when reading the rss feed. I tested the regular feeds in curl and NetNewswire and without the auth=yes part and logging in, the private posts don't show up, so this seems Safari-specific.

    Still, an interesting thing to note about Safari's RSS ability. It seems to persist in the cache for a while too. I logged out, went back to the default rss url and my private posts were still there. I had to empty cache, quit and run Safari again before it reloaded the URL without authentication and the private post was gone.
  • Ananda · 3 years ago
    Awesome plugin. Does exactly what I needed it to do....
  • Matt · 3 years ago
    For the problem mentioned earlier wtih categories not displaying properly (Category does not display if all posts in category are marked private.)

    One workaround is too add an argument 'hide_empty=0' to the wp_list_cats function call. This will display all categories.
    Usually the call is made in your template - possibly in sidebar.php.
    If you use widgets then this can be found in plug-ins/widgets/widgets.php in function widget_categories:
    Wherever the function call is made change
    wp_list_cats("sort_column=nameoptioncount=$chierarchical=$h");
    to
    wp_list_cats("sort_column=nameoptioncount=$chierarchical=$hhide_empty=0");

    For more read: http://codex.wordpress.org/Template_Tags/wp_lis...
  • Matt · 3 years ago
    Example above is for the widgets.php file.
    In other template files the call would look like
    wp_list_cats('sort_column=nameoptioncount=1hierarchical=0hide_empty=0');
    (ie no variables($c, $h) - for people not familiar with php)
  • Jacob · 3 years ago
    I updated my post in the Wordpress forums...

    I'm not really any closer to solving my problem. But, and I'm not sure this has nothing to do with my htaccess hacking, while fiddling with the urls I randomly got to see the post if I was already logged in. Though I've only witnessed this in Firefox. I'm kinda surprised that no one has seen this type of problem before. :( Can anybody help?
  • Ben · 3 years ago
    Great plugin.... thanks a lot. But please please please make it work with static pages too!!! Thanks, Ben
  • Nic · 3 years ago
    This looks like it'll mostly do the trick for me, thanks for your work.

    However, I wish I knew php to modify it. Perhaps you'd consider adding this in as an option?

    I would like to display the excerpt, or the bit of text before the More, to everyone, even for those private posts (to incite people to register). Short of that, a default bit of text, showing the tile and "you must be a subscriber to see this content".

    Cheers
  • rich · 3 years ago
    Hi
    The plugin seems to me exactly that what I need.
    But when I want to download it, there only comes an website with advertisement.
    Bye
  • shmrete · 3 years ago
    When I installed the plugin and tried to activate it, it says this:

    Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/kevinp/public_html/notjustanotherday/wp-content/plugins/post-levels.php on line 7

    Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/kevinp/public_html/notjustanotherday/wp-content/plugins/post-levels.php on line 29

    Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/kevinp/public_html/notjustanotherday/wp-content/plugins/post-levels.php on line 30

    Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/kevinp/public_html/notjustanotherday/wp-content/plugins/post-levels.php on line 31

    Parse error: syntax error, unexpected T_IF in /home/kevinp/public_html/notjustanotherday/wp-content/plugins/post-levels.php on line 34

    Any idea how I can fix this?
    Thanks!
  • Jenny · 3 years ago
    Hey, thanks so much for making this plugin! It's just what I was looking for!
  • Joefish · 3 years ago
    This plugin is fantastic. I absolutely love it.
  • Carrie · 3 years ago
    All of my private posts are showing up in the feeds even if you arent logged in or logged in as someone who shouldnt have access to them. Appending auth=no to the rss2 feed works... but that doesnt work for the atom and rss feed. I'm viewing the feeeds in firefox. Any ideas?
  • Helgi · 3 years ago
    Great Great Plugin.

    So useful, so needed, so everything. Thanks as lot, seriously the best plugin that I have for WP!

    Like others here it would be nice to have a static page for post levels but just that, nice. On the other hand I am using Mobile Blog with pictures and that always goes to the Mobile category and I would like that to be privite always; and as I am doing this through my phone I cant set the Post Level. Is there any soltion to this, either that certain categories are always Private or the text for the post could include some short cut:

    i.e."PostLevel:5" at the start of the moblog could trickert the post to belong to that level.

    All suggestions welcomed, and again, great work!
  • neubeedoo · 3 years ago
    New to WP and the world of plug-ins - used this and it installed great - but I have a mod question..
    Currently, if the post-level is set to 2, any user with a post level of 2 or GREATER can see the post.
    Would it be possible to have post-level 2 (and 10-admin) postings only visible to level 2 (and 10) users - not level 3-9(or maybe some other known plug-in) meaning levels set for the post are exact(+admin) designations? - I am trying to isolate subgroups of users somehow ...
  • jweaks · 3 years ago
    I'm getting the login box like #63 above, only in FireFox. I guess it's some sort of HTTP auth problem. Ideas?
  • joiz · 3 years ago
    As mentioned by someone earlier, this plugin works great in IE but I'm also more of a Firefox user and I'm getting the popups when I'm logged in. Any way I could get rid of those? Thanks so much for this plugin by the way :)
  • Shelby DeNIke · 3 years ago
    I dont think this works with wordpress 2.0.4, as when i enabled it i can not see any posts in the admin section.
  • nprw jbcuxlzw · 3 years ago
    tjzahyw fqlzycow nuqc oybfcqa wjrakv muakl moqiy
  • Shelby · 3 years ago
    Anyone else having that issue with 2.0.4? or am I not installing this correctly.
  • phoenixdynasty · 3 years ago
    I installed the Post levels plug in but it gives me this error

    Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/bizkids/public_html/wp-content/plugins/post-levels.php on line 2

    Parse error: syntax error, unexpected T_STRING in /home/bizkids/public_html/wp-content/plugins/post-levels.php on line 2

    Pls help how I can correct this.
  • ipeppas · 2 years ago
    Does anyone fix the problem with the private posts not showing up in Categories/Archives for authorized users when they are logged in? (even to me that i have level 10)
  • Shelby DeNike · 2 years ago
    I am waiting for the same fix ipeppas
  • Sean · 2 years ago
    this is a nice plugin i love it. But it does not work if the posts where red by using:

    [...]
    $posts = get_posts('numberposts=5offset=1');
    foreach($posts as $post) :
    [...]

    instead of:

    [...]
    while (have_posts()) : the_post();
    [...]
  • Jeff · 2 years ago
    How do you keep posts out of the RSS feed?