Forum Replies Created

Viewing 15 replies - 1 through 15 (of 17 total)
  • Thread Starter gentist

    (@gentist)

    I figured it out by using the get_posts() and a foreach loop, using a modified example from the get_posts() page. However, I still have one problem left… Is there a way to get rid of the permalink from the categorynames when using wp_list_cats()?

    Thread Starter gentist

    (@gentist)

    samboll: If you’re going to contact the author of Role Manager, I don’t think he’ll be able to do much (except maybe write an “ugly” workaround). I haven’t looked at the code, but my guess is that it’s the WP code that checks for the Role name (Contributor), rather than its Capabilities. In other words, the original code doesn’t take plugins such as Role Manager into account.

    The reason as to why I haven’t filed a bug report yet is because this could be considered a “feature”, or a way of making sure that the restriction is limited to the intended Role, which is fine as long as you’re not using any plugins.

    Thread Starter gentist

    (@gentist)

    Samboll: The “bug” specifically occurs when you use Role Manager and create your own Role which has similar features as the Contributor Role; you’re able to save drafts, but they won’t show up as “others drafts” for an admin/editor, thus rendering said admin/editor unable to approve it. For some reason, the draft has to be submitted by someone with the Contributor Role (not anyone with edit capabilities that lacks publishing capabilities), in order for an admin/editor to be able to process it.

    If you want to try it out yourself, do the following:

    Install and activate Role Manager.
    Create a new Role with identical capabilities as Contributor.
    Create a new user.
    Assign the new user to the new Role.
    Write something as the new user and save it.
    Log in as admin.
    Notice the draft doesn’t show up under “others drafts”.
    Change the Role of the new user to Contributor.
    Check “others drafts” again, it should show up.

    Forum: Fixing WordPress
    In reply to: Post moderation?
    Thread Starter gentist

    (@gentist)

    It wouldn’t know. You’d have both assigned to you at all times, though Limit Category would be able to separate them depending on the actions you make. However, I imagine that assigning two Roles to one user might create a problem with the SQL database (can it store two different values for the same thing?)

    I haven’t looked at the code behind Limit Categories, but I imagine that it’s easier to hack that instead of WP itself. I was thinking of another row of checkboxes which lets you choose where the user (Role) has edit (write) permissions, as an addition to the checkboxes that lets you choose where the user (Role) has publish permissions.

    Forum: Fixing WordPress
    In reply to: Post moderation?
    Thread Starter gentist

    (@gentist)

    Basically, I need different groups of users to act as moderators for different categories (each group [Role] is assigned to one category, via “Limit Categories”). So far so good. However, I also want users to be able to post in categories for which they aren’t moderators (post approval required). This also works, but only as long as they aren’t moderators for other categories (I can’t figure out a “clean” way of allowing users to both be moderators for one category, and contributers for other categories). Now, I might attempt to modify “Limit Categories” so that it also gives the ability to write for a specific category, without publishing to it. However, this would only work if such posts would be treated as contributer posts, otherwise an editor or admin won’t be able to approve them.

    Thread Starter gentist

    (@gentist)

    That’s kind of what I wanted. It does solve this specific problem, but it may not be able to solve future, similar problems. Thanks.

    Forum: Fixing WordPress
    In reply to: Post moderation?
    Thread Starter gentist

    (@gentist)

    There’s no “others drafts”.

    I’m using the “Limit Categories” plugin, as well as “Role Manager”. However, I doubt they would cause that.

    Edit: Apparently, you have to assign users to the Contributors group for that to work. Another group with the exact same permissions is apparently not sufficient. I suppose that’s a bug.

    This creates a problem for me as I kind of need to assign users to two groups as to disable moderation for one category and enable it for the other categories, or modify the Limit Categories plugin. However, I can’t modify Limit Categories if I can’t use customized groups for draft moderation.

    Forum: Fixing WordPress
    In reply to: Post moderation?
    Thread Starter gentist

    (@gentist)

    Where does the posts appear from the point of view of an admin/editor? I can’t seem to find it.

    Forum: Plugins
    In reply to: Multiple Roles?
    Thread Starter gentist

    (@gentist)

    I suppose one other solution is to modify “Limit Category” to allow “posting to categories without the publishing right” as an alternative to just “posting rights”, though I suppose that’s a feature request for the plugin, unless I decide to patch it myself.

    Thread Starter gentist

    (@gentist)

    I read up on the loop thing (I actually did that before posting this question), and fixed the problem using one line of PHP code. I just wanted to know if there was an easier way, since the way I did it isn’t very clean (I have to manually keep track of the category IDs, should they ever change).

    Here’s my code, placed after the start of “The Loop”:

    <?php if (!in_category(‘4’) && is_home()) continue; ?>

    If there’s a better way of doing that, like, say, making sure it’s still valid, even if the category ID would change (I’d rather it keeps track of it using the name of the category), I’d like to know.

    Thread Starter gentist

    (@gentist)

    I looked through the link, and I think that’s what I need. Thanks.

    I suppose I’ll reply again if it doesn’t work as expected.

    Forum: Fixing WordPress
    In reply to: PHP code in Pages?
    Thread Starter gentist

    (@gentist)

    I’ll give it a try. Thanks.

    Forum: Fixing WordPress
    In reply to: Restricting users?
    Thread Starter gentist

    (@gentist)

    moshu: I think I can achieve the results I need with the Limit Categories plugin. However, when I load it (LimitCat version 1.5.2, WP version 2.0.3), and go to the write/post section when logged in as admin, I’m given a blank page.

    Does anyone know why this occurs?

    Edit: Obviously I forgot to configure it, though I assumed that it wouldn’t deny everyone (including the admin) the ability to post.

    One problem though… When changing the settings, I’m getting error messages like so:

    Warning: in_array(): Wrong datatype for second argument in /htdocs/www/wp-content/plugins/limitcats.php on line 182

    I haven’t looked into it yet, though Role Manager also gives me error messages (I can’t recall what though now), when trying to delete roles. So far I haven’t noticed any problems, though I haven’t really looked at the database for leftovers or similar.

    Edit 2: The error message for LimitCats appears to occur when I try to remove posting rights to the default category. I might be able to work around that though.

    Is there a way to give posting rights to specific users instead of roles, or do I have to create a separate role for each user?

    Forum: Plugins
    In reply to: Swedish translation

    As I understand it, the .mo file isn’t going to translate everything for you. Some things aren’t translated, and other things are hardcoded so that they can’t be translated (you have to manually edit them). The amount of translated text seem to depend on the theme you use, but if you installed it correctly, the entire admin panel should at least be translated.

    Forum: Fixing WordPress
    In reply to: Restricting users?
    Thread Starter gentist

    (@gentist)

    Role Manager doesn’t quite do what I want it to do. Basically I want some users to have complete control of a subsection of the blog, meaning that the user in question will be able to edit and add subPages to one section (or Page), while denying said user the ability to post anything on the rest of the blog.

    With Role Manager, I suppose I can allow the user to edit Pages, and then create and assign the pages myself, but then the user won’t be able to add subPages to the Page assigned to him/her.

    Edit: It doesn’t appear to be possible to use Role Manager to enable a user to edit Pages without enabling the user to create Pages. In fact, the user is also able to delete Pages owned by other users, even though the user can’t touch normal posts.

    Is there something else I can try?

Viewing 15 replies - 1 through 15 (of 17 total)