/**
  * Processing the wizard items array
  *
  * @param	array		$wizardItems: The wizard items
  * @return	Modified array with wizard items
  */
 function proc($wizardItems)
 {
     global $LANG;
     $LL = $this->includeLocalLang();
     $wizardItems['plugins_tx_rggooglemap_pi1'] = array('icon' => t3lib_extMgm::extRelPath('rggooglemap') . 'pi1/ce_wiz.png', 'title' => $LANG->getLLL('pi1_title', $LL), 'description' => $LANG->getLLL('pi1_plus_wiz_description', $LL), 'params' => '&defVals[tt_content][CType]=list&defVals[tt_content][list_type]=rggooglemap_pi1');
     return $wizardItems;
 }
 /**
  * Main function, adding the item to input menuItems array
  *
  * @param	object		References to parent clickmenu objects.
  * @param	array		Array of existing menu items accumulated. New element added to this.
  * @param	string		Table name of the element
  * @param	integer		Record UID of the element
  * @return	array		Modified menuItems array
  */
 function main(&$backRef, $menuItems, $table, $uid)
 {
     global $BE_USER, $TCA, $LANG;
     $localItems = array();
     if (!$backRef->cmLevel && $uid > 0 && $BE_USER->check('modules', 'web_txversionM1')) {
         // Returns directly, because the clicked item was not from the pages table
         if (in_array('versioning', $backRef->disabledItems) || !$TCA[$table] || !$TCA[$table]['ctrl']['versioningWS']) {
             return $menuItems;
         }
         // Adds the regular item
         $LL = $this->includeLL();
         // "Versioning" element added:
         $url = t3lib_extMgm::extRelPath('version') . 'cm1/index.php?table=' . rawurlencode($table) . '&uid=' . $uid;
         $localItems[] = $backRef->linkItem($GLOBALS['LANG']->getLLL('title', $LL), $backRef->excludeIcon('<img src="' . $backRef->backPath . t3lib_extMgm::extRelPath('version') . 'cm1/cm_icon.gif" width="15" height="12" border="0" align="top" alt="" />'), $backRef->urlRefForCM($url), 1);
         // "Send to review" element added:
         $url = t3lib_extMgm::extRelPath('version') . 'cm1/index.php?id=' . ($table == 'pages' ? $uid : $backRef->rec['pid']) . '&table=' . rawurlencode($table) . '&uid=' . $uid . '&sendToReview=1';
         $localItems[] = $backRef->linkItem($GLOBALS['LANG']->getLLL('title_review', $LL), $backRef->excludeIcon('<img src="' . $backRef->backPath . t3lib_extMgm::extRelPath('version') . 'cm1/cm_icon.gif" width="15" height="12" border="0" align="top" alt="" />'), $backRef->urlRefForCM($url), 1);
         // Find position of "delete" element:
         $c = 0;
         foreach ($menuItems as $k => $value) {
             $c++;
             if (!strcmp($k, 'delete')) {
                 break;
             }
         }
         // .. subtract two (delete item + divider line)
         $c -= 2;
         // ... and insert the items just before the delete element.
         array_splice($menuItems, $c, 0, $localItems);
     }
     return $menuItems;
 }
 /**
  * Processing of clickmenu items
  *
  * @param	object		Reference to parent
  * @param	array		Menu items array to modify
  * @param	string		Table name
  * @param	integer		Uid of the record
  * @return	array		Menu item array, returned after modification
  * @todo	Skinning for icons...
  */
 function main(&$backRef, $menuItems, $table, $uid)
 {
     global $BE_USER, $TCA;
     $localItems = array();
     if ($backRef->cmLevel && t3lib_div::_GP('subname') == 'moreoptions' || $table === 'pages' && $uid == 0) {
         // Show import/export on second level menu OR root level.
         $LL = $this->includeLL();
         $modUrl = $backRef->backPath . t3lib_extMgm::extRelPath('impexp') . 'app/index.php';
         $url = $modUrl . '?tx_impexp[action]=export&id=' . ($table == 'pages' ? $uid : $backRef->rec['pid']);
         if ($table == 'pages') {
             $url .= '&tx_impexp[pagetree][id]=' . $uid;
             $url .= '&tx_impexp[pagetree][levels]=0';
             $url .= '&tx_impexp[pagetree][tables][]=_ALL';
         } else {
             $url .= '&tx_impexp[record][]=' . rawurlencode($table . ':' . $uid);
             $url .= '&tx_impexp[external_ref][tables][]=_ALL';
         }
         $localItems[] = $backRef->linkItem($GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLLL('export', $LL)), $backRef->excludeIcon(t3lib_iconWorks::getSpriteIcon('actions-document-export-t3d')), $backRef->urlRefForCM($url), 1);
         if ($table == 'pages') {
             $url = $modUrl . '?id=' . $uid . '&table=' . $table . '&tx_impexp[action]=import';
             $localItems[] = $backRef->linkItem($GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLLL('import', $LL)), $backRef->excludeIcon(t3lib_iconWorks::getSpriteIcon('actions-document-import-t3d')), $backRef->urlRefForCM($url), 1);
         }
     }
     return array_merge($menuItems, $localItems);
 }
 /**
  * Adds the plugin wizard icon
  *
  * @param 	array 	Input array with wizard items for plugins
  * @return 	array 	Modified input array, having the items for plugin added.
  */
 public function proc($wizardItems)
 {
     global $LANG;
     $LL = $this->includeLocalLang();
     $wizardItems['plugins_tx_' . $this->extKey] = array('icon' => t3lib_extMgm::extRelPath($this->extKey) . $this->iconPath, 'title' => $LANG->getLLL('plugin.' . $this->extKey . '.label', $LL), 'description' => $LANG->getLLL('plugin.' . $this->extKey . '.description', $LL), 'params' => '&defVals[tt_content][CType]=list&defVals[tt_content][list_type]=tx_' . $this->extKey);
     return $wizardItems;
 }
 /**
  * Adds the formhandler wizard icon
  *
  * @param	array		Input array with wizard items for plugins
  * @return	array		Modified input array, having the item for formhandler
  * pi1 added.
  */
 function proc($wizardItems)
 {
     global $LANG;
     $LL = $this->includeLocalLang();
     $wizardItems['plugins_tx_formhandler_pi1'] = array('icon' => t3lib_extMgm::extRelPath('formhandler') . 'Resources/Images/ce_wiz_pi1.png', 'title' => $LANG->getLLL('wizard_pi1.title', $LL), 'description' => $LANG->getLLL('tt_content.pi1_plus_wiz_description', $LL), 'params' => '&defVals[tt_content][CType]=list&defVals[tt_content][list_type]=formhandler_pi1');
     return $wizardItems;
 }
 /**
  * Adds the formhandler wizard icon
  *
  * @param array $wizardItems Input array with wizard items for plugins
  *
  * @return array Modified input array, having the semantic template
  *               pi1 item added.
  */
 public function proc($wizardItems)
 {
     global $LANG;
     $LL = $this->includeLocalLang();
     $wizardItems['plugins_tx_formhandler_pi1'] = array('icon' => t3lib_extMgm::extRelPath('nr_semantic_templates') . 'res/ce_wiz_pi1.png', 'title' => $LANG->getLLL('tt_content.list_type_pi1', $LL), 'description' => $LANG->getLLL('tt_content.wiz_description_pi1', $LL), 'params' => '&defVals[tt_content][CType]=list' . '&defVals[tt_content][list_type]=nr_semantic_templates_pi1');
     return $wizardItems;
 }
 /**
  * Processing the wizard items array
  *
  * @param	array		$wizardItems: The wizard items
  * @return	Modified array with wizard items
  */
 function proc($wizardItems)
 {
     global $LANG;
     $LL = $this->includeLocalLang();
     $wizardItems['plugins_ameos_formidable_pi2'] = array('icon' => t3lib_extMgm::extRelPath('ameos_formidable') . 'pi2/ce_wiz.gif', 'title' => 'FORMIDABLE_INT cObj (not cached)', 'description' => 'Formidable standard plugins to invoke and run your XML application (not cached)', 'params' => '&defVals[tt_content][CType]=list&defVals[tt_content][list_type]=ameos_formidable_pi2');
     return $wizardItems;
 }
 /**
  * Processing the wizard items array
  *
  * @param	array		$wizardItems: The wizard items
  * @return	Modified array with wizard items
  */
 function proc($wizardItems)
 {
     global $LANG;
     $LL = $this->includeLocalLang();
     $wizardItems['plugins_caretaker_pi_singleview'] = array('icon' => t3lib_extMgm::extRelPath('caretaker') . 'pi_singleview/ce_wiz.gif', 'title' => $LANG->getLLL('pi_singleview_title', $LL), 'description' => $LANG->getLLL('pi_singleview_plus_wiz_description', $LL), 'params' => '&defVals[tt_content][CType]=list&defVals[tt_content][list_type]=caretaker_pi_singleview');
     return $wizardItems;
 }
 function initialize_editor($pageId, $template_uid = 0)
 {
     // Initializes the module. Done in this function because we may need to re-initialize if data is submitted!
     global $tmpl, $tplRow, $theConstants;
     $tmpl = t3lib_div::makeInstance("t3lib_tsparser_ext");
     // Defined global here!
     $tmpl->tt_track = 0;
     // Do not log time-performance information
     $tmpl->init();
     $tmpl->ext_localGfxPrefix = t3lib_extMgm::extPath("tstemplate_ceditor");
     $tmpl->ext_localWebGfxPrefix = $GLOBALS["BACK_PATH"] . t3lib_extMgm::extRelPath("tstemplate_ceditor");
     $tplRow = $tmpl->ext_getFirstTemplate($pageId, $template_uid);
     // Get the row of the first VISIBLE template of the page. whereclause like the frontend.
     if (is_array($tplRow)) {
         // IF there was a template...
         // Gets the rootLine
         $sys_page = t3lib_div::makeInstance("t3lib_pageSelect");
         $rootLine = $sys_page->getRootLine($pageId);
         $tmpl->runThroughTemplates($rootLine, $template_uid);
         // This generates the constants/config + hierarchy info for the template.
         $theConstants = $tmpl->generateConfig_constants();
         // The editable constants are returned in an array.
         $tmpl->ext_categorizeEditableConstants($theConstants);
         // The returned constants are sorted in categories, that goes into the $tmpl->categories array
         $tmpl->ext_regObjectPositions($tplRow["constants"]);
         // This array will contain key=[expanded constantname], value=linenumber in template. (after edit_divider, if any)
         return 1;
     }
 }
