Public Member Functions | |
modMenu () | |
Adds menu items... | |
main () | |
Main function creating the content for the module. | |
helpBubble () | |
Return the helpbubble image tag. |
|
Return the helpbubble image tag.
Definition at line 179 of file class.tx_wizardcrpages_webfunc_2.php. 00179 { 00180 return '<img src="'.$GLOBALS['BACK_PATH'].'gfx/helpbubble.gif" width="14" height="14" hspace="2" align="top"'.$this->pObj->doc->helpStyle().' alt="" />'; 00181 }
|
|
Main function creating the content for the module.
Definition at line 95 of file class.tx_wizardcrpages_webfunc_2.php. References $a, $LANG, $out, t3lib_BEfunc::cshItem(), t3lib_BEfunc::getRecord(), t3lib_BEfunc::getSetUpdateSignal(), and t3lib_extMgm::isLoaded(). 00095 { 00096 global $SOBE,$LANG; 00097 00098 $theCode=''; 00099 00100 $m_perms_clause = $GLOBALS['BE_USER']->getPagePermsClause(8); // create new pages here? 00101 $pRec = t3lib_BEfunc::getRecord ('pages',$this->pObj->id,'uid',' AND '.$m_perms_clause); 00102 $sys_pages = t3lib_div::makeInstance('t3lib_pageSelect'); 00103 $menuItems = $sys_pages->getMenu($this->pObj->id); 00104 if (is_array($pRec)) { 00105 $data = t3lib_div::_GP('data'); 00106 if (is_array($data['pages'])) { 00107 if (t3lib_div::_GP('createInListEnd')) { 00108 $endI = end($menuItems); 00109 $thePid = -intval($endI['uid']); 00110 if (!$thePid) $thePid = $this->pObj->id; 00111 } else { 00112 $thePid = $this->pObj->id; 00113 } 00114 00115 while(list($k,$dat)=each($data['pages'])) { 00116 if (!trim($dat['title'])) { 00117 unset($data['pages'][$k]); 00118 } else { 00119 $data['pages'][$k]['pid']=$thePid; 00120 $data['pages'][$k]['hidden'] = t3lib_div::_GP('hidePages') ? 1 : 0; 00121 } 00122 } 00123 if (count($data['pages'])) { 00124 reset($data); 00125 $tce = t3lib_div::makeInstance('t3lib_TCEmain'); 00126 $tce->stripslashes_values=0; 00127 $tce->reverseOrder=1; 00128 $tce->start($data,array()); 00129 $tce->process_datamap(); 00130 t3lib_BEfunc::getSetUpdateSignal('updatePageTree'); 00131 } else { 00132 $theCode.=$GLOBALS['TBE_TEMPLATE']->rfw($LANG->getLL('wiz_newPages_noCreate').'<br /><br />'); 00133 } 00134 00135 // Display result: 00136 $menuItems = $sys_pages->getMenu($this->pObj->id); 00137 reset($menuItems); 00138 $lines=array(); 00139 while(list(,$rec)=each($menuItems)) { 00140 $lines[]= '<nobr>'.t3lib_iconWorks::getIconImage('pages',$rec,$GLOBALS['BACK_PATH'],'align="top" '.t3lib_BEfunc::titleAttribForPages($rec)). 00141 htmlspecialchars(t3lib_div::fixed_lgd_cs($rec['title'],$GLOBALS['BE_USER']->uc['titleLen'])).'</nobr>'; 00142 } 00143 $theCode.= '<b>'.$LANG->getLL('wiz_newPages_currentMenu').':</b><br /><br />'.implode('<br />',$lines); 00144 } else { 00145 // Create loremIpsum code: 00146 if (t3lib_extMgm::isLoaded('lorem_ipsum')) { 00147 $loremIpsumObj = t3lib_div::getUserObj('EXT:lorem_ipsum/class.tx_loremipsum_wiz.php:tx_loremipsum_wiz'); 00148 } 00149 // Display create form 00150 $lines = array(); 00151 for ($a=0;$a<9;$a++) { 00152 $lines[] = $LANG->getLL('wiz_newPages_page').' '.($a+1). 00153 ': <input type="text" name="data[pages][NEW'.$a.'][title]"'.$this->pObj->doc->formWidth(35).' />'. 00154 (is_object($loremIpsumObj) ? '<a href="#" onclick="'.htmlspecialchars($loremIpsumObj->getHeaderTitleJS('document.forms[0][\'data[pages][NEW'.$a.'][title]\'].value', 'title')).'">'.$loremIpsumObj->getIcon('',$this->pObj->doc->backPath).'</a>' : ''); 00155 } 00156 00157 $theCode.= '<b>'.$LANG->getLL('wiz_newPages').':</b><br /><br />'.implode('<br />',$lines). 00158 '<br /><br /> 00159 <input type="checkbox" name="createInListEnd" value="1" />'.$LANG->getLL('wiz_newPages_listEnd').'<br /> 00160 <input type="checkbox" name="hidePages" value="1" />'.$LANG->getLL('wiz_newPages_hidePages').'<br /> 00161 <input type="submit" name="create" value="'.$LANG->getLL('wiz_newPages_lCreate').'" onclick="return confirm('.$GLOBALS['LANG']->JScharCode($GLOBALS['LANG']->getLL('wiz_newPages_lCreate_msg1')).')"> <input type="reset" value="'.$LANG->getLL('wiz_newPages_lReset').'" />'; 00162 } 00163 } else { 00164 $theCode.=$GLOBALS['TBE_TEMPLATE']->rfw($LANG->getLL('wiz_newPages_errorMsg1')); 00165 } 00166 00167 // CSH 00168 $theCode.= t3lib_BEfunc::cshItem('_MOD_web_func', 'tx_wizardcrpages', $GLOBALS['BACK_PATH'],'<br/>|'); 00169 00170 $out=$this->pObj->doc->section($LANG->getLL('wiz_crMany'),$theCode,0,1); 00171 return $out; 00172 }
|
|
Adds menu items... but I think this is not used at all. Looks very much like some testing code. If anyone cares to check it we can remove it some day...
Definition at line 78 of file class.tx_wizardcrpages_webfunc_2.php. 00078 { 00079 global $LANG; 00080 00081 $modMenuAdd = array( 00082 'cr_333' => array( 00083 '0' => 'nul', 00084 '1' => 'et' 00085 ) 00086 ); 00087 return $modMenuAdd; 00088 }
|