Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-02-22 12:51:54

sthmtc
Member
From: CGN, GER
Registered: 2005-01-17
Posts: 586
Website

possible to set the default section in the write tab per user?

for a multiauthor site there are sometimes authors, that should only post in one section of the site, others in another. to avoid accidents i’d like to set the default section on the write tab on a per user base. would that be somehow possible?

Last edited by sthmtc (2008-02-22 12:52:26)

Offline

#2 2008-03-01 11:16:29

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: possible to set the default section in the write tab per user?

Not without a plugin. You’d have to add an extra field to the txp_users table to store the sections a user is allowed to post in (perhaps leave it empty to allow all sections) and then use that information to modify how the write tab is displayed. If the sections a user is allowed to post in are directly related to the privilege level and the number of sections doesn’t change a lot, you could opt to hard-code the relationship between author/privilege level and sections into the plugin, to avoid having to create a user interface that allows you to change this.

Offline

#3 2008-03-01 12:16:53

sthmtc
Member
From: CGN, GER
Registered: 2005-01-17
Posts: 586
Website

Re: possible to set the default section in the write tab per user?

thanks for your input on this. sounds way beyond my php skill level though :) what would you think about an approach that only hides the sections in the dropdown? that would come in handy in other situations as well. for example we have to setup sections for different things all the time but the minority are used for handling articles. wouldn’t it be possible to traverse the document with some jQuery wizardry and then hide specific sections… (also on a per user base)

haha, not sure if this is making things even more complicated…

Last edited by sthmtc (2008-03-01 12:17:54)

Offline

#4 2008-03-01 12:57:18

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: possible to set the default section in the write tab per user?

That’s also possible. The main question remains: where do you set which sections a user is allowed to see. With a limited amount of user, I’d hard-code it into a plugin, that outputs the right javascript commands at the end of the write tab page to modify the section select box.

Offline

#5 2008-03-01 13:10:41

sthmtc
Member
From: CGN, GER
Registered: 2005-01-17
Posts: 586
Website

Re: possible to set the default section in the write tab per user?

hard coding it would be perfectly fine in my case…

Offline

Board footer

Powered by FluxBB