예제 #10
0
 /**
  * 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']);
     }
 }
 /**
  * Adds the newloginbox wizard icon
  *
  * @param	array		Input array with wizard items for plugins
  * @return	array		Modified input array, having the item for newloginbox added.
  */
 function proc($wizardItems)
 {
     global $LANG;
     $LL = $this->includeLocalLang();
     $wizardItems['plugins_tx_ttnews_pi'] = array('icon' => t3lib_extMgm::extRelPath('tt_news') . 'pi/ce_wiz.gif', 'title' => $LANG->getLLL('pi_title', $LL), 'description' => $LANG->getLLL('pi_plus_wiz_description', $LL), 'params' => '&defVals[tt_content][CType]=list&defVals[tt_content][list_type]=9');
     return $wizardItems;
 }
    /**
     * [Describe function...]
     *
     * @return	[type]		...
     */
    function displayMessage(&$params, &$tsObj)
    {
        $out = '';
        if ($this->compatibility()->int_from_ver(TYPO3_version) < 4003000) {
            // 4.3.0 comes with flashmessages styles. For older versions we include the needed styles here
            $cssPath = $GLOBALS['BACK_PATH'] . t3lib_extMgm::extRelPath('tt_news');
            $out .= '<link rel="stylesheet" type="text/css" href="' . $cssPath . 'compat/flashmessages.css" media="screen" />';
        }
        if ($this->compatibility()->int_from_ver(TYPO3_version) < 4005000) {
            $link = 'index.php?&amp;id=0&amp;CMD[showExt]=tt_news&amp;SET[singleDetails]=updateModule';
        } else {
            $link = 'mod.php?&amp;id=0&amp;M=tools_em&amp;CMD[showExt]=tt_news&amp;SET[singleDetails]=updateModule';
        }
        $out .= '
		<div style="position:absolute;top:10px;right:10px; width:300px;">
			<div class="typo3-message message-information">
   				<div class="message-header">' . $GLOBALS['LANG']->sL('LLL:EXT:tt_news/locallang.xml:extmng.updatermsgHeader') . '</div>
  				<div class="message-body">
  					' . $GLOBALS['LANG']->sL('LLL:EXT:tt_news/locallang.xml:extmng.updatermsg') . '<br />
  					<a style="text-decoration:underline;" href="' . $link . '">
  					' . $GLOBALS['LANG']->sL('LLL:EXT:tt_news/locallang.xml:extmng.updatermsgLink') . '</a>
  				</div>
  			</div>
  		</div>
  		';
        return $out;
    }
 function proc($wizardItems)
 {
     global $LANG;
     $LL = $this->includeLocalLang();
     $wizardItems["plugins_tx_thexttable_pi1"] = array("icon" => t3lib_extMgm::extRelPath("th_exttable") . "pi1/ce_wiz.gif", "title" => $LANG->getLLL("pi1_title", $LL), "description" => $LANG->getLLL("pi1_plus_wiz_description", $LL), "params" => "&defVals[tt_content][CType]=th_exttable_pi1");
     return $wizardItems;
 }
 function proc($wizardItems)
 {
     global $LANG;
     $LL = $this->getLL();
     $wizardItems['plugins_tx_pdfcontroller_pi1'] = array('icon' => t3lib_extMgm::extRelPath('pdfcontroller') . 'pi1/pdfcontroller_wizard.gif', 'title' => $LANG->getLLL('wizard.list_type_pi1', $LL), 'description' => $LANG->getLLL('wizard.list_type_pi1.desc', $LL), 'params' => '&defVals[tt_content][CType]=list&defVals[tt_content][list_type]=pdfcontroller_pi1');
     return $wizardItems;
 }
 function proc($wizardItems)
 {
     global $LANG;
     $LL = $this->includeLocalLang();
     $wizardItems["plugins_tx_dlcube04CAS_pi6"] = array("icon" => t3lib_extMgm::extRelPath("dlcube04_CAS") . "pi6/ce_wiz.gif", "title" => $LANG->getLLL("pi6_title", $LL), "description" => $LANG->getLLL("pi6_plus_wiz_description", $LL), "params" => "&defVals[tt_content][CType]=list&defVals[tt_content][list_type]=dlcube04_CAS_pi6");
     return $wizardItems;
 }
 /**
  * Main function
  *
  * @param   [type]    $$backRef: ...
  * @param   [type]    $menuItems: ...
  * @param   [type]    $table: ...
  * @param   [type]    $uid: ...
  * @return  [type]    ...
  */
 function main(&$backRef, $menuItems, $table, $uid)
 {
     global $BE_USER, $TCA, $LANG;
     $localItems = array();
     if (!$backRef->cmLevel) {
         // Returns directly, because the clicked item was not from the pages table
         if ($table == "tx_l10nmgr_cfg") {
             // Adds the regular item:
             $LL = $this->includeLL();
             // Repeat this (below) for as many items you want to add!
             // Remember to add entries in the localconf.php file for additional titles.
             $url = t3lib_extMgm::extRelPath("l10nmgr") . "cm1/index.php?id=" . $uid;
             $localItems[] = $backRef->linkItem($GLOBALS["LANG"]->getLLL("cm1_title", $LL), $backRef->excludeIcon('<img src="' . t3lib_extMgm::extRelPath("l10nmgr") . 'cm1/cm_icon.gif" width="15" height="12" border="0" align="top" />'), $backRef->urlRefForCM($url), 1);
         }
         $localItems["moreoptions_tx_l10nmgr_cm3"] = $backRef->linkItem('L10Nmgr tools', '', "top.loadTopMenu('" . t3lib_div::linkThisScript() . "&cmLevel=1&subname=moreoptions_tx_l10nmgrXX_cm3');return false;", 0, 1);
         // Simply merges the two arrays together and returns ...
         $menuItems = array_merge($menuItems, $localItems);
     } elseif (t3lib_div::_GET('subname') == 'moreoptions_tx_l10nmgrXX_cm3') {
         $url = t3lib_extMgm::extRelPath("l10nmgr") . "cm3/index.php?id=" . $uid . '&table=' . $table;
         $localItems[] = $backRef->linkItem('Create priority', '', $backRef->urlRefForCM($url . '&cmd=createPriority'), 1);
         $localItems[] = $backRef->linkItem('Manage priorities', '', $backRef->urlRefForCM($url . '&cmd=managePriorities'), 1);
         $localItems[] = $backRef->linkItem('Update Index', '', $backRef->urlRefForCM($url . '&cmd=updateIndex'), 1);
         $localItems[] = $backRef->linkItem('Flush Translations', '', $backRef->urlRefForCM($url . '&cmd=flushTranslations'), 1);
         $menuItems = array_merge($menuItems, $localItems);
     }
     return $menuItems;
 }
 /**
  * Processing the wizard items array
  *
  * @param	array		$wizardItems: The wizard items
  * @return	Modified array with wizard items
  */
 function proc($wizardItems)
 {
     global $LANG;
     $LL = $this->includeLocalLang();
     $wizardItems['plugins_user_fdfactdbcc_pi1'] = array('icon' => t3lib_extMgm::extRelPath('user_fdf_actdb_cc') . 'pi1/ce_wiz.gif', 'title' => $LANG->getLLL('pi1_title', $LL), 'description' => $LANG->getLLL('pi1_plus_wiz_description', $LL), 'params' => '&defVals[tt_content][CType]=list&defVals[tt_content][list_type]=user_fdf_actdb_cc_pi1');
     return $wizardItems;
 }
 /**
  * Main function
  *
  * @param clickMenu reference parent object
  * @param array menutitems for manipultation
  * @param string table name
  * @param int uid
  * @return array manipulated menuitems
  */
 function main(clickMenu $backRef, array $menuItems, $table, $uid)
 {
     if ($table != 'tx_crawler_configuration') {
         // early return without doing anything
         return $menuItems;
     }
     $localItems = array();
     $row = t3lib_BEfunc::getRecord($table, $uid, 'pid, name, processing_instruction_filter', '', true);
     if (!empty($row)) {
         if (version_compare(TYPO3_version, '4.5.0', '>=')) {
             $url = t3lib_extMgm::extRelPath('info') . 'mod1/index.php';
         } else {
             $url = $backRef->backPath . 'mod/web/info/index.php';
         }
         $url .= '?id=' . intval($row['pid']);
         $url .= '&SET[function]=tx_crawler_modfunc1';
         $url .= '&SET[crawlaction]=start';
         $url .= '&configurationSelection[]=' . $row['name'];
         foreach (t3lib_div::trimExplode(',', $row['processing_instruction_filter']) as $processing_instruction) {
             $url .= '&procInstructions[]=' . $processing_instruction;
         }
         // $onClick = $backRef->urlRefForCM($url);
         $onClick = "top.nextLoadModuleUrl='" . $url . "';top.goToModule('web_info',1);";
         $localItems[] = $backRef->linkItem('Crawl', $backRef->excludeIcon('<img src="' . $backRef->backPath . t3lib_extMgm::extRelPath('crawler') . 'icon_tx_crawler_configuration.gif" border="0" align="top" alt="" />'), $onClick, 0);
     }
     return array_merge($menuItems, $localItems);
 }
 function proc($wizardItems)
 {
     global $LANG;
     // get language file
     include t3lib_extMgm::extPath('sema_sourcecode') . 'pi1/locallang.php';
     $wizardItems["plugins_tx_semasourcecode_pi1"] = array("icon" => t3lib_extMgm::extRelPath("sema_sourcecode") . "pi1/ce_wiz.gif", "title" => $LANG->getLLL('ext_title', $LOCAL_LANG), "description" => $LANG->getLLL('ext_desc', $LOCAL_LANG), "params" => "&defVals[tt_content][CType]=list&defVals[tt_content][list_type]=sema_sourcecode_pi1");
     return $wizardItems;
 }
 /**
  * Prepares object to run.
  *
  * @param	object		&$pObj	Parent object (mod1/index.php)
  * @return	void
  */
 function start(&$pObj)
 {
     $this->pObj =& $pObj;
     $GLOBALS['SOBE']->MOD_SETTINGS['bigControlPanel'] = 1;
     // enable extended view
     $this->script = t3lib_extMgm::extRelPath('templavoila') . 'mod1/index.php';
     return parent::start($this->pObj->rootElementUid_pidForContent, '', intval($this->pObj->MOD_SETTINGS['recordsView_start']));
 }
