Bug #18916

I want to limit the plugin modul to show only one language!

Added by Chi Hoang over 13 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2008-06-06
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.1
PHP Version:
4.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

I have an extension with uses a tree in the flexform of the plugin configuration. When I add more language to the cms, all the language flexform configuration trees are rendered. I want to limit this to the language of the BE-User. Is that possible?

(issue imported from #M8630)

#1

Updated by Georg Ringer over 13 years ago

this is no help forum but a bug tracker! post bugs (or features) and ask in dev or english list!

#2

Updated by Chi Hoang about 13 years ago

Here is a patch that may help:

--- ../../typo3_src-4.2.1.orig/typo3_src-4.2.1/t3lib/class.t3lib_tceforms.php 2008-06-11 10:14:58.000000000 0200
++ class.t3lib_tceforms.php 2008-09-05 13:57:40.000000000 +0200
@ -2255,6 +2255,7 @ * @return string The HTML code for the TCEform field
*/
function getSingleField_typeFlex($table,$field,$row,&$PA) {
+ global $BE_USER;

// Data Structure:
$dataStructArray = t3lib_BEfunc::getFlexFormDS($PA['fieldConf']['config'],$row,$table);
@ -2310,7 +2311,7 @
$PA['_noEditDEF'] = FALSE;
if ($langChildren || $langDisabled) {
- $rotateLang = array('DEF');
+ $rotateLang = array(strtoupper($BE_USER->uc['lang']));
} else {
if (!in_array('DEF',$editData['meta']['currentLangId'])) {
array_unshift($editData['meta']['currentLangId'],'DEF');
@ -2338,7 +2339,7 @
// Render sheet:
if (is_array($dataStruct['ROOT']) && is_array($dataStruct['ROOT']['el'])) {
$lang = 'l'.$lKey; // Default language, other options are "lUK" or whatever country code (independant of system!!!)
- $PA['_valLang'] = $langChildren && !$langDisabled ? $editData['meta']['currentLangId'] : 'DEF'; // Default language, other options are "lUK" or whatever country c
ode (independant of system!!!)
+ $PA['_valLang'] = $langChildren && !$langDisabled ? $editData['meta']['currentLangId'] : array(strtoupper($BE_USER->uc['lang'])); // Default language, other
options are "lUK" or whatever country code (independant of system!!!)
$PA['_lang'] = $lang;
$PA['_cshFile'] = ((isset($dataStruct['ROOT']['TCEforms']) && isset($dataStruct['ROOT']['TCEforms']['cshFile'])) ? $dataStruct['ROOT']['TCEforms']['cshFile'] : ''
);
#3

Updated by Stefano Kowalke about 13 years ago

Please take care for the rules1 to create and post a patch

[1] http://typo3.org/teams/core/core-mailinglist-rules/

#4

Updated by Georg Ringer over 10 years ago

  • Status changed from Needs Feedback to Closed
  • Target version deleted (0)

closed as no bug

<meta>
        <langDisable>1</langDisable>
    </meta>

works fine

Also available in: Atom PDF