コード例 #1
0
 /**
  * Die dazu das aktuelle item für eine Detailseite zu holen bzw dieses zurückzusetzen.
  * Dazu muss den Linker einfach folgendes für den action namen liefern: "show" + den eigentlichen key.
  * 
  * Dann brauch man in der Detailansicht noch einen Button nach folgendem Schema:
  * $markerArray['###NEWSEARCHBTN###'] = $formTool->createSubmit('showHowTo[clear]', '###LABEL_BUTTON_BACK###'); 
  * 
  * @param string $key
  * @param tx_rnbase_mod_IModule $module
  * 
  * @return tx_rnbase_model_base
  */
 public static function getCurrentItem($key, tx_rnbase_mod_IModule $module)
 {
     $itemid = 0;
     $data = t3lib_div::_GP('show' . $key);
     if ($data) {
         list($itemid, ) = each($data);
     }
     $dataKey = 'current' . $key;
     if ($itemid === 'clear') {
         $data = t3lib_BEfunc::getModuleData(array($dataKey => ''), array($dataKey => '0'), $module->getName());
         return false;
     }
     // Daten mit Modul abgleichen
     $changed = $itemid ? array($dataKey => $itemid) : array();
     $data = t3lib_BEfunc::getModuleData(array($dataKey => ''), $changed, $module->getName());
     $itemid = $data[$dataKey];
     if (!$itemid) {
         return false;
     }
     $modelData = explode('|', $itemid);
     $item = tx_rnbase::makeInstance($modelData[0], $modelData[1]);
     if (!$item->isValid()) {
         $item = null;
         //auf null setzen damit die Suche wieder angezeigt wird
     }
     return $item;
 }
コード例 #2
0
ファイル: index.php プロジェクト: NaveedWebdeveloper/Test
    /**
     * Main function of the module. Write the content to $this->content
     *
     * @return	void
     */
    public function main()
    {
        $this->thisScript = 'mod.php?M=' . $this->MCONF['name'];
        // Clean up settings:
        $this->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->MOD_MENU, t3lib_div::_GP('SET'), $this->MCONF['name']);
        // Draw the header
        $this->doc = t3lib_div::makeInstance('noDoc');
        $this->doc->backPath = $GLOBALS['BACK_PATH'];
        $this->doc->form = '<form action="" method="post">';
        // JavaScript
        $this->doc->JScode = $this->doc->wrapScriptTags('
				script_ended = 0;
				function jumpToUrl(URL)	{	//
					window.location.href = URL;
				}
			');
        // DBAL page title:
        $this->content .= $this->doc->startPage($GLOBALS['LANG']->getLL('title'));
        $this->content .= $this->doc->header($GLOBALS['LANG']->getLL('title'));
        $this->content .= $this->doc->spacer(5);
        $this->content .= $this->doc->section('', $this->doc->funcMenu('', t3lib_BEfunc::getFuncMenu(0, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function'])));
        // Debug log:
        switch ($this->MOD_SETTINGS['function']) {
            case 'info':
                $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('Cached_info'), $this->printCachedInfo());
                break;
            case 'sqlcheck':
                $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('SQL_check'), $this->printSqlCheck());
                break;
            case 0:
                $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('Debug_log'), $this->printLogMgm());
                break;
        }
        // ShortCut
        if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
            $this->content .= $this->doc->spacer(20) . $this->doc->section('', $this->doc->makeShortcutIcon('id', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']));
        }
        $this->content .= $this->doc->spacer(10);
    }
コード例 #3
0
    /**
     * [Describe function...]
     * 
     * @return	[type]		...
     */
    function main()
    {
        global $LANG, $TYPO3_CONF_VARS, $FILEMOUNTS;
        $menu = '
			<!-- Tab menu -->
			<div class="tabs">
				<ul>';
        $bgcolor = 'class=""';
        $bgcolorA = 'class="current"';
        if ($this->act == "image" || t3lib_div::_GP("cWidth")) {
            // If $this->act is specifically set to "image" or if cWidth is passed around...
            $menu .= '<td align=center nowrap="nowrap" width="25%"' . ($this->act == "image" ? $bgcolorA : $bgcolor) . '><a href="#" onclick="jumpToUrl(\'?act=image\');return false;"><strong>' . $LANG->getLL("currentImage") . '</strong></a></td>';
        }
        if (in_array("magic", $this->allowedItems)) {
            $menu .= '<li ' . ($this->act == "magic" ? $bgcolorA : $bgcolor) . ' title="' . str_replace('"', "'", $LANG->getLL("magicImage_msg")) . '"><span><a href="#" onclick="jumpToUrl(\'?act=magic\');return false;">' . $LANG->getLL("magicImage") . '</a></span></li>' . "\n";
        }
        if (in_array("plain", $this->allowedItems)) {
            $menu .= '<li ' . ($this->act == "plain" ? $bgcolorA : $bgcolor) . ' title="' . str_replace('"', "'", $LANG->getLL("plainImage_msg")) . '"><span><a href="#" onclick="jumpToUrl(\'?act=plain\');return false;">' . $LANG->getLL("plainImage") . '</a></span></li>' . "\n";
        }
        $menu .= '<li ' . ($this->act == "upload" ? $bgcolorA : $bgcolor) . ' title="' . str_replace('"', "'", $LANG->getLL("uploadImage_msg")) . '"><span><a href="#" onclick="jumpToUrl(\'?act=upload\');return false;">' . $LANG->getLL("uploadImage") . '</a></span></li>' . "\n";
        $menu .= '
				</ul>
			</div>';
        $this->content .= $menu;
        $this->content .= '<div class="panel_wrapper">';
        if ($this->act != "upload") {
            // Getting flag for showing/not showing thumbnails:
            $noThumbs = $GLOBALS["BE_USER"]->getTSConfigVal("options.noThumbsInRTEimageSelect");
            if (!$noThumbs) {
                // MENU-ITEMS, fetching the setting for thumbnails from File>List module:
                $_MOD_MENU = array('displayThumbs' => '');
                $_MCONF['name'] = 'file_list';
                $_MOD_SETTINGS = t3lib_BEfunc::getModuleData($_MOD_MENU, t3lib_div::_GP('SET'), $_MCONF['name']);
                $addParams = '&act=' . $this->act . '&expandFolder=' . rawurlencode($this->modData["expandFolder"]);
                $thumbNailCheck = '<fieldset><legend>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_file_list.php:displayThumbs', 1) . '</legend>' . t3lib_BEfunc::getFuncCheck('', 'SET[displayThumbs]', $_MOD_SETTINGS['displayThumbs'], 'rte_select_image.php', $addParams) . '</fieldset>';
            } else {
                $thumbNailCheck = '';
            }
            // File-folders:
            $foldertree = t3lib_div::makeInstance("localFolderTree");
            $tree = $foldertree->getBrowsableTree();
            list(, , $specUid) = explode("_", t3lib_div::_GP("PM"));
            $files = $this->expandFolder($foldertree->specUIDmap[$specUid], $this->act == "plain", $noThumbs ? $noThumbs : !$_MOD_SETTINGS['displayThumbs']);
            $files = '<fieldset><legend>' . $GLOBALS['LANG']->getLL('images') . '</legend><div style="overflow: hidden;"><table><tr><td>' . $files . '</td></tr></table></div></fieldset>';
            $this->content .= '<table border="0" cellpadding="0" cellspacing="0" style="width: 100%;">
			<tr>
				<td valign="top" style="width: 48%;"><fieldset><legend>' . $LANG->getLL("folderTree") . '</legend><div style="overflow: hidden;"><table><tr><td>' . $tree . '</td></tr></table></div></fieldset></td>
				<td valign="top" style="width: 1%;"><img src="clear.gif" width="5" alt="clear" /></td>
				<td valign="top" style="width: 48%;">' . $files . '</td>
			</tr>
			</table>' . $thumbNailCheck;
        } else {
            if ($this->act == "upload") {
                // ***************************
                // Upload
                // ***************************
                // File-folders:
                $foldertree = t3lib_div::makeInstance("localFolderTree");
                $tree = $foldertree->getBrowsableTree();
                $this->content .= '<table border="0" cellpadding="0" cellspacing="0" style="width: 100%;">
			<tr>
				<td valign="top" style="width: 100%;"><fieldset><legend>' . $LANG->getLL("folderTree") . '</legend><div style="overflow: hidden;"><table><tr><td>' . $tree . '</td></tr></table></div></fieldset></td>
			</tr>
			</table>';
                $fileProcessor = t3lib_div::makeInstance("t3lib_basicFileFunctions");
                $fileProcessor->init($FILEMOUNTS, $TYPO3_CONF_VARS["BE"]["fileExtensions"]);
                $path = t3lib_div::_GP("expandFolder");
                if (!$path || $path == "/" || !@is_dir($path)) {
                    $path = $fileProcessor->findTempFolder();
                    // The closest TEMP-path is found
                    if ($path) {
                        $path .= "/";
                    }
                }
                if ($path && @is_dir($path)) {
                    $this->content .= $this->uploadForm($path);
                }
            } else {
                $this->content .= '</div>
			<script language="javascript" type="text/javascript">
		document.write(printCurrentImageOptions());
		insertImagePropertiesInForm();
			</script>
			';
            }
        }
        $this->content .= '</div>';
    }
