<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>fortes.com - Latest Comments in Post Levels plugin v0.2.1</title><link>http://fortes.disqus.com/</link><description></description><atom:link href="https://fortes.disqus.com/post_levels_plugin_v021/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Wed, 17 Aug 2005 16:29:01 -0000</lastBuildDate><item><title>Re: Post Levels plugin v0.2.1</title><link>http://fortes.com/2005/05/postlevels-021/#comment-1207733</link><description>&lt;p&gt;First off, great plug-in!  Exactly what I was looking for.  &lt;br&gt;I want to let folks know about a strange behavior I have encountered with Soren's (and perhaps the original) Post-Levels plugin.  The plug-in works great in Internet Explorer (PC &amp;amp; Mac), but for me, Does not work in Firefox (PC &amp;amp; Mac) or Safari (Mac).  Am I the only one with this problem?&lt;br&gt;Thanks again to Filipe, Soren, and any other contributors for this great plug-in.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Brian Rowland</dc:creator><pubDate>Wed, 17 Aug 2005 16:29:01 -0000</pubDate></item><item><title>Re: Post Levels plugin v0.2.1</title><link>http://fortes.com/2005/05/postlevels-021/#comment-1207732</link><description>&lt;p&gt;As mentioned in the first comment, I think choosing 0 post_level by default is a logic error. I changed this a little bit. So that I can set users just registered users (or friends). Otherwise you need to set user's level to 1, which also gives posting permissions. Here is my patch. empty changed to isset, and default post_level is below allowed levels (-1)..&lt;/p&gt;&lt;p&gt;---------------------------&lt;/p&gt;&lt;p&gt;--- post-levels.php.txt 2005-05-15 00:43:41.000000000 +0300&lt;br&gt;+++ post-levels.php     2005-07-28 10:43:05.205061888 +0300&lt;br&gt;@@ -32,9 +32,8 @@&lt;br&gt;   if (function_exists('add_filter'))&lt;br&gt;   {&lt;br&gt;     global $user_level; get_currentuserinfo();&lt;br&gt;-&lt;br&gt;     // Don't bother unless someone is logged in&lt;br&gt;-    if (!empty($user_level))&lt;br&gt;+    if (isset($user_level))&lt;br&gt;     {&lt;br&gt;       add_filter('posts_join', 'postlevel_posts_join');&lt;br&gt;       add_filter('posts_where', 'postlevel_posts_where');&lt;br&gt;@@ -50,21 +49,21 @@&lt;br&gt;       }&lt;/p&gt;&lt;p&gt;       // Whether the current posts is of the given level&lt;br&gt;-      function is_post_level($level = 0)&lt;br&gt;+      function is_post_level($level = -1)&lt;br&gt;       {&lt;br&gt;         global $postlevel_key;&lt;br&gt;         $val = get_post_custom_values($postlevel_key);&lt;br&gt;         if (!empty($val))&lt;br&gt;           return ($val == $level);&lt;br&gt;         else&lt;br&gt;-          return ($level == 0);&lt;br&gt;+          return ($level == -1);&lt;br&gt;       }&lt;br&gt;     }&lt;br&gt;     else&lt;br&gt;     {&lt;br&gt;       // Not logged in, use define fast functions that don't use the DB&lt;br&gt;       function is_private() { return false; }&lt;br&gt;-      function is_post_level($level = 0) { return ($level == 0); }&lt;br&gt;+      function is_post_level($level = -1) { return ($level == -1); }&lt;br&gt;     }&lt;br&gt;   }&lt;br&gt; }&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">serkan</dc:creator><pubDate>Thu, 28 Jul 2005 03:38:39 -0000</pubDate></item><item><title>Re: Post Levels plugin v0.2.1</title><link>http://fortes.com/2005/05/postlevels-021/#comment-1207731</link><description>&lt;p&gt;Hi, I created a bugfix branch to work around the above problem with WP 1.5.x. Incorporated in this fix is the above written code plus some minor other bugfixes and an additional feature. Read all about it here: &lt;a href="http://soeren-weber.net/post/2005/07/10/34/" rel="nofollow noopener" target="_blank" title="http://soeren-weber.net/post/2005/07/10/34/"&gt;http://soeren-weber.net/pos...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">McShelby</dc:creator><pubDate>Tue, 12 Jul 2005 16:36:35 -0000</pubDate></item><item><title>Re: Post Levels plugin v0.2.1</title><link>http://fortes.com/2005/05/postlevels-021/#comment-1207730</link><description>&lt;p&gt;There are a lot of advantages using the "private" flag. Assume the plugin is somehow disfunct or turned off in the admin panel. If the "private" flag is not set, suddenly every visitor of your site can view every post! For me, that's not what I want. If a this access control plugin fails I prefer that it is rather showing nothing than exposing every content to all users.&lt;/p&gt;&lt;p&gt;Besides that if not flagged "private" your new "published" post wil be announced at the update service (by default &lt;a href="http://rpc.pingomatic.com/)" rel="nofollow noopener" target="_blank" title="http://rpc.pingomatic.com/)"&gt;http://rpc.pingomatic.com/)&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Nevertheless a user can edit another post even if it's flagged private and post_levels plugin is active if his' userlevel is higher than that of the writer. Maybe you can tweak the levels of your users by providing an "edit user" with level 9 and all other user not higher than 8? Just a thought. &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">McShelby</dc:creator><pubDate>Sun, 10 Jul 2005 07:41:11 -0000</pubDate></item><item><title>Re: Post Levels plugin v0.2.1</title><link>http://fortes.com/2005/05/postlevels-021/#comment-1207729</link><description>&lt;p&gt;Is there some way to filter out these posts just based on the post_level custom field and not the "private" post_status?  I have a bunch of authors on my site and we need to edit each others content.  It would be really nice to be able to just use the custom field so that we can get to the posts.  I recognize that if the plugin is disabled, the custom field will be worthless. (I've been trying to play with the str_replace line without much success.)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Burt</dc:creator><pubDate>Sun, 10 Jul 2005 07:13:49 -0000</pubDate></item><item><title>Re: Post Levels plugin v0.2.1</title><link>http://fortes.com/2005/05/postlevels-021/#comment-1207728</link><description>&lt;p&gt;Sorry, I just copied and pasted the code from my source, but somehow the blog has converted the quotes. Sorry for this. I wished Filipe already had included this fix into the code and provide an official new version of this great plugin, so no one has to mess around with fixing the code by hand.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">McShelby</dc:creator><pubDate>Thu, 07 Jul 2005 10:38:27 -0000</pubDate></item><item><title>Re: Post Levels plugin v0.2.1</title><link>http://fortes.com/2005/05/postlevels-021/#comment-1207727</link><description>&lt;p&gt;The code (above) posted by McShelby works really well to fix the single post 404 issue.  Copy it into your post-levels.php file - but make sure to do a search and replace for the 'curved single quotes' ('smart quotes' that dont work in code) that appear in the code above - with actual single quotes.  If you don't, the plugin will error out when you try to load any of your pages.  &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Carrie</dc:creator><pubDate>Mon, 27 Jun 2005 13:31:47 -0000</pubDate></item><item><title>Re: Post Levels plugin v0.2.1</title><link>http://fortes.com/2005/05/postlevels-021/#comment-1207726</link><description>&lt;p&gt;Is there any way to automatically set the level based on the category of the post? I'm likely to forget to set it. I have a hard enough time remembering to set the categories. :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">coppit</dc:creator><pubDate>Thu, 23 Jun 2005 11:28:40 -0000</pubDate></item><item><title>Re: Post Levels plugin v0.2.1</title><link>http://fortes.com/2005/05/postlevels-021/#comment-1207725</link><description>&lt;p&gt;You wouldn't happen to have the ticket number for the bug you reported?  I wonder if anyone can get the Dev's to just include post-level functionality in 1.6.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">motion3</dc:creator><pubDate>Tue, 21 Jun 2005 23:41:11 -0000</pubDate></item><item><title>Re: Post Levels plugin v0.2.1</title><link>http://fortes.com/2005/05/postlevels-021/#comment-1207724</link><description>&lt;p&gt;if there any way to get the post_level plugin to work with the latest WP version ? can't you modify the plugin to work with all versions ?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Tue, 21 Jun 2005 18:57:07 -0000</pubDate></item><item><title>Re: Post Levels plugin v0.2.1</title><link>http://fortes.com/2005/05/postlevels-021/#comment-1207723</link><description>&lt;p&gt;i'm still not sure what post_level is suppose to do does it keep a post from being viewed ? or edited&lt;/p&gt;&lt;p&gt;since it requires you make a post private wouldn't that keep it out of the viewing pages ?&lt;/p&gt;&lt;p&gt;when you mean a certain userlevel can see it do you mean in the admin only or in the actual blog pages&lt;/p&gt;&lt;p&gt;i'm using WP 1.5.1 and haven't been able to make much use of post_levels&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Tue, 21 Jun 2005 13:53:04 -0000</pubDate></item><item><title>Re: Post Levels plugin v0.2.1</title><link>http://fortes.com/2005/05/postlevels-021/#comment-1207722</link><description>&lt;p&gt;can someone elaborate please on what this single-post issue is?&lt;/p&gt;&lt;p&gt;the only problem i found was if i logged-out and manually tried to access a PL-ed post, i got a dirty 404, instead of a nice WP redirect.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">crash</dc:creator><pubDate>Sun, 19 Jun 2005 16:14:50 -0000</pubDate></item><item><title>Re: Post Levels plugin v0.2.1</title><link>http://fortes.com/2005/05/postlevels-021/#comment-1207721</link><description>&lt;p&gt;Does 'Single Post View is Broken' mean 404 errors?  I have a bunch of users complaining about 404 errors on single post views for entries with postlevel set - but they come up fine for me.  &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Carrie</dc:creator><pubDate>Thu, 16 Jun 2005 10:55:41 -0000</pubDate></item><item><title>Re: Post Levels plugin v0.2.1</title><link>http://fortes.com/2005/05/postlevels-021/#comment-1207720</link><description>&lt;p&gt;Ups, messed up the indention in my last post. If you want to have indention (and some comments of me), take a look at the HTML code of this page and copy/paste the fixed plugin code from there. Remove the  after every line code manually.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">McShelby</dc:creator><pubDate>Tue, 07 Jun 2005 18:15:07 -0000</pubDate></item><item><title>Re: Post Levels plugin v0.2.1</title><link>http://fortes.com/2005/05/postlevels-021/#comment-1207719</link><description>&lt;p&gt;Hi there,&lt;/p&gt;&lt;p&gt;I was always looking for a plugin like this. With WP 1.2 I tried out Viewlevel but wasn't very exhalted with the features it provided. This was also because of the poor WP API.&lt;/p&gt;&lt;p&gt;Now a new major release is out and I saw your new plugin doing much the same as the old abandoned Viewlevel. This day I installed it on my test blog and ran into the same problem as all others did with WP 1.5.1. Anyway I wanted this to work as it was supposed to and so I built a solution where it isn't necessary to touch any WP original code. The good thing to say about it: It works. The bad: I am not sure whether I used variables in this fix I shouldn't have.&lt;/p&gt;&lt;p&gt;So here it is. All code has to be added to your post-levels.php file.&lt;/p&gt;&lt;p&gt;1.) Find the line "add_filter('posts_where', 'postlevel_posts_where');". Insert a new line after it with "add_filter('the_posts', 'postlevel_posts');"&lt;/p&gt;&lt;p&gt;2.) Before the "?&amp;gt;" insert the following code:&lt;br&gt;function postlevel_posts($where)&lt;br&gt;{&lt;br&gt;  if (count($where) == 0)&lt;br&gt;  {&lt;br&gt;// &lt;br&gt;// this is a workaround for WP 1.5.1 until it is somehow fixed&lt;br&gt;    global $wpdb, $user_ID, $postlevel_key, $user_level;&lt;br&gt;    $posts = $wpdb-&amp;gt;get_results($request);&lt;br&gt;    if (count($posts) == 1) {&lt;br&gt;      if ('publish' != $posts[0]-&amp;gt;post_status) {&lt;br&gt;        if ( ! (isset($user_ID) &amp;amp;&amp;amp; ('' != intval($user_ID))) ) {&lt;br&gt;          // User must be logged in to view unpublished posts.&lt;br&gt;          $posts = array();&lt;br&gt;        } else {&lt;br&gt;          if ('draft' == $posts[0]-&amp;gt;post_status) {&lt;br&gt;            // User must have edit permissions on the draft to preview.&lt;br&gt;            if (! user_can_edit_post($user_ID, $posts[0]-&amp;gt;ID)) {&lt;br&gt;              $posts = array();&lt;br&gt;            }&lt;br&gt;          } elseif ('private' == $posts[0]-&amp;gt;post_status) {&lt;br&gt;// here lies the problem in the main code, so we changed this here&lt;br&gt;            if (($posts[0]-&amp;gt;post_author != $user_ID)&lt;br&gt;              &amp;amp;&amp;amp; !($postlevel_key == $posts[0]-&amp;gt;meta_key&lt;br&gt;              &amp;amp;&amp;amp; intval($user_level) &amp;gt;= intval($posts[0]-&amp;gt;meta_value))) {&lt;br&gt;              $posts = array();&lt;br&gt;            }&lt;br&gt;          }&lt;br&gt;        }&lt;br&gt;      }&lt;br&gt;    }&lt;br&gt;// &lt;br&gt;    return $posts;&lt;br&gt;  }&lt;br&gt;  return $where;&lt;br&gt;}&lt;/p&gt;&lt;p&gt;That's all. Warning: This comes with no warranty. As soon as there is an "official" API, this should be removed because of possible security holes. Anyway: Enjoy!&lt;/p&gt;&lt;p&gt;McShelby (normally just Shelby)&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">McShelby</dc:creator><pubDate>Tue, 07 Jun 2005 18:09:22 -0000</pubDate></item><item><title>Re: Post Levels plugin v0.2.1</title><link>http://fortes.com/2005/05/postlevels-021/#comment-1207718</link><description>&lt;p&gt;Hey there - I am curious, how are these posts handled by search engines?&lt;br&gt;I just opened my site up today again to search engines and almost immediately msnbot has been all over it.  I just took a look at my users online page and it showed msn bot at being on the page of one of my level 2 posts.&lt;br&gt;So basically, I'm thinking - how did the bot get there in the first place if the post isn't viewable to users who aren't logged in?  And did it actually see/index anything?&lt;/p&gt;&lt;p&gt;Thanks, valerie (&lt;a href="http://spoken-for.org" rel="nofollow noopener" target="_blank" title="spoken-for.org"&gt;spoken-for.org&lt;/a&gt;)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Valerie</dc:creator><pubDate>Wed, 01 Jun 2005 13:14:03 -0000</pubDate></item><item><title>Re: Post Levels plugin v0.2.1</title><link>http://fortes.com/2005/05/postlevels-021/#comment-1207717</link><description>&lt;p&gt;Is there any way I can redirect a user to my blog instead of the dashboard?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Wed, 01 Jun 2005 12:24:33 -0000</pubDate></item><item><title>Re: Post Levels plugin v0.2.1</title><link>http://fortes.com/2005/05/postlevels-021/#comment-1207716</link><description>&lt;p&gt;Sill doesn't work in 1.5.1.2... :'(&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Mon, 30 May 2005 10:56:03 -0000</pubDate></item><item><title>Re: Post Levels plugin v0.2.1</title><link>http://fortes.com/2005/05/postlevels-021/#comment-1207715</link><description>&lt;p&gt;here is 1.5.1.2 out now...  Hope to see this working as this is a sweet plugin. Thanks Fil&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Shelby</dc:creator><pubDate>Sun, 29 May 2005 14:55:33 -0000</pubDate></item><item><title>Re: Post Levels plugin v0.2.1</title><link>http://fortes.com/2005/05/postlevels-021/#comment-1207714</link><description>&lt;p&gt;So it wont work in 1.5.1.1?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Shelby</dc:creator><pubDate>Wed, 25 May 2005 02:57:57 -0000</pubDate></item><item><title>Re: Post Levels plugin v0.2.1</title><link>http://fortes.com/2005/05/postlevels-021/#comment-1207713</link><description>&lt;p&gt;And oh, downgrading didn't go well at all because I didn't have the database backup from before 1.5.1.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">reverie</dc:creator><pubDate>Tue, 24 May 2005 07:02:31 -0000</pubDate></item><item><title>Re: Post Levels plugin v0.2.1</title><link>http://fortes.com/2005/05/postlevels-021/#comment-1207712</link><description>&lt;p&gt;Thanks for looking into it. I've upgraded to 1.5.1.1 too. But the bug is still there. I guess I'll wait. :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">reverie</dc:creator><pubDate>Tue, 24 May 2005 07:01:24 -0000</pubDate></item><item><title>Re: Post Levels plugin v0.2.1</title><link>http://fortes.com/2005/05/postlevels-021/#comment-1207711</link><description>&lt;p&gt;Reverie: Just looked into this, it's a new issue in 1.5.1 that I unfortunately cannot fix in a plugin (you would have to hack / replace a core file in WordPress).&lt;/p&gt;&lt;p&gt;You will either have to downgrade to 1.5, or live without the post levels plugin until 1.5.1.1 :(&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Fortes</dc:creator><pubDate>Sun, 22 May 2005 20:34:18 -0000</pubDate></item><item><title>Re: Post Levels plugin v0.2.1</title><link>http://fortes.com/2005/05/postlevels-021/#comment-1207710</link><description>&lt;p&gt;No it's not just your site. This happens also in mine. Does anyone know how to solve this issue? (I'm a Computer Science student, and I'm willing to help if my help is needed)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Sat, 21 May 2005 15:38:27 -0000</pubDate></item><item><title>Re: Post Levels plugin v0.2.1</title><link>http://fortes.com/2005/05/postlevels-021/#comment-1207709</link><description>&lt;p&gt;Ever since I upgraded to 1.5.1, Wordpress has been telling my users that no posts matched their criteria whenever they try to comment. They used to be able to access individual pages of private entries. Is there a reason why they can't now? Is it just my site?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">reverie</dc:creator><pubDate>Fri, 20 May 2005 19:59:50 -0000</pubDate></item></channel></rss>