Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
customise the interface for certain admin users
Hello,
I have built a site and gave the client permissions to be a staff writer but understably they are confused with the interface of the write tab.
There is a lot of useless sections which they never need to use but still remain there. Is it possible to do the following either by hacking or even better with a plugin…
- only allow them to create new articles in certain sections of the site.
- auto select a category.
- remove Article Markup, Excerpt Markup, overide form, keywords.
Many thanks
Dave
Offline
Re: customise the interface for certain admin users
remove Article Markup, Excerpt Markup, overide form, keywords.
This you can do with ied_hide_in_admin.
only allow them to create new articles in certain sections of the site.
AFAIK this requires a hack – check this thread and a later post which suggests he found a solution (that thread also mentions a forthcoming plugin).
auto select a category
Not sure about this. maybe someone else has an idea.
TXP Builders – finely-crafted code, design and txp
Offline
Re: customise the interface for certain admin users
jakob wrote:
bq. remove Article Markup, Excerpt Markup, overide form, keywords.
This you can do with ied_hide_in_admin.
I saw ths plugin before but it seems to lead to a blank page, does anyone have it already downloaded so they can send it me?
dave.
Offline
Re: customise the interface for certain admin users
v 0.1.5 is on the wiki
v 0.1.6 I’ve put it here for the moment: http://nopaste.info/7b40eb8b0b.html (or here) and sent to alicson to host on the txp resources.
Last edited by jakob (2008-06-22 09:44:36)
TXP Builders – finely-crafted code, design and txp
Offline
Re: customise the interface for certain admin users
thanks! but unfortunately i am not sure this plugin works. I have installed it and it seems to show a tab in the extensions where i can tick or untick items but when i login as a writer it doesn’t seem to hide anything.
anyone have any ideas?
Offline
#6 2008-06-22 11:22:42
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: customise the interface for certain admin users
daver89 wrote:
… it seems to show a tab in the extensions where i can tick or untick items but when i login as a writer it doesn’t seem to hide anything…
Did you unticked the items under the “writer” column?
Offline
Re: customise the interface for certain admin users
redbot wrote:
daver89 wrote:
… it seems to show a tab in the extensions where i can tick or untick items but when i login as a writer it doesn’t seem to hide anything…
Did you unticked the items under the “writer” column?
ye, and to double make sure i unticked everything on that row. but it still doesn’t seem to have any effect on the write tab.
EDIT: the category ones seem to work but can’t get things like overide form working.
Last edited by daver89 (2008-06-22 11:29:48)
Offline
#8 2008-06-22 11:43:42
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,315
Re: customise the interface for certain admin users
daver89 wrote:
- auto select a category.
If you can live with hardcoding:
Open textpattern/include/txp_article.php. Look for
//-- category selects -----------
Replace by
//-- category selects -----------
if(!$from_view && !$pull) $Category1 = "Your_category_1";
if(!$from_view && !$pull) $Category2 = "Your_category_2";
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: customise the interface for certain admin users
hide_in_admin queries are probably better posted in the forum thread on the plugin but Yura hasn’t been around for a while. What version of txp are you using? The back-end has changed in small ways over the versions and ied_hide_in_admin may need adapting to fit (i.e. possible DOM-tree mismatches in the plug-in need correcting).
uli wrote regarding ‘auto-select a category’:
If you can live with hardcoding: open textpattern/include/txp_article.php. Look for … and replace with …
You might want to wrap this in a test for whether the logged in user is a “staff writer” so that you have the full category selection. Should work with something along these lines:
if (safe_field('privs', 'txp_users', "`name`='".doSlash($txp_user)."'") == 4)
{
... uli's suggestion ...
} else {
... txp's category code ...
}
TXP Builders – finely-crafted code, design and txp
Offline
Re: customise the interface for certain admin users
jakob wrote:
AFAIK this requires a hack
no hack needed, i solved it with a plugin. it’s pretty specific to my needs and lacks an interface to define which users get to see which sections that’s why i haven’t released it. if you’re interested in giving this a shot, let me know.
Offline
#11 2008-06-22 12:15:16
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,315
Re: customise the interface for certain admin users
Jakob, thanks! But then again: you’ve spoilt my midday riddle ;)) I’ve noticed the privs thing myself and was just about to look for the necessary code :)
BTW, the full category selection is kept, the right one is just preselected.
BTW2, the “if part” should be sufficient, if you put the closing curly bracket immediately after my code.
Last edited by uli (2008-06-22 22:23:20)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#12 2008-06-22 12:42:17
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: customise the interface for certain admin users
daver89 wrote:
…the category ones seem to work but can’t get things like overide form working.
Maybe is a stupid question but , in your advanced preferences, is “Allow form override?” checked? I think it should for ied_hide_in_admin to work
P.S. in all my installations ied_hide is working ok
Offline