• Is it possible to restrict a user to being able to post (write) to one category only?

    What I want to do is use WordPress as a news fed site for an online mall. Each user on the site is a store owner in the mall, and I wanted to make it so that when they log in and write a post, the post will be written to ‘their’ category.

    For instance, Mary owns ‘A Dolls World” which is a store in the mall. So I create a category called “A Dolls World”

    When Mary logs in and goes to write a post, the way it is now is that she can select which category she will post in. But as many new users are likely to do, she may forget to check ‘her’ category and post to the default category instead. I would like to make it so that she can only post in her own category.

    Is this possible?

    And, BTW, perhaps there’s a better way of doing this altogether. Allow me, if you will, to ask this:

    My idea is to create a category for each store in my mall and allow store owners to have their own news feed.

    My limited experience with WordPress allowed me only one idea on how to do this; by setting up a category for each store owner.

    This way, every time a store owner posts a news item, (and assuming the user put the item in their own category, the item would show up on the front page as well as in their category. Fans of that user could subscribe to that particular category, which would keep them updated on anything new in that users store.

    The news item would also show up on the front page, allowing fans of the entire mall to subscribe to the entire site rather than one or two individual stores.

    Is this one-category-per-store the best way to accomplish this, or am I missing some bigger picture.

    Thanks!

Viewing 15 replies - 1 through 15 (of 40 total)
  • At least start by looking at the Limit Category plugin
    http://redalt.com/wiki/Limit+Categories

    that Plugin was listed here:
    http://codex.wordpress.org/Plugins/Restriction

    Thread Starter dollpage

    (@dollpage)

    Thanks, but that won’t do it.

    That plugin will restrict users of a certain level, (contributor, author, etc) to post to single category.

    What many of us want (for different reasons) is a way to basically give every user his own category and restrict his posts to that category only.

    In my case, I have aproximately 200 store owners. I’m giving each store owner his own category, (mary’s doll shop) where they can post items of interest that have to do with their store. These items will, by default, also show up on the main page.

    The main page will be fed to the RSS readers, and each individual store will have it’s own individual feed so that fans of a particular doll shop will be kept abreast of any new items in that particular shop buy subscribing to that feed.

    Right now, when mary’s doll shop posts an article, she has to find her category from a list of 200, and check it, or the article will go into the default category. Of course it can be edited later and placed in the right category, but who wants to do that when you could do it right the first time. (if that was possible here.)

    The category restriction plugin only allows restriction of user levels to a particular category, but cannot restrict a user of any level to one category.

    Thanks for giving my question a shot, though! And I also appreciate all the other free support offered by WordPress!

    Dollpage

    With some (a lot of?) work you can find a workaround.
    Using the Role Manager plugin you could create a new “role” for every user and limit that role to his/her own category.
    Well, I know it’s crazy 🙂 – but I can’t think of anything else right now…

    limit category is only for 1.5,

    Dollpage, you might look into wordpress MU: http://mu.wordpress.org. What you’ve got there that you need is more like a multi-user blog setup.

    You don’t really need categories. You can simply have everyone post uncategorized (renamed it what you like), and then create links to the authors posts. So instead of a list of categories, you have a list of authors, and clicking an author will bring up a page of their posts.

    Manstraw, nice idea, however, what if i would like my users to post ONLY to uncatagorized?

    Then only have uncategorized as a topic. I can’t remember if a regular Author can create a category, but I don’t think they can. The Role Manager plugin let’s you adjust the capabilities if you need that.

    no no no no no!, there SHOULD be an elegant way to restrict a group of users to a group of catagories. Depending on what your topic is, Its really unrealistic to have ONLY one category!

    For the OP’s requirements, what I’ve suggested is completely appropriate.

    And there is an elegant way to restrict a group of users to a group of categories. A combination of the Role Manager and Limit Categories plugins does exactly that. Create a role, limit categories for that role. Done. The OP’s needs are atypical, in that he wants a one to one relationship between category and user, which ultimately makes categories redundant.

    thanks for your reply manstraw.

    1:I am running role manager and it is working like a charm, however, limitcats.php V 1.5.2 crashes with this output in my httpd-error:

    /rootdir/blablabla.com/wp-content/plugins/limitcats.php(297) : Parse error – syntax error, unexpected ‘}’

    I did some research on it, he is defining a class which contains more than one php block. And i guess php does’nt like that very much. thats my best theory.

    I’m running php5!!, i dont know where else to go from there, any ideas?

    2: what do you mean by OP?

    OP = Original Poster.

    That syntax error looks to me like it’s just a wayward bracket that’s misplaced. Can you wade through the code and make sense of it? Can you maybe post the code as a text file so the rest of us can glance through it to hunt down the problem? That syntax error doesn’t appear to be a complete deal breaker, it’s just got a slight problem but will probably still work fine.

    And I agree that this sounds like a WordPress MU thing. Either that or author pages as the different stores in the online mall, as manstraw suggested. With that method, there would be no categories; the author display names would be the names of the malls you want represented. Do away with categories and have the author display names categorize everything. That’s actually a rather elegant way around this. Think of how your users will experience that: they wouldn’t have to worry about categories at all. They’d just need to type their entries and publish.

    I’ve got role manager and limit categories intalled on one of my blogs and they’ve working fine. It’s only version 2.0.3 of wordpress though. Role Manager is version 1.4.4 and Limit Categories is 1.5.2.

    Because I have the same version of limit categories, and I don’t have a parse error, I recommend you redownload and reinstall it. A parse error happens before execution. It simply means there is a missed or extra character somewhere. A fresh download/install should take care of that.

    I just downloaded a fresh copy and there, it is giving me the exact same error!!!!!!!!

    [Fri Aug 11 07:01:05 2006] [error] [client IP] PHP Parse
    error: syntax error, unexpected ‘}’ in /rootdir/wp-content/plugins/limitcats.php on line 247

    that is UNTOUCHED code on his site!, which makes me REALLY believe that there maybe something wrong with my setup!. HOWEVER, here is the code incase you would like to look at it.

    http://www.guitargeartalk.com/limitcats.php.txt

    Thank you for your guy’s reply,

Viewing 15 replies - 1 through 15 (of 40 total)
  • The topic ‘Can you restrict users to write to only 1 category?’ is closed to new replies.