Main Page | Directories | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages | Examples

SC_alt_db_navframe Class Reference

List of all members.

Public Member Functions

 init ()
 Initialiation of the class.
 main ()
 Main function, rendering the browsable page tree.
 printContent ()
 Outputting the accumulated content to screen.
 initializeTemporaryDBmount ()
 Getting temporary DB mount.
 settingTemporaryMountPoint ($pageId)
 Setting temporary page id as DB mount.

Public Attributes

 $content
 $pagetree
 $doc
 $active_tempMountPoint = 0
 $currentSubScript
 $cMR
 $setTempDBmount

Member Function Documentation

SC_alt_db_navframe::init  ) 
 

Initialiation of the class.

Returns:
void

Definition at line 180 of file alt_db_navframe.php.

References initializeTemporaryDBmount().

00180                      {
00181       global $BE_USER,$BACK_PATH;
00182 
00183          // Setting GPvars:
00184       $this->currentSubScript = t3lib_div::_GP('currentSubScript');
00185       $this->cMR = t3lib_div::_GP('cMR');
00186       $this->setTempDBmount = t3lib_div::_GP('setTempDBmount');
00187 
00188          // Create page tree object:
00189       $this->pagetree = t3lib_div::makeInstance('localPageTree');
00190       $this->pagetree->ext_IconMode = $BE_USER->getTSConfigVal('options.pageTree.disableIconLinkToContextmenu');
00191       $this->pagetree->ext_showPageId = $BE_USER->getTSConfigVal('options.pageTree.showPageIdWithTitle');
00192       $this->pagetree->thisScript = 'alt_db_navframe.php';
00193       $this->pagetree->addField('alias');
00194       $this->pagetree->addField('shortcut');
00195       $this->pagetree->addField('shortcut_mode');
00196       $this->pagetree->addField('mount_pid');
00197       $this->pagetree->addField('mount_pid_ol');
00198       $this->pagetree->addField('nav_hide');
00199       $this->pagetree->addField('url');
00200 
00201 #     $this->settingTemporaryMountPoint(11);
00202          // Temporary DB mounts:
00203       $this->initializeTemporaryDBmount();
00204 
00205          // Setting highlight mode:
00206       $this->doHighlight = !$BE_USER->getTSConfigVal('options.pageTree.disableTitleHighlight');
00207 
00208          // Create template object:
00209       $this->doc = t3lib_div::makeInstance('template');
00210       $this->doc->docType='xhtml_trans';
00211 
00212          // Setting backPath
00213       $this->doc->backPath = $BACK_PATH;
00214 
00215          // Setting JavaScript for menu.
00216       $this->doc->JScode=$this->doc->wrapScriptTags(
00217    ($this->currentSubScript?'top.currentSubScript=unescape("'.rawurlencode($this->currentSubScript).'");':'').'
00218 
00219       // Function, loading the list frame from navigation tree:
00220    function jumpTo(id,linkObj,highLightID)   {  //
00221       var theUrl = top.TS.PATH_typo3+top.currentSubScript+"?id="+id;
00222 
00223       if (top.condensedMode)  {
00224          top.content.document.location=theUrl;
00225       } else {
00226          parent.list_frame.document.location=theUrl;
00227       }
00228 
00229       '.($this->doHighlight?'hilight_row("web",highLightID);':'').'
00230 
00231       '.(!$GLOBALS['CLIENT']['FORMSTYLE'] ? '' : 'if (linkObj) {linkObj.blur();}').'
00232       return false;
00233    }
00234 
00235       // Call this function, refresh_nav(), from another script in the backend if you want to refresh the navigation frame (eg. after having changed a page title or moved pages etc.)
00236       // See t3lib_BEfunc::getSetUpdateSignal()
00237    function refresh_nav()  {  //
00238       window.setTimeout("_refresh_nav();",0);
00239    }
00240    function _refresh_nav() {  //
00241       document.location="'.$this->pagetree->thisScript.'?unique='.time().'";
00242    }
00243 
00244       // Highlighting rows in the page tree:
00245    function hilight_row(frameSetModule,highLightID) { //
00246 
00247          // Remove old:
00248       theObj = document.getElementById(top.fsMod.navFrameHighlightedID[frameSetModule]);
00249       if (theObj) {
00250          theObj.style.backgroundColor="";
00251       }
00252 
00253          // Set new:
00254       top.fsMod.navFrameHighlightedID[frameSetModule] = highLightID;
00255       theObj = document.getElementById(highLightID);
00256       if (theObj) {
00257          theObj.style.backgroundColor="'.t3lib_div::modifyHTMLColorAll($this->doc->bgColor,-20).'";
00258       }
00259    }
00260 
00261    '.($this->cMR?"jumpTo(top.fsMod.recentIds['web'],'');":'').';
00262       ');
00263 
00264          // Click menu code is added:
00265       $CMparts=$this->doc->getContextMenuCode();
00266       $this->doc->bodyTagAdditions = $CMparts[1];
00267       $this->doc->JScode.= $CMparts[0];
00268       $this->doc->postCode.= $CMparts[2];
00269    }

SC_alt_db_navframe::initializeTemporaryDBmount  ) 
 

Getting temporary DB mount.

Returns:
void

Definition at line 354 of file alt_db_navframe.php.

References t3lib_BEfunc::readPageAccess().

Referenced by init().

