Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2007-11-25 17:46:59

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: Better support for "static pages" by hiding sections on the write tab

Alesh,
I think I found a solution to your initial question.
replace
$out[] = n.t.'<option value="'.htmlspecialchars($avalue).'"'.$sel.'>'.htmlspecialchars($alabel).'</option>';
with
$out[] = n.t.'<option value="'.htmlspecialchars($avalue).'"'.$sel.' class="option_'.htmlspecialchars($avalue).'"'.'>'.htmlspecialchars($alabel).'</option>';
around line 80 in txplib_forms.
This will simply add a class=“option_(section name)” to every item in the section dropdown of the “write” tab (and also in any other dropdown in txp interface).
Now you can hide a section via css adding in your textpattern.css something like
option.option_about { display:none; }
Note that I used the prefix “option_” to avoid any possible conflict with other class names.
That’s all, usually I tend to avoid hacks but I think this won’t do any harm.

Last edited by redbot (2007-11-26 01:17:22)

Offline

#26 2007-11-27 22:08:04

michaelkpate
Moderator
From: Avon Park, FL
Registered: 2004-02-24
Posts: 1,379
Website GitHub Mastodon

Re: Better support for "static pages" by hiding sections on the write tab

I have used the one post per section another time and I think this is a great idea. But I am also patient enough to wait for it to be implemented.

Reading over this thread (as well as some of the others) it sometimes seems like the disconnect isn’t whether or not a feature will make it into 4.0.x but rather is it something the developers are interested in pursuing at all.

Offline

#27 2009-07-10 07:57:11

divan
New Member
From: Ukraine
Registered: 2009-04-30
Posts: 7

Re: Better support for "static pages" by hiding sections on the write tab

And how about setting privileges for various writers on sections? For example, I have sections ‘news’ and ‘articles’ on the site, and I want to give some writer an ability to write only to ‘news’ section.

Offline

#28 2009-07-10 09:32:32

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,012
Website GitHub Mastodon Twitter

Re: Better support for "static pages" by hiding sections on the write tab

divan wrote:

And how about setting privileges for various writers on sections? For example, I have sections ‘news’ and ‘articles’ on the site, and I want to give some writer an ability to write only to ‘news’ section.

the hide in admin plugin hides back end interface elements from users other than admins. So if you have your “news” as default you’d have that ability.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

Board footer

Powered by FluxBB