コード例 #4
0
 /**
  * [Describe function...]
  *
  * @return	[type]		...
  */
 function procesStoreControl()
 {
     $storeArray = $this->initStoreArray();
     $storeQueryConfigs = unserialize($GLOBALS['SOBE']->MOD_SETTINGS['storeQueryConfigs']);
     $storeControl = t3lib_div::_GP('storeControl');
     $storeIndex = intval($storeControl['STORE']);
     $saveStoreArray = 0;
     $writeArray = array();
     if (is_array($storeControl)) {
         $msg = '';
         if ($storeControl['LOAD']) {
             if ($storeIndex > 0) {
                 $writeArray = $this->loadStoreQueryConfigs($storeQueryConfigs, $storeIndex, $writeArray);
                 $saveStoreArray = 1;
                 $flashMessage = t3lib_div::makeInstance('t3lib_FlashMessage', sprintf($GLOBALS['LANG']->getLL('query_loaded'), htmlspecialchars($storeArray[$storeIndex])));
             } elseif ($storeIndex < 0 && t3lib_extMgm::isLoaded('sys_action')) {
                 $actionRecord = t3lib_BEfunc::getRecord('sys_action', abs($storeIndex));
                 if (is_array($actionRecord)) {
                     $dA = unserialize($actionRecord['t2_data']);
                     $dbSC = array();
                     if (is_array($dA['qC'])) {
                         $dbSC[0] = $dA['qC'];
                     }
                     $writeArray = $this->loadStoreQueryConfigs($dbSC, '0', $writeArray);
                     $saveStoreArray = 1;
                     $flashMessage = t3lib_div::makeInstance('t3lib_FlashMessage', sprintf($GLOBALS['LANG']->getLL('query_from_action_loaded'), htmlspecialchars($actionRecord['title'])));
                 }
             }
         } elseif ($storeControl['SAVE']) {
             if ($storeIndex < 0) {
                 $qOK = $this->saveQueryInAction(abs($storeIndex));
                 if ($qOK) {
                     $flashMessage = t3lib_div::makeInstance('t3lib_FlashMessage', $GLOBALS['LANG']->getLL('query_saved'));
                 } else {
                     $flashMessage = t3lib_div::makeInstance('t3lib_FlashMessage', $GLOBALS['LANG']->getLL('query_notsaved'), '', t3lib_FlashMessage::ERROR);
                 }
             } else {
                 if (trim($storeControl['title'])) {
                     if ($storeIndex > 0) {
                         $storeArray[$storeIndex] = $storeControl['title'];
                     } else {
                         $storeArray[] = $storeControl['title'];
                         end($storeArray);
                         $storeIndex = key($storeArray);
                     }
                     $storeQueryConfigs = $this->addToStoreQueryConfigs($storeQueryConfigs, $storeIndex);
                     $saveStoreArray = 1;
                     $flashMessage = t3lib_div::makeInstance('t3lib_FlashMessage', $GLOBALS['LANG']->getLL('query_saved'));
                 }
             }
         } elseif ($storeControl['REMOVE']) {
             if ($storeIndex > 0) {
                 $flashMessage = t3lib_div::makeInstance('t3lib_FlashMessage', sprintf($GLOBALS['LANG']->getLL('query_removed'), htmlspecialchars($storeArray[$storeControl['STORE']])));
                 unset($storeArray[$storeControl['STORE']]);
                 // Removing
                 $saveStoreArray = 1;
             }
         }
         if ($flashMessage) {
             $msg = $flashMessage->render();
         }
     }
     if ($saveStoreArray) {
         unset($storeArray[0]);
         // making sure, index 0 is not set!
         $writeArray['storeArray'] = serialize($storeArray);
         $writeArray['storeQueryConfigs'] = serialize($this->cleanStoreQueryConfigs($storeQueryConfigs, $storeArray));
         $GLOBALS['SOBE']->MOD_SETTINGS = t3lib_BEfunc::getModuleData($GLOBALS['SOBE']->MOD_MENU, $writeArray, $GLOBALS['SOBE']->MCONF['name'], 'ses');
     }
     return $msg;
 }
コード例 #5
0
 /**
  * Initialize function menu array
  *
  * @return	void
  */
 function menuConfig()
 {
     // MENU-ITEMS:
     $this->MOD_MENU = array('bigControlPanel' => '', 'clipBoard' => '', 'localization' => '');
     // Loading module configuration:
     $this->modTSconfig = t3lib_BEfunc::getModTSconfig($this->id, 'mod.' . $this->MCONF['name']);
     // Clean up settings:
     $this->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->MOD_MENU, t3lib_div::_GP('SET'), $this->MCONF['name']);
 }
コード例 #6
0
 /**
  * Return $MOD_SETTINGS array
  *
  * @param 	string	$key Returns $MOD_SETTINGS[$key] instead of $MOD_SETTINGS
  * @return	array $MOD_SETTINGS
  */
 function getModSettings($key = '')
 {
     static $MOD_SETTINGS = NULL;
     if ($MOD_SETTINGS == NULL) {
         $MOD_MENU = array('displayThumbs' => '', 'extendedInfo' => '', 'act' => '', 'mode' => '', 'bparams' => '');
         $MCONF['name'] = 'tx_dam_browse';
         $settings = t3lib_div::_GP('SET');
         // save params in session
         if ($this->act) {
             $settings['act'] = $this->act;
         }
         if ($this->mode) {
             $settings['mode'] = $this->mode;
         }
         if ($this->bparams) {
             $settings['bparams'] = $this->bparams;
         }
         $MOD_SETTINGS = t3lib_BEfunc::getModuleData($MOD_MENU, $settings, $MCONF['name']);
     }
     if ($key) {
         return $MOD_SETTINGS[$key];
     } else {
         return $MOD_SETTINGS;
     }
 }
