Taskcenter refactored and prepared for new workflow module (second try cvsprobs)
authorChristian Jul Jensen <christian.jensen@typo3.org>
Wed, 15 Dec 2004 08:33:34 +0000 (08:33 +0000)
committerChristian Jul Jensen <christian.jensen@typo3.org>
Wed, 15 Dec 2004 08:33:34 +0000 (08:33 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@519 709f56b5-9817-0410-a4d7-c38de5d9e867

typo3/alt_main.php
typo3/sysext/taskcenter/ext_emconf.php
typo3/sysext/taskcenter/task/class.mod_user_task.php
typo3/sysext/taskcenter/task/conf.php
typo3/sysext/taskcenter/task/index.php

index f4ddc87..1fec289 100755 (executable)
@@ -438,7 +438,7 @@ class SC_alt_main {
                $this->content.=$GLOBALS['TBE_TEMPLATE']->startPage($title);
 
                        // Creates frameset
-               $fr_content = '<frame name="content" src="'.($BE_USER->uc['startInTaskCenter']&&t3lib_extMgm::isLoaded('taskcenter')?t3lib_extMgm::extRelPath('taskcenter').'task/frameset.php':'alt_intro.php').'" marginwidth="0" marginheight="0" frameborder="0" scrolling="auto" noresize="noresize" />';
+               $fr_content = '<frame name="content" src="'.($BE_USER->uc['startInTaskCenter']&&t3lib_extMgm::isLoaded('taskcenter')?t3lib_extMgm::extRelPath('taskcenter').'task/index.php':'alt_intro.php').'" marginwidth="0" marginheight="0" frameborder="0" scrolling="auto" noresize="noresize" />';
                $fr_toplogo = '<frame name="toplogo" src="alt_toplogo.php" marginwidth="0" marginheight="0" frameborder="0" scrolling="no" noresize="noresize" />';
                $fr_topmenu = '<frame name="topmenuFrame" src="alt_topmenu_dummy.php" marginwidth="0" marginheight="0" frameborder="0" scrolling="no" noresize="noresize" />';
 
index ac4067f..187bd9e 100755 (executable)
@@ -3,7 +3,7 @@
 ########################################################################
 # Extension Manager/Repository config file for ext: "taskcenter"
 # 
-# Auto generated 17-11-2004 17:49
+# Auto generated 14-12-2004 14:42
 # 
 # Manual updates:
 # Only the data in the array - anything else is removed by next write
@@ -36,7 +36,7 @@ $EM_CONF[$_EXTKEY] = Array (
        'private' => 0,
        'download_password' => '',
        'version' => '0.1.2',   // Don't modify this! Managed automatically during upload to repository.
-       '_md5_values_when_last_written' => 'a:17:{s:12:"ext_icon.gif";s:4:"fc53";s:14:"ext_tables.php";s:4:"837d";s:28:"task/class.mod_user_task.php";s:4:"06ca";s:14:"task/clear.gif";s:4:"cc11";s:13:"task/conf.php";s:4:"aba9";s:17:"task/frameset.php";s:4:"7115";s:14:"task/index.php";s:4:"6ed0";s:18:"task/locallang.xml";s:4:"1831";s:22:"task/locallang_mod.xml";s:4:"5b3c";s:17:"task/overview.php";s:4:"5981";s:13:"task/task.gif";s:4:"fc53";s:16:"task/CVS/Entries";s:4:"51c8";s:19:"task/CVS/Repository";s:4:"752c";s:13:"task/CVS/Root";s:4:"0ea2";s:11:"CVS/Entries";s:4:"41c7";s:14:"CVS/Repository";s:4:"e70d";s:8:"CVS/Root";s:4:"0ea2";}',
+       '_md5_values_when_last_written' => 'a:13:{s:11:"CVS/Entries";s:4:"9c6f";s:14:"CVS/Repository";s:4:"e16f";s:8:"CVS/Root";s:4:"e21b";s:28:"task/class.mod_user_task.php";s:4:"3c2f";s:14:"task/clear.gif";s:4:"cc11";s:13:"task/conf.php";s:4:"c23d";s:14:"task/index.php";s:4:"b51d";s:18:"task/locallang.php";s:4:"97ec";s:22:"task/locallang_mod.php";s:4:"62be";s:13:"task/task.gif";s:4:"fc53";s:16:"task/CVS/Entries";s:4:"c7fb";s:19:"task/CVS/Repository";s:4:"6412";s:13:"task/CVS/Root";s:4:"e21b";}',
 );
 
 ?>
\ No newline at end of file
index dcf7c45..2adc6d6 100755 (executable)
 <?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 1999-2004 Kasper Skaarhoj (kasperYYYY@typo3.com)
-*  All rights reserved
-*
-*  This script is part of the TYPO3 project. The TYPO3 project is
-*  free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2 of the License, or
-*  (at your option) any later version.
-*
-*  The GNU General Public License can be found at
-*  http://www.gnu.org/copyleft/gpl.html.
-*  A copy is found in the textfile GPL.txt and important notices to the license
-*  from the author is found in LICENSE.txt distributed with these scripts.
-*
-*
-*  This script is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*  GNU General Public License for more details.
-*
-*  This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
-/**
- * Module class for task module
- *
- * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
- */
+       /***************************************************************
+       *  Copyright notice
+       *
+       *  (c) 1999-2004 Kasper Skaarhoj (kasper@typo3.com)
+       *  All rights reserved
+       *
+       *  This script is part of the TYPO3 project. The TYPO3 project is
+       *  free software; you can redistribute it and/or modify
+       *  it under the terms of the GNU General Public License as published by
+       *  the Free Software Foundation; either version 2 of the License, or
+       *  (at your option) any later version.
+       *
+       *  The GNU General Public License can be found at
+       *  http://www.gnu.org/copyleft/gpl.html.
+       *  A copy is found in the textfile GPL.txt and important notices to the license
+       *  from the author is found in LICENSE.txt distributed with these scripts.
+       *
+       *
+       *  This script is distributed in the hope that it will be useful,
+       *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+       *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+       *  GNU General Public License for more details.
+       *
+       *  This copyright notice MUST APPEAR in all copies of the script!
+       ***************************************************************/
+       /**
+       * Module class for task module
+       *
+       * @author Kasper Skårhøj <kasperYYYY@typo3.com>
+       * @author Christian Jul Jensen <christian(at)jul(dot)net>
+       *                                       Revision for TYPO3 3.8.0 / Native Workflow System
+       */
+        
+       require_once(PATH_t3lib.'class.t3lib_extobjbase.php');
+        
+       class mod_user_task extends t3lib_extobjbase {
+               var $getUserNamesFields = 'username,usergroup,usergroup_cached_list,uid,realName,email';
+               var $userGroupArray = array();
+               var $perms_clause = '';
+                
+               var $backPath;
+               var $BE_USER;
+                
+               function JScode() {
+                        
+               }
+                
+               /**
+               * Send an email...
+               *
+               * @param string  $email: the email address to send to
+               * @param string  $subject: the subject of the emil
+               * @param string  $message: the message body of the email
+               * @return void
+               *
+               * @todo this function is from the old implementation of the
+               *       taskcenter, it should be updated to modern standards
+               */
+               function sendEmail($email, $subject, $message) {
+                       $sender = $this->BE_USER->user['realName'].' <'.$this->BE_USER->user['email'].'>';
+                       $message .= '
+                                
+                               --------
+                               '.sprintf($GLOBALS['LANG']->getLL('messages_emailFooter'), $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'], t3lib_div::getIndpEnv('HTTP_HOST'));
+                       mail($email, $GLOBALS['TYPO3_CONF_VARS']['BE']['notificationPrefix'].' '.$subject, $message, "From: ".$sender);
+                        
+                       //  debug($email);
+                       //  debug($message);
+               }
+                
+               /**
+               * Initialise the object
+               *
+               * @param object  $BE_USER: instance of t3lib_beuserauth representing the current be user.
+               * @return void
+               */
+               function mod_user_task_init($BE_USER) {
+                       debug($BE_USER,'$BE_USER',__LINE__,__FILE__);
 
-require_once(PATH_t3lib."class.t3lib_extobjbase.php");
+                       $this->BE_USER = $BE_USER;
+                       $this->perms_clause = $this->BE_USER->getPagePermsClause(1);
+               }
+                
+               /**
+               * Return helpbubble image
+               *
+               * @return string  image tag (HTML)
+               */
+               function helpBubble() {
+                       return '<img src="'.$this->backPath.'gfx/helpbubble.gif" width="14" height="14" hspace=2 align=top'.$GLOBALS['SOBE']->doc->helpStyle().'>';
+               }
+                
+                
+               /**
+               * Create a link to the module with the name of the module as link text.
+               *
+               * @param string  $key: the classname of the module
+               * @param bool    $dontLink: Just return the name of the module without a link.
+               * @param stting  $params: HTTP GET parameter string to add to the link (not used if dontLink true)
+               * @return string  link (HTML) / name of module (regular string)
+               */
+               function headLink($key, $dontLink = false, $params = '') {
+                       debug($this->BE_USER->uc,'$this->BE_USER->uc',__LINE__,__FILE__);
 
-class mod_user_task extends t3lib_extobjbase {
-       var $getUserNamesFields = "username,usergroup,usergroup_cached_list,uid,realName,email";
-       var $userGroupArray=array();
-       var $perms_clause="";
-
-       var $backPath;
-       var $BE_USER;
-
-       function JScode()       {
-
-       }
-       function sendEmail($email,$subject,$message)    {
-               $sender = $this->BE_USER->user["realName"]." <".$this->BE_USER->user["email"].">";
-               $message.='
-
---------
-'.sprintf($GLOBALS["LANG"]->getLL("messages_emailFooter"),$GLOBALS["TYPO3_CONF_VARS"]["SYS"]["sitename"],t3lib_div::getIndpEnv("HTTP_HOST"));
-               mail($email,$GLOBALS["TYPO3_CONF_VARS"]["BE"]["notificationPrefix"]." ".$subject,$message,"From: ".$sender);
-
-//             debug($email);
-//             debug($message);
-       }
-       function mod_user_task_init($BE_USER)   {
-               $this->BE_USER = $BE_USER;
-               $this->perms_clause = $this->BE_USER->getPagePermsClause(1);
-       }
-       function helpBubble()   {
-               return '<img src="'.$this->backPath.'gfx/helpbubble.gif" width="14" height="14" hspace=2 align=top'.$GLOBALS["SOBE"]->doc->helpStyle().'>';
-       }
-       function loadLeftFrameJS()      {
-               $str = '<script language="javascript" type="text/javascript">if (parent.nav_frame)      parent.nav_frame.document.location="overview.php";</script>';
-               return $str;
-       }
-       function headLink($key,$dontLink=0,$params="")  {
-               $str = $GLOBALS["SOBE"]->MOD_MENU["function"][$key];
-               if (!$dontLink) $str = '<a href="index.php?SET[function]='.$key.$params.'" target="list_frame" onClick="this.blur();">'.htmlspecialchars($str).'</a>';
-               return $str;
-       }
-       function fixed_lgd($str,$len=0) {
-               return t3lib_div::fixed_lgd($str,$len?$len:$this->BE_USER->uc["titleLen"]);
-       }
-       function errorIcon()    {
-               return '<img src="'.$this->backPath.'gfx/icon_fatalerror.gif" width="18" height="16" align=top>';
-       }
-       function getUserAndGroupArrays()        {
+                       $str = $GLOBALS['SOBE']->MOD_MENU['function'][$key];
+                       if (!$dontLink) $str = '<a href="index.php?SET[function]='.$key.$params.'" onClick="this.blur();">'.htmlspecialchars($str).'</a>';
+                       return $str;
+               }
+                
+               /**
+               * Return a string cropped to a fixed length according to system setting or parameter
+               *
+               * @param string  $str: string to be cropped.
+               * @param int       $len: length of the cropped string, system settings is used if none is given
+               * @return string        cropped string
+               */
+               function fixed_lgd($str, $len = 0) {
+                       return t3lib_div::fixed_lgd($str, $len?$len:$this->BE_USER->uc['titleLen']);
+               }
+                
+               /**
+               * Return an error icon
+               *
+               * @return string        Image tag (HTML)
+               */
+               function errorIcon() {
+                       return '<img src="'.$this->backPath.'gfx/icon_fatalerror.gif" width="18" height="16" align=top>';
+               }
+                
+               /**
+               * [Describe function...]
+               *
+               * @return array  ...
+               */
+               function getUserAndGroupArrays() {
                        // Get groupnames for todo-tasks
-               $be_group_Array=t3lib_BEfunc::getListGroupNames("title,uid");
-               $groupArray=array_keys($be_group_Array);
+                       $be_group_Array = t3lib_BEfunc::getListGroupNames('title,uid');
+                       $groupArray = array_keys($be_group_Array);
                        // Usernames
-               $be_user_Array = $be_user_Array_o = t3lib_BEfunc::getUserNames($this->getUserNamesFields);
-               if (!$GLOBALS["BE_USER"]->isAdmin())            $be_user_Array = t3lib_BEfunc::blindUserNames($be_user_Array,$groupArray,1);
-
-               $this->userGroupArray = array($be_user_Array,$be_group_Array,$be_user_Array_o);
-               return $this->userGroupArray;
+                       $be_user_Array = $be_user_Array_o = t3lib_BEfunc::getUserNames($this->getUserNamesFields);
+                       if (!$GLOBALS['BE_USER']->isAdmin()) $be_user_Array = t3lib_BEfunc::blindUserNames($be_user_Array, $groupArray, 1);
+                                
+                       $this->userGroupArray = array($be_user_Array, $be_group_Array, $be_user_Array_o);
+                       return $this->userGroupArray;
+               }
+                
+               /**
+               * [Describe function...]
+               *
+               * @param [type]  $tstamp: ...
+               * @param [type]  $prefix: ...
+               * @return [type]  ...
+               */
+               function dateTimeAge($tstamp, $prefix = 1) {
+                       return t3lib_BEfunc::dateTimeAge($tstamp, $prefix);
+               }
+                
+               /**
+               * [Describe function...]
+               *
+               * @param [type]  $mod: ...
+               * @return [type]  ...
+               */
+               function accessMod($mod) {
+                       return $this->BE_USER->modAccess(array('name' => $mod, 'access' => 'user,group'), 0);
+               }
+                
+               /**
+               * Create configuration for entry in the left tab menu.
+               *
+               * @param string  $htmlContent: Content that does not get escaped, use this for icons links etc. (HTML)
+               * @param string  $label: Title of the tab, escaped for HTML, dispalyed after html content.
+               * @param string  $content: html content that gets displayed when the tab is activated. (HTML)
+               * @param string  $popUpDescription: alt-text for the tab text
+               * @return array         proper configuration for the tab menu.
+               */
+               function mkMenuConfig($htmlContent, $label = "", $content = "", $popUpDescription = '') {
+                       $configArr = Array();
+                       if ((string) $htmlContent) $configArr['icon'] = $htmlContent;
+                       if ((string) $label) $configArr['label'] = $label;
+                       if ((string) $content) $configArr['content'] = $content;
+                       if ((string) $linkTitle) $configArr['linkTitle'] = $linkTitle;
+                       return $configArr;
+               }
+                
+               /**
+               * Returns HTML code to dislay an url in an iframe with the right side of the taskcenter
+               *
+               * @param string  $url: url to display
+               * @return string        code that inserts the iframe (HTML)
+               */
+               function urlInIframe($url) {
+                       return '<iframe src="'.$url.'" width="100%" height="100%" style="width: 100%; height: 1200px; border: none;" />';
+               }
+                
+                
        }
-       function dateTimeAge($tstamp,$prefix=1) {
-               return t3lib_BEfunc::dateTimeAge($tstamp,$prefix);
+        
+       // Include extension?
+       if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/taskcenter/task/class.mod_user_task.php']) {
+               include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/taskcenter/task/class.mod_user_task.php']);
        }
-       function accessMod($mod)        {
-               return $this->BE_USER->modAccess(array("name"=>$mod,"access"=>"user,group"),0);
-       }
-}
-
-// Include extension?
-if (defined("TYPO3_MODE") && $TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["ext/taskcenter/task/class.mod_user_task.php"])    {
-       include_once($TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["ext/taskcenter/task/class.mod_user_task.php"]);
-}
-
-
-?>
\ No newline at end of file
+        
+        
+?>
index e10de71..8c709ee 100755 (executable)
@@ -5,7 +5,7 @@ $BACK_PATH='../../../';
 $MLANG['default']['tabs_images']['tab'] = 'task.gif';
 $MLANG['default']['ll_ref']='LLL:EXT:taskcenter/task/locallang_mod.php';
 
-$MCONF['script']='frameset.php';
+$MCONF['script']='index.php';
 $MCONF['access']='group,user';
 $MCONF['name']='user_task';
 ?>
\ No newline at end of file
index 9223837..2d41deb 100755 (executable)
 <?php
-/***************************************************************
-*  Copyright notice
-*  
-*  (c) 1999-2004 Kasper Skaarhoj (kasperYYYY@typo3.com)
-*  All rights reserved
-*
-*  This script is part of the TYPO3 project. The TYPO3 project is 
-*  free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2 of the License, or
-*  (at your option) any later version.
-* 
-*  The GNU General Public License can be found at
-*  http://www.gnu.org/copyleft/gpl.html.
-*  A copy is found in the textfile GPL.txt and important notices to the license 
-*  from the author is found in LICENSE.txt distributed with these scripts.
-*
-* 
-*  This script is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*  GNU General Public License for more details.
-*
-*  This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
-/** 
- * User Task Center
- *
- * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
- */
-
-
-unset($MCONF);
-require ("conf.php");
-require ($BACK_PATH."init.php");
-require ($BACK_PATH."template.php");
-$LANG->includeLLFile("EXT:taskcenter/task/locallang.php");
-require_once(PATH_t3lib."class.t3lib_scbase.php");
-require_once("class.mod_user_task.php");
-
-$BE_USER->modAccess($MCONF,1);
-
-
-// ***************************
-// Script Classes
-// ***************************
-class SC_mod_user_task_index extends t3lib_SCbase {
-       var $BE_USER;
-       
-       function main() {
-               global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;
-
-               $this->doc = t3lib_div::makeInstance("mediumDoc");
-               $this->doc->form='<form action="index.php" method="POST" name="editform">';
-               $this->backPath = $this->doc->backPath = $BACK_PATH;
-
-               $this->doc->JScode = '
-               <script language="javascript" type="text/javascript">
-                       script_ended = 0;
-                       function jumpToUrl(URL) {
-                               document.location = URL;
+       /***************************************************************
+       *  Copyright notice
+       *
+       *  (c) 1999-2004 Kasper Skaarhoj (kasper@typo3.com)
+       *  All rights reserved
+       *
+       *  This script is part of the TYPO3 project. The TYPO3 project is
+       *  free software; you can redistribute it and/or modify
+       *  it under the terms of the GNU General Public License as published by
+       *  the Free Software Foundation; either version 2 of the License, or
+       *  (at your option) any later version.
+       *
+       *  The GNU General Public License can be found at
+       *  http://www.gnu.org/copyleft/gpl.html.
+       *  A copy is found in the textfile GPL.txt and important notices to the license
+       *  from the author is found in LICENSE.txt distributed with these scripts.
+       *
+       *
+       *  This script is distributed in the hope that it will be useful,
+       *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+       *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+       *  GNU General Public License for more details.
+       *
+       *  This copyright notice MUST APPEAR in all copies of the script!
+       ***************************************************************/
+       /**
+       * User Task Center
+       *
+       * @author Kasper Skårhøj <kasperYYYY@typo3.com>
+       * @author Christian Jul Jensen <christian(at)jul(dot)net>
+       *     Revision for TYPO3 3.8.0 / Native Workflow System
+       */
+        
+        
+       unset($MCONF);
+       require ('conf.php');
+       require ($BACK_PATH.'init.php');
+       require ($BACK_PATH.'template.php');
+       $LANG->includeLLFile('EXT:taskcenter/task/locallang.php');
+       require_once(PATH_t3lib.'class.t3lib_scbase.php');
+       require_once('class.mod_user_task.php');
+        
+       $BE_USER->modAccess($MCONF, 1);
+        
+        
+       // ***************************
+       // Script Classes
+       // ***************************
+       class SC_mod_user_task_index extends t3lib_SCbase {
+               var $allExtClassConf = array();
+               var $backPath;
+               var $BE_USER;
+                
+               /**
+               * This makes sure that all classes of task-center related extensions are included
+               * Further it registers the classes in the variable $this->allExtClassConf
+               *
+               * @return void
+               */
+               function includeAllClasses() {
+                       foreach($this->MOD_MENU['function'] as $key => $name) {
+                               $curExtClassConf = $this->getExternalItemConfig($this->MCONF['name'], 'function', $key);
+                               if (is_array($curExtClassConf) && $curExtClassConf['path']) {
+                                       $this->allExtClassConf[] = $curExtClassConf;
+                                       $this->include_once[] = $curExtClassConf['path'];
+                               }
                        }
-                       '.(is_object($this->extObj)?$this->extObj->JScode():"").'
-               </script>
-               ';
-               
-               $this->content="";
-               $this->content.=$this->doc->startPage($this->MOD_MENU["function"][$this->MOD_SETTINGS["function"]]);
-               $this->content.=$this->doc->header($this->MOD_MENU["function"][$this->MOD_SETTINGS["function"]]);
-               $this->content.=$this->doc->spacer(5);
-
-
-               /*
-               if (!$BE_USER->isAdmin())       {
-                                       // This is used to test with other users. Development ONLY!
-                               $BE_USER = t3lib_div::makeInstance("t3lib_beUserAuth"); // New backend user object
-                               $BE_USER->OS = TYPO3_OS;
-                               $BE_USER->setBeUserByUid(4);
-                               $BE_USER->fetchGroupData();
                }
+                
+               /**
+               * This is the main function called by the TYPO3 framework
+               *
+               * @return string  The conntent of the module (HTML)
                */
+               function main() {
+                       global $BE_USER, $LANG, $BACK_PATH, $TCA_DESCR, $TCA, $CLIENT, $TYPO3_CONF_VARS;
+                       debug($this->extClassConf, '$this->extClassConf', __LINE__, __FILE__);
+                       debug($this->allExtClassConf, '$this->allExtClassConf', __LINE__, __FILE__);
+                        
+                       /* Setup document template */
+                       $this->doc = t3lib_div::makeInstance('noDoc');
+                       $this->doc->docType = 'xhtml_trans';
+                       $this->doc->divClass = '';
+                       $this->doc->form = '<form action="index.php" method="POST" name="editform">';
+                       $this->backPath = $this->doc->backPath = $BACK_PATH;
+                       $this->doc->JScode = '  <script language="javascript" type="text/javascript">
+                               script_ended = 0;
+                               function jumpToUrl(URL) {
+                               document.location = URL;
+                               }
+                               '.(is_object($this->extObj)?$this->extObj->JScode():"").'
+                               </script>
+                               ';
+                       $this->doc->JScode .= $this->doc->getDynTabMenuJScode();
+                        
+                       //DEV - remove before release;
+                       $this->doc->parseTimeFlag = true;
+                        
+                       /* call getMainContent first, because what happens here might affect leftContent */
+                       $mainContent = $this->getMainContent();
+
+                       /* content... */
+                       $this->content = '';
+                       $this->content .= $this->doc->startPage($this->MOD_MENU['function'][$this->MOD_SETTINGS['function']]);
+                       $this->content .= '<table style="width: 100%"><tr>';
+                       $this->content .= '<td valign="top" style="width: 20%;">'.$this->getleftHeader().$this->getDynTabMenu().'</td>';
+                       $this->content .= '<td valign="top">'.$mainContent.'</td>';
+                       $this->content .= '</tr></table>';
+               }
 
-               if (is_object($this->extObj))   {
-                       $this->extObj->backPath = $this->backPath;
-                       $this->extObj->mod_user_task_init($BE_USER);
-                       $this->content.=$this->extObj->main();
+               /** Generate the dynamic tab menu in the left side by iterating
+               * over all submodules and creating configurations.
+               *
+               * @return string  the code for the dynamic tab menu (HTML)
+               */
+               Function getDynTabMenu() {
+                       //walk through registered submodules and generate configuration
+                       //for tabmenu
+                       $parts = Array();
+                       foreach($this->allExtClassConf as $conf) {
+                               $extObj = t3lib_div::makeInstance($conf['name']);
+                               /* call init to make sure the LOCAL_LANG is included for all listed
+                               * extensions. If they OVERRIDE each other there is trouble! */
+                               $extObj->init($this, $conf);
+                               $extObj->backPath = $this->backPath;
+                               $extObj->mod_user_task_init($GLOBALS['BE_USER']);
+                               $part = $extObj->overview_main();
+                               if (is_array($part)) {
+                                       $parts[] = $part;
+                               }
+                       }
+                       return $this->doc->getDynTabMenu($parts, 'tx_taskcenter', 1, true);
+               }
+                
+               /**
+               * Generate the header of the left column
+               *
+               * @return string  header in the left side (HTML)
+               */
+               function getleftHeader() {
+                       $name = $GLOBALS['BE_USER']->user['realName']?$GLOBALS['BE_USER']->user['realName']:
+                       $GLOBALS['BE_USER']->user['username'];
+                       return '<h1>TYPO3 taskcenter <br />'.$name.'</h1>';
+                        
+               }
+                
+               /**
+               * Get the main content for the module by initiating the external object (if any) and calling it's main function.
+               *
+               * @return string main content (HTML)
+               */
+               function getMainContent() {
+                       if (is_object($this->extObj)) {
+                               $this->extObj->backPath = $this->backPath;
+                               $this->extObj->mod_user_task_init($GLOBALS['BE_USER']);
+                               return $this->extObj->main();
+                       }
+               }
+                
+               /**
+               * Output the content of the object to the browser
+               *
+               * @return void
+               */
+               function printContent() {
+                       $this->content .= $this->doc->endPage();
+                       echo $this->content;
                }
+                
        }
-       function printContent() {
-
-               $this->content.=$this->doc->endPage();
-               echo $this->content;
+        
+        
+        
+       // Include extension?
+       if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/taskcenter/task/index.php']) {
+               include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/taskcenter/task/index.php']);
        }
-}
-
-// Include extension?
-if (defined("TYPO3_MODE") && $TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["ext/taskcenter/task/index.php"])  {
-       include_once($TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["ext/taskcenter/task/index.php"]);
-}
-
-
-
-
-
-
-
-
-
-
-
-
-// Make instance:
-$SOBE = t3lib_div::makeInstance("SC_mod_user_task_index");
-$SOBE->init();
-
-// Include files?
-foreach($SOBE->include_once as $INC_FILE)      include_once($INC_FILE);
-$SOBE->checkExtObj();  // Checking for first level external objects
-
-$SOBE->main();
-$SOBE->printContent();
-?>
\ No newline at end of file
+        
+        
+        
+        
+        
+        
+        
+        
+        
+        
+        
+       // Make instance:
+       $SOBE = t3lib_div::makeInstance('SC_mod_user_task_index');
+       $SOBE->init();
+       $SOBE->includeAllClasses();
+        
+       // Include files?
+       foreach($SOBE->include_once as $INC_FILE) include_once($INC_FILE);
+       $SOBE->checkExtObj(); // Checking for first level external objects
+        
+       $SOBE->main();
+       $SOBE->printContent();
+?>