Is there a way that I can change it so that users of *the same* user level, instead of only being able to edit posts of users below them, can also edit *each other’s* posts. Specifically, I’d like all users of level 5 to be able to edit posts by users of level 5 downwards.
Prior to v1.5 everybody was complaining… and asking the devs to make NOT possible for users of the same level to edit each other’s post.
Curiously, people always want something that is not in the script 🙂
Okay, thanks for the replies both of you.
I can write the plugin myself, but I’d be grateful if you could point me in the right direction, in terms of what I’d have to do : ).
(Also, instead of going one way of t’other, it could have been made a option — but there are things I’m more concerned about, so I’ll quit complaining ; )
I am very interested in a solution of this problem too. And that option would be fine.. 🙂
Ok, I figured it out myself:
in function “user_can_edit_post” (that is on line 357) change
$author_data->user_level > $post_author_data->user_levelto
$author_data->user_level >= $post_author_data->user_level
Good that the variables have speaking names! IMO good coding style..!
Just had a need for this myself, and did the change you suggested phred. I did have to make one more additional correction.
wp-includes/functions-post.php, line 398 — to get the Edit/Delete to appear in the Manage>Posts section.
if ( $user->user_level > $other->user_level || $user->user_level > 8 || $user->ID == $other->ID )
if ( $user->user_level >= $other->user_level || $user->user_level > 8 || $user->ID == $other->ID )
a similar question but with comments: currently on 1.5 users cannot edit their own comments unless you up their level to a certain point. however, at this point they can edit the comments of everyone at their level. is it possible to change something to allow registered users to only edit their own comments?
interesting how some would like users to be able to edit other users posts, i’d prefer to not allow anyone to edit someone elses posts except admin, who’s insane idea was this ? lol
i also wonder if there’s a way to secure the blog from public at least some areas for the people who aren’t registered. Infomation especially personal should not be so easy to come by it should be considered sacred and protected 🙂
what i am asking for is something very different: allow registered members to edit their own comments but not those of anyone else (at their level or below). hope someone’s working on a plugin that fixes this missing feature for any group blog.
one more note, if you choose to do the same thing with pages, you need to make an edit in wp-admin/edit-pages.php as well.
AND ($wpdb->users.user_level < $user_level OR $wpdb->posts.post_author = $user_ID)
AND ($wpdb->users.user_level <= $user_level OR $wpdb->posts.post_author = $user_ID)
Ok, I figured it out myself:
in function “user_can_edit_post” (that is on line 357) change $author_data->user_level > $post_author_data->user_level to $author_data->user_level >= $post_author_data->user_level
Okay, what version of WP are you guys making these modifications to? I am using V1.5 (I don’t have time to upgrade any time soon) but I want to use the Post Levels plugin. My only problem is that I do not want registered users to be able to post or edit ANYTHING on my blog. I have searched the template files listed above but cannot find the code to tweak.
Does anyone have any suggestions?
Would all be 1.5 incremental versions, Daisyhead. First post was in March….
I believe that as long as you require registration, but never promote above 0 level, people shouldn’t be able to post. I may be wrong about that (I’ve never tried posting as a 0 level myself….)
Okay, just created a 0 level user, all that user can see is the Dashboard and its own profile page and a logout option…. no posting.
You’re right Vkaryl, but they can’t see the “private” entries either if I set leave their level set at 0.
And, If I set the post_level value on a private entry to 1, then anyone with a level of 0 cannot read the private entry. If I change the post_level value to 0, then that means that ANYONE who registers on my blog (since you are automatically assigned a level of 0 when you first register) can read the private entries as soon as they register. That kind of defeats the purpose of the private entries.
I just read up on V2.0 of WP and how the roles and capabilities work. It sounds just like what I need so I will more than likely have to upgrade in order to get the functionality out of this plugin that I need, but I just don’t have time anytime soon to upgrade. *sigh*
Why so difficult?? 😉
daisy, if you follow the instructions for backing up, and upgrading, it really shouldn’t take much more time than it did to post your previous 2 posts. Perhaps slightly longer with 2.0, but only if you have a multitude of plugins.
Also, I believe there is already a post-levels plugin for earlier versions, no?
- The topic ‘Changing the way user levels work…’ is closed to new replies.