예제 #21
0
 /**
  * Resizes a given image (if required) and renders the respective img tag
  *
  * @see http://typo3.org/documentation/document-library/references/doc_core_tsref/4.2.0/view/1/5/#id4164427
  *
  *@param Tx_Feupload_Domain_Model_File $file
  * @return string rendered tag.
  */
 public function render($file)
 {
     $type = $this->_getFileType($file);
     $path = t3lib_extMgm::extRelPath('feupload');
     $src = "{$path}/Resources/Public/Css/images/{$type}.png";
     $tag = "<img src='{$src}' alt='{$type}' />";
     return $tag;
 }
 /**
  * Add wizard item to the backend
  *
  * @param		$wizardItems		The wizard items
  * @return		The wizard item
  */
 function proc($wizardItems)
 {
     // Get locallang values
     $LL = $this->includeLocalLang();
     // Wizard item
     $wizardItems['plugins_tx_tscobj_pi1'] = array('icon' => t3lib_extMgm::extRelPath('tscobj') . 'pi1/ce_wiz.gif', 'title' => $GLOBALS['LANG']->getLLL('pi1_title', $LL), 'description' => $GLOBALS['LANG']->getLLL('pi1_plus_wiz_description', $LL), 'params' => '&defVals[tt_content][CType]=list&defVals[tt_content][list_type]=tscobj_pi1');
     // Return items
     return $wizardItems;
 }
