Project

General

Profile

Actions

Feature #14999

closed

override admin panel values from TSConfig

Added by Sebastian Kurfuerst almost 19 years ago. Updated almost 18 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2005-10-02
Due date:
% Done:

0%

Estimated time:
PHP Version:
4
Tags:
Complexity:
Sprint Focus:

Description

currently, it is not possible to override all admin panel values from user/group TSConfig.
At the moment, there are only the following properties for module.edit:
( http://typo3.org/documentation/document-library/doc_core_tsconfig/gt_ADMPANEL/ )
.forceDisplayIcons
.forceDisplayFieldIcons
.forceNoPopup

But in case you want to hide the admin panel for users and still set some values for them, you can use the proposed patch. For example, to set the preview for pages and records to on, you can use the following TSConfig after applying the patch:

admPanel {
hide = 1
module.preview = 1
module.preview.showHiddenPages = 1
module.preview.showHiddenRecords = 1
}

Maybe this is helpful to others as well, do others think this might become a core modification?
Greets,
Sebastian

(issue imported from #M1518)


Files

2005-10-02_1518_adminpanel.patch (794 Bytes) 2005-10-02_1518_adminpanel.patch Administrator Admin, 2005-10-02 15:51
bug_1518_2.patch (778 Bytes) bug_1518_2.patch Administrator Admin, 2005-11-09 18:37

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #15224: NOTE to 1518: Option .showHiddenPages for "module.preview" obsolete?ClosedMichael Stucki2005-11-20

Actions
Actions #1

Updated by Sebastian Kurfuerst almost 19 years ago

There is a problem with this fix which is more complicated.
It's visible that it is not possible to set
module.preview.showHiddenRecords = 1 - that's how I noticed the bug.
It became visible that the problem itself lies in the function t3lib_page::enableFields in the second if-statement:
if ($show_hidden==-1) $show_hidden=0; // If show_hidden was not changed
If show_hidden is a boolean value (as it is when it is set with the method outlined in the bugreport), then $show_hidden is set to 0 (http://www.php.net/manual/en/types.comparisons.php) - Bugfix for this would be to write === instead of ==.
Normally, $show_hidden comes from UC, and is a String there: t3lib_tsfebeuserauth::extGetFeAdminValue: $retVal = $val ? $this->uc['TSFE_adminConfig'][$pre.'_'.$val] : 1;
The t3lib_page::enableFields function is called in tslib_content::enableFields, but this is not relevant.
One solution for exactly this problem would be to do a
return '1';
instead of
return true
in the patch which is attached to this bugreport. This however, is somewhat "unclean" I think, because the values are just supposed to be boolean. Thus, the proposed solution would be to write
if ($show_hidden===-1)
instead of
if ($show_hidden==-1)
in t3lib_page::enableFields. Then the solution is clean and everything should work as expected.

Any comments, hints, suggestions? Greets, Sebastian

Actions #2

Updated by Sebastian Kurfuerst over 18 years ago

the new version implements non-boolean fields as well.
greets, Sebastian

Actions #3

Updated by Sebastian Kurfuerst over 18 years ago

fixed in CVS.

Actions

Also available in: Atom PDF