Index: typo3/sysext/func/ext_emconf.php =================================================================== --- typo3/sysext/func/ext_emconf.php (revision 0) +++ typo3/sysext/func/ext_emconf.php (revision 0) @@ -0,0 +1,53 @@ + 'Web>Func', + 'description' => 'Advanced functions', + 'category' => 'module', + 'shy' => 1, + 'dependencies' => 'cms', + 'conflicts' => '', + 'priority' => '', + 'loadOrder' => '', + 'module' => 'view', + 'doNotLoadInFE' => 1, + 'state' => 'stable', + 'internal' => 0, + 'uploadfolder' => 0, + 'createDirs' => '', + 'modify_tables' => '', + 'clearCacheOnLoad' => 0, + 'lockType' => '', + 'author' => 'Kasper Skaarhoj', + 'author_email' => 'kasperYYYY@typo3.com', + 'author_company' => '', + 'CGLcompliance' => '', + 'CGLcompliance_note' => '', + 'version' => '1.0.0', + '_md5_values_when_last_written' => 'a:6:{s:12:"ext_icon.gif";s:4:"2d41";s:14:"ext_tables.php";s:4:"6f55";s:14:"mod1/clear.gif";s:4:"cc11";s:13:"mod1/conf.php";s:4:"ff90";s:13:"mod1/func.gif";s:4:"2d41";s:14:"mod1/index.php";s:4:"69d7";}', + 'constraints' => array( + 'depends' => array( + 'cms' => '', + 'php' => '5.1.0-0.0.0', + 'typo3' => '4.5.0-0.0.0', + ), + 'conflicts' => array( + ), + 'suggests' => array( + ), + ), + 'suggests' => array( + ), +); + +?> \ No newline at end of file Index: typo3/sysext/func/ext_icon.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: typo3\sysext\func\ext_icon.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: typo3/sysext/func/ext_tables.php =================================================================== --- typo3/sysext/func/ext_tables.php (revision 0) +++ typo3/sysext/func/ext_tables.php (revision 0) @@ -0,0 +1,9 @@ + \ No newline at end of file Index: typo3/sysext/func/mod1/clear.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: typo3\sysext\func\mod1\clear.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: typo3/sysext/func/mod1/conf.php =================================================================== --- typo3/sysext/func/mod1/conf.php (revision 0) +++ typo3/sysext/func/mod1/conf.php (revision 0) @@ -0,0 +1,11 @@ + \ No newline at end of file Index: typo3/sysext/func/mod1/func.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: typo3\sysext\func\mod1\func.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: typo3/sysext/func/mod1/index.php =================================================================== --- typo3/sysext/func/mod1/index.php (revision 0) +++ typo3/sysext/func/mod1/index.php (revision 0) @@ -0,0 +1,239 @@ + + */ +/** + * [CLASS/FUNCTION INDEX of SCRIPT] + * + * + * + * 71: class SC_mod_web_func_index extends t3lib_SCbase + * 84: function main() + * 172: function printContent() + * + * TOTAL FUNCTIONS: 2 + * (This index is automatically created/updated by the extension "extdeveval") + * + */ + + +unset($MCONF); +require('conf.php'); +require($BACK_PATH.'init.php'); +require($BACK_PATH.'template.php'); +$LANG->includeLLFile('EXT:lang/locallang_mod_web_func.xml'); + +$BE_USER->modAccess($MCONF,1); + + + +/** + * Script Class for the Web > Functions module + * This class creates the framework to which other extensions can connect their sub-modules + * + * @author Kasper Skaarhoj + * @package TYPO3 + * @subpackage core + */ +class SC_mod_web_func_index extends t3lib_SCbase { + + // Internal, dynamic: + var $pageinfo; + var $fileProcessor; + + /** + * Document Template Object + * + * @var mediumDoc + */ + var $doc; + + + + /** + * Initialize module header etc and call extObjContent function + * + * @return void + */ + function main() { + global $BE_USER,$LANG,$BACK_PATH; + + // Access check... + // The page will show only if there is a valid page and if this page may be viewed by the user + $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause); + $access = is_array($this->pageinfo) ? 1 : 0; + + // Template markers + $markers = array( + 'CSH' => '', + 'FUNC_MENU' => '', + 'CONTENT' => '' + ); + + $this->doc = t3lib_div::makeInstance('template'); + $this->doc->backPath = $BACK_PATH; + $this->doc->setModuleTemplate('templates/func.html'); + + // ************************** + // Main + // ************************** + if ($this->id && $access) { + // JavaScript + $this->doc->JScode = $this->doc->wrapScriptTags(' + script_ended = 0; + function jumpToUrl(URL) { // + window.location.href = URL; + } + '); + $this->doc->postCode=$this->doc->wrapScriptTags(' + script_ended = 1; + if (top.fsMod) top.fsMod.recentIds["web"] = '.intval($this->id).'; + '); + + + // Setting up the context sensitive menu: + $this->doc->getContextMenuCode(); + + $this->doc->form='
'; + + $vContent = $this->doc->getVersionSelector($this->id,1); + if ($vContent) { + $this->content.=$this->doc->section('',$vContent); + } + + + $this->extObjContent(); + + // Setting up the buttons and markers for docheader + $docHeaderButtons = $this->getButtons(); + $markers['CSH'] = $docHeaderButtons['csh']; + $markers['FUNC_MENU'] = t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']); + $markers['CONTENT'] = $this->content; + } else { + // If no access or if ID == zero + $flashMessage = t3lib_div::makeInstance( + 't3lib_FlashMessage', + $LANG->getLL('clickAPage_content'), + $LANG->getLL('title'), + t3lib_FlashMessage::INFO + ); + $this->content = $flashMessage->render(); + + // Setting up the buttons and markers for docheader + $docHeaderButtons = $this->getButtons(); + $markers['CSH'] = $docHeaderButtons['csh']; + $markers['CONTENT'] = $this->content; + } + // Build the for the module + $this->content = $this->doc->startPage($LANG->getLL('title')); + $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers); + $this->content.= $this->doc->endPage(); + $this->content = $this->doc->insertStylesAndJS($this->content); + } + + /** + * Print module content (from $this->content) + * + * @return void + */ + function printContent() { + echo $this->content; + } + + /** + * Create the panel of buttons for submitting the form or otherwise perform operations. + * + * @return array all available buttons as an assoc. array + */ + protected function getButtons() { + global $TCA, $LANG, $BACK_PATH, $BE_USER; + + $buttons = array( + 'csh' => '', + 'view' => '', + 'record_list' => '', + 'shortcut' => '', + ); + // CSH + $buttons['csh'] = t3lib_BEfunc::cshItem('_MOD_web_func', '', $GLOBALS['BACK_PATH'], '', TRUE); + + if($this->id && is_array($this->pageinfo)) { + + // View page + $buttons['view'] = '' . t3lib_iconWorks::getSpriteIcon('actions-document-view') . ''; + + // Shortcut + if ($BE_USER->mayMakeShortcut()) { + $buttons['shortcut'] = $this->doc->makeShortcutIcon('id, edit_record, pointer, new_unique_uid, search_field, search_levels, showLimit', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']); + } + + // If access to Web>List for user, then link to that module. + if ($BE_USER->check('modules','web_list')) { + $href = $BACK_PATH . 'db_list.php?id=' . $this->pageinfo['uid'] . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')); + $buttons['record_list'] = '' . + t3lib_iconWorks::getSpriteIcon('actions-system-list-open') . ''; + } + } + + return $buttons; + } +} + + +if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/mod/web/func/index.php']) { + include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/mod/web/func/index.php']); +} + + + +// Make instance: +$SOBE = t3lib_div::makeInstance('SC_mod_web_func_index'); +$SOBE->init(); + +// Include files? +foreach($SOBE->include_once as $INC_FILE) include_once($INC_FILE); +$SOBE->checkExtObj(); // Checking for first level external objects + +// Repeat Include files! - if any files has been added by second-level extensions +foreach($SOBE->include_once as $INC_FILE) include_once($INC_FILE); +$SOBE->checkSubExtObj(); // Checking second level external objects + +$SOBE->main(); +$SOBE->printContent(); + +?> \ No newline at end of file Index: typo3/sysext/info/ext_tables.php =================================================================== --- typo3/sysext/info/ext_tables.php (revision 0) +++ typo3/sysext/info/ext_tables.php (revision 0) @@ -0,0 +1,9 @@ + \ No newline at end of file