browse_links Class Reference

Inheritance diagram for browse_links:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 init ()
 processSessionData ($data)
 main_rte ($wiz=0)
 main_db ()
 main_file ()
 main_folder ()
 expandPage ()
 TBE_expandPage ($tables)
 TBE_expandSubFolders ($expandFolder=0)
 expandFolder ($expandFolder=0, $extensionList='')
 TBE_expandFolder ($expandFolder=0, $extensionList='', $noThumbs=0)
 fileList ($files, $folderName='', $noThumbs=0)
 folderList ($baseFolder, $folders)
 TBE_dragNDrop ($expandFolder=0, $extensionList='')
 isWebFolder ($folder)
 checkFolder ($folder)
 isReadOnlyFolder ($folder)
 barheader ($str)
 getMsgBox ($in_msg, $icon='icon_note')
 printCurrentUrl ($str)
 parseCurUrl ($href, $siteUrl)
 uploadForm ($path)
 createFolder ($path)
 getBulkSelector ($filesCount)

Public Attributes

 $siteURL
 $thisScript
 $thisConfig
 $setTarget
 $setClass
 $setTitle
 $doc
 $elements = array()
 $mode
 $act
 $expandPage
 $expandFolder
 $P
 $bparams
 $RTEtsConfigParams
 $PM
 $pointer
 $curUrlArray
 $curUrlInfo
 $fileProcessor

Protected Attributes

 $hookObjects = array()

Detailed Description

Definition at line 657 of file class.browse_links.php.


Member Function Documentation

browse_links::barheader ( str  ) 

Prints a 'header' where string is in a tablecell

Parameters:
string The string to print in the header. The value is htmlspecialchars()'ed before output.
Returns:
string The header HTML (wrapped in a table)

Definition at line 2514 of file class.browse_links.php.

browse_links::checkFolder ( folder  ) 

Checks, if a path is within the mountpoints of the backend user

Parameters:
string Absolute filepath
Returns:
boolean If the input path is found in the backend users filemounts, then return true.

Definition at line 2494 of file class.browse_links.php.

browse_links::createFolder ( path  ) 

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.

Parameters:
string Absolute filepath on server in which to create the new folder.
Returns:
string HTML for the create folder form.

Definition at line 2712 of file class.browse_links.php.

References $GLOBALS, and t3lib_div::isFirstPartOfStr().

Referenced by tx_rtehtmlarea_browse_links::main_rte().

browse_links::expandFolder ( expandFolder = 0,
extensionList = '' 
)

For RTE: This displays all files from folder. No thumbnails shown

Parameters:
string The folder path to expand
string List of fileextensions to show
Returns:
string HTML output

Definition at line 2005 of file class.browse_links.php.

References $GLOBALS, t3lib_div::fixed_lgd_cs(), t3lib_div::formatSize(), t3lib_div::get_dirs(), t3lib_BEfunc::getFileIcon(), t3lib_div::getFilesInDir(), and t3lib_iconWorks::skinImg().

Referenced by init(), tx_rtehtmlarea_browse_links::initVariables(), tx_rtehtmlarea_browse_links::main_rte(), main_rte(), and processSessionData().

browse_links::expandPage (  ) 

For RTE: This displays all content elements on a page and lets you create a link to the element.

Returns:
string HTML output. Returns content only if the ->expandPage value is set (pointing to a page uid to show tt_content records from ...)

Definition at line 1791 of file class.browse_links.php.

References $GLOBALS, $res, $row, t3lib_BEfunc::deleteClause(), t3lib_div::fixed_lgd_cs(), t3lib_iconWorks::getIconImage(), t3lib_BEfunc::getRecordWSOL(), t3lib_div::inList(), t3lib_div::testInt(), and t3lib_BEfunc::versioningPlaceholderClause().

Referenced by init(), tx_rtehtmlarea_select_image::initVariables(), tx_rtehtmlarea_browse_links::initVariables(), tx_rtehtmlarea_browse_links::main_rte(), main_rte(), and processSessionData().

browse_links::fileList ( files,
folderName = '',
noThumbs = 0 
)

Render list of files.

Parameters:
array List of files. See t3lib_div::getFilesInDir
string If set a header with a folder icon and folder name are shown
boolean Whether to show thumbnails or not. If set, no thumbnails are shown.
Returns:
string HTML output

Definition at line 2110 of file class.browse_links.php.

