Hallo,
gibt es eine Möglichkeit die Größe des Browserfensters dauerhaft zu verändern? Es ist nervig; für jedem Eintrag muss jedesmal das Browserfenster größergezogen werden, da der Editor nur halb zu sehen ist..
Hallo,
gibt es eine Möglichkeit die Größe des Browserfensters dauerhaft zu verändern? Es ist nervig; für jedem Eintrag muss jedesmal das Browserfenster größergezogen werden, da der Editor nur halb zu sehen ist..
Also dann gehts wohl nicht oder keiner weiß wie es geht..
Danke...
mmh kannst höchsten die größe des RTE beeinflussen, an anderen Lösungen
wäre ich auch interessiert.
TCEFORM.tt_content.bodytext.RTEfullScreenWidth= 80%
Hi,
vor dem Problem stand ich auch vor zwei Tagen. Von Typo3 aus geht es nicht, man muss halt schon selber ein bißchen werkeln. Bei mir musste es schnell gehen, ich habe daher die erst mögliche Lösung gewählt, und zwar eine mit XCLASS.
So gehts, Schritt für Schritt:
1. Die Datei typo3/typo3conf/localconf.php um diese Zeile erweitern:
$TYPO3_CONF_VARS["FE"]["XCLASS"]["tslib/class.tslib_content.php"] = PATH_typo3conf."class.test.php";
2. Im selben Ordner (typo3/typo3conf) eine neue Datei erstellen, bei mir heisst die einfach class.test.php. In dieser Datei dann folgenden Code einfügen:
<?php
class ux_tslib_cObj extends tslib_cObj {
function editIcons($content,$params, $conf=array(), $currentRecord='', $dataArr=array(),$addUrlParamStr='') {
global $BE_USER;
// If no backend user, return immediately
if (!$GLOBALS['TSFE']->beUserLogin) {return $content;}
// Check incoming params:
$rParts = explode(':',$currentRecord?$currentRecord:$this->currentRecord);
list($table,$fieldList)=t3lib_div::trimExplode(':',$params,1);
if (!$fieldList) {
$fieldList=$table;
$table=$rParts[0];
} else {
if ($table!=$rParts[0]) return $content; // If the table is set as the first parameter, and does not match the table of the current record, then just return.
}
// Check if allowed to edit content:
$mayEdit=0;
$dataArr=count($dataArr)?$dataArr:$this->data; // If pages-record, should contain correct perms-field, if not, should contain correct pid value.
$editUid = $dataArr['_LOCALIZED_UID'] ? $dataArr['_LOCALIZED_UID'] : $rParts[1];
if ($table=='pages') {
$mayEdit = $BE_USER->isAdmin()||$BE_USER->doesUserHaveAccess($dataArr,2)?1:0;
} else {
$mayEdit = $BE_USER->isAdmin()||$BE_USER->doesUserHaveAccess(t3lib_BEfunc::getRecord('pages',$dataArr['pid']),16)?1:0;
}
// Check if allowed to edit language
if ($mayEdit) {
if ($table === 'pages') {
$lang = $GLOBALS['TSFE']->sys_language_uid;
} elseif ($table === 'tt_content') {
$lang = $GLOBALS['TSFE']->sys_language_content;
} elseif ($TCA[$table]['ctrl']['languageField']) {
$lang = $currentRecord[$TCA[$table]['ctrl']['languageField']];
} else {
$lang = -1;
}
if (!$BE_USER->checkLanguageAccess($GLOBALS['TSFE']->sys_language_uid)) { $mayEdit = 0; }
}
if ($GLOBALS['TSFE']->displayFieldEditIcons && $table && $mayEdit && $fieldList) {
$GLOBALS['TSFE']->set_no_cache(); // Special content is about to be shown, so the cache must be disabled.
$style = $conf['styleAttribute'] ? ' style="'.htmlspecialchars($conf['styleAttribute']).'"' : '';
$iconTitle = $this->stdWrap($conf['iconTitle'],$conf['iconTitle.']);
$iconImg = $conf['iconImg'] ? $conf['iconImg'] : '<img src="'.TYPO3_mainDir.'gfx/edit_fe.gif" width="11" height="12" border="0" align="top" title="" style="" class="frontEndEditIcons" alt="" />';
$nV=t3lib_div::_GP('ADMCMD_view')?1:0;
$adminURL = t3lib_div::getIndpEnv('TYPO3_SITE_URL').TYPO3_mainDir;
/**********eigene Modifikation Beginn***********/
$PopupWidth = isset ($conf["PopupWidth"])
?$conf["PopupWidth"]
:540;
$PopupHeight = isset ($conf["PopupHeight"])
?$conf["PopupHeight"]
:400;
$icon = $this->editPanelLinkWrap_doWrap($iconImg, $adminURL.'alt_doc.php?edit['.$rParts[0].']['.$editUid.']=edit&columnsOnly='.rawurlencode($fieldList).'&noView='.$nV.$addUrlParamStr,implode(':',$rParts), $PopupWidth, $PopupHeight);
/**********eigene Modifikation Ende************/
if ($conf['beforeLastTag']<0) content="$icon.$content;" elseif="" confbeforelasttag="">0) {
$cBuf = rtrim($content);
$securCount=30;
while($securCount && substr($cBuf,-1)=='>' && substr($cBuf,-4)!='</a>') {
$cBuf = rtrim(ereg_replace('<[^<]*>$','',$cBuf));
$securCount--;
}
$content = strlen($cBuf)&&$securCount ? substr($content,0,strlen($cBuf)).$icon.substr($content,strlen($cBuf)) : $content=$icon.$content;
} else {
$content.=$icon;
}
}
return $content;
}
function editPanelLinkWrap_doWrap($string,$url,$currentRecord, $PopupWidth, $PopupHeight) {
if ($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['edit_editNoPopup'] || $GLOBALS['BE_USER']->extAdminConfig['module.']['edit.']['forceNoPopup']) {
$retUrl = t3lib_div::getIndpEnv('REQUEST_URI');
$rParts = explode(':',$currentRecord);
if ($rParts[0]=='tt_content' && $this->parentRecordNumber>2) { // This parentRecordNumber is used to make sure that only elements 3- of ordinary content elements makes a 'anchor' jump down the page.
$retUrl.='#'.$rParts[1];
}
return '<a href="'.htmlspecialchars($url.'&returnUrl='.rawurlencode($retUrl)).'">'.$string.'</a>';
} else {
return '<a href="#" onclick="'.
htmlspecialchars('vHWin=window.open(\''.$url.'&returnUrl=close.html\',\'FEquickEditWindow\',\''.($GLOBALS['BE_USER']-">uc['edit_wideDocument']?'width=690,height=500':'width='.$PopupWidth.',height='.$PopupHeight.'').',status=0,menubar=0,scrollbars=1,resizable=no\');vHWin.focus();return false;').
'">'.$string.'</a>';
}
}
}
?>
Ich habe darin die tslib_cObj-Klasse (zuständig für das Rendering für cObj) erweitert und Änderungen an der Methode editIcons und editPanelLinkWrap_doWrap vorgenommen.
Mit diesem TS-Code kann ich jetzt die Breite und/oder Höhe des Browserfensters bestimmen:
10 = CONTENT
10 {
table = tt_content
select.orderBy = sorting
select.where = colPos = 1
renderObj {
stdWrap.editIcons = tt_content : bodytext
stdWrap.editIcons.beforeLastTag = 1
stdWrap.editIcons.PopupWidth = 600
stdWrap.editIcons.PopupHeight = 600
}
}
Die Zeilen worum es hier geht sind natürlich:
stdWrap.editIcons.PopupWidth = 600
stdWrap.editIcons.PopupHeight = 600
Mit meiner Modifikation kann man jetzt der editIcons-Eigenschaft ein PopupWidth bzw. PopupHeight anhängen.
So, ich hoffe das hilft Euch weiter. Und vielleicht habt ihr ja ne Antwort auf eine meiner Fragen:
#43464
Grüße
Nube2021