00354                                         {
00355       global $BE_USER;
00356 
00357          // Set/Cancel Temporary DB Mount:
00358       if (strlen($this->setTempDBmount))  {
00359          $set = t3lib_div::intInRange($this->setTempDBmount,0);
00360          if ($set>0 && $BE_USER->isInWebMount($set))  {  // Setting...:
00361             $this->settingTemporaryMountPoint($set);
00362          } else { // Clear:
00363             $this->settingTemporaryMountPoint(0);
00364          }
00365       }
00366 
00367          // Getting temporary mount point ID:
00368       $temporaryMountPoint = intval($BE_USER->getSessionData('pageTree_temporaryMountPoint'));
00369 
00370          // If mount point ID existed and is within users real mount points, then set it temporarily:
00371       if ($temporaryMountPoint > 0 && $BE_USER->isInWebMount($temporaryMountPoint)) {
00372          $this->pagetree->MOUNTS = array($temporaryMountPoint);
00373          $this->active_tempMountPoint = t3lib_BEfunc::readPageAccess($temporaryMountPoint, $BE_USER->getPagePermsClause(1));
00374       }
00375    }

SC_alt_db_navframe::main  ) 
 

Main function, rendering the browsable page tree.

Returns:
void

Definition at line 276 of file alt_db_navframe.php.

References $LANG, and t3lib_BEfunc::cshItem().

00276                      {
00277       global $LANG,$CLIENT;
00278 
00279          // Produce browse-tree:
00280       $tree = $this->pagetree->getBrowsableTree();
00281 
00282          // Start page:
00283       $this->content = '';
00284       $this->content.= $this->doc->startPage('Page tree');
00285 
00286          // Outputting Temporary DB mount notice:
00287       if ($this->active_tempMountPoint)   {
00288          $this->content.= '
00289             <div class="bgColor4 c-notice">
00290                <img'.t3lib_iconWorks::skinImg('','gfx/icon_note.gif','width="18" height="16"').' align="top" alt="" />'.
00291                '<a href="'.htmlspecialchars(t3lib_div::linkThisScript(array('setTempDBmount' => 0))).'">'.
00292                $LANG->sl('LLL:EXT:lang/locallang_core.php:labels.temporaryDBmount',1).
00293                '</a><br/>
00294                '.$LANG->sl('LLL:EXT:lang/locallang_core.php:labels.path',1).': <span title="'.htmlspecialchars($this->active_tempMountPoint['_thePathFull']).'">'.htmlspecialchars(t3lib_div::fixed_lgd_cs($this->active_tempMountPoint['_thePath'],-50)).'</span>
00295             </div>
00296          ';
00297       }
00298 
00299          // Outputting page tree:
00300       $this->content.= $tree;
00301 
00302          // Outputting refresh-link
00303       $refreshUrl = t3lib_div::getIndpEnv('REQUEST_URI');
00304       $this->content.= '
00305          <p class="c-refresh">
00306             <a href="'.htmlspecialchars($refreshUrl).'">'.
00307             '<img'.t3lib_iconWorks::skinImg('','gfx/refresh_n.gif','width="14" height="14"').' title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:labels.refresh',1).'" alt="" />'.
00308             '</a><a href="'.htmlspecialchars($refreshUrl).'">'.
00309             $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.refresh',1).'</a>
00310          </p>
00311          <br />';
00312 
00313          // CSH icon:
00314       $this->content.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'pagetree', $GLOBALS['BACK_PATH']);
00315 
00316          // Adding highlight - JavaScript
00317       if ($this->doHighlight) $this->content .=$this->doc->wrapScriptTags('
00318          hilight_row("",top.fsMod.navFrameHighlightedID["web"]);
00319       ');
00320    }

SC_alt_db_navframe::printContent  ) 
 

Outputting the accumulated content to screen.

Returns:
void

Definition at line 327 of file alt_db_navframe.php.

00327                            {
00328       $this->content.= $this->doc->endPage();
00329       echo $this->content;
00330    }

SC_alt_db_navframe::settingTemporaryMountPoint pageId  ) 
 

Setting temporary page id as DB mount.

Parameters:
integer The page id to set as DB mount
Returns:
void

Definition at line 383 of file alt_db_navframe.php.

00383                                                 {
00384       global $BE_USER;
00385 
00386          // Setting temporary mount point ID:
00387       $BE_USER->setAndSaveSessionData('pageTree_temporaryMountPoint',intval($pageId));
00388    }


Member Data Documentation

SC_alt_db_navframe::$active_tempMountPoint = 0
 

Definition at line 168 of file alt_db_navframe.php.

SC_alt_db_navframe::$cMR
 

Definition at line 172 of file alt_db_navframe.php.

SC_alt_db_navframe::$content
 

Definition at line 165 of file alt_db_navframe.php.

SC_alt_db_navframe::$currentSubScript
 

Definition at line 171 of file alt_db_navframe.php.

SC_alt_db_navframe::$doc
 

Definition at line 167 of file alt_db_navframe.php.

SC_alt_db_navframe::$pagetree
 

Definition at line 166 of file alt_db_navframe.php.

SC_alt_db_navframe::$setTempDBmount
 

Definition at line 173 of file alt_db_navframe.php.


The documentation for this class was generated from the following file:
Generated on Sun Oct 3 01:06:27 2004 for TYPO3core 3.7.0 dev by  doxygen 1.3.8-20040913