예제 #23
0
 public function manipulateCacheActions(&$cacheActions, &$optionValues)
 {
     if ($GLOBALS['BE_USER']->isAdmin()) {
         // Add new cache menu item
         $title = $GLOBALS['LANG']->sL('LLL:EXT:tq_seo/hooks/sitemap/locallang.xml:clearSeoSitemap');
         $cacheActions[] = array('id' => 'clearRTECache', 'title' => $title, 'href' => $GLOBALS['BACK_PATH'] . 'ajax.php?ajaxID=tx_tqseo_sitemap::clearSeoSitemap', 'icon' => '<img' . t3lib_iconWorks::skinImg($this->doc->backPath, t3lib_extMgm::extRelPath('tq_seo') . 'res/images/clear-sitemap.png', 'width="16" height="16"') . ' title="' . $title . '" alt="' . $title . '" />');
         $optionValues[] = 'clearSeoSitemap';
     }
 }
예제 #24
0
    /**
     * Main function of the module. Write the content to $this->content
     * If you chose "web" as main module, you will need to consider the $this->id parameter which will contain the uid-number of the page clicked in the page tree
     *
     * @return	[type]		...
     */
    function main()
    {
        global $BE_USER, $LANG, $BACK_PATH, $TCA_DESCR, $TCA, $CLIENT, $TYPO3_CONF_VARS;
        $PATH_TYPO3 = t3lib_div::getIndpEnv('TYPO3_SITE_URL') . 'typo3/';
        if ($BE_USER->user["admin"]) {
            // Draw the header.
            $this->doc = t3lib_div::makeInstance("template");
            $this->doc->backPath = $BACK_PATH;
            $this->pageRenderer = $this->doc->getPageRenderer();
            // Include Ext JS
            $this->pageRenderer->loadExtJS(true, true);
            $this->pageRenderer->enableExtJSQuickTips();
            $this->pageRenderer->enableExtJsDebug();
            $this->pageRenderer->addJsFile($BACK_PATH . t3lib_extMgm::extRelPath('caretaker') . 'res/js/tx.caretaker.js', 'text/javascript', FALSE, FALSE);
            $this->pageRenderer->addJsFile($BACK_PATH . t3lib_extMgm::extRelPath('caretaker') . 'res/js/tx.caretaker.NodeTree.js', 'text/javascript', FALSE, FALSE);
            //Add caretaker css
            $this->pageRenderer->addCssFile('../res/css/tx.caretaker.nodetree.css', 'stylesheet', 'all', '', FALSE);
            // storage Pid
            $confArray = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['caretaker']);
            $storagePid = (int) $confArray['storagePid'];
            $this->pageRenderer->addJsInlineCode('Caretaker_Nodetree', '
			Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
			Ext.ns("tx.caretaker");
			Ext.onReady(function() {
				tx.caretaker.view = new Ext.Viewport({
					layout: "fit",
					items: {
						id: "cartaker-tree",
						xtype: "caretaker-nodetree",
                        autoScroll: true,
						dataUrl: "' . $this->doc->backPath . 'ajax.php?ajaxID=tx_caretaker::treeloader",
						addUrl: "' . $PATH_TYPO3 . 'alt_doc.php?edit[###NODE_TYPE###][' . $storagePid . ']=new",
						editUrl: "' . $PATH_TYPO3 . 'alt_doc.php?edit[tx_caretaker_###NODE_TYPE###][###NODE_UID###]=edit",
						hideUrl: "' . $PATH_TYPO3 . 'tce_db.php?&data[tx_caretaker_###NODE_TYPE###][###NODE_UID###][hidden]=1",
						unhideUrl: "' . $PATH_TYPO3 . 'tce_db.php?&data[tx_caretaker_###NODE_TYPE###][###NODE_UID###][hidden]=0"
					}
				});

				tx_caretaker_updateTreeById = function( id ){
					tx_caretaker_tree = Ext.getCmp("cartaker-tree");
					tx_caretaker_tree.reloadTreePartial( id );
				}
			});
			');
            $this->content .= $this->doc->startPage($LANG->getLL("title"));
            $this->doc->form = '';
        } else {
            // If no access or if not admin
            $this->doc = t3lib_div::makeInstance("mediumDoc");
            $this->doc->backPath = $BACK_PATH;
            $this->content .= $this->doc->startPage($LANG->getLL("title"));
            $this->content .= $this->doc->header($LANG->getLL("title"));
            $this->content .= $this->doc->spacer(5);
            $this->content .= $this->doc->spacer(10);
        }
    }