コード例 #7
0
ファイル: file_list.php プロジェクト: NaveedWebdeveloper/Test
 /**
  * Setting the menu/session variables
  *
  * @return	void
  */
 function menuConfig()
 {
     // MENU-ITEMS:
     // If array, then it's a selector box menu
     // If empty string it's just a variable, that'll be saved.
     // Values NOT in this array will not be saved in the settings-array for the module.
     $this->MOD_MENU = array('sort' => '', 'reverse' => '', 'displayThumbs' => '', 'clipBoard' => '', 'bigControlPanel' => '');
     // CLEANSE SETTINGS
     $this->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->MOD_MENU, t3lib_div::_GP('SET'), $this->MCONF['name']);
 }
コード例 #8
0
 function main()
 {
     global $SOBE, $BE_USER, $LANG, $BACK_PATH, $TCA_DESCR, $TCA, $CLIENT, $TYPO3_CONF_VARS;
     global $tmpl, $tplRow, $theConstants;
     // **************************
     // Create extension template
     // **************************
     $this->pObj->createTemplate($this->pObj->id);
     // **************************
     // Checking for more than one template an if, set a menu...
     // **************************
     $manyTemplatesMenu = $this->pObj->templateMenu();
     $template_uid = 0;
     if ($manyTemplatesMenu) {
         $template_uid = $this->pObj->MOD_SETTINGS["templatesOnPage"];
     }
     // **************************
     // Main
     // **************************
     // BUGBUG: Should we check if the uset may at all read and write template-records???
     $existTemplate = $this->initialize_editor($this->pObj->id, $template_uid);
     // initialize
     if ($existTemplate) {
         $saveId = $tplRow['_ORIG_uid'] ? $tplRow['_ORIG_uid'] : $tplRow['uid'];
         // Update template ?
         if (t3lib_div::_POST('submit') || t3lib_div::testInt(t3lib_div::_POST('submit_x')) && t3lib_div::testInt(t3lib_div::_POST('submit_y'))) {
             $tmpl->changed = 0;
             $tmpl->ext_procesInput(t3lib_div::_POST(), $_FILES, $theConstants, $tplRow);
             //		debug($tmpl->changed);
             //		debug($tmpl->raw);
             //		$tmpl->changed=0;
             if ($tmpl->changed) {
                 // Set the data to be saved
                 $recData = array();
                 $recData["sys_template"][$saveId]["constants"] = implode($tmpl->raw, LF);
                 // Create new  tce-object
                 $tce = t3lib_div::makeInstance("t3lib_TCEmain");
                 $tce->stripslashes_values = 0;
                 // Initialize
                 $tce->start($recData, array());
                 // Saved the stuff
                 $tce->process_datamap();
                 // Clear the cache (note: currently only admin-users can clear the cache in tce_main.php)
                 $tce->clear_cacheCmd("all");
                 // re-read the template ...
                 $this->initialize_editor($this->pObj->id, $template_uid);
             }
         }
         // Output edit form
         $tmpl->ext_readDirResources($TYPO3_CONF_VARS["MODS"]["web_ts"]["onlineResourceDir"]);
         $tmpl->ext_resourceDims();
         // Resetting the menu (start). I wonder if this in any way is a violation of the menu-system. Haven't checked. But need to do it here, because the menu is dependent on the categories available.
         $this->pObj->MOD_MENU["constant_editor_cat"] = $tmpl->ext_getCategoryLabelArray();
         $this->pObj->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->pObj->MOD_MENU, t3lib_div::_GP("SET"), $this->pObj->MCONF["name"]);
         // Resetting the menu (stop)
         $theOutput .= $this->pObj->doc->spacer(5);
         $theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('editConstants', true), t3lib_iconWorks::getSpriteIconForRecord('sys_template', $tplRow) . '<strong>' . $this->pObj->linkWrapTemplateTitle($tplRow["title"], "constants") . '</strong>' . htmlspecialchars(trim($tplRow["sitetitle"]) ? ' - (' . $tplRow["sitetitle"] . ')' : ''), 0, 1);
         if ($manyTemplatesMenu) {
             $theOutput .= $this->pObj->doc->section("", $manyTemplatesMenu);
             $theOutput .= $this->pObj->doc->divider(5);
         }
         $theOutput .= $this->pObj->doc->spacer(5);
         if (count($this->pObj->MOD_MENU["constant_editor_cat"])) {
             $menu = $GLOBALS['LANG']->getLL('category', true) . " " . t3lib_BEfunc::getFuncMenu($this->pObj->id, "SET[constant_editor_cat]", $this->pObj->MOD_SETTINGS["constant_editor_cat"], $this->pObj->MOD_MENU["constant_editor_cat"]);
             $theOutput .= $this->pObj->doc->section("", '<NOBR>' . $menu . '</NOBR>');
         } else {
             $theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('noConstants', true), $GLOBALS['LANG']->getLL('noConstantsDescription', true), 1, 0, 1);
         }
         // Category and constant editor config:
         $category = $this->pObj->MOD_SETTINGS["constant_editor_cat"];
         /*	$TSCE_tmpl = t3lib_div::makeInstance("t3lib_tsparser_ext");	// Defined global here!
         			$TSCE_tmpl->tt_track = 0;	// Do not log time-performance information
         			$TSCE_tmpl->init();
         			$TSCE_tmpl->constants=array($tplRow["constants"]);
         			debug($tplRow);
         			$TSCE_tmpl->generateConfig_constants();
         			debug($TSCE_tmpl->setup);
         			*/
         $tmpl->ext_getTSCE_config($category);
         # NOT WORKING:
         if ($BE_USER_modOptions["properties"]["constantEditor."]["example"] == "top") {
             $theOutput = $this->displayExample($theOutput);
         }
         $printFields = trim($tmpl->ext_printFields($theConstants, $category));
         if ($printFields) {
             $theOutput .= $this->pObj->doc->spacer(20);
             $theOutput .= $this->pObj->doc->section("", $printFields);
         }
         if ($BE_USER_modOptions["properties"]["constantEditor."]["example"] != "top") {
             $theOutput = $this->displayExample($theOutput);
         }
     } else {
         $theOutput .= $this->pObj->noTemplate(1);
     }
     return $theOutput;
 }