References $GLOBALS, $lines, t3lib_div::fixed_lgd_cs(), t3lib_BEfunc::getFileIcon(), t3lib_div::getIndpEnv(), t3lib_BEfunc::getThumbNail(), t3lib_div::inList(), t3lib_div::makeInstance(), nbsp, and t3lib_div::shortMD5().

browse_links::folderList ( baseFolder,
folders 
)

Render list of folders.

Parameters:
array List of folders. See t3lib_div::get_dirs
string If set a header with a folder icon and folder name are shown
Returns:
string HTML output

Definition at line 2238 of file class.browse_links.php.

References $content, $GLOBALS, $lines, t3lib_div::fixed_lgd_cs(), and nbsp.

browse_links::getBulkSelector ( filesCount  ) 

Get the HTML data required for a bulk selection of files of the TYPO3 Element Browser.

Parameters:
integer $filesCount: Number of files currently displayed
Returns:
string HTML data required for a bulk selection of files - if $filesCount is 0, nothing is returned

Definition at line 2761 of file class.browse_links.php.

References $GLOBALS.

browse_links::getMsgBox ( in_msg,
icon = 'icon_note' 
)

Displays a message box with the input message

Parameters:
string Input message to show (will be htmlspecialchars()'ed inside of this function)
string Icon filename body from gfx/ (default is "icon_note") - meant to allow change to warning type icons...
Returns:
string HTML for the message (wrapped in a table).

Definition at line 2531 of file class.browse_links.php.

browse_links::init (  ) 

Constructor: Initializes a lot of variables, setting JavaScript functions in header etc.

Returns:
void

Splits parts of $this->bparams

See also:
$bparams

Reimplemented in tx_rtehtmlarea_browse_links, and tx_rtehtmlarea_select_image.

Definition at line 776 of file class.browse_links.php.

References $GLOBALS, t3lib_div::_GP(), debug(), expandFolder(), expandPage(), t3lib_div::get_tag_attributes(), t3lib_div::getIndpEnv(), t3lib_BEfunc::getPagesTSconfig(), t3lib_div::getUserObj(), t3lib_div::implodeArrayForUrl(), t3lib_div::isFirstPartOfStr(), t3lib_div::makeInstance(), parseCurUrl(), t3lib_BEfunc::RTEsetup(), and t3lib_div::trimExplode().

browse_links::isReadOnlyFolder ( folder  ) 

Checks, if a path is within a read-only mountpoint of the backend user

Parameters:
string Absolute filepath
Returns:
boolean If the input path is found in the backend users filemounts and if the filemount is of type readonly, then return true.

Definition at line 2504 of file class.browse_links.php.

References $GLOBALS.

browse_links::isWebFolder ( folder  ) 

Verifies that a path is a web-folder:

Parameters:
string Absolute filepath
Returns:
boolean If the input path is found in PATH_site then it returns true.

Definition at line 2483 of file class.browse_links.php.

References t3lib_div::isFirstPartOfStr().

browse_links::main_db (  ) 

TYPO3 Element Browser: Showing a page tree and allows you to browse for records

Returns:
string HTML content for the module

Definition at line 1562 of file class.browse_links.php.

References $content, $GLOBALS, and t3lib_div::makeInstance().

browse_links::main_file (  ) 

TYPO3 Element Browser: Showing a folder tree, allowing you to browse for files.

Returns:
string HTML content for the module

Definition at line 1609 of file class.browse_links.php.

References $content, $GLOBALS, t3lib_div::_GP(), t3lib_BEfunc::getFuncCheck(), t3lib_BEfunc::getModuleData(), and t3lib_div::makeInstance().

browse_links::main_folder (  ) 

TYPO3 Element Browser: Showing a folder tree, allowing you to browse for folders.

Returns:
string HTML content for the module

Definition at line 1698 of file class.browse_links.php.

References $content, $GLOBALS, and t3lib_div::makeInstance().

browse_links::main_rte ( wiz = 0  ) 

Rich Text Editor (RTE) link selector (MAIN function) Generates the link selector for the Rich Text Editor. Can also be used to select links for the TCEforms (see $wiz)

Parameters:
boolean If set, the "remove link" is not shown in the menu: Used for the "Select link" wizard which is used by the TCEforms
Returns:
string Modified content variable.

Reimplemented in tx_rtehtmlarea_browse_links.

Definition at line 1214 of file class.browse_links.php.

References $content, $GLOBALS, expandFolder(), expandPage(), t3lib_div::makeInstance(), printCurrentUrl(), and t3lib_div::trimExplode().

browse_links::parseCurUrl ( href,
siteUrl 
)

For RTE/link: Parses the incoming URL and determines if it's a page, file, external or mail address.

Parameters:
string HREF value tp analyse
string The URL of the current website (frontend)
Returns:
array Array with URL information stored in assoc. keys: value, act (page, file, spec, mail), pageid, cElement, info

Definition at line 2575 of file class.browse_links.php.

References $GLOBALS, t3lib_div::fixed_lgd_cs(), t3lib_BEfunc::getRecordsByField(), t3lib_BEfunc::getRecordWSOL(), t3lib_div::isFirstPartOfStr(), and t3lib_div::testInt().

Referenced by tx_rtehtmlarea_browse_links::init(), and init().

browse_links::printCurrentUrl ( str  ) 

For RTE/link: This prints the 'currentUrl'

Parameters:
string URL value. The value is htmlspecialchars()'ed before output.
Returns:
string HTML content, wrapped in a table.

Definition at line 2555 of file class.browse_links.php.

Referenced by tx_rtehtmlarea_browse_links::main_rte(), and main_rte().

browse_links::processSessionData ( data  ) 

Session data for this class can be set from outside with this method. Call after init()

Parameters:
array Session data array
Returns:
array Session data and boolean which indicates that data needs to be stored in session because it's changed

Reimplemented in tx_rtehtmlarea_select_image.

Definition at line 1170 of file class.browse_links.php.

References expandFolder(), and expandPage().

browse_links::TBE_dragNDrop ( expandFolder = 0,
extensionList = '' 
)

For RTE: This displays all IMAGES (gif,png,jpg) (from extensionList) from folder. Thumbnails are shown for images. This listing is of images located in the web-accessible paths ONLY - the listing is for drag-n-drop use in the RTE

Parameters:
string The folder path to expand
string List of fileextensions to show
Returns:
string HTML output

Reimplemented in tx_rtehtmlarea_select_image.

Definition at line 2355 of file class.browse_links.php.

References $GLOBALS, $lines, t3lib_div::_GP(), t3lib_div::fixed_lgd_cs(), t3lib_BEfunc::getFileIcon(), t3lib_div::getFilesInDir(), t3lib_div::inList(), and nbsp.

browse_links::TBE_expandFolder ( expandFolder = 0,
extensionList = '',
noThumbs = 0 
)

For TYPO3 Element Browser: Expand folder of files.

Parameters:
string The folder path to expand
string List of fileextensions to show
boolean Whether to show thumbnails or not. If set, no thumbnails are shown.
Returns:
string HTML output

Definition at line 2087 of file class.browse_links.php.

References t3lib_div::getFilesInDir().

browse_links::TBE_expandPage ( tables  ) 

For TYPO3 Element Browser: This lists all content elements from the given list of tables

Parameters:
string Commalist of tables. Set to "*" if you want all tables.
Returns:
string HTML output.

Definition at line 1872 of file class.browse_links.php.

browse_links::TBE_expandSubFolders ( expandFolder = 0  ) 

Render list of folders inside a folder.

Parameters:
string string of the current folder
Returns:
string HTML output

Definition at line 1955 of file class.browse_links.php.

References $content, t3lib_div::get_dirs(), and t3lib_div::isFirstPartOfStr().

browse_links::uploadForm ( path  ) 

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.

Parameters:
string Absolute filepath on server to which to upload.
Returns:
string HTML for an upload form.

Definition at line 2649 of file class.browse_links.php.

References $GLOBALS, and t3lib_div::isFirstPartOfStr().

Referenced by tx_rtehtmlarea_browse_links::main_rte().


Member Data Documentation

browse_links::$act

Link selector action. page,file,url,mail,spec are allowed values. These are only important with the link selector function and in that case they switch between the various menu options.

Definition at line 687 of file class.browse_links.php.

browse_links::$bparams

Active with TYPO3 Element Browser: Contains the name of the form field for which this window opens - thus allows us to make references back to the main window in which the form is. Example value: "data[pages][39][bodytext]|||tt_content|" or "data[tt_content][NEW3fba56fde763d][image]|||gif,jpg,jpeg,tif,bmp,pcx,tga,png,pdf,ai|"

Values: 0: form field name reference, eg. "data[tt_content][123][image]" 1: htlmArea RTE parameters: editorNo:contentTypo3Language:contentTypo3Charset 2: RTE config parameters: RTEtsConfigParams 3: allowed types. Eg. "tt_content" or "gif,jpg,jpeg,tif,bmp,pcx,tga,png,pdf,ai" 4: IRRE uniqueness: target level object-id to perform actions/checks on, eg. "data[79][tt_address][1][<field>][<foreign_table>]" 5: IRRE uniqueness: name of function in opener window that checks if element is already used, eg. "inline.checkUniqueElement" 6: IRRE uniqueness: name of function in opener window that performs some additional(!) action, eg. "inline.setUniqueElement" 7: IRRE uniqueness: name of function in opener window that performs action instead of using addElement/insertElement, eg. "inline.importElement"

$pArr = explode('|',$this->bparams); $formFieldName = $pArr[0]; $allowedTablesOrFileTypes = $pArr[3];

Definition at line 724 of file class.browse_links.php.

browse_links::$curUrlArray

Used with the link selector: Contains the GET input information about the CURRENT link in the RTE/TCEform field. This consists of "href", "target" and "title" keys. This information is passed around in links.

Definition at line 751 of file class.browse_links.php.

browse_links::$curUrlInfo

Used with the link selector: Contains a processed version of the input values from curUrlInfo. This is splitted into pageid, content element id, label value etc. This is used for the internal processing of that information.

Definition at line 756 of file class.browse_links.php.

browse_links::$doc

Definition at line 666 of file class.browse_links.php.

browse_links::$elements = array()

Definition at line 667 of file class.browse_links.php.

browse_links::$expandFolder

When you click a folder name/expand icon to see the content of a certain file folder, this value will contain that value (the path of the expanded file folder). If the value is NOT set, then it will be restored from the module session data (see main(), mode="file"/"filedrag"). Example value: "/www/htdocs/typo3/32/3dsplm/fileadmin/css/"

Definition at line 697 of file class.browse_links.php.

browse_links::$expandPage

When you click a page title/expand icon to see the content of a certain page, this value will contain that value (the ID of the expanded page). If the value is NOT set, then it will be restored from the module session data (see main(), mode="db")

Definition at line 692 of file class.browse_links.php.

browse_links::$fileProcessor

object for t3lib_basicFileFunctions

Definition at line 767 of file class.browse_links.php.

browse_links::$hookObjects = array() [protected]

array which holds hook objects (initialised in init() )

Definition at line 761 of file class.browse_links.php.

browse_links::$mode

The mode determines the main kind of output from the element browser. There are these options for values: rte, db, file, filedrag, wizard. "rte" will show the link selector for the Rich Text Editor (see main_rte()) "db" will allow you to browse for pages or records in the page tree (for TCEforms, see main_db()) "file"/"filedrag" will allow you to browse for files or folders in the folder mounts (for TCEforms, main_file()) "wizard" will allow you to browse for links (like "rte") which are passed back to TCEforms (see main_rte(1))

See also:
main()

Definition at line 680 of file class.browse_links.php.

browse_links::$P

TYPO3 Element Browser, wizard mode parameters. There is a heap of parameters there, better debug() them out if you need something... :-)

Definition at line 704 of file class.browse_links.php.

browse_links::$PM

Plus/Minus icon value. Used by the tree class to open/close notes on the trees.

Definition at line 738 of file class.browse_links.php.

browse_links::$pointer

Pointer, used when browsing a long list of records etc.

Definition at line 743 of file class.browse_links.php.

browse_links::$RTEtsConfigParams

Used with the Rich Text Editor. Example value: "tt_content:NEW3fba58c969f5c:bodytext:23:text:23:"

Definition at line 730 of file class.browse_links.php.

browse_links::$setClass

Definition at line 664 of file class.browse_links.php.

browse_links::$setTarget

Definition at line 663 of file class.browse_links.php.

browse_links::$setTitle

Definition at line 665 of file class.browse_links.php.

browse_links::$siteURL

Definition at line 660 of file class.browse_links.php.

browse_links::$thisConfig

Reimplemented in tx_rtehtmlarea_select_image.

Definition at line 662 of file class.browse_links.php.

browse_links::$thisScript

Definition at line 661 of file class.browse_links.php.


The documentation for this class was generated from the following file:
Generated on Sat Nov 29 04:23:29 2008 for TYPO3 API by  doxygen 1.4.7