예제 #25
0
 /**
  * Initializes the controller before invoking an action method.
  *
  * @return void
  */
 protected function initializeAction()
 {
     // @todo Evaluate how the intval() call can be used with Extbase validators/filters
     $this->pageId = intval(t3lib_div::_GP('id'));
     $this->pageRenderer->addInlineSetting('Workspaces', 'id', $this->pageId);
     $this->pageRenderer->addInlineSetting('Workspaces', 'depth', $this->pageId === 0 ? 999 : 1);
     $this->pageRenderer->addCssFile(t3lib_extMgm::extRelPath('workspaces') . 'Resources/Public/StyleSheet/module.css');
     $this->pageRenderer->addInlineLanguageLabelArray(array('title' => $GLOBALS['LANG']->getLL('title'), 'path' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.path'), 'table' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.table'), 'depth' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_web_perm.xml:Depth'), 'depth_0' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_0'), 'depth_1' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_1'), 'depth_2' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_2'), 'depth_3' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_3'), 'depth_4' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_4'), 'depth_infi' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_infi')));
     $this->pageRenderer->addInlineLanguageLabelFile('EXT:workspaces/Resources/Private/Language/locallang.xml');
 }
 function proc($wizardItems)
 {
     global $LANG;
     $LL = (include t3lib_extMgm::extPath('user_almatis') . 'locallang.php');
     $wizardItems['user_almatis'] = array('header' => $LANG->getLLL('almatis_title', $LL));
     $wizardItems['user_almatis_1'] = array('icon' => t3lib_extMgm::extRelPath('user_almatis') . 'pi1/ce_wiz.gif', 'title' => $LANG->getLLL('pi1_title', $LL), 'description' => $LANG->getLLL('pi1_plus_wiz_description', $LL), 'params' => '&defVals[tt_content][CType]=list&defVals[tt_content][list_type]=user_almatis_pi1');
     debug($wizardItems);
     die(0);
     return $wizardItems;
 }
 /**
  * Constructor
  *
  * @param SC_mod_tools_em_index $parentObject
  */
 public function __construct(SC_mod_tools_em_index $parentObject)
 {
     $this->parentObject = $parentObject;
     $this->parentObject->doc->setExtDirectStateProvider();
     $this->pageRenderer = $this->parentObject->doc->getPageRenderer();
     $this->resPath = $this->parentObject->doc->backPath . t3lib_extMgm::extRelPath('em') . 'res/';
     $userSettings = $this->parentObject->settings->getUserSettings();
     $this->debug = isset($userSettings['debug']) ? intval($userSettings['debug']) : 0;
     $this->gzSupport = isset($userSettings['jsGzCompressed']) ? TRUE : FALSE;
     $this->checkRepository();
 }
 /**
  * Initializes the controller before invoking an action method.
  *
  * @return void
  */
 protected function initializeAction()
 {
     $this->pageRenderer->addCssFile(t3lib_extMgm::extRelPath('smoothmigration') . 'Resources/Public/StyleSheet/module.css');
     $this->pageRenderer->addInlineLanguageLabelFile('EXT:smoothmigration/Resources/Private/Language/locallang.xml');
     $this->pageRenderer->addJsLibrary('jquery', t3lib_extMgm::extRelPath('smoothmigration') . 'Resources/Public/JavaScript/jquery-1.10.1.min.js');
     $this->pageRenderer->addJsLibrary('sprintf', t3lib_extMgm::extRelPath('smoothmigration') . 'Resources/Public/JavaScript/sprintf.min.js');
     $this->pageRenderer->addJsFile(t3lib_extMgm::extRelPath('smoothmigration') . 'Resources/Public/JavaScript/General.js');
     if (t3lib_div::int_from_ver(TYPO3_version) > 6001000) {
         $this->moduleToken = \TYPO3\CMS\Core\FormProtection\FormProtectionFactory::get()->generateToken('moduleCall', 'tools_SmoothmigrationSmoothmigration');
     }
 }