コード例 #9
0
    /**
     * TYPO3 Element Browser: Showing a folder tree, allowing you to browse for files.
     *
     * @return	string		HTML content for the module
     */
    function main_file()
    {
        global $BE_USER;
        // Starting content:
        $content .= $this->doc->startPage('TBE file selector');
        // Init variable:
        $pArr = explode('|', $this->bparams);
        // Create upload/create folder forms, if a path is given:
        $path = $this->expandFolder;
        if (!$path || !@is_dir($path)) {
            // The closest TEMP-path is found
            $path = $this->fileProcessor->findTempFolder() . '/';
        }
        if ($path != '/' && @is_dir($path)) {
            $uploadForm = $this->uploadForm($path);
            $createFolder = $this->createFolder($path);
        } else {
            $createFolder = '';
            $uploadForm = '';
        }
        if ($BE_USER->getTSConfigVal('options.uploadFieldsInTopOfEB')) {
            $content .= $uploadForm;
        }
        // Getting flag for showing/not showing thumbnails:
        $noThumbs = $GLOBALS['BE_USER']->getTSConfigVal('options.noThumbsInEB');
        if (!$noThumbs) {
            // MENU-ITEMS, fetching the setting for thumbnails from File>List module:
            $_MOD_MENU = array('displayThumbs' => '');
            $_MCONF['name'] = 'file_list';
            $_MOD_SETTINGS = t3lib_BEfunc::getModuleData($_MOD_MENU, t3lib_div::_GP('SET'), $_MCONF['name']);
            $addParams = '&act=' . $this->act . '&mode=' . $this->mode . '&expandFolder=' . rawurlencode($path) . '&bparams=' . rawurlencode($this->bparams);
            $thumbNailCheck = t3lib_BEfunc::getFuncCheck('', 'SET[displayThumbs]', $_MOD_SETTINGS['displayThumbs'], $this->thisScript, $addParams, 'id="checkDisplayThumbs"') . ' <label for="checkDisplayThumbs">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_file_list.php:displayThumbs', 1) . '</label>';
        } else {
            $thumbNailCheck = '';
        }
        $noThumbs = $noThumbs ? $noThumbs : !$_MOD_SETTINGS['displayThumbs'];
        // Create folder tree:
        $foldertree = t3lib_div::makeInstance('TBE_FolderTree');
        $foldertree->thisScript = $this->thisScript;
        $foldertree->ext_noTempRecyclerDirs = $this->mode == 'filedrag';
        $tree = $foldertree->getBrowsableTree();
        list(, , $specUid) = explode('_', $this->PM);
        if ($this->mode == 'filedrag') {
            $files = $this->TBE_dragNDrop($foldertree->specUIDmap[$specUid], $pArr[3]);
        } else {
            $files = $this->TBE_expandFolder($foldertree->specUIDmap[$specUid], $pArr[3], $noThumbs);
        }
        // Putting the parts together, side by side:
        $content .= '

			<!--
				Wrapper table for folder tree / file list:
			-->
			<table border="0" cellpadding="0" cellspacing="0" id="typo3-EBfiles">
				<tr>
					<td class="c-wCell" valign="top">' . $this->barheader($GLOBALS['LANG']->getLL('folderTree') . ':') . $tree . '</td>
					<td class="c-wCell" valign="top">' . $files . '</td>
				</tr>
			</table>
			';
        $content .= $thumbNailCheck;
        // Adding create folder + upload forms if applicable:
        if (!$BE_USER->getTSConfigVal('options.uploadFieldsInTopOfEB')) {
            $content .= $uploadForm;
        }
        if ($BE_USER->isAdmin() || $BE_USER->getTSConfigVal('options.createFoldersInEB')) {
            $content .= $createFolder;
        }
        // Add some space
        $content .= '<br /><br />';
        // Setup indexed elements:
        $this->doc->JScode .= $this->doc->wrapScriptTags('BrowseLinks.addElements(' . json_encode($this->elements) . ');');
        // Ending page, returning content:
        $content .= $this->doc->endPage();
        $content = $this->doc->insertStylesAndJS($content);
        return $content;
    }
 /**
  * Process saving request like in class.tstemplateinfo.php (TCE processing)
  *
  * @return boolean true if successful
  */
 public function save($parameters, $pObj)
 {
     $savingsuccess = false;
     if ($parameters['type'] == $this->ajaxSaveType) {
         $pageId = t3lib_div::_GP('pageId');
         if (!is_numeric($pageId) || $pageId < 1) {
             return false;
         }
         // if given use the requested template_uid
         // if not, use the first template-record on the page (in this case there should only be one record!)
         $set = t3lib_div::_GP('SET');
         $template_uid = $set['templatesOnPage'] ? $set['templatesOnPage'] : 0;
         $tmpl = t3lib_div::makeInstance('t3lib_tsparser_ext');
         // Defined global here!
         $tmpl->tt_track = 0;
         // Do not log time-performance information
         $tmpl->init();
         // Get the row of the first VISIBLE template of the page. whereclause like the frontend.
         $tplRow = $tmpl->ext_getFirstTemplate($pageId, $template_uid);
         $existTemplate = is_array($tplRow) ? true : false;
         if ($existTemplate) {
             $saveId = $tplRow['_ORIG_uid'] ? $tplRow['_ORIG_uid'] : $tplRow['uid'];
             // Update template ?
             $POST = t3lib_div::_POST();
             if ($POST['submit']) {
                 require_once PATH_t3lib . 'class.t3lib_tcemain.php';
                 // Set the data to be saved
                 $recData = array();
                 if (is_array($POST['data'])) {
                     foreach ($POST['data'] as $field => $val) {
                         switch ($field) {
                             case 'constants':
                             case 'config':
                             case 'title':
                             case 'sitetitle':
                             case 'description':
                                 $recData['sys_template'][$saveId][$field] = $val;
                                 break;
                         }
                     }
                 }
                 if (count($recData)) {
                     // process template row before saving
                     require_once t3lib_extMgm::extPath('tstemplate_info') . 'class.tx_tstemplateinfo.php';
                     $tstemplateinfo = t3lib_div::makeInstance('tx_tstemplateinfo');
                     /* @var $tstemplateinfo tx_tstemplateinfo */
                     // load the MOD_SETTINGS in order to check if the includeTypoScriptFileContent is set
                     $tstemplateinfo->pObj->MOD_SETTINGS = t3lib_BEfunc::getModuleData(array('includeTypoScriptFileContent' => true), array(), 'web_ts');
                     $recData['sys_template'][$saveId] = $tstemplateinfo->processTemplateRowBeforeSaving($recData['sys_template'][$saveId]);
                     // Create new tce-object
                     $tce = t3lib_div::makeInstance('t3lib_TCEmain');
                     $tce->stripslashes_values = 0;
                     // Initialize
                     $tce->start($recData, array());
                     // Saved the stuff
                     $tce->process_datamap();
                     // Clear the cache (note: currently only admin-users can clear the
                     // cache in tce_main.php)
                     $tce->clear_cacheCmd('all');
                     $savingsuccess = true;
                 }
             }
         }
     }
     return $savingsuccess;
 }
コード例 #11
0
 /**
  *
  * @param tx_rnbase_mod_IModule $mod
  */
 public function getCurrentUid(tx_rnbase_mod_IModule $mod)
 {
     $modSettings = array($this->identifier => '0');
     $params = t3lib_div::_GP('showDetails');
     $params = is_array($params) ? $params : array();
     list($model, $uid) = each($params);
     if (is_array($uid)) {
         list($uid, ) = each($uid);
     }
     if (!empty($uid) && $uid === 'clear') {
         t3lib_BEfunc::getModuleData($modSettings, $modSettings, $mod->getName());
         return 0;
     }
     // else
     $uid = intval($uid);
     $data = t3lib_BEfunc::getModuleData($modSettings, $uid ? array($this->identifier => $uid) : array(), $mod->getName());
     return intval($data[$this->identifier]);
 }
