Inherited by localFolderTree::rteFolderTree, and localFolderTree::TBE_FolderTree.
Public Member Functions | |
| wrapTitle ($title, $v) | |
| Wrapping the title in a link, if applicable. | |
| ext_isLinkable ($v) | |
| Returns true if the input "record" contains a folder which can be linked. | |
| PM_ATagWrap ($icon, $cmd, $bMark='') | |
| Wrap the plus/minus icon in a link. | |
| printTree ($treeArr='') | |
| Create the folder navigation tree in HTML. | |
| uploadForm ($path) | |
| For TBE: Makes an upload form for uploading files to the filemount the user is browsing. | |
| createFolder ($path) | |
| For TBE: Makes a form for creating new folders in the filemount the user is browsing. | |
Public Attributes | |
| $ext_IconMode = 1 | |
|
|
For TBE: Makes a form for creating new folders in the filemount the user is browsing. The folder creation request is sent to the tce_file.php script in the core which will handle the creation.
Definition at line 2195 of file browse_links.php. References $a, header(), PATH_site, and table(). 02195 {
02196
02197 // Create header, showing upload path:
02198 $header = t3lib_div::isFirstPartOfStr($path,PATH_site)?substr($path,strlen(PATH_site)):$path;
02199 $code=$this->barheader($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:file_newfolder.php.pagetitle').':');
02200 $code.='
02201
02202 <!--
02203 Form, for creating new folders:
02204 -->
02205 <form action="tce_file.php" method="post" name="editform2">
02206 <table border="0" cellpadding="0" cellspacing="3" id="typo3-crFolder">
02207 <tr>
02208 <td><strong>'.$GLOBALS['LANG']->getLL('path',1).':</strong> '.htmlspecialchars($header).'</td>
02209 </tr>
02210 <tr>
02211 <td>';
02212
02213 // Create the new-folder name field:
02214 $a=1;
02215 $code.='<input'.$this->doc->formWidth(20).' type="text" name="file[newfolder]['.$a.'][data]" />'.
02216 '<input type="hidden" name="file[newfolder]['.$a.'][target]" value="'.htmlspecialchars($path).'" />';
02217
02218 // Make footer of upload form, including the submit button:
02219 $redirectValue = 'browse_links.php?act='.$this->act.'&mode='.$this->mode.'&expandFolder='.rawurlencode($path).'&bparams='.rawurlencode($this->bparams);
02220 $code.='<input type="hidden" name="redirect" value="'.htmlspecialchars($redirectValue).'" />'.
02221 '<input type="submit" name="submit" value="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:file_newfolder.php.submit',1).'" />';
02222
02223 $code.='</td>
02224 </tr>
02225 </table>
02226 </form>';
02227
02228 return $code;
02229 }
|
|
|
Returns true if the input "record" contains a folder which can be linked.
Reimplemented in localFolderTree::TBE_FolderTree. Definition at line 479 of file browse_links.php. References getPathType_web_nonweb(). Referenced by printTree(), and wrapTitle(). 00479 {
00480 $webpath=t3lib_BEfunc::getPathType_web_nonweb($v['path']); // Checking, if the input path is a web-path.
00481 if (strstr($v['path'],'_recycler_') || strstr($v['path'],'_temp_') || $webpath!='web') {
00482 return 0;
00483 }
00484 return 1;
00485 }
|
|
||||||||||||||||
|
Wrap the plus/minus icon in a link.
Definition at line 496 of file browse_links.php. 00496 {
00497 if ($bMark) {
00498 $anchor = '#'.$bMark;
00499 $name=' name="'.$bMark.'"';
00500 }
00501 $aOnClick = 'return jumpToUrl(\''.$this->script.'?PM='.$cmd.'\',\''.$anchor.'\');';
00502 return '<a href="#"'.$name.' onclick="'.htmlspecialchars($aOnClick).'">'.$icon.'</a>';
00503 }
|
|
|
Create the folder navigation tree in HTML.
Definition at line 511 of file browse_links.php. References $out, ext_isLinkable(), PATH_site, and table(). 00511 {
00512 $titleLen=intval($GLOBALS['BE_USER']->uc['titleLen']);
00513
00514 if (!is_array($treeArr)) $treeArr=$this->tree;
00515
00516 $out='';
00517 $c=0;
00518
00519 // Preparing the current-path string (if found in the listing we will see a red blinking arrow).
00520 if (!$GLOBALS['SOBE']->curUrlInfo['value']) {
00521 $cmpPath='';
00522 } else if (substr(trim($GLOBALS['SOBE']->curUrlInfo['info']),-1)!='/') {
00523 $cmpPath=PATH_site.dirname($GLOBALS['SOBE']->curUrlInfo['info']).'/';
00524 } else {
00525 $cmpPath=PATH_site.$GLOBALS['SOBE']->curUrlInfo['info'];
00526 }
00527
00528 // Traverse rows for the tree and print them into table rows:
00529 foreach($treeArr as $k => $v) {
00530 $c++;
00531 $bgColorClass=($c+1)%2 ? 'bgColor' : 'bgColor-10';
00532
00533 // Creating blinking arrow, if applicable:
00534 if ($GLOBALS['SOBE']->curUrlInfo['act']=='file' && $cmpPath==$v['row']['path']) {
00535 $arrCol='<td><img'.t3lib_iconWorks::skinImg('','gfx/blinkarrow_right.gif','width="5" height="9"').' class="c-blinkArrowR" alt="" /></td>';
00536 $bgColorClass='bgColor4';
00537 } else {
00538 $arrCol='<td></td>';
00539 }
00540 // Create arrow-bullet for file listing (if folder path is linkable):
00541 $aOnClick = 'return jumpToUrl(\''.$this->script.'?act='.$GLOBALS['SOBE']->act.'&mode='.$GLOBALS['SOBE']->mode.'&expandFolder='.rawurlencode($v['row']['path']).'\');';
00542 $cEbullet = $this->ext_isLinkable($v['row']) ? '<a href="#" onclick="'.htmlspecialchars($aOnClick).'"><img'.t3lib_iconWorks::skinImg('','gfx/ol/arrowbullet.gif','width="18" height="16"').' alt="" /></a>' : '';
00543
00544 // Put table row with folder together:
00545 $out.='
00546 <tr class="'.$bgColorClass.'">
00547 <td nowrap="nowrap">'.$v['HTML'].$this->wrapTitle(t3lib_div::fixed_lgd_cs($v['row']['title'],$titleLen),$v['row']).'</td>
00548 '.$arrCol.'
00549 <td>'.$cEbullet.'</td>
00550 </tr>';
00551 }
00552
00553 $out='
00554
00555 <!--
00556 Folder tree:
00557 -->
00558 <table border="0" cellpadding="0" cellspacing="0" id="typo3-tree">
00559 '.$out.'
00560 </table>';
00561 return $out;
00562 }
|
|
|
For TBE: Makes an upload form for uploading files to the filemount the user is browsing. The files are uploaded to the tce_file.php script in the core which will handle the upload.
Definition at line 2142 of file browse_links.php. References $a, header(), PATH_site, and table(). 02142 {
02143 $count=3;
02144
02145 // Create header, showing upload path:
02146 $header = t3lib_div::isFirstPartOfStr($path,PATH_site)?substr($path,strlen(PATH_site)):$path;
02147 $code=$this->barheader($GLOBALS['LANG']->getLL('uploadImage').':');
02148 $code.='
02149
02150 <!--
02151 Form, for uploading files:
02152 -->
02153 <form action="tce_file.php" method="post" name="editform" enctype="'.$GLOBALS['TYPO3_CONF_VARS']['SYS']['form_enctype'].'">
02154 <table border="0" cellpadding="0" cellspacing="3" id="typo3-uplFiles">
02155 <tr>
02156 <td><strong>'.$GLOBALS['LANG']->getLL('path',1).':</strong> '.htmlspecialchars($header).'</td>
02157 </tr>
02158 <tr>
02159 <td>';
02160
02161 // Traverse the number of upload fields (default is 3):
02162 for ($a=1;$a<=$count;$a++) {
02163 $code.='<input type="file" name="upload_'.$a.'"'.$this->doc->formWidth(35).' size="50" />
02164 <input type="hidden" name="file[upload]['.$a.'][target]" value="'.htmlspecialchars($path).'" />
02165 <input type="hidden" name="file[upload]['.$a.'][data]" value="'.$a.'" /><br />';
02166 }
02167
02168 // Make footer of upload form, including the submit button:
02169 $redirectValue = 'browse_links.php?act='.$this->act.'&mode='.$this->mode.'&expandFolder='.rawurlencode($path).'&bparams='.rawurlencode($this->bparams);
02170 $code.='<input type="hidden" name="redirect" value="'.htmlspecialchars($redirectValue).'" />'.
02171 '<input type="submit" name="submit" value="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:file_upload.php.submit',1).'" />';
02172
02173 $code.='
02174 <div id="c-override">
02175 <input type="checkbox" name="overwriteExistingFiles" value="1" /> '.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_misc.xml:overwriteExistingFiles',1).'
02176 </div>
02177 ';
02178
02179
02180 $code.='</td>
02181 </tr>
02182 </table>
02183 </form>';
02184
02185 return $code;
02186 }
|
|
||||||||||||
|
Wrapping the title in a link, if applicable.
Reimplemented in localFolderTree::TBE_FolderTree. Definition at line 464 of file browse_links.php. References ext_isLinkable(). 00464 {
00465 if ($this->ext_isLinkable($v)) {
00466 $aOnClick = 'return jumpToUrl(\''.$this->script.'?act='.$GLOBALS['SOBE']->act.'&mode='.$GLOBALS['SOBE']->mode.'&expandFolder='.rawurlencode($v['path']).'\');';
00467 return '<a href="#" onclick="'.htmlspecialchars($aOnClick).'">'.$title.'</a>';
00468 } else {
00469 return '<span class="typo3-dimmed">'.$title.'</span>';
00470 }
00471 }
|
|
|
Definition at line 455 of file browse_links.php. |
1.3.8-20040913