예제 #29
0
 /**
  * Set DAM as an additional option. Changes are done in $config
  *
  * @param array $config configuration of TCA field
  * @param t3lib_TCEforms $parentObject parent object
  * @return void
  */
 public function user_MediaType(array &$config, t3lib_TCEforms $parentObject)
 {
     // if dam is loaded
     if (t3lib_extMgm::isLoaded('dam')) {
         $locallangFile = 'LLL:EXT:news/Resources/Private/Language/locallang_db.xml:';
         // additional entry
         $damEntry = array($GLOBALS['LANG']->sL($locallangFile . 'tx_news_domain_model_media.type.I.3'), '3', t3lib_extMgm::extRelPath('news') . 'Resources/Public/Icons/media_type_dam.gif');
         // add entry to type list
         array_push($config['items'], $damEntry);
     }
 }
예제 #30
0
 /**
  * Get path to ext_icon.gif from processing instruction key
  *
  * @param string $key Like tx_realurl_rebuild
  * @return string
  */
 protected function getExtensionIcon($key)
 {
     $extIcon = '';
     if (method_exists(t3lib_extMgm, 'getExtensionKeyByPrefix')) {
         $parts = explode('_', $key);
         if (is_array($parts) && count($parts) > 2) {
             $extensionKey = t3lib_extMgm::getExtensionKeyByPrefix('tx_' . $parts[1]);
             $extIcon = t3lib_extMgm::extRelPath($extensionKey) . 'ext_icon.gif';
         }
     }
     return $extIcon;
 }