コード例 #12
0
ファイル: index.php プロジェクト: ghanshyamgohel/tt_news
 /**
  * Adds items to the ->MOD_MENU array. Used for the function menu selector.
  *
  * @return	void
  */
 function menuConfig()
 {
     $this->MOD_MENU = array('function' => array('1' => $GLOBALS['LANG']->getLL('function1')), 'showEditIcons' => 0, 'expandAll' => 0, 'showOnlyEditable' => 0, 'showHiddenCategories' => 0, 'searchLevels' => array(-1 => $GLOBALS['LANG']->getLL('allPages'), 0 => $GLOBALS['LANG']->getLL('thisPage'), 1 => $GLOBALS['LANG']->getLL('oneLevel'), 2 => $GLOBALS['LANG']->getLL('twoLevels'), 3 => $GLOBALS['LANG']->getLL('threeLevels'), 4 => $GLOBALS['LANG']->getLL('fourLevels')), 'showThumbs' => 1, 'showLimit' => 0, 'language' => array(0 => $GLOBALS['LANG']->getLL('defaultLangLabel')));
     $this->initLanguageMenu();
     $this->MOD_MENU['function'] = $this->mergeExternalItems($this->MCONF['name'], 'function', $this->MOD_MENU['function']);
     $this->MOD_MENU['function'] = t3lib_BEfunc::unsetMenuItems($this->modTSconfig['properties'], $this->MOD_MENU['function'], 'menu.function');
     $this->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->MOD_MENU, t3lib_div::_GP('SET'), $this->MCONF['name'], $this->modMenu_type, $this->modMenu_dontValidateList, $this->modMenu_setDefaultList);
 }
コード例 #13
0
 /**
  * Menu configuration
  *
  * @return	void
  */
 function menuConfig()
 {
     global $BE_USER, $LANG, $BACK_PATH, $TCA_DESCR, $TCA, $CLIENT, $TYPO3_CONF_VARS, $TYPO3_DB;
     // MENU-ITEMS:
     // If array, then it's a selector box menu
     // If empty string it's just a variable, that'll be saved.
     // Values NOT in this array will not be saved in the settings-array for the module.
     $this->MOD_MENU = array('users' => array(0 => $GLOBALS['LANG']->getLL('any'), '-1' => $GLOBALS['LANG']->getLL('self')), 'workspaces' => array('-99' => $GLOBALS['LANG']->getLL('any'), 0 => $GLOBALS['LANG']->getLL('live'), '-1' => $GLOBALS['LANG']->getLL('draft')), 'time' => array(0 => $GLOBALS['LANG']->getLL('thisWeek'), 1 => $GLOBALS['LANG']->getLL('lastWeek'), 2 => $GLOBALS['LANG']->getLL('last7Days'), 10 => $GLOBALS['LANG']->getLL('thisMonth'), 11 => $GLOBALS['LANG']->getLL('lastMonth'), 12 => $GLOBALS['LANG']->getLL('last31Days'), 20 => $GLOBALS['LANG']->getLL('noLimit'), 30 => $GLOBALS['LANG']->getLL('userdefined')), 'max' => array(20 => $GLOBALS['LANG']->getLL('20'), 50 => $GLOBALS['LANG']->getLL('50'), 100 => $GLOBALS['LANG']->getLL('100'), 200 => $GLOBALS['LANG']->getLL('200'), 500 => $GLOBALS['LANG']->getLL('500'), 1000 => $GLOBALS['LANG']->getLL('1000'), 1000000 => $GLOBALS['LANG']->getLL('any')), 'action' => array(0 => $GLOBALS['LANG']->getLL('any'), 1 => $GLOBALS['LANG']->getLL('actionDatabase'), 2 => $GLOBALS['LANG']->getLL('actionFile'), 254 => $GLOBALS['LANG']->getLL('actionSettings'), 255 => $GLOBALS['LANG']->getLL('actionLogin'), '-1' => $GLOBALS['LANG']->getLL('actionErrors')), 'manualdate' => '', 'manualdate_end' => '', 'groupByPage' => '');
     // Add custom workspaces (selecting all, filtering by BE_USER check):
     $workspaces = $TYPO3_DB->exec_SELECTgetRows('uid,title', 'sys_workspace', 'pid=0' . t3lib_BEfunc::deleteClause('sys_workspace'), '', 'title');
     if (count($workspaces)) {
         foreach ($workspaces as $rec) {
             $this->MOD_MENU['workspaces'][$rec['uid']] = $rec['uid'] . ': ' . $rec['title'];
         }
     }
     // Adding groups to the users_array
     $groups = t3lib_BEfunc::getGroupNames();
     if (is_array($groups)) {
         foreach ($groups as $grVals) {
             $this->MOD_MENU['users']['gr-' . $grVals['uid']] = $GLOBALS['LANG']->getLL('group') . ' ' . $grVals['title'];
         }
     }
     $users = t3lib_BEfunc::getUserNames();
     if (is_array($users)) {
         foreach ($users as $grVals) {
             $this->MOD_MENU['users']['us-' . $grVals['uid']] = $GLOBALS['LANG']->getLL('user') . ' ' . $grVals['username'];
         }
     }
     // CLEANSE SETTINGS
     $this->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->MOD_MENU, t3lib_div::_GP('SET'), $this->MCONF['name']);
     // manual dates
     if ($this->MOD_SETTINGS['time'] == 30) {
         if (!trim($this->MOD_SETTINGS['manualdate'])) {
             $this->theTime = $this->MOD_SETTINGS['manualdate'] = 0;
         } else {
             $this->theTime = $this->parseDate($this->MOD_SETTINGS['manualdate']);
             if (!$this->theTime) {
                 $this->MOD_SETTINGS['manualdate'] = '';
             } else {
                 $this->MOD_SETTINGS['manualdate'] = date($this->dateFormat, $this->theTime);
             }
         }
         if (!trim($this->MOD_SETTINGS['manualdate_end'])) {
             $this->theTime_end = $this->MOD_SETTINGS['manualdate_end'] = 0;
         } else {
             $this->theTime_end = $this->parseDate($this->MOD_SETTINGS['manualdate_end']);
             if (!$this->theTime_end) {
                 $this->MOD_SETTINGS['manualdate_end'] = '';
             } else {
                 $this->MOD_SETTINGS['manualdate_end'] = date($this->dateFormat, $this->theTime_end);
             }
         }
     }
 }
コード例 #14
0
 /**
  * Creates an instance of the class found in $this->extClassConf['name'] in $this->extObj if any (this should hold three keys, "name", "path" and "title" if a "Function menu module" tries to connect...)
  * This value in extClassConf might be set by an extension (in a ext_tables/ext_localconf file) which thus "connects" to a module.
  * The array $this->extClassConf is set in handleExternalFunctionValue() based on the value of MOD_SETTINGS[function]
  * (Should be) called from global scope right after inclusion of files from the ->include_once array.
  * If an instance is created it is initiated with $this passed as value and $this->extClassConf as second argument. Further the $this->MOD_SETTING is cleaned up again after calling the init function.
  *
  * @return	void
  * @see handleExternalFunctionValue(), t3lib_extMgm::insertModuleFunction(), $extObj
  */
 function checkExtObj()
 {
     if (is_array($this->extClassConf) && $this->extClassConf['name']) {
         $this->extObj = t3lib_div::makeInstance($this->extClassConf['name']);
         $this->extObj->init($this, $this->extClassConf);
         // Re-write:
         $this->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->MOD_MENU, t3lib_div::_GP('SET'), $this->MCONF['name'], $this->modMenu_type, $this->modMenu_dontValidateList, $this->modMenu_setDefaultList);
     }
 }
