TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,966
  • Latest: safir45
Stats
  • Total Posts: 195,992
  • Total Topics: 21,323
  • Online today: 380
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 285
  • Total: 285

categories restriction

Started by emanuele, November 14, 2012, 01:54:12 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

emanuele

I'm sure the answer is already out there and I feel stupid asking this question, but today I'm completely dumb and cannot find it... lol
So sorry. ;)

Is there any way in TP to disallow/deny a user to post an article in a certain category?

IchBin

If it's a user (non admin, or no permission to manage articles) they shouldn't get the option to select any category. The category will have to be selected upon approval by admin, or person with manage articles permission.


emanuele

It was to sort of define some roles (and make things easier to some people that may not be particularly tech-savvy): in other words some people would have shorter list of categories depending on where they have more needs to post in.

So let's say: groupA is responsible to post in catA and catB it would see in the dropdown only catA and catB, groupB is responsible for catC and catD and the dropdown contains only catC and catD.

I think I'll add the option...one day or another. :P

IchBin

Yeah I see what you are saying. Could be a useful option to have I suppose.

ZarPrime

emanuele, you could put this into our bugtracker as a feature request for the next version if you are so inclined --> http://www.tinyportal.net/index.php?project=1;area=issues

Be sure to reference this topic in your feature request.  If you don't know how to use our bugtracker to put in a feature request, let us know and one of us can add it for you.

ZarPrime

emanuele

The day I'll be in a good mood I'll give a try and code something.
It shouldn't be that difficult (except for understand exactly where to put the code :P).

It would need:
1) a new columns in tp_variables (no way I'm going to use a valueSOMETHING column... :P),
2) another list of groups in the category creation (that's easy, the data is there, just need a new name for the checkboxes, just template),
3) a bit of processing on receiving the form,
4) a find_in_set when creating the article page to find the categories (and a bit of processing when receiving the form to be sure the user has selected a category he can create articles in).

But probably such change would require also to merge the post page for the members with and without manage_articles permission (that could be possible (and should be done) even now, but it's more meaningful with this feature).

* emanuele keeps this topic unread to not forget about it O:)

This website is proudly hosted on Crocweb Cloud Website Hosting.