本文整理匯總了PHP中template::setModuleTemplate方法的典型用法代碼示例。如果您正苦於以下問題:PHP template::setModuleTemplate方法的具體用法?PHP template::setModuleTemplate怎麽用?PHP template::setModuleTemplate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類template
的用法示例。
在下文中一共展示了template::setModuleTemplate方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: initialize
/**
* Initializes the Module
*
* @return void
*/
public function initialize()
{
parent::init();
$this->doc = t3lib_div::makeInstance('template');
$this->doc->setModuleTemplate(t3lib_extMgm::extPath('recycler') . 'mod1/mod_template.html');
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->doc->setExtDirectStateProvider();
$this->pageRenderer = $this->doc->getPageRenderer();
$this->relativePath = t3lib_extMgm::extRelPath('recycler');
$this->pageRecord = t3lib_BEfunc::readPageAccess($this->id, $this->perms_clause);
$this->isAccessibleForCurrentUser = $this->id && is_array($this->pageRecord) || !$this->id && $this->isCurrentUserAdmin();
//don't access in workspace
if ($GLOBALS['BE_USER']->workspace !== 0) {
$this->isAccessibleForCurrentUser = false;
}
//read configuration
$modTS = $GLOBALS['BE_USER']->getTSConfig('mod.recycler');
if ($this->isCurrentUserAdmin()) {
$this->allowDelete = true;
} else {
$this->allowDelete = $modTS['properties']['allowDelete'] == '1';
}
if (isset($modTS['properties']['recordsPageLimit']) && intval($modTS['properties']['recordsPageLimit']) > 0) {
$this->recordsPageLimit = intval($modTS['properties']['recordsPageLimit']);
}
}
示例2: init
/**
* first initialization of the global variables. Set some JS-code
*
* @return void ...
*/
function init()
{
global $BE_USER, $LANG, $BACK_PATH, $TYPO3_CONF_VARS;
$this->doc = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
$this->doc->backPath = $BACK_PATH;
$this->doc->setModuleTemplate('EXT:direct_mail/mod1/mod_template.html');
$this->doc->showFlashMessages = FALSE;
$currentSubScript = GeneralUtility::_GP('currentSubScript');
// Setting highlight mode:
$this->doHighlight = !$BE_USER->getTSConfigVal('options.pageTree.disableTitleHighlight');
$this->doc->inDocStyles = '
#typo3-docheader-row2 { line-height: 14px !important; }
#typo3-docheader-row2 span { font-weight: bold; margin-top: -3px; color: #000; margin-top: 0; padding-left: 20px; }
';
// Setting JavaScript for menu.
$this->doc->JScode = $this->doc->wrapScriptTags(($currentSubScript ? 'top.currentSubScript=unescape("' . rawurlencode($currentSubScript) . '");' : '') . '
function jumpTo(params,linkObj,highLightID) { //
var theUrl = top.TS.PATH_typo3+top.currentSubScript+"?"+params;
if (top.condensedMode) {
top.content.document.location=theUrl;
} else {
parent.list_frame.document.location=theUrl;
}
' . ($this->doHighlight ? 'hilight_row("row"+top.fsMod.recentIds["txdirectmailM1"],highLightID);' : '') . '
' . (!$GLOBALS['CLIENT']['FORMSTYLE'] ? '' : 'if (linkObj) {linkObj.blur();}') . '
return false;
}
// Call this function, refresh_nav(), from another script in the backend if you want to refresh the navigation frame (eg. after having changed a page title or moved pages etc.)
// See t3lib_BEfunc::getSetUpdateSignal()
function refresh_nav() { //
window.setTimeout("_refresh_nav();",0);
}
function _refresh_nav() { //
document.location="' . htmlspecialchars(GeneralUtility::getIndpEnv('SCRIPT_NAME') . '?unique=' . time()) . '";
}
// Highlighting rows in the page tree:
function hilight_row(frameSetModule,highLightID) { //
// Remove old:
theObj = document.getElementById(top.fsMod.navFrameHighlightedID[frameSetModule]);
if (theObj) {
theObj.style.backgroundColor="";
}
// Set new:
top.fsMod.navFrameHighlightedID[frameSetModule] = highLightID;
theObj = document.getElementById(highLightID);
if (theObj) {
theObj.style.backgroundColor="' . GeneralUtility::modifyHTMLColorAll($this->doc->bgColor, -5) . '";
}
}
');
}
示例3: init
/**
* Initialize script class
*
* @return void
*/
function init()
{
//TODO remove global
global $BACK_PATH, $TYPO3_CONF_VARS;
// Setting target, which must be a file reference to a file within the mounts.
$this->target = $this->origTarget = t3lib_div::_GP('target');
$this->returnUrl = t3lib_div::sanitizeLocalUrl(t3lib_div::_GP('returnUrl'));
// Creating file management object:
$this->basicff = t3lib_div::makeInstance('t3lib_basicFileFunctions');
$this->basicff->init($GLOBALS['FILEMOUNTS'], $TYPO3_CONF_VARS['BE']['fileExtensions']);
if (file_exists($this->target)) {
$this->target = $this->basicff->cleanDirectoryName($this->target);
// Cleaning and checking target (file or dir)
} else {
$this->target = '';
}
$key = $this->basicff->checkPathAgainstMounts($this->target . '/');
if (!$this->target || !$key) {
$title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_file_list.xml:paramError', TRUE);
$message = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_file_list.xml:targetNoDir', TRUE);
throw new RuntimeException($title . ': ' . $message);
}
// Finding the icon
switch ($GLOBALS['FILEMOUNTS'][$key]['type']) {
case 'user':
$this->icon = 'gfx/i/_icon_ftp_user.gif';
break;
case 'group':
$this->icon = 'gfx/i/_icon_ftp_group.gif';
break;
default:
$this->icon = 'gfx/i/_icon_ftp.gif';
break;
}
$this->icon = '<img' . t3lib_iconWorks::skinImg($this->backPath, $this->icon, 'width="18" height="16"') . ' title="" alt="" />';
// Relative path to filemount, $key:
$this->shortPath = substr($this->target, strlen($GLOBALS['FILEMOUNTS'][$key]['path']));
// Setting title:
$this->title = $this->icon . $GLOBALS['FILEMOUNTS'][$key]['name'] . ': ' . $this->shortPath;
// ***************************
// Setting template object
// ***************************
$this->doc = t3lib_div::makeInstance('template');
$this->doc->setModuleTemplate('templates/file_edit.html');
$this->doc->backPath = $BACK_PATH;
$this->doc->JScode = $this->doc->wrapScriptTags('
function backToList() { //
top.goToModule("file_list");
}
');
$this->doc->form = '<form action="tce_file.php" method="post" name="editform">';
}
示例4: initPage
/**
* initialization for the visual parts of the class
* Use template rendering only if this is a non-AJAX call
*
* @return void
*/
public function initPage()
{
global $BE_USER;
// Setting highlight mode:
$this->doHighlight = !$BE_USER->getTSConfigVal('options.pageTree.disableTitleHighlight');
// If highlighting is active, define the CSS class for the active item depending on the workspace
if ($this->doHighlight) {
$hlClass = $BE_USER->workspace === 0 ? 'active' : 'active active-ws wsver' . $BE_USER->workspace;
}
// Create template object:
$this->doc = t3lib_div::makeInstance('template');
$this->doc->backPath = $BACK_PATH;
$this->doc->setModuleTemplate('templates/alt_db_navframe.html');
$this->doc->showFlashMessages = FALSE;
// get HTML-Template
// Adding javascript code for AJAX (prototype), drag&drop and the pagetree as well as the click menu code
$this->doc->getDragDropCode('pages');
$this->doc->getContextMenuCode();
$this->doc->getPageRenderer()->loadScriptaculous('effects');
$this->doc->getPageRenderer()->loadExtJS();
$this->doc->getPageRenderer()->addJsFile('js/pagetreefiltermenu.js');
$this->doc->JScode .= $this->doc->wrapScriptTags(($this->currentSubScript ? 'top.currentSubScript=unescape("' . rawurlencode($this->currentSubScript) . '");' : '') . '
// setting prefs for pagetree and drag & drop
' . ($this->doHighlight ? 'Tree.highlightClass = "' . $hlClass . '";' : '') . '
// Function, loading the list frame from navigation tree:
function jumpTo(id, linkObj, highlightID, bank) { //
var theUrl = top.TS.PATH_typo3 + top.currentSubScript ;
if (theUrl.indexOf("?") != -1) {
theUrl += "&id=" + id
} else {
theUrl += "?id=" + id
}
top.fsMod.currentBank = bank;
if (top.TYPO3.configuration.condensedMode) {
top.content.location.href = theUrl;
} else {
parent.list_frame.location.href=theUrl;
}
' . ($this->doHighlight ? 'Tree.highlightActiveItem("web", highlightID + "_" + bank);' : '') . '
' . (!$GLOBALS['CLIENT']['FORMSTYLE'] ? '' : 'if (linkObj) linkObj.blur(); ') . '
return false;
}
' . ($this->cMR ? "jumpTo(top.fsMod.recentIds['web'],'');" : '') . ($this->hasFilterBox ? 'var TYPO3PageTreeFilter = new PageTreeFilter();' : '') . '
');
$this->doc->bodyTagId = 'typo3-pagetree';
}
示例5: initialize
/**
* Initializes the Module.
*
* @return void
*/
protected function initialize()
{
if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkvalidator']['checkLinks'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkvalidator']['checkLinks'] as $linkType => $classRef) {
$this->hookObjectsArr[$linkType] =& t3lib_div::getUserObj($classRef);
}
}
$this->doc = t3lib_div::makeInstance('template');
$this->doc->setModuleTemplate(t3lib_extMgm::extPath('linkvalidator') . 'modfuncreport/mod_template.html');
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->relativePath = t3lib_extMgm::extRelPath('linkvalidator');
$this->pageRecord = t3lib_BEfunc::readPageAccess($this->pObj->id, $this->perms_clause);
$this->isAccessibleForCurrentUser = FALSE;
if ($this->pObj->id && is_array($this->pageRecord) || !$this->pObj->id && $this->isCurrentUserAdmin()) {
$this->isAccessibleForCurrentUser = TRUE;
}
$this->loadHeaderData();
// Don't access in workspace
if ($GLOBALS['BE_USER']->workspace !== 0) {
$this->isAccessibleForCurrentUser = FALSE;
}
}
示例6: init
/**
* Initialization of the class
*
* @return void
*/
public function init()
{
// Setting GPvars:
$this->id = intval(t3lib_div::_GP('id'));
$this->edit = t3lib_div::_GP('edit');
$this->return_id = t3lib_div::_GP('return_id');
$this->lastEdited = t3lib_div::_GP('lastEdited');
// Module name;
$this->MCONF = $GLOBALS['MCONF'];
// Page select clause:
$this->perms_clause = $GLOBALS['BE_USER']->getPagePermsClause(1);
// Initializing document template object:
$this->doc = t3lib_div::makeInstance('template');
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->doc->setModuleTemplate('templates/perm.html');
$this->doc->form = '<form action="' . $GLOBALS['BACK_PATH'] . 'tce_db.php" method="post" name="editform">';
$this->doc->loadJavascriptLib('../t3lib/jsfunc.updateform.js');
$this->doc->getPageRenderer()->loadPrototype();
$this->doc->loadJavascriptLib(TYPO3_MOD_PATH . 'perm.js');
// Setting up the context sensitive menu:
$this->doc->getContextMenuCode();
// Set up menus:
$this->menuConfig();
}
示例7: initPage
/**
* initialization for the visual parts of the class
* Use template rendering only if this is a non-AJAX call
*
* @return void
*/
public function initPage()
{
global $BE_USER, $BACK_PATH, $CLIENT;
// Setting highlight mode:
$this->doHighlight = !$BE_USER->getTSConfigVal('options.pageTree.disableTitleHighlight');
// Create template object:
$this->doc = t3lib_div::makeInstance('template');
$this->doc->backPath = $BACK_PATH;
$this->doc->setModuleTemplate('templates/alt_file_navframe.html');
$this->doc->showFlashMessages = FALSE;
// Adding javascript code for AJAX (prototype), drag&drop and the filetree as well as the click menu code
$this->doc->getDragDropCode('folders');
$this->doc->getContextMenuCode();
// Setting JavaScript for menu.
$this->doc->JScode .= $this->doc->wrapScriptTags(($this->currentSubScript ? 'top.currentSubScript=unescape("' . rawurlencode($this->currentSubScript) . '");' : '') . '
function initFlashUploader(path) {
path = decodeURIComponent(path);
var flashUploadOptions = {
uploadURL: top.TS.PATH_typo3 + "ajax.php",
uploadFileSizeLimit: "' . t3lib_div::getMaxUploadFileSize() . '",
uploadFileTypes: {
allow: "' . $GLOBALS['TYPO3_CONF_VARS']['BE']['fileExtensions']['webspace']['allow'] . '",
deny: "' . $GLOBALS['TYPO3_CONF_VARS']['BE']['fileExtensions']['webspace']['deny'] . '"
},
uploadFilePostName: "upload_1",
uploadPostParams: {
"file[upload][1][target]": path,
"file[upload][1][data]": 1,
"file[upload][1][charset]": "utf-8",
"ajaxID": "TYPO3_tcefile::process"
}
};
// get the flashUploaderWindow instance from the parent frame
var flashUploader = top.TYPO3.FileUploadWindow.getInstance(flashUploadOptions);
// add an additional function inside the container to show the checkbox option
var infoComponent = new top.Ext.Panel({
autoEl: { tag: "div" },
height: "auto",
bodyBorder: false,
border: false,
hideBorders: true,
cls: "t3-upload-window-infopanel",
id: "t3-upload-window-infopanel-addition",
html: \'<label for="overrideExistingFilesCheckbox"><input id="overrideExistingFilesCheckbox" type="checkbox" onclick="setFlashPostOptionOverwriteExistingFiles(this);" />\' + top.String.format(top.TYPO3.LLL.fileUpload.infoComponentOverrideFiles) + \'</label>\'
});
flashUploader.add(infoComponent);
// do a reload of this frame once all uploads are done
flashUploader.on("totalcomplete", function() {
jumpTo (top.rawurlencode(path), "", "", "");
});
// this is the callback function that delivers the additional post parameter to the flash application
top.setFlashPostOptionOverwriteExistingFiles = function(checkbox) {
var uploader = top.TYPO3.getInstance("FileUploadWindow");
if (uploader.isVisible()) {
uploader.swf.addPostParam("overwriteExistingFiles", (checkbox.checked == true ? 1 : 0));
}
};
}
// setting prefs for foldertree
Tree.ajaxID = "SC_alt_file_navframe::expandCollapse";
// Function, loading the list frame from navigation tree:
function jumpTo(id, linkObj, highlightID, bank) {
var theUrl = top.TS.PATH_typo3 + top.currentSubScript ;
if (theUrl.indexOf("?") != -1) {
theUrl += "&id=" + id
} else {
theUrl += "?id=" + id
}
top.fsMod.currentBank = bank;
if (top.TYPO3.configuration.condensedMode) {
top.content.location.href = theUrl;
} else {
parent.list_frame.location.href=theUrl;
}
' . ($this->doHighlight ? 'Tree.highlightActiveItem("file", highlightID + "_" + bank);' : '') . '
' . (!$CLIENT['FORMSTYLE'] ? '' : 'if (linkObj) linkObj.blur(); ') . '
return false;
}
' . ($this->cMR ? " jumpTo(top.fsMod.recentIds['file'],'');" : ''));
}
示例8: main
/**
* Main function, starting the rendering of the list.
*
* @return void
*/
function main()
{
global $BE_USER, $LANG, $BACK_PATH, $CLIENT;
// Start document template object:
$this->doc = t3lib_div::makeInstance('template');
$this->doc->backPath = $BACK_PATH;
$this->doc->setModuleTemplate('templates/db_list.html');
// Loading current page record and checking access:
$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id, $this->perms_clause);
$access = is_array($this->pageinfo) ? 1 : 0;
// Initialize the dblist object:
$dblist = t3lib_div::makeInstance('localRecordList');
$dblist->backPath = $BACK_PATH;
$dblist->calcPerms = $BE_USER->calcPerms($this->pageinfo);
$dblist->thumbs = $BE_USER->uc['thumbnailsByDefault'];
$dblist->returnUrl = $this->returnUrl;
$dblist->allFields = $this->MOD_SETTINGS['bigControlPanel'] || $this->table ? 1 : 0;
$dblist->localizationView = $this->MOD_SETTINGS['localization'];
$dblist->showClipboard = 1;
$dblist->disableSingleTableView = $this->modTSconfig['properties']['disableSingleTableView'];
$dblist->listOnlyInSingleTableMode = $this->modTSconfig['properties']['listOnlyInSingleTableView'];
$dblist->hideTables = $this->modTSconfig['properties']['hideTables'];
$dblist->tableTSconfigOverTCA = $this->modTSconfig['properties']['table.'];
$dblist->clickTitleMode = $this->modTSconfig['properties']['clickTitleMode'];
$dblist->alternateBgColors = $this->modTSconfig['properties']['alternateBgColors'] ? 1 : 0;
$dblist->allowedNewTables = t3lib_div::trimExplode(',', $this->modTSconfig['properties']['allowedNewTables'], 1);
$dblist->deniedNewTables = t3lib_div::trimExplode(',', $this->modTSconfig['properties']['deniedNewTables'], 1);
$dblist->newWizards = $this->modTSconfig['properties']['newWizards'] ? 1 : 0;
$dblist->pageRow = $this->pageinfo;
$dblist->counter++;
$dblist->MOD_MENU = array('bigControlPanel' => '', 'clipBoard' => '', 'localization' => '');
$dblist->modTSconfig = $this->modTSconfig;
// Clipboard is initialized:
$dblist->clipObj = t3lib_div::makeInstance('t3lib_clipboard');
// Start clipboard
$dblist->clipObj->initializeClipboard();
// Initialize - reads the clipboard content from the user session
// Clipboard actions are handled:
$CB = t3lib_div::_GET('CB');
// CB is the clipboard command array
if ($this->cmd == 'setCB') {
// CBH is all the fields selected for the clipboard, CBC is the checkbox fields which were checked. By merging we get a full array of checked/unchecked elements
// This is set to the 'el' array of the CB after being parsed so only the table in question is registered.
$CB['el'] = $dblist->clipObj->cleanUpCBC(array_merge((array) t3lib_div::_POST('CBH'), (array) t3lib_div::_POST('CBC')), $this->cmd_table);
}
if (!$this->MOD_SETTINGS['clipBoard']) {
$CB['setP'] = 'normal';
}
// If the clipboard is NOT shown, set the pad to 'normal'.
$dblist->clipObj->setCmd($CB);
// Execute commands.
$dblist->clipObj->cleanCurrent();
// Clean up pad
$dblist->clipObj->endClipboard();
// Save the clipboard content
// This flag will prevent the clipboard panel in being shown.
// It is set, if the clickmenu-layer is active AND the extended view is not enabled.
$dblist->dontShowClipControlPanels = $CLIENT['FORMSTYLE'] && !$this->MOD_SETTINGS['bigControlPanel'] && $dblist->clipObj->current == 'normal' && !$BE_USER->uc['disableCMlayers'] && !$this->modTSconfig['properties']['showClipControlPanelsDespiteOfCMlayers'];
// If there is access to the page, then render the list contents and set up the document template object:
if ($access) {
// Deleting records...:
// Has not to do with the clipboard but is simply the delete action. The clipboard object is used to clean up the submitted entries to only the selected table.
if ($this->cmd == 'delete') {
$items = $dblist->clipObj->cleanUpCBC(t3lib_div::_POST('CBC'), $this->cmd_table, 1);
if (count($items)) {
$cmd = array();
foreach ($items as $iK => $value) {
$iKParts = explode('|', $iK);
$cmd[$iKParts[0]][$iKParts[1]]['delete'] = 1;
}
$tce = t3lib_div::makeInstance('t3lib_TCEmain');
$tce->stripslashes_values = 0;
$tce->start(array(), $cmd);
$tce->process_cmdmap();
if (isset($cmd['pages'])) {
t3lib_BEfunc::setUpdateSignal('updatePageTree');
}
$tce->printLogErrorMessages(t3lib_div::getIndpEnv('REQUEST_URI'));
}
}
// Initialize the listing object, dblist, for rendering the list:
$this->pointer = t3lib_div::intInRange($this->pointer, 0, 100000);
$dblist->start($this->id, $this->table, $this->pointer, $this->search_field, $this->search_levels, $this->showLimit);
$dblist->setDispFields();
// Render versioning selector:
if (t3lib_extMgm::isLoaded('version')) {
$dblist->HTMLcode .= $this->doc->getVersionSelector($this->id);
}
// Render the list of tables:
$dblist->generateList();
// Write the bottom of the page:
$dblist->writeBottom();
// Add JavaScript functions to the page:
$this->doc->JScode = $this->doc->wrapScriptTags('
function jumpToUrl(URL) { //
//.........這裏部分代碼省略.........
示例9: main
/**
* Main function, creating the listing
*
* @return void
*/
function main()
{
global $BE_USER, $LANG, $BACK_PATH, $TYPO3_CONF_VARS, $FILEMOUNTS;
// Initialize the template object
$this->doc = t3lib_div::makeInstance('template');
$this->doc->backPath = $BACK_PATH;
$this->doc->setModuleTemplate('templates/file_list.html');
$this->doc->getPageRenderer()->loadPrototype();
// Validating the input "id" (the path, directory!) and checking it against the mounts of the user.
$this->id = $this->basicFF->is_directory($this->id);
$access = $this->id && $this->basicFF->checkPathAgainstMounts($this->id . '/');
// There there was access to this file path, continue, make the list
if ($access) {
// include the initialization for the flash uploader
if ($GLOBALS['BE_USER']->uc['enableFlashUploader']) {
$this->doc->JScodeArray['flashUploader'] = '
if (top.TYPO3.FileUploadWindow.isFlashAvailable()) {
document.observe("dom:loaded", function() {
// monitor the button
$("button-upload").observe("click", initFlashUploader);
function initFlashUploader(event) {
// set the page specific options for the flashUploader
var flashUploadOptions = {
uploadURL: top.TS.PATH_typo3 + "ajax.php",
uploadFileSizeLimit: "' . t3lib_div::getMaxUploadFileSize() . '",
uploadFileTypes: {
allow: "' . $GLOBALS['TYPO3_CONF_VARS']['BE']['fileExtensions']['webspace']['allow'] . '",
deny: "' . $GLOBALS['TYPO3_CONF_VARS']['BE']['fileExtensions']['webspace']['deny'] . '"
},
uploadFilePostName: "upload_1",
uploadPostParams: {
"file[upload][1][target]": "' . $this->id . '",
"file[upload][1][data]": 1,
"file[upload][1][charset]": "utf-8",
"ajaxID": "TYPO3_tcefile::process"
}
};
// get the flashUploaderWindow instance from the parent frame
var flashUploader = top.TYPO3.FileUploadWindow.getInstance(flashUploadOptions);
// add an additional function inside the container to show the checkbox option
var infoComponent = new top.Ext.Panel({
autoEl: { tag: "div" },
height: "auto",
bodyBorder: false,
border: false,
hideBorders: true,
cls: "t3-upload-window-infopanel",
id: "t3-upload-window-infopanel-addition",
html: \'<label for="overrideExistingFilesCheckbox"><input id="overrideExistingFilesCheckbox" type="checkbox" onclick="setFlashPostOptionOverwriteExistingFiles(this);" />\' + top.String.format(top.TYPO3.LLL.fileUpload.infoComponentOverrideFiles) + \'</label>\'
});
flashUploader.add(infoComponent);
// do a reload of this frame once all uploads are done
flashUploader.on("totalcomplete", function() {
window.location.reload();
});
// this is the callback function that delivers the additional post parameter to the flash application
top.setFlashPostOptionOverwriteExistingFiles = function(checkbox) {
var uploader = top.TYPO3.getInstance("FileUploadWindow");
if (uploader.isVisible()) {
uploader.swf.addPostParam("overwriteExistingFiles", (checkbox.checked == true ? 1 : 0));
}
};
event.stop();
};
});
}
';
}
// Create filelisting object
$this->filelist = t3lib_div::makeInstance('fileList');
$this->filelist->backPath = $BACK_PATH;
// Apply predefined values for hidden checkboxes
// Set predefined value for DisplayBigControlPanel:
if ($GLOBALS['BE_USER']->getTSConfigVal('options.file_list.enableDisplayBigControlPanel') === 'activated') {
$this->MOD_SETTINGS['bigControlPanel'] = TRUE;
} elseif ($GLOBALS['BE_USER']->getTSConfigVal('options.file_list.enableDisplayBigControlPanel') === 'deactivated') {
$this->MOD_SETTINGS['bigControlPanel'] = FALSE;
}
// Set predefined value for DisplayThumbnails:
if ($GLOBALS['BE_USER']->getTSConfigVal('options.file_list.enableDisplayThumbnails') === 'activated') {
$this->MOD_SETTINGS['displayThumbs'] = TRUE;
} elseif ($GLOBALS['BE_USER']->getTSConfigVal('options.file_list.enableDisplayThumbnails') === 'deactivated') {
$this->MOD_SETTINGS['displayThumbs'] = FALSE;
}
// Set predefined value for Clipboard:
if ($GLOBALS['BE_USER']->getTSConfigVal('options.file_list.enableClipBoard') === 'activated') {
$this->MOD_SETTINGS['clipBoard'] = TRUE;
} elseif ($GLOBALS['BE_USER']->getTSConfigVal('options.file_list.enableClipBoard') === 'deactivated') {
$this->MOD_SETTINGS['clipBoard'] = FALSE;
}
//.........這裏部分代碼省略.........