コード例 #15
0
ファイル: index.php プロジェクト: NaveedWebdeveloper/Test
 /**
  * Initialization of the module menu configuration
  *
  * @return	void
  */
 function menuConfig()
 {
     // MENU-ITEMS:
     // If array, then it's a selector box menu
     // If empty string it's just a variable, that'll be saved.
     // Values NOT in this array will not be saved in the settings-array for the module.
     $this->MOD_MENU = array('function' => array('compare' => $GLOBALS['LANG']->getLL('compareUserSettings', true), 'whoisonline' => $GLOBALS['LANG']->getLL('listUsersOnline', true)));
     // CLEAN SETTINGS
     $this->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->MOD_MENU, t3lib_div::_GP('SET'), $this->MCONF['name'], 'ses');
 }
コード例 #16
0
 /**
  * Write the current storage array and update MOD_SETTINGS
  *
  * @param	array		Array of settings which should be overwrite current MOD_SETTINGS
  * @param	string		Name of the module to store the settings for. Default: $GLOBALS['SOBE']->MCONF['name'] (current module)
  * @return	void
  */
 function writeStoredSetting($writeArray = array(), $mconfName = '')
 {
     global $SOBE;
     // for debugging: just removes all module data from user settings
     # $GLOBALS['BE_USER']->pushModuleData($SOBE->MCONF['name'],array());
     unset($this->storedSettings[0]);
     // making sure, index 0 is not set!
     $this->storedSettings = $this->cleanupStorageArray($this->storedSettings);
     $writeArray[$this->prefix . '_storedSettings'] = serialize($this->storedSettings);
     $SOBE->MOD_SETTINGS = t3lib_BEfunc::getModuleData($SOBE->MOD_MENU, $writeArray, $mconfName ? $mconfName : $SOBE->MCONF['name'], $this->type);
     if ($this->writeDevLog) {
         t3lib_div::devLog('Settings stored:' . $this->msg, 't3lib_modSettings', 0);
     }
 }
コード例 #17
0
ファイル: alt_doc.php プロジェクト: NaveedWebdeveloper/Test
    /**
     * Initialize the normal module operation
     *
     * @return	void
     */
    function init()
    {
        global $BE_USER, $LANG, $BACK_PATH;
        // Setting more GPvars:
        $this->popViewId = t3lib_div::_GP('popViewId');
        $this->popViewId_addParams = t3lib_div::_GP('popViewId_addParams');
        $this->viewUrl = t3lib_div::_GP('viewUrl');
        $this->editRegularContentFromId = t3lib_div::_GP('editRegularContentFromId');
        $this->recTitle = t3lib_div::_GP('recTitle');
        $this->disHelp = t3lib_div::_GP('disHelp');
        $this->noView = t3lib_div::_GP('noView');
        $this->perms_clause = $BE_USER->getPagePermsClause(1);
        // Set other internal variables:
        $this->R_URL_getvars['returnUrl'] = $this->retUrl;
        $this->R_URI = $this->R_URL_parts['path'] . '?' . t3lib_div::implodeArrayForUrl('', $this->R_URL_getvars);
        // MENU-ITEMS:
        // If array, then it's a selector box menu
        // If empty string it's just a variable, that'll be saved.
        // Values NOT in this array will not be saved in the settings-array for the module.
        $this->MOD_MENU = array('showPalettes' => '');
        // Setting virtual document name
        $this->MCONF['name'] = 'xMOD_alt_doc.php';
        // CLEANSE SETTINGS
        $this->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->MOD_MENU, t3lib_div::_GP('SET'), $this->MCONF['name']);
        // Create an instance of the document template object
        $this->doc = $GLOBALS['TBE_TEMPLATE'];
        $this->doc->backPath = $BACK_PATH;
        $this->doc->setModuleTemplate('templates/alt_doc.html');
        $this->doc->form = '<form action="' . htmlspecialchars($this->R_URI) . '" method="post" enctype="' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['form_enctype'] . '" name="editform" onsubmit="document.editform._scrollPosition.value=(document.documentElement.scrollTop || document.body.scrollTop); return TBE_EDITOR.checkSubmit(1);">';
        $this->doc->getPageRenderer()->loadPrototype();
        $this->doc->JScode = $this->doc->wrapScriptTags('
			function jumpToUrl(URL,formEl)	{	//
				if (!TBE_EDITOR.isFormChanged())	{
					window.location.href = URL;
				} else if (formEl && formEl.type=="checkbox") {
					formEl.checked = formEl.checked ? 0 : 1;
				}
			}
				// Object: TS:
				// passwordDummy and decimalSign are used by tbe_editor.js and have to be declared here as
				// TS object overwrites the object declared in tbe_editor.js
			function typoSetup	()	{	//
				this.uniqueID = "";
				this.passwordDummy = "********";
				this.decimalSign = ".";
			}
			var TS = new typoSetup();

				// Info view:
			function launchView(table,uid,bP)	{	//
				var backPath= bP ? bP : "";
				var thePreviewWindow="";
				thePreviewWindow = window.open(backPath+"show_item.php?table="+encodeURIComponent(table)+"&uid="+encodeURIComponent(uid),"ShowItem"+TS.uniqueID,"height=300,width=410,status=0,menubar=0,resizable=0,location=0,directories=0,scrollbars=1,toolbar=0");
				if (thePreviewWindow && thePreviewWindow.focus)	{
					thePreviewWindow.focus();
				}
			}
			function deleteRecord(table,id,url)	{	//
				if (
					' . ($GLOBALS['BE_USER']->jsConfirmation(4) ? 'confirm(' . $LANG->JScharCode($LANG->getLL('deleteWarning')) . ')' : '1==1') . '
				)	{
					window.location.href = "tce_db.php?cmd["+table+"]["+id+"][delete]=1' . t3lib_BEfunc::getUrlToken('tceAction') . '&redirect="+escape(url)+"&vC=' . $BE_USER->veriCode() . '&prErr=1&uPT=1";
				}
				return false;
			}
		' . (isset($_POST['_savedokview_x']) && $this->popViewId ? 'if (window.opener) { ' . t3lib_BEfunc::viewOnClick($this->popViewId, '', t3lib_BEfunc::BEgetRootLine($this->popViewId), '', $this->viewUrl, $this->popViewId_addParams, FALSE) . ' } else { ' . t3lib_BEfunc::viewOnClick($this->popViewId, '', t3lib_BEfunc::BEgetRootLine($this->popViewId), '', $this->viewUrl, $this->popViewId_addParams) . ' } ' : ''));
        // Setting up the context sensitive menu:
        $this->doc->getContextMenuCode();
        $this->doc->bodyTagAdditions = 'onload="window.scrollTo(0,' . t3lib_div::intInRange(t3lib_div::_GP('_scrollPosition'), 0, 10000) . ');"';
    }
 protected function getSolrConnectionMenu(array $solrConnections)
 {
     $connectionMenuItems = array();
     foreach ($solrConnections as $key => $solrConnection) {
         $connectionMenuItems[$key] = $solrConnection['solrHost'] . ':' . $solrConnection['solrPort'] . $solrConnection['solrPath'];
     }
     $this->reportsModule->MOD_MENU = array_merge($this->reportsModule->MOD_MENU, array('tx_solr_connection' => $connectionMenuItems));
     // updating module settings after modifying MOD_MENU
     $this->reportsModule->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->reportsModule->MOD_MENU, t3lib_div::_GP('SET'), $this->reportsModule->MCONF['name'], $this->reportsModule->modMenu_type, $this->reportsModule->modMenu_dontValidateList, $this->reportsModule->modMenu_setDefaultList);
     $connectionMenu = 'Solr Server: ' . t3lib_BEfunc::getFuncMenu(0, 'SET[tx_solr_connection]', $this->reportsModule->MOD_SETTINGS['tx_solr_connection'], $this->reportsModule->MOD_MENU['tx_solr_connection']);
     return $connectionMenu;
 }
