Project

General

Profile

Bug #23644 » admpanel_10.diff

Administrator Admin, 2010-09-29 15:49

View differences:

t3lib/js/adminpanel.js (working copy)
*
* Copyright notice
*
* (c) 2009-2010 Ingo Renner <ingo@typo3.org>
* (c) 2010 Dmitry Dulepov <dmitry@typo3.org>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
......
***************************************************************/
/**
* @author Ingo Renner <ingo@typo3.org>
* @author Oliver Hader <oliver@typo3.org>
* @author Ingmar Schlecht <ingmar@typo3.org>
* @author Jonas D?bi <jd@cabag.ch>
* @author Dmitry Dulepov <dmitry@typo3.org>
*/
var TYPO3AdminPanel = {
var TYPO3AdminPanel = function() {
this.boxElement = null;
this.dragging = false;
this.dragElement = document;
this.previousMouseUpHandler = null;
this.previousMouseMoveHandler = null;
this.mouseOffset = {
x: 0,
y: 0
};
}
positionRestored: false,
dragObject: null,
dragX: 0,
dragY: 0,
posX: 0,
posY: 0,
TYPO3AdminPanel.prototype = {
savePosition: function(panel) {
var admPanelPosX = panel.offsetLeft;
var admPanelPosY = panel.offsetTop;
TYPO3AdminPanel.setCookie('admPanelPosX', admPanelPosX, '', '/');
TYPO3AdminPanel.setCookie('admPanelPosY', admPanelPosY, '', '/');
init: function(headerElementId, boxElementId) {
this.boxElement = document.getElementById(boxElementId);
this.setInitialPosition();
this.setMouseDownHandler(headerElementId);
},
restorePosition: function() {
if (TYPO3AdminPanel.positionRestored == false) {
var admPanelPosX = TYPO3AdminPanel.getCookie('admPanelPosX');
if (admPanelPosX > 0) {
document.getElementById('admPanel').style.left = admPanelPosX + 'px';
dragStart: function(event) {
if (!this.dragging) {
if (!event) {
event = window.event;
}
this.dragging = true;
this.setMouseOffsets(event);
this.setDragHandlers();
}
},
var admPanelPosY = TYPO3AdminPanel.getCookie('admPanelPosY');
if (admPanelPosY > 0) {
document.getElementById('admPanel').style.top = admPanelPosY + 'px';
}
TYPO3AdminPanel.positionRestored = true;
dragEnd: function() {
if (this.dragging) {
this.dragging = false;
this.dragElement.onmouseup = this.previousMouseUpHandler;
this.dragElement.onmousemove = this.previousMouseMoveHandler;
this.setCookie("admPanelPosX", this.boxElement.style.left);
this.setCookie("admPanelPosY", this.boxElement.style.top);
}
},
setCookie: function(name, value, expires, path, domain, secure) {
document.cookie = name + '=' + escape(value)
+ (expires ? '; expires=' + expires.toGMTString() : '')
+ (path ? '; path=' + path : '')
+ (domain ? '; domain=' + domain : '')
+ (secure ? '; secure' : '');
drag: function(event) {
if (this.dragging) {
if (!event) {
event = window.event;
}
this.boxElement.style.left = (event.clientX + this.mouseOffset.x) + "px";
this.boxElement.style.top = (event.clientY + this.mouseOffset.y) + "px";
}
},
getCookie: function(name) {
var dc = document.cookie;
var prefix = name + '=';
var begin = dc.indexOf('; ' + prefix);
var prefix = name + "=";
var begin = dc.indexOf("; " + prefix);
if (begin == -1) {
begin = dc.indexOf(prefix);
......
begin += 2;
}
var end = dc.indexOf(';', begin);
var end = dc.indexOf(";", begin);
if (end == -1) {
end = dc.length;
}
......
return unescape(dc.substring(begin + prefix.length, end));
},
dragInit: function() {
document.onmousemove = TYPO3AdminPanel.drag;
document.onmouseup = TYPO3AdminPanel.dragStop;
setCookie: function(name, value) {
document.cookie = name + "=" + escape(value);
},
dragStart: function(element) {
TYPO3AdminPanel.dragObject = element;
TYPO3AdminPanel.dragX = TYPO3AdminPanel.posX - TYPO3AdminPanel.dragObject.offsetLeft;
TYPO3AdminPanel.dragY = TYPO3AdminPanel.posY - TYPO3AdminPanel.dragObject.offsetTop;
setDragHandlers: function() {
var _this = this;
this.previousMouseUpHandler = this.dragElement.onmouseup;
this.dragElement.onmouseup = function() {
_this.dragEnd.apply(_this, arguments);
}
this.previousMouseMoveHandler = this.dragElement.onmousemove;
this.dragElement.onmousemove = function() {
_this.drag.apply(_this, arguments);
}
},
dragStop: function() {
TYPO3AdminPanel.dragObject = null;
setInitialPosition: function() {
this.boxElement.style.position = "absolute";
var pos = this.getCookie("admPanelPosX");
if (pos) {
this.boxElement.style.left = pos;
}
pos = this.getCookie("admPanelPosY");
if (pos) {
this.boxElement.style.top = pos;
}
},
drag: function(dragEvent) {
TYPO3AdminPanel.posX = document.all ? window.event.clientX : dragEvent.pageX;
TYPO3AdminPanel.posY = document.all ? window.event.clientY : dragEvent.pageY;
setMouseDownHandler: function(headerElementId) {
var _this = this, headerElement = document.getElementById(headerElementId);
headerElement.onmousedown = function() {
_this.dragStart.apply(_this, arguments);
}
},
if (TYPO3AdminPanel.dragObject != null) {
TYPO3AdminPanel.dragObject.style.left = (TYPO3AdminPanel.posX - TYPO3AdminPanel.dragX) + 'px';
TYPO3AdminPanel.dragObject.style.top = (TYPO3AdminPanel.posY - TYPO3AdminPanel.dragY) + 'px';
}
setMouseOffsets: function(event) {
this.mouseOffset.x = this.boxElement.offsetLeft - event.clientX;
this.mouseOffset.y = this.boxElement.offsetTop - event.clientY;
}
};
typo3/sysext/t3skin/ext_tables.php (working copy)
<?php
if (!defined ('TYPO3_MODE')) die ('Access denied.');
if (TYPO3_MODE == 'BE' || (TYPO3_MODE == 'FE' && isset($GLOBALS['BE_USER']) && $GLOBALS['BE_USER']->isFrontendEditingActive())) {
if (TYPO3_MODE == 'BE' || (TYPO3_MODE == 'FE' && isset($GLOBALS['BE_USER']))) {
global $TBE_STYLES;
// register as a skin
......
$GLOBALS['TYPO3_CONF_VARS']['typo3/backend.php']['additionalBackendItems'][] = t3lib_extMgm::extPath('t3skin').'registerIe6Stylesheet.php';
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/template.php']['preHeaderRenderHook'][] = t3lib_extMgm::extPath('t3skin').'pngfix/class.tx_templatehook.php:tx_templatehook->registerPngFix';
$GLOBALS['TBE_STYLES']['stylesheets']['admPanel'] = t3lib_extMgm::siteRelPath('t3skin') . 'stylesheets/visual/admin_panel.css';
}
?>
typo3/sysext/t3skin/stylesheets/visual/admin_panel.css (revision 0)
.typo3-adminPanel {
background-color: #f1f1f1;
border: 1px solid black;
box-shadow: 4px 4px 5px #c0c0c0;
width: 1%;
z-index:0;
-moz-border-radius: 4px;
-moz-box-shadow: 4px 4px 5px #808080;
-webkit-box-shadow: 4px 4px 5px #808080;
}
.typo3-adminPanel td {
font-size: 12px;
}
#TSFE_ADMIN_PANEL_FORM, #TSFE_ADMIN_PANEL_FORM A {
font-family: Arial;
font-size: 12px;
color: black;
text-decoration: none;
}
.typo3-adminPanel-section-open, .typo3-adminPanel-section-closed {
background: url(../../icons/gfx/ol/minusbullet.gif) no-repeat 0 -2px;
display: inline-block;
height: 16px;
margin: 0 1px 0 9px;
width: 16px;
}
.typo3-adminPanel-section-closed {
background-image: url(../../icons/gfx/ol/plusbullet.gif);
}
tr.typo3-adminPanel-section-title td {
background-color: #dddddd;
border-bottom: 1px solid #cccccc;
border-top: 1px dotted black;
clear: left;
font-weight: bold;
font-size: 14px;
font-variant: small-caps;
padding: 4px 15px 3px 0;
white-space: nowrap;
}
tr.typo3-adminPanel-itemRow td {
border-bottom: 1px dotted #e1e1e1;
padding: 3px 5px 3px 11px;
text-align: left;
vertical-align: top;
white-space: nowrap;
}
tr.typo3-adminPanel-itemRow td.typo3-adminPanel-section-content-title {
border-right: 1px dotted #e1e1e1;
padding-top: 5px;
width: 1%;
}
td.typo3-adminPanel-section-content {
padding-right: 11px;
width: 99%;
}
tr.typo3-adminPanel-hRow td {
background-color: #585858;
border-bottom: 1px solid black;
color: white;
cursor: move;
font-weight: bold;
}
span.typo3-adminPanel-beuser {
font-variant: normal;
}
tr.typo3-adminPanel-itemRow td table td {
border: none;
}
typo3/sysext/lang/locallang_tsfe.xml (working copy)
</meta>
<data type="array">
<languageKey index="default" type="array">
<label index="adminOptions">ADMIN PANEL</label>
<label index="adminOptions">TYPO3 ADMIN PANEL</label>
<label index="preview">Preview</label>
<label index="preview_showHiddenPages">Show Hidden Pages:</label>
<label index="preview_showHiddenRecords">Show Hidden Records:</label>
<label index="preview_simulateDate">Simulate Time:</label>
<label index="preview_simulateUserGroup">Simulate User Group:</label>
<label index="preview_showHiddenPages">Show hidden pages:</label>
<label index="preview_showHiddenRecords">Show hidden eecords:</label>
<label index="preview_simulateDate">Simulate time:</label>
<label index="preview_simulateUserGroup">Simulate user group:</label>
<label index="cache">Cache</label>
<label index="cache_noCache">No caching:</label>
<label index="cache_doit">Clear cache now!</label>
......
<label index="publish_tree">Publish pages:</label>
<label index="publish_doit">Publish now!</label>
<label index="edit">Editing</label>
<label index="edit_displayIcons">Display Edit Panels:</label>
<label index="edit_displayFieldIcons">Display Edit Icons:</label>
<label index="edit_displayIcons">Display edit panels:</label>
<label index="edit_displayFieldIcons">Display edit icons:</label>
<label index="edit_editFormsOnPage">Editforms on-page:</label>
<label index="edit_editNoPopup">No popup window:</label>
<label index="edit_openAB">Open TYPO3 Backend</label>
typo3/sysext/cms/tslib/class.tslib_adminpanel.php (working copy)
*
* @author Jeff Segars <jeff@webempoweredchurch.org>
* @author David Slayback <dave@webempoweredchurch.org>
* @author Dmitry Dulepov <dmitry@typo3.org>
* @package TYPO3
* @subpackage tslib
*/
......
if (t3lib_div::_GP('ADMCMD_editIcons')) {
$GLOBALS['TSFE']->displayFieldEditIcons=1;
$GLOBALS['BE_USER']->uc['TSFE_adminConfig']['edit_editNoPopup']=1;
$GLOBALS['BE_USER']->uc['TSFE_adminConfig']['edit_editNoPopup'] = 1;
}
if (t3lib_div::_GP('ADMCMD_simUser')) {
......
}
/**
* Obtains header data for the admin panel.
*
* @return string
*/
public function getAdminPanelHeaderData() {
$result = '';
// Include BE styles
$GLOBALS['TSFE']->includeTCA();
if(!empty($GLOBALS['TBE_STYLES']['stylesheets']['admPanel'])) {
$result = '<link rel="stylesheet" type="text/css" href="' .
htmlspecialchars(t3lib_div::locationHeaderUrl($GLOBALS['TBE_STYLES']['stylesheets']['admPanel'])) .
'" />';
}
return $result;
}
/**
* Checks if a Admin Panel section ("module") is available for the user. If so, true is returned.
*
* @param string The module key, eg. "edit", "preview", "info" etc.
* @return boolean
*/
public function isAdminModuleEnabled($key) {
$result = false;
// Returns true if the module checked is "preview" and the forcePreview flag is set.
if ($key=='preview' && $this->ext_forcePreview) {
return true;
if ($key == 'preview' && $this->ext_forcePreview) {
$result = true;
}
// If key is not set, only "all" is checked
if ($GLOBALS['BE_USER']->extAdminConfig['enable.']['all']) {
return true;
$result = true;
}
if ($GLOBALS['BE_USER']->extAdminConfig['enable.'][$key]) {
return true;
$result = true;
}
return $result;
}
/**
......
* @param string Setting key
* @return string The setting value
*/
public function extGetFeAdminValue($pre, $val='') {
public function extGetFeAdminValue($sectionName, $val = '') {
// Check if module is enabled.
if ($this->isAdminModuleEnabled($pre)) {
if ($this->isAdminModuleEnabled($sectionName)) {
// Exceptions where the values can be overridden from backend:
// deprecated
if ($pre . '_' . $val == 'edit_displayIcons' && $GLOBALS['BE_USER']->extAdminConfig['module.']['edit.']['forceDisplayIcons']) {
if ($sectionName . '_' . $val == 'edit_displayIcons' && $GLOBALS['BE_USER']->extAdminConfig['module.']['edit.']['forceDisplayIcons']) {
return true;
}
if ($pre . '_' . $val == 'edit_displayFieldIcons' && $GLOBALS['BE_USER']->extAdminConfig['module.']['edit.']['forceDisplayFieldIcons']) {
if ($sectionName . '_' . $val == 'edit_displayFieldIcons' && $GLOBALS['BE_USER']->extAdminConfig['module.']['edit.']['forceDisplayFieldIcons']) {
return true;
}
// override all settings with user TSconfig
if ($GLOBALS['BE_USER']->extAdminConfig['override.'][$pre . '.'][$val] && $val) {
return $GLOBALS['BE_USER']->extAdminConfig['override.'][$pre . '.'][$val];
if ($val && $GLOBALS['BE_USER']->extAdminConfig['override.'][$sectionName . '.'][$val]) {
return $GLOBALS['BE_USER']->extAdminConfig['override.'][$sectionName . '.'][$val];
}
if ($GLOBALS['BE_USER']->extAdminConfig['override.'][$pre]) {
return $GLOBALS['BE_USER']->extAdminConfig['override.'][$pre];
if ($GLOBALS['BE_USER']->extAdminConfig['override.'][$sectionName]) {
return $GLOBALS['BE_USER']->extAdminConfig['override.'][$sectionName];
}
$retVal = $val ? $GLOBALS['BE_USER']->uc['TSFE_adminConfig'][$pre . '_' . $val] : 1;
$retVal = $val ? $GLOBALS['BE_USER']->uc['TSFE_adminConfig'][$sectionName . '_' . $val] : 1;
if ($pre=='preview' && $this->ext_forcePreview) {
if (!$val) {
return true;
} else {
return $retVal;
}
if ($sectionName == 'preview' && $this->ext_forcePreview) {
return (!$val ? true : $retVal);
}
// regular check:
if ($this->isAdminModuleOpen($pre)) { // See if the menu is expanded!
if ($this->isAdminModuleOpen($sectionName)) { // See if the menu is expanded!
return $retVal;
}
......
// @deprecated since TYPO3 4.3
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tsfebeuserauth.php']['extEditAction-postProc'])) {
t3lib_div::deprecationLog('Frontend admin post processing hook extEditAction-postProc is deprecated since TYPO3 4.3.');
$_params = array('cmd' => &$cmd, 'tce' => &$this->tce, 'pObj' => &$this);
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tsfebeuserauth.php']['extEditAction-postProc'] as $_funcRef) {
t3lib_div::callUserFunction($_funcRef, $_params, $this);
$params = array('cmd' => &$cmd, 'tce' => &$this->tce, 'pObj' => &$this);
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tsfebeuserauth.php']['extEditAction-postProc'] as $funcRef) {
t3lib_div::callUserFunction($funcRef, $params, $this);
}
}
}
......
public function display() {
$GLOBALS['LANG']->includeLLFile('EXT:lang/locallang_tsfe.php');
$out = '<script type="text/javascript" src="t3lib/js/adminpanel.js"></script>';
//CSS
// @todo Check how this was handled before and if it's required here
// $GLOBALS['TSFE']->additionalHeaderData['admPanelCSS'] = '<link rel="stylesheet" type="text/css" href="' . t3lib_extMgm::extRelPath('feedit') . 'admpanel.css' . '" />';
if(!empty($GLOBALS['TBE_STYLES']['stylesheets']['admPanel'])) {
$GLOBALS['TSFE']->additionalHeaderData['admPanelCSS-Skin'] = '
<link rel="stylesheet" type="text/css" href="' . $GLOBALS['TBE_STYLES']['stylesheets']['admPanel'].'" />
';
}
$moduleContent = '';
if ($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['display_top']) {
if ($this->isAdminModuleEnabled('preview')) {
$out .= $this->getPreviewModule();
$moduleContent .= $this->getPreviewModule();
}
if ($this->isAdminModuleEnabled('cache')) {
$out .= $this->getCacheModule();
$moduleContent .= $this->getCacheModule();
}
if ($this->isAdminModuleEnabled('publish')) {
$out .= $this->getPublishModule();
$moduleContent .= $this->getPublishModule();
}
if ($this->isAdminModuleEnabled('edit')){
$out .= $this->getEditModule();
$moduleContent .= $this->getEditModule();
}
if ($this->isAdminModuleEnabled('tsdebug')) {
$out .= $this->getTSDebugModule();
$moduleContent .= $this->getTSDebugModule();
}
if ($this->isAdminModuleEnabled('info')) {
$out .= $this->getInfoModule();
$moduleContent .= $this->getInfoModule();
}
}
$row = '<img src="' . TYPO3_mainDir . 'gfx/ol/blank.gif" width="18" height="16" align="absmiddle" border="0" alt="" />';
$row .= '<img src="' . TYPO3_mainDir . 'gfx/ol/' . ($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['display_top']?'minus':'plus') . 'bullet.gif" width="18" height="16" align="absmiddle" border="0" alt="" />';
$row .= '<strong>' . $this->extFw($this->extGetLL('adminOptions')) . '</strong>';
$row .= $this->extFw(': ' . $GLOBALS['BE_USER']->user['username']);
$row = $this->extGetLL('adminOptions') . ': <span class="typo3-adminPanel-beuser">' .
htmlspecialchars($GLOBALS['BE_USER']->user['username']) . '</span>';
$header = '
<tr class="typo3-adminPanel-hRow" style="background-color: #9ba1a8; cursor: move;">
<td colspan="4" style="text-align:left; white-space:nowrap;">' .
$this->extItemLink('top',$row) . '
<img src="clear.gif" width="40" height="1" alt="" />
<input type="hidden" name="TSFE_ADMIN_PANEL[display_top]" value="' . $GLOBALS['BE_USER']->uc['TSFE_adminConfig']['display_top'] . '" />' . ($this->extNeedUpdate ? '<input type="submit" value="' . $this->extGetLL('update') . '" />' : '') . '</td>
</tr>';
$isVisible = $GLOBALS['BE_USER']->uc['TSFE_adminConfig']['display_top'];
$cssClassName = 'typo3-adminPanel-section-' . ($isVisible ? 'open' : 'closed');
$header = '<tr class="typo3-adminPanel-section-title typo3-adminPanel-hRow">' .
'<td colspan="2" id="typo3-adminPanel-header">' .
$this->linkSectionHeader('top', $row, $cssClassName) .
'<input type="hidden" name="TSFE_ADMIN_PANEL[display_top]" value="' . $GLOBALS['BE_USER']->uc['TSFE_adminConfig']['display_top'] . '" />' .
($this->extNeedUpdate ? ' <input type="submit" value="' . $this->extGetLL('update') . '" />' : '') . '</td>' .
'</tr>';
$query = !t3lib_div::_GET('id') ? ('<input type="hidden" name="id" value="' . $GLOBALS['TSFE']->id . '" />' . LF) : '';
$query = !t3lib_div::_GET('id') ? ('<input type="hidden" name="id" value="' . $GLOBALS['TSFE']->id . '" />') : '';
// the dummy field is needed for Firefox: to force a page reload on submit with must change the form value with JavaScript (see "onsubmit" attribute of the "form" element")
$query .= '<input type="hidden" name="TSFE_ADMIN_PANEL[DUMMY]" value="">';
$query .= '<input type="hidden" name="TSFE_ADMIN_PANEL[DUMMY]" value="" />';
foreach (t3lib_div::_GET() as $key => $value) {
if ($key != 'TSFE_ADMIN_PANEL') {
if (is_array($value)) {
$query .= $this->getHiddenFields($key, $value);
} else {
$query .= '<input type="hidden" name="' . $key . '" value="' . htmlspecialchars($value) . '">' . LF;
$query .= '<input type="hidden" name="' . $key . '" value="' . htmlspecialchars($value) . '" />';
}
}
}
$out = '
<!--
ADMIN PANEL
TYPO3 admin panel start
-->
<a name="TSFE_ADMIN"></a>
<form name="TSFE_ADMIN_PANEL_FORM" action="' . htmlspecialchars(t3lib_div::getIndpEnv('TYPO3_REQUEST_SCRIPT')) . '#TSFE_ADMIN" method="get" style="margin:0;" onsubmit="document.forms.TSFE_ADMIN_PANEL_FORM[\'TSFE_ADMIN_PANEL[DUMMY]\'].value=Math.random().toString().substring(2,8)">' .
$query . '
<table border="0" cellpadding="0" cellspacing="0" class="typo3-adminPanel" style="background-color:#f6f2e6; border: 1px solid black; z-index:0; position:absolute;" summary="">' .
$header .
$out . '
</table>
</form>';
<a id="TSFE_ADMIN"></a>
<form id="TSFE_ADMIN_PANEL_FORM" name="TSFE_ADMIN_PANEL_FORM" action="' . htmlspecialchars(t3lib_div::getIndpEnv('TYPO3_REQUEST_SCRIPT')) . '#TSFE_ADMIN" method="get" onsubmit="document.forms.TSFE_ADMIN_PANEL_FORM[\'TSFE_ADMIN_PANEL[DUMMY]\'].value=Math.random().toString().substring(2,8)">' .
$query . '<table border="0" cellpadding="0" cellspacing="0" class="typo3-adminPanel" summary="">' .
$header . $moduleContent . '</table></form>';
if ($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['display_top']) {
$out .= '<script type="text/javascript" src="t3lib/jsfunc.evalfield.js"></script>';
$out .= '
<script type="text/javascript">
/*<![CDATA[*/
$out .= '<script type="text/javascript">/*<![CDATA[*/' . t3lib_div::minifyJavaScript('
var evalFunc = new evalFunc();
// TSFEtypo3FormFieldSet()
function TSFEtypo3FormFieldSet(theField, evallist, is_in, checkbox, checkboxValue) { //
......
document.TSFE_ADMIN_PANEL_FORM[theField].value = evalFunc.evalObjValue(theFObj, document.TSFE_ADMIN_PANEL_FORM[theField+"_hr"].value);
}
TSFEtypo3FormFieldSet(theField, evallist, is_in, checkbox, checkboxValue);
}
/*]]>*/
</script>
<script language="javascript" type="text/javascript">' . $this->extJSCODE . '</script>';
}') . '/*]]>*/</script><script language="javascript" type="text/javascript">' .
$this->extJSCODE . '</script>';
}
$out = '
<div onmousedown="TYPO3AdminPanel.dragStart(this)" onmouseup="TYPO3AdminPanel.savePosition(this)" id="admPanel" style="position:absolute; z-index: 10000;">
' . $out . '
<br /></div>
<script type="text/javascript">
TYPO3AdminPanel.dragInit();
TYPO3AdminPanel.restorePosition();
</script>';
$out .= '<script src="' . t3lib_div::locationHeaderUrl('t3lib/js/adminpanel.js') . '" type="text/javascript"></script><script type="text/javascript">/*<![CDATA[*/' .
'typo3AdminPanel = new TYPO3AdminPanel();typo3AdminPanel.init("typo3-adminPanel-header", "TSFE_ADMIN_PANEL_FORM");' .
'/*]]>*/</script>
<!--
TYPO3 admin panel end
-->
';
return $out;
}
......
* @return string hidden fields
* @see display()
*/
protected function getHiddenFields($key, &$val) {
protected function getHiddenFields($key, array $val) {
$out = '';
foreach ($val as $k => $v) {
if (is_array($v)) {
......
/**
* Creates the content for the "preview" section ("module") of the Admin Panel
*
* @param string Optional start-value; The generated content is added to this variable.
* @return string HTML content for the section. Consists of a string with table-rows with four columns.
* @see display()
*/
protected function getPreviewModule($out = '') {
$out .= $this->extGetHead('preview');
protected function getPreviewModule() {
$out = $this->extGetHead('preview');
if ($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['display_preview']) {
$this->extNeedUpdate = true;
$out .= $this->extGetItem('preview_showHiddenPages', '<input type="hidden" name="TSFE_ADMIN_PANEL[preview_showHiddenPages]" value="0" /><input type="checkbox" name="TSFE_ADMIN_PANEL[preview_showHiddenPages]" value="1"' . ($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['preview_showHiddenPages'] ? ' checked="checked"' : '') . ' />');
......
/**
* Creates the content for the "cache" section ("module") of the Admin Panel
*
* @param string Optional start-value; The generated content is added to this variable.
* @return string HTML content for the section. Consists of a string with table-rows with four columns.
* @see display()
*/
protected function getCacheModule($out = '') {
$out.= $this->extGetHead('cache');
protected function getCacheModule() {
$out = $this->extGetHead('cache');
if ($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['display_cache']) {
$this->extNeedUpdate = true;
$out .= $this->extGetItem('cache_noCache', '<input type="hidden" name="TSFE_ADMIN_PANEL[cache_noCache]" value="0" /><input type="checkbox" name="TSFE_ADMIN_PANEL[cache_noCache]" value="1"' . ($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['cache_noCache'] ? ' checked="checked"' : '') . ' />');
$levels = $GLOBALS['BE_USER']->uc['TSFE_adminConfig']['cache_clearCacheLevels'];
$options = '';
$options .= '<option value="0"' . ($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['cache_clearCacheLevels'] == 0 ? ' selected="selected"' : '') . '>' . $this->extGetLL('div_Levels_0') . '</option>';
$options .= '<option value="1"' . ($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['cache_clearCacheLevels'] == 1 ? ' selected="selected"' : '') . '>' . $this->extGetLL('div_Levels_1') . '</option>';
$options .= '<option value="2"' . ($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['cache_clearCacheLevels'] == 2 ? ' selected="selected"' : '') . '>' . $this->extGetLL('div_Levels_2') . '</option>';
$options .= '<option value="0"' . ($levels == 0 ? ' selected="selected"' : '') . '>' . $this->extGetLL('div_Levels_0') . '</option>';
$options .= '<option value="1"' . ($levels == 1 ? ' selected="selected"' : '') . '>' . $this->extGetLL('div_Levels_1') . '</option>';
$options .= '<option value="2"' . ($levels == 2 ? ' selected="selected"' : '') . '>' . $this->extGetLL('div_Levels_2') . '</option>';
$out .= $this->extGetItem('cache_clearLevels', '<select name="TSFE_ADMIN_PANEL[cache_clearCacheLevels]">' . $options . '</select>' .
'<input type="hidden" name="TSFE_ADMIN_PANEL[cache_clearCacheId]" value="' . $GLOBALS['TSFE']->id . '" /><input type="submit" value="' . $this->extGetLL('update') . '" />');
'<input type="hidden" name="TSFE_ADMIN_PANEL[cache_clearCacheId]" value="' . $GLOBALS['TSFE']->id . '" /> <input type="submit" value="' . $this->extGetLL('update') . '" />');
// Generating tree:
$depth = $this->extGetFeAdminValue('cache', 'clearCacheLevels');
......
$GLOBALS['BE_USER']->extPageInTreeInfo[] = array($GLOBALS['TSFE']->page['uid'], htmlspecialchars($GLOBALS['TSFE']->page['title']), $depth+1);
$GLOBALS['BE_USER']->extGetTreeList($GLOBALS['TSFE']->id, $depth, 0, $GLOBALS['BE_USER']->getPagePermsClause(1));
foreach ($GLOBALS['BE_USER']->extPageInTreeInfo as $row) {
$outTable .= '
<tr>
<td style="white-space:nowrap;"><img src="clear.gif" width="' . (($depth+1-$row[2])*18) . '" height="1" alt="" /><img src="' . TYPO3_mainDir . 'gfx/i/pages.gif" width="18" height="16" align="absmiddle" border="0" alt="" />' . $this->extFw($row[1]) . '</td>
<td><img src="clear.gif" width="10" height="1" alt="" /></td>
<td>' . $this->extFw($GLOBALS['BE_USER']->extGetNumberOfCachedPages($row[0])) . '</td>
</tr>';
$outTable .= '<tr>' .
'<td><img src="typo3/gfx/clear.gif" width="' . (($depth+1-$row[2])*18) . '" height="1" alt="" /><img ' .
t3lib_iconWorks::skinImg(TYPO3_mainDir, 'gfx/i/pages.gif', 'width="18" height="16"') . ' align="top" alt="" /> ' . htmlspecialchars($row[1]) .
'</td><td>' . $GLOBALS['BE_USER']->extGetNumberOfCachedPages($row[0]) . '</td></tr>';
}
$outTable = '<br /><table border="0" cellpadding="0" cellspacing="0" summary="">' . $outTable . '</table>';
......
* @return string HTML content for the section. Consists of a string with table-rows with four columns.
* @see display()
*/
protected function getPublishModule($out = '') {
$out .= $this->extGetHead('publish');
protected function getPublishModule() {
$out = $this->extGetHead('publish');
if ($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['display_publish']) {
$this->extNeedUpdate = true;
$levels = $GLOBALS['BE_USER']->uc['TSFE_adminConfig']['publish_levels'];
$options = '';
$options .= '<option value="0"' . ($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['publish_levels'] == 0 ? ' selected="selected"' : '') . '>' . $this->extGetLL('div_Levels_0') . '</option>';
$options .= '<option value="1"' . ($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['publish_levels'] == 1 ? ' selected="selected"' : '') . '>' . $this->extGetLL('div_Levels_1') . '</option>';
$options .= '<option value="2"' . ($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['publish_levels'] == 2 ? ' selected="selected"' : '') . '>' . $this->extGetLL('div_Levels_2') . '</option>';
$options .= '<option value="0"' . ($levels == 0 ? ' selected="selected"' : '') . '>' . $this->extGetLL('div_Levels_0') . '</option>';
$options .= '<option value="1"' . ($levels ? ' selected="selected"' : '') . '>' . $this->extGetLL('div_Levels_1') . '</option>';
$options .= '<option value="2"' . ($levels == 2 ? ' selected="selected"' : '') . '>' . $this->extGetLL('div_Levels_2') . '</option>';
$out .= $this->extGetItem('publish_levels', '<select name="TSFE_ADMIN_PANEL[publish_levels]">' . $options . '</select>' .
'<input type="hidden" name="TSFE_ADMIN_PANEL[publish_id]" value="' . $GLOBALS['TSFE']->id . '" />&nbsp;<input type="submit" value="' . $this->extGetLL('update') . '" />');
......
$GLOBALS['BE_USER']->extPageInTreeInfo[] = array($GLOBALS['TSFE']->page['uid'], htmlspecialchars($GLOBALS['TSFE']->page['title']), $depth+1);
$GLOBALS['BE_USER']->extGetTreeList($GLOBALS['TSFE']->id, $depth, 0, $GLOBALS['BE_USER']->getPagePermsClause(1));
foreach ($GLOBALS['BE_USER']->extPageInTreeInfo as $row) {
$outTable.= '
<tr>
<td style="white-space:nowrap;"><img src="clear.gif" width="' . (($depth + 1 - $row[2]) * 18) . '" height="1" alt="" /><img src="' . TYPO3_mainDir . 'gfx/i/pages.gif" width="18" height="16" align="absmiddle" border="0" alt="" />' . $this->extFw($row[1]) . '</td>
<td><img src="clear.gif" width="10" height="1" alt="" /></td>
<td>' . $this->extFw('...') . '</td>
</tr>';
$outTable.= '<tr>' .
'<td style="white-space:nowrap;"><img src="typo3/gfx/clear.gif" width="' . (($depth + 1 - $row[2]) * 18) . '" height="1" alt="" /><img ' .
t3lib_iconWorks::skinImg(TYPO3_mainDir, 'gfx/i/pages.gif', 'width="18" height="16"') . ' align="top" border="0" alt="" />' . $row[1] .
'</td><td><img src="typo3/gfx/clear.gif" width="10" height="1" alt="" /></td><td>...</td></tr>';
}
$outTable = '<br /><table border="0" cellpadding="0" cellspacing="0" summary="">' . $outTable . '</table>';
$outTable .= '<input type="submit" name="TSFE_ADMIN_PANEL[action][publish]" value="' . $this->extGetLL('publish_doit') . '" />';
......
/**
* Creates the content for the "edit" section ("module") of the Admin Panel
*
* @param string Optional start-value; The generated content is added to this variable.
* @return string HTML content for the section. Consists of a string with table-rows with four columns.
* @see display()
*/
protected function getEditModule($out = '') {
$out .= $this->extGetHead('edit');
protected function getEditModule() {
$out = $this->extGetHead('edit');
if ($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['display_edit']) {
// If another page module was specified, replace the default Page module with the new one
......
}
return false;
').
'">' . $this->extFw($this->extGetLL('edit_openAB')) . '</a>');
'">' . $this->extGetLL('edit_openAB') . '</a>');
}
}
......
/**
* Creates the content for the "tsdebug" section ("module") of the Admin Panel
*
* @param string Optional start-value; The generated content is added to this variable.
* @return string HTML content for the section. Consists of a string with table-rows with four columns.
* @see display()
*/
protected function getTSDebugModule($out = '') {
$out .= $this->extGetHead('tsdebug');
protected function getTSDebugModule() {
$out = $this->extGetHead('tsdebug');
if ($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['display_tsdebug']) {
$this->extNeedUpdate = true;
......
$GLOBALS['TT']->printConf['flag_content'] = $this->extGetFeAdminValue('tsdebug', 'displayContent');
$GLOBALS['TT']->printConf['flag_queries'] = $this->extGetFeAdminValue('tsdebug', 'displayQueries');
$out.= '
<tr>
<td><img src="clear.gif" width="50" height="1" alt="" /></td>
<td colspan="3">' . $GLOBALS['TT']->printTSlog() . '</td>
</tr>';
$out.= '<tr><td colspan="2">' . $GLOBALS['TT']->printTSlog() . '</td></tr>';
}
return $out;
......
/**
* Creates the content for the "info" section ("module") of the Admin Panel
*
* @param string Optional start-value; The generated content is added to this variable.
* @return string HTML content for the section. Consists of a string with table-rows with four columns.
* @see display()
*/
protected function getInfoModule($out = '') {
$out .= $this->extGetHead('info');
protected function getInfoModule() {
$out = $this->extGetHead('info');
if ($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['display_info']) {
$tableArr = array();
......
foreach ($tableArr as $arr) {
if (strlen($arr[0])) { // Put text wrapped by "*" between <strong> tags
$value1 = preg_replace('/^\*(.*)\*$/', '$1', $arr[0], -1, $count);
$value1 = ($count?'<strong>':'') . $this->extFw($value1) . ($count?'</strong>':'');
$value1 = ($count?'<strong>':'') . $value1 . ($count?'</strong>':'');
} else {
$value1 = $this->extFw('&nbsp;');
$value1 = '&nbsp;';
}
$value2 = strlen($arr[1]) ? $arr[1] : '&nbsp;';
$value2 = $this->extFw($value2);
$value2 = $value2;
$table .= '
<tr>
<td style="text-align:left">' . $value1 . '</td>
<td style="text-align:right">' . $value2 . '</td>
</tr>';
$table .= '<tr class="typo3-adminPanel-itemRow">' .
'<td class="typo3-adminPanel-section-content-title">' . $value1 . '</td>' .
'<td class="typo3-adminPanel-section-content">' . $value2 . '</td>' .
'</tr>';
}
$table = '<table border="0" cellpadding="0" cellspacing="0" summary="">' . $table . '</table>';
$out .= '
<tr>
<td><img src="clear.gif" width="50" height="1" alt="" /></td>
<td colspan="3">' . $table . '</td>
</tr>';
$out .= $table;
}
return $out;
......
* @access private
* @see extGetItem()
*/
protected function extGetHead($pre) {
$out = '<img src="' . TYPO3_mainDir . 'gfx/ol/blank.gif" width="18" height="16" align="absmiddle" border="0" alt="" />';
$out .= '<img src="' . TYPO3_mainDir . 'gfx/ol/' . ($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['display_' . $pre] ? 'minus' : 'plus') . 'bullet.gif" width="18" height="16" align="absmiddle" border="0" alt="" />';
$out .= $this->extFw($this->extGetLL($pre));
protected function extGetHead($sectionSuffix) {
$settingName = 'display_' . $sectionSuffix;
$isVisible = $GLOBALS['BE_USER']->uc['TSFE_adminConfig'][$settingName];
$cssClassName = 'typo3-adminPanel-section-' . ($isVisible ? 'open' : 'closed');
$out = $this->extItemLink($pre,$out);
return '
<tr class="typo3-adminPanel-itemHRow" style="background-color:#abbbb4;">
<td colspan="4" style="text-align:left; border-top:dashed 1px #007a8c; white-space:nowrap;">' . $out . '<input type="hidden" name="TSFE_ADMIN_PANEL[display_' . $pre . ']" value="' . $GLOBALS['BE_USER']->uc['TSFE_adminConfig']['display_' . $pre] . '" /></td>
</tr>';
return '<tr class="typo3-adminPanel-section-title"><td colspan="2">' .
$this->linkSectionHeader($sectionSuffix, $this->extGetLL($sectionSuffix), $cssClassName) .
'<input type="hidden" name="TSFE_ADMIN_PANEL[' . $settingName .
']" value="' . $isVisible . '" /></td></tr>';
}
/**
......
* @access private
* @see extGetHead()
*/
protected function extItemLink($pre, $str) {
return '<a href="#" style="text-decoration:none;" onclick="' .
htmlspecialchars('document.TSFE_ADMIN_PANEL_FORM[\'TSFE_ADMIN_PANEL[display_' . $pre . ']\'].value=' . ($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['display_' . $pre] ? '0' : '1') . '; document.TSFE_ADMIN_PANEL_FORM.submit(); return false;') .
'">' . $str . '</a>';
protected function linkSectionHeader($sectionSuffix, $sectionTitle, $className = '') {
return '<a href="javascript:void(0)" onclick="' .
htmlspecialchars('document.TSFE_ADMIN_PANEL_FORM[\'TSFE_ADMIN_PANEL[display_' . $sectionSuffix . ']\'].value=' . ($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['display_' . $sectionSuffix] ? '0' : '1') . ';document.TSFE_ADMIN_PANEL_FORM.submit();return false;') .
'"' . ($className ? ' class="' . $className . '"' : '') . '>&nbsp;</a>' .
$sectionTitle;
}
/**
......
* @access private
* @see extGetHead()
*/
protected function extGetItem($pre, $element) {
$out = '
<tr class="typo3-adminPanel-itemRow">
<td><img src="clear.gif" width="50" height="1" alt="" /></td>
<td style="text-align:left; white-space:nowrap;">' . ($pre ? $this->extFw($this->extGetLL($pre)) : '&nbsp;') . '</td>
<td><img src="clear.gif" width="30" height="1" alt="" /></td>
<td style="text-align:left; white-space:nowrap;">' . $element . '</td>
</tr>';
protected function extGetItem($title, $content) {
$out = '<tr class="typo3-adminPanel-itemRow">' .
'<td class="typo3-adminPanel-section-content-title">' . ($title ? $this->extGetLL($title) : '&nbsp;') . '</td>' .
'<td class="typo3-adminPanel-section-content">' . $content . '</td></tr>';
return $out;
}
/**
* Wraps a string in a span-tag with black verdana font
*
* @param string The string to wrap
* @return string
*/
protected function extFw($str) {
return '<span style="font-family:Verdana,Arial,Helvetica,sans-serif; font-size:10px; color:black;">' . $str . '</span>';
}
/**
* Creates the tool bar links for the "edit" section of the Admin Panel.
*
* @return string A string containing images wrapped in <a>-tags linking them to proper functions.
*/
public function ext_makeToolBar() {
// If mod.web_list.newContentWiz.overrideWithExtension is set, use that extension's create new content wizard instead:
$tmpTSc = t3lib_BEfunc::getModTSconfig($this->pageinfo['uid'],'mod.web_list');
$tmpTSc = $tmpTSc ['properties']['newContentWiz.']['overrideWithExtension'];
$newContentWizScriptPath = t3lib_extMgm::isLoaded($tmpTSc) ? (t3lib_extMgm::extRelPath($tmpTSc) . 'mod1/db_new_content_el.php') : (TYPO3_mainDir . 'sysext/cms/layout/db_new_content_el.php');
$tsConfig = t3lib_BEfunc::getModTSconfig($this->pageinfo['uid'],'mod.web_list');
$tsConfig = $tsConfig ['properties']['newContentWiz.']['overrideWithExtension'];
$newContentWizScriptPath = t3lib_extMgm::isLoaded($tsConfig) ? (t3lib_extMgm::extRelPath($tsConfig) . 'mod1/db_new_content_el.php') : (TYPO3_mainDir . 'sysext/cms/layout/db_new_content_el.php');
$perms = $GLOBALS['BE_USER']->calcPerms($GLOBALS['TSFE']->page);
$langAllowed = $GLOBALS['BE_USER']->checkLanguageAccess($GLOBALS['TSFE']->sys_language_uid);
$toolBar = '';
$id = $GLOBALS['TSFE']->id;
$toolBar .= '<a href="' . htmlspecialchars(TYPO3_mainDir . 'show_rechis.php?element=' . rawurlencode('pages:' . $id) . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))) . '#latest">' .
'<img src="' . TYPO3_mainDir . 'gfx/history2.gif" width="13" height="12" hspace="2" border="0" align="top" title="' . $this->extGetLL('edit_recordHistory') . '" alt="" /></a>';
$toolBar = '<a href="' . htmlspecialchars(TYPO3_mainDir . 'show_rechis.php?element=' . rawurlencode('pages:' . $id) . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))) . '#latest">' .
'<img ' . t3lib_iconWorks::skinImg(TYPO3_mainDir, 'gfx/history2.gif', 'width="13" height="12"') .
' hspace="2" border="0" align="top" title="' . $this->extGetLL('edit_recordHistory') . '" alt="" /></a>';
if ($perms&16 && $langAllowed) {
if (($perms & 16) && $langAllowed) {
$params = '';
if ($GLOBALS['TSFE']->sys_language_uid) {
$params = '&sys_language_uid=' . $GLOBALS['TSFE']->sys_language_uid;
}
$toolBar .= '<a href="' . htmlspecialchars($newContentWizScriptPath . '?id=' . $id . $params . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))) . '">' .
'<img src="' . TYPO3_mainDir . 'gfx/new_record.gif" width="16" height="12" hspace="1" border="0" align="top" title="' . $this->extGetLL('edit_newContentElement') . '" alt="" /></a>';
'<img ' . t3lib_iconWorks::skinImg(TYPO3_mainDir, 'gfx/new_record.gif', 'width="16" height="12"') . ' hspace="1" border="0" align="top" title="' . $this->extGetLL('edit_newContentElement') . '" alt="" /></a>';
}
if ($perms&2) {
if (($perms & 2)) {
$toolBar .= '<a href="' . htmlspecialchars(TYPO3_mainDir . 'move_el.php?table=pages&uid=' . $id . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))) . '">' .
'<img src="' . TYPO3_mainDir . 'gfx/move_page.gif" width="11" height="12" hspace="2" border="0" align="top" title="' . $this->extGetLL('edit_move_page') . '" alt="" /></a>';
'<img ' . t3lib_iconWorks::skinImg(TYPO3_mainDir, 'gfx/move_page.gif', 'width="11" height="12') . ' hspace="2" border="0" align="top" title="' . $this->extGetLL('edit_move_page') . '" alt="" /></a>';
}
if ($perms&8) {
if (($perms & 8)) {
$toolBar .= '<a href="' . htmlspecialchars(TYPO3_mainDir . 'db_new.php?id=' . $id . '&pagesOnly=1&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))) . '">' .
'<img src="' . TYPO3_mainDir . 'gfx/new_page.gif" width="13" height="12" hspace="0" border="0" align="top" title="' . $this->extGetLL('edit_newPage') . '" alt="" /></a>';
'<img ' . t3lib_iconWorks::skinImg(TYPO3_mainDir, 'gfx/new_page.gif', 'width="13" height="12"') . ' hspace="0" border="0" align="top" title="' . $this->extGetLL('edit_newPage') . '" alt="" /></a>';
}
if ($perms&2) {
if (($perms & 2)) {
$params = '&edit[pages][' . $id . ']=edit';
$toolBar .= '<a href="' . htmlspecialchars(TYPO3_mainDir . 'alt_doc.php?' . $params . '&noView=1&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))) . '">' .
'<img src="' . TYPO3_mainDir . 'gfx/edit2.gif" width="11" height="12" hspace="2" border="0" align="top" title="' . $this->extGetLL('edit_editPageProperties') . '" alt="" /></a>';
$toolBar .= '<a href="' . htmlspecialchars(TYPO3_mainDir . 'alt_document.php?' . $params . '&noView=1&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))) . '">' .
'<img ' . t3lib_iconWorks::skinImg(TYPO3_mainDir . 'gfx/edit2.gif', 'width="11" height="12"') . 'hspace="2" border="0" align="top" title="' . $this->extGetLL('edit_editPageProperties') . '" alt="" /></a>';
if ($GLOBALS['TSFE']->sys_language_uid && $langAllowed) {
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
......
$GLOBALS['TSFE']->sys_page->versionOL('pages_language_overlay',$row);
if (is_array($row)) {
$params = '&edit[pages_language_overlay][' . $row['uid'] . ']=edit';
$toolBar .= '<a href="' . htmlspecialchars(TYPO3_mainDir . 'alt_doc.php?' . $params . '&noView=1&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))) . '">' .
'<img src="' . TYPO3_mainDir . 'gfx/edit3.gif" width="11" height="12" hspace="2" border="0" align="top" title="' . $this->extGetLL('edit_editPageOverlay') . '" alt="" /></a>';
$toolBar .= '<a href="' . htmlspecialchars(TYPO3_mainDir . 'alt_document.php?' . $params . '&noView=1&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))) . '">' .
'<img ' . t3lib_iconWorks::skinImg(TYPO3_mainDir, 'gfx/edit3.gif', 'width="11" height="12"') . ' hspace="2" border="0" align="top" title="' . $this->extGetLL('edit_editPageOverlay') . '" alt="" /></a>';
}
}
}
if ($GLOBALS['BE_USER']->check('modules', 'web_list')) {
$toolBar .= '<a href="' . htmlspecialchars(TYPO3_mainDir . t3lib_extMgm::extRelPath('list') . 'mod1/db_list.php?id=' . $id . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))) . '">' .
'<img src="' . TYPO3_mainDir . 'gfx/list.gif" width="11" height="11" hspace="2" border="0" align="top" title="' . $this->extGetLL('edit_db_list') . '" alt="" /></a>';
'<img ' . t3lib_iconWorks::skinImg(TYPO3_mainDir, 'gfx/list.gif', 'width="11" height="11"') . ' hspace="2" border="0" align="top" title="' . $this->extGetLL('edit_db_list') . '" alt="" /></a>';
}
return $toolBar;
......
* Returns the label for key, $key. If a translation for the language set in $GLOBALS['BE_USER']->uc['lang'] is found that is returned, otherwise the default value.
* IF the global variable $LOCAL_LANG is NOT an array (yet) then this function loads the global $LOCAL_LANG array with the content of "sysext/lang/locallang_tsfe.php" so that the values therein can be used for labels in the Admin Panel
*
* FIXME The function should onvert to $TSFE->renderCharset, not to UTF8!
*
* @param string Key for a label in the $LOCAL_LANG array of "sysext/lang/locallang_tsfe.php"
* @return string The value for the $key
*/
......
$labelStr = htmlspecialchars($GLOBALS['LANG']->getLL($key)); // Label string in the default backend output charset.
// Convert to utf-8, then to entities:
if ($GLOBALS['LANG']->charSet!='utf-8') {
if ($GLOBALS['LANG']->charSet != 'utf-8') {
$labelStr = $GLOBALS['LANG']->csConvObj->utf8_encode($labelStr,$GLOBALS['LANG']->charSet);
}
$labelStr = $GLOBALS['LANG']->csConvObj->utf8_to_entities($labelStr);
typo3/sysext/cms/tslib/index_ts.php (working copy)
t3lib_div::_GP('MP'),
t3lib_div::_GP('RDCT')
);
/* @var $TSFE tslib_fe */
/** @var $TSFE tslib_fe */
if($TYPO3_CONF_VARS['FE']['pageUnavailable_force'] &&
!t3lib_div::cmpIP(t3lib_div::getIndpEnv('REMOTE_ADDR'), $TYPO3_CONF_VARS['SYS']['devIPmask'])) {
......
// BE_USER
// *********
$BE_USER = NULL;
/** @var $BE_USER t3lib_tsfeBeUserAuth */
if ($_COOKIE['be_typo_user']) { // If the backend cookie is set, we proceed and checks if a backend user is logged in.
$TYPO3_MISC['microtime_BE_USER_start'] = microtime(true);
$TT->push('Back End user initialized','');
......
// ***************
// Output content
// ***************
$sendTSFEContent = false;
if ($TSFE->isOutputting()) {
$TT->push('Print Content','');
$TSFE->processOutput();
......
$TT->pull();
} else {
echo $TSFE->content;
$sendTSFEContent = true;
}
$TT->pull();
}
......
// Admin panel
// *************
if (is_object($BE_USER) && $BE_USER->isAdminPanelVisible() && $TSFE->beUserLogin) {
echo $BE_USER->displayAdminPanel();
$TSFE->content = str_ireplace('</head>', $BE_USER->adminPanel->getAdminPanelHeaderData() . '</head>', $TSFE->content);
$TSFE->content = str_ireplace('</body>', $BE_USER->displayAdminPanel() . '</body>', $TSFE->content);
}
if ($sendTSFEContent) {
echo $TSFE->content;
}
// *************
// Debugging Output
// *************
(2-2/8)