コード例 #19
0
 /**
  * Checks if $this->path is a path under one of the filemounts
  *
  * @param string $path If set this path will be set as current
  * @return	void
  * @see init()
  * @todo check path access in modules or set path to a valid path?
  */
 function checkOrSetPath($path = '')
 {
     global $FILEMOUNTS;
     if ($path) {
         $this->path = $path;
     }
     if (!$this->path) {
         reset($FILEMOUNTS);
         $fmount = current($FILEMOUNTS);
         $path = $fmount['path'];
     } else {
         $path = tx_dam::path_makeAbsolute($this->path);
     }
     $pathInfo = tx_dam::path_compileInfo($path);
     if ($this->checkPathAccess($pathInfo)) {
         $this->path = $pathInfo['dir_path_relative'];
         $this->pathInfo = $pathInfo;
         $this->pathAccess = true;
     } else {
         $this->path = $path;
         $this->pathInfo = $pathInfo;
         $this->pathAccess = false;
     }
     $this->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->MOD_MENU, array('tx_dam_folder' => $this->path), $this->MCONF['name'], 'ses');
     if (tx_dam::config_getValue('setup.devel')) {
         $this->debugContent['pathInfo'] = '<h4>pathInfo</h4>' . t3lib_div::view_array($this->pathInfo);
     }
 }
 public function testGetResultListReturnsCorrectTableAndPagerIfSortLinkIsClickedAndSetsSortOptionToModuleData()
 {
     $_GET['sortField'] = 'uid';
     $_GET['sortRev'] = 'asc';
     //damit currenShowHidden gesetzt wird
     $this->oSearcher->getSearchForm();
     $aResultList = $this->oSearcher->getResultList();
     //Daten im Modul korrekt?
     $aModuleData = t3lib_BEfunc::getModuleData(array(), t3lib_div::_GP('SET'), $this->oMod->getName());
     $this->assertEquals(array('uid' => 'asc'), $aModuleData['dummySearcherorderby'], 'OrderBy in Moduldaten nicht korrekt gesetzt.');
     $result = $aResultList['table'];
     $this->assertRegExp('/^<table border="0"/', $result, 'Table Tag fehlt.');
     $this->assertRegExp('/<\\/table>$/', $result, 'Schließendes Table Tag fehlt.');
     // TODO: Die Reihenfolge der Zeilen müsste noch getestet werden.
     for ($i = 1; $i < 6; $i++) {
         $this->assertRegExp('/">' . $i . '<\\/span>/', $result, 'Wert ' . $i . ' fehlt in Tabelle');
     }
     $this->assertEquals(5, $aResultList['totalsize'], 'Die Anzahl ist falsch.');
     //unberührt?
     $this->assertContains('<div class="pager">', $aResultList['pager'], 'Der Pager ist falsch.');
     $this->assertContains('<select name="SET[dummySearcherPagerdata_limit]" onchange="jumpToUrl(', $aResultList['pager'], 'Der Pager ist falsch.');
     $this->assertContains('<option value="10" selected="selected">10 Einträge</option>', $aResultList['pager'], 'Der Pager ist falsch.');
     $this->assertContains('<option value="100">100 Einträge</option>', $aResultList['pager'], 'Der Pager ist falsch.');
     $this->assertContains('</select>', $aResultList['pager'], 'Der Pager ist falsch.');
     $this->assertContains('<select name="SET[dummySearcherPagerdata_offset]"', $aResultList['pager'], 'Der Pager ist falsch.');
     $this->assertContains('<option value="0" selected="selected">Seite 0</option>', $aResultList['pager'], 'Der Pager ist falsch.');
     $this->assertContains('</div>', $aResultList['pager'], 'Der Pager ist falsch.');
 }
コード例 #21
0
ファイル: index.php プロジェクト: rod86/t3sandbox
 /**
  * Preparing menu content and initializing clipboard and module TSconfig
  *
  * @return	void
  * @access public
  */
 function menuConfig()
 {
     global $TYPO3_CONF_VARS;
     // Prepare array of sys_language uids for available translations:
     $this->translatedLanguagesArr = $this->getAvailableLanguages($this->id);
     $translatedLanguagesUids = array();
     foreach ($this->translatedLanguagesArr as $languageRecord) {
         $translatedLanguagesUids[$languageRecord['uid']] = $languageRecord['title'];
     }
     $this->MOD_MENU = array('tt_content_showHidden' => 1, 'showOutline' => 1, 'language' => $translatedLanguagesUids, 'clip_parentPos' => '', 'clip' => '', 'langDisplayMode' => '', 'recordsView_table' => '', 'recordsView_start' => '', 'disablePageStructureInheritance' => '');
     // Hook: menuConfig_preProcessModMenu
     $menuHooks = $this->hooks_prepareObjectsArray('menuConfigClass');
     foreach ($menuHooks as $hookObj) {
         if (method_exists($hookObj, 'menuConfig_preProcessModMenu')) {
             $hookObj->menuConfig_preProcessModMenu($this->MOD_MENU, $this);
         }
     }
     // page/be_user TSconfig settings and blinding of menu-items
     $this->MOD_MENU['view'] = t3lib_BEfunc::unsetMenuItems($this->modTSconfig['properties'], $this->MOD_MENU['view'], 'menu.function');
     if (!isset($this->modTSconfig['properties']['sideBarEnable'])) {
         $this->modTSconfig['properties']['sideBarEnable'] = 1;
     }
     // CLEANSE SETTINGS
     $this->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->MOD_MENU, t3lib_div::_GP('SET'), $this->MCONF['name']);
 }
コード例 #22
0
 /**
  * Same as t3lib_SCbase::checkExtObj()
  *
  * @return	void
  * @see t3lib_SCbase::checkExtObj()
  */
 function checkExtObj()
 {
     if (is_array($this->extClassConf) && $this->extClassConf['name']) {
         $this->extObj = t3lib_div::makeInstance($this->extClassConf['name']);
         $this->extObj->init($this->pObj, $this->extClassConf);
         // Re-write:
         $this->pObj->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->pObj->MOD_MENU, t3lib_div::_GP('SET'), $this->pObj->MCONF['name']);
     }
 }
コード例 #23
0
 /**
  * Initialize menu configuration
  *
  * @return	void
  */
 function menuConfig()
 {
     // fetches the configuration of the version extension
     $versionExtconf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['version']);
     // show draft workspace only if enabled in the version extensions config
     if ($versionExtconf['showDraftWorkspace']) {
         $this->showDraftWorkspace = TRUE;
     }
     // Menu items:
     $this->MOD_MENU = array('filter' => array(1 => $GLOBALS['LANG']->getLL('filter_drafts'), 2 => $GLOBALS['LANG']->getLL('filter_archive'), 0 => $GLOBALS['LANG']->getLL('filter_all')), 'display' => array(0 => $GLOBALS['LANG']->getLL('liveWorkspace'), -98 => $GLOBALS['LANG']->getLL('draftWorkspaces'), -99 => $GLOBALS['LANG']->getLL('filter_all')), 'diff' => '');
     if ($this->showDraftWorkspace === TRUE) {
         $this->MOD_MENU['display'][-1] = $GLOBALS['LANG']->getLL('defaultDraft');
     }
     // Add workspaces:
     if ($GLOBALS['BE_USER']->workspace === 0) {
         // Spend time on this only in online workspace because it might take time:
         $workspaces = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,title,adminusers,members,reviewers', 'sys_workspace', 'pid=0' . t3lib_BEfunc::deleteClause('sys_workspace'), '', 'title');
         foreach ($workspaces as $rec) {
             if ($GLOBALS['BE_USER']->checkWorkspace($rec)) {
                 $this->MOD_MENU['display'][$rec['uid']] = '[' . $rec['uid'] . '] ' . $rec['title'];
             }
         }
     }
     // CLEANSE SETTINGS
     $this->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->MOD_MENU, t3lib_div::_GP('SET'), $this->MCONF['name'], 'ses');
 }
コード例 #24
0
 function templateMenu()
 {
     $tmpl = t3lib_div::makeInstance('t3lib_tsparser_ext');
     // Defined global here!
     /* @var $tmpl t3lib_tsparser_ext */
     $tmpl->tt_track = false;
     // Do not log time-performance information
     $tmpl->init();
     $all = $tmpl->ext_getAllTemplates($this->id, $this->perms_clause);
     $menu = '';
     if (count($all) > 1) {
         $this->MOD_MENU['templatesOnPage'] = array();
         foreach ($all as $d) {
             $this->MOD_MENU['templatesOnPage'][$d['uid']] = $d['title'];
         }
     }
     $this->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->MOD_MENU, t3lib_div::_GP('SET'), $this->MCONF['name'], $this->modMenu_type, $this->modMenu_dontValidateList, $this->modMenu_setDefaultList);
     $menu = t3lib_BEfunc::getFuncMenu($this->id, 'SET[templatesOnPage]', $this->MOD_SETTINGS['templatesOnPage'], $this->MOD_MENU['templatesOnPage']);
     return $menu;
 }
コード例 #25
0
 /**
  * Get the last selection from the undo storage and set it as current selection.
  *
  * @return	void
  */
 function undoSelection()
 {
     if (is_object($this->SOBE)) {
         $undo = $this->unserialize($this->SOBE->MOD_SETTINGS[$this->store_MOD_SETTINGS . '_undo']);
         array_pop($undo);
         $sel = end($undo);
         $this->sel = $sel['undo'];
         $this->SOBE->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->SOBE->MOD_MENU, array($this->store_MOD_SETTINGS => serialize($this->sel), $this->store_MOD_SETTINGS . '_undo' => serialize($undo)), $this->SOBE->MCONF['name'], 'ses');
         $this->setCurrentSelectionFromStored();
     }
 }
コード例 #26
0
	/**
	 * Preparing menu content
	 *
	 * @return	void
	 */
	function menuConfig()	{
		$this->MOD_MENU = array(
#			'set_showDSxml' => '',
			'set_details' => '',
			'set_unusedDs' => '',
			'wiz_step' => ''
		);

			// page/be_user TSconfig settings and blinding of menu-items
		$this->modTSconfig = t3lib_BEfunc::getModTSconfig($this->id,'mod.'.$this->MCONF['name']);

			// CLEANSE SETTINGS
		$this->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->MOD_MENU, t3lib_div::_GP('SET'), $this->MCONF['name']);
	}
コード例 #27
0
 /**
  * Configuration of the menu and initialization of ->MOD_SETTINGS
  *
  * @return	void
  */
 public function menuConfig()
 {
     global $LANG;
     // MENU-ITEMS:
     // If array, then it's a selector box menu
     // If empty string it's just a variable, that'll be saved.
     // Values NOT in this array will not be saved in the settings-array for the module.
     $temp = $LANG->getLL('levels');
     $this->MOD_MENU = array('depth' => array(1 => '1 ' . $temp, 2 => '2 ' . $temp, 3 => '3 ' . $temp, 4 => '4 ' . $temp, 10 => '10 ' . $temp), 'mode' => array(0 => $LANG->getLL('user_overview'), 'perms' => $LANG->getLL('permissions')));
     // Clean up settings:
     $this->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->MOD_MENU, t3lib_div::_GP('SET'), $this->MCONF['name']);
 }
コード例 #28
0
ファイル: index.php プロジェクト: NaveedWebdeveloper/Test
 /**
  * Menu Configuration
  *
  * @return	void
  */
 function menuConfig()
 {
     global $TYPO3_CONF_VARS;
     // MENU-ITEMS:
     // If array, then it's a selector box menu
     // If empty string it's just a variable, that'll be saved.
     // Values NOT in this array will not be saved in the settings-array for the module.
     $this->MOD_MENU = array('function' => array(0 => $GLOBALS['LANG']->getLL('typo3ConfVars', true), 1 => $GLOBALS['LANG']->getLL('tca', true), 2 => $GLOBALS['LANG']->getLL('tcaDescr', true), 3 => $GLOBALS['LANG']->getLL('loadedExt', true), 4 => $GLOBALS['LANG']->getLL('t3services', true), 5 => $GLOBALS['LANG']->getLL('tbemodules', true), 6 => $GLOBALS['LANG']->getLL('tbemodulesext', true), 7 => $GLOBALS['LANG']->getLL('tbeStyles', true), 8 => $GLOBALS['LANG']->getLL('beUser', true), 9 => $GLOBALS['LANG']->getLL('usersettings', true)), 'regexsearch' => '', 'fixedLgd' => '');
     // CLEANSE SETTINGS
     $this->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->MOD_MENU, t3lib_div::_GP('SET'), $this->MCONF['name']);
 }
コード例 #29
0
 /**
  * MENU-ITEMS:
  * If array, then it's a selector box menu
  * If empty string it's just a variable, that'll be saved.
  * Values NOT in this array will not be saved in the settings-array for the module.
  *
  * @return	void
  */
 function menuConfig()
 {
     $this->MOD_MENU = array('function' => array('stat' => 'General statistics', 'typo3pages' => 'List: TYPO3 Pages', 'externalDocs' => 'List: External documents'));
     // cleanse settings
     $this->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->MOD_MENU, t3lib_div::_GP('SET'), $this->MCONF['name'], 'ses');
 }
コード例 #30
0
 /**
  * Return requested value from module data
  *
  * @param 	string $key
  * @return 	mixed
  */
 public function getValueFromModuleData($key)
 {
     // Fetch selected company trade
     $modData = t3lib_BEfunc::getModuleData(array($key => ''), t3lib_div::_GP('SET'), $this->getMod()->getName());
     if (isset($modData[$key])) {
         return $modData[$key];
     }
     return NULL;
 }