Solutions Open Source

Référence de la classe t3lib_parsehtml_proc

Graphe d'héritage de t3lib_parsehtml_proc:

Inheritance graph
[légende]
Graphe de collaboration de t3lib_parsehtml_proc:

Collaboration graph
[légende]

Liste de tous les membres

Fonctions membres publiques

 init ($elRef='', $recPid=0)
 setRelPath ($path)
 evalWriteFile ($pArr, $currentRecord)
 RTE_transform ($value, $specConf, $direction='rte', $thisConfig=array())
 TS_images_db ($value)
 TS_images_rte ($value)
 TS_reglinks ($value, $direction)
 TS_links_db ($value)
 TS_links_rte ($value)
 TS_preserve_db ($value)
 TS_preserve_rte ($value)
 TS_transform_db ($value, $css=FALSE)
 transformStyledATags ($value)
 TS_transform_rte ($value, $css=0)
 TS_strip_db ($value)
 getURL ($url)
 HTMLcleaner_db ($content, $tagList='')
 getKeepTags ($direction='rte', $tagList='')
 divideIntoLines ($value, $count=5, $returnArray=FALSE)
 setDivTags ($value, $dT='p')
 internalizeFontTags ($value)
 siteUrl ()
 rteImageStorageDir ()
 removeTables ($value, $breakChar='< br/>')
 defaultTStagMapping ($code, $direction='rte')
 getWHFromAttribs ($attribArray)
 urlInfoForLinkTags ($url)
 TS_AtagToAbs ($value, $dontSetRTEKEEP=FALSE)

Attributs publics

 $headListTags = 'PRE,UL,OL,H1,H2,H3,H4,H5,H6,HR,ADDRESS,DL'
 $recPid = 0
 $elRef = ''
 $relPath = ''
 $relBackPath = ''
 $procOptions = ''
 $TS_transform_db_safecounter = 100
 $rte_p = ''
 $getKeepTags_cache = array()
 $allowedClasses = array()
 $preserveTags = ''


Documentation des fonctions membres

t3lib_parsehtml_proc::init ( elRef = '',
recPid = 0 
)

Initialize, setting element reference and record PID

Paramètres:
string Element reference, eg "tt_content:bodytext"
integer PID of the record (page id)
Renvoie:
void

t3lib_parsehtml_proc::setRelPath ( path  ) 

Setting the ->relPath and ->relBackPath to proper values so absolute references to links and images can be converted to relative dittos. This is used when editing files with the RTE

Paramètres:
string The relative path from PATH_site to the place where the file being edited is. Eg. "fileadmin/static".
Renvoie:
void There is no output, it is set in internal variables. With the above example of "fileadmin/static" as input this will yield ->relPath to be "fileadmin/static/" and ->relBackPath to be "../../"

t3lib_parsehtml_proc::evalWriteFile ( pArr,
currentRecord 
)

Evaluate the environment for editing a staticFileEdit file. Called for almost all fields being saved in the database. Is called without an instance of the object: t3lib_parsehtml_proc::evalWriteFile()

Paramètres:
array Parameters for the current field as found in types-config
array Current record we are editing.
Renvoie:
mixed On success an array with various information is returned, otherwise a string with an error message
Voir également:
t3lib_TCEmain, t3lib_transferData

t3lib_parsehtml_proc::RTE_transform ( value,
specConf,
direction = 'rte',
thisConfig = array() 
)

Transform value for RTE based on specConf in the direction specified by $direction (rte/db) This is the main function called from tcemain and transfer data classes

Paramètres:
string Input value
array Special configuration for a field; This is coming from the types-configuration of the field in the TCA. In the types-configuration you can setup features for the field rendering and in particular the RTE takes al its major configuration options from there!
string Direction of the transformation. Two keywords are allowed; "db" or "rte". If "db" it means the transformation will clean up content coming from the Rich Text Editor and goes into the database. The other direction, "rte", is of course when content is coming from database and must be transformed to fit the RTE.
array Parsed TypoScript content configuring the RTE, probably coming from Page TSconfig.
Renvoie:
string Output value
Voir également:
t3lib_TCEmain::fillInFieldArray(), t3lib_transferData::renderRecord_typesProc()

t3lib_parsehtml_proc::TS_images_db ( value  ) 

Transformation handler: 'ts_images' / direction: "db" Processing images inserted in the RTE. This is used when content goes from the RTE to the database. Images inserted in the RTE has an absolute URL applied to the src attribute. This URL is converted to a relative URL If it turns out that the URL is from another website than the current the image is read from that external URL and moved to the local server. Also "magic" images are processed here.

Paramètres:
string The content from RTE going to Database
Renvoie:
string Processed content

t3lib_parsehtml_proc::TS_images_rte ( value  ) 

Transformation handler: 'ts_images' / direction: "rte" Processing images from database content going into the RTE. Processing includes converting the src attribute to an absolute URL.

Paramètres:
string Content input
Renvoie:
string Content output

t3lib_parsehtml_proc::TS_reglinks ( value,
direction 
)

Transformation handler: 'ts_reglinks' / direction: "db"+"rte" depending on $direction variable. Converting -tags to/from abs/rel

Paramètres:
string Content input
string Direction of conversion; "rte" (from database to RTE) or "db" (from RTE to database)
Renvoie:
string Content output

t3lib_parsehtml_proc::TS_links_db ( value  ) 

Transformation handler: 'ts_links' / direction: "db" Converting -tags to <link tags>="">

Paramètres:
string Content input
Renvoie:
string Content output
Voir également:
TS_links_rte()

t3lib_parsehtml_proc::TS_links_rte ( value  ) 

Transformation handler: 'ts_links' / direction: "rte" Converting <link tags>=""> to -tags

Paramètres:
string Content input
Renvoie:
string Content output
Voir également:
TS_links_rte()

t3lib_parsehtml_proc::TS_preserve_db ( value  ) 

Preserve special tags

Paramètres:
string Content input
Renvoie:
string Content output

t3lib_parsehtml_proc::TS_preserve_rte ( value  ) 

Preserve special tags

Paramètres:
string Content input
Renvoie:
string Content output

t3lib_parsehtml_proc::TS_transform_db ( value,
css = FALSE 
)

Transformation handler: 'ts_transform' + 'css_transform' / direction: "db" Cleaning (->db) for standard content elements (ts)

Paramètres:
string Content input
boolean If true, the transformation was "css_transform", otherwise "ts_transform"
Renvoie:
string Content output
Voir également:
TS_transform_rte()

t3lib_parsehtml_proc::transformStyledATags ( value  ) 

Wraps a-tags that contain a style attribute with a span-tag

Paramètres:
string Content input
Renvoie:
string Content output

t3lib_parsehtml_proc::TS_transform_rte ( value,
css = 0 
)

Transformation handler: 'ts_transform' + 'css_transform' / direction: "rte" Set (->rte) for standard content elements (ts)

Paramètres:
string Content input
boolean If true, the transformation was "css_transform", otherwise "ts_transform"
Renvoie:
string Content output
Voir également:
TS_transform_db()

t3lib_parsehtml_proc::TS_strip_db ( value  ) 

Transformation handler: 'ts_strip' / direction: "db" Removing all non-allowed tags

Paramètres:
string Content input
Renvoie:
string Content output

t3lib_parsehtml_proc::getURL ( url  ) 

Reads the file or url $url and returns the content

Paramètres:
string Filepath/URL to read
Renvoie:
string The content from the resource given as input.
Voir également:
t3lib_div::getURL()

t3lib_parsehtml_proc::HTMLcleaner_db ( content,
tagList = '' 
)

Function for cleaning content going into the database. Content is cleaned eg. by removing unallowed HTML and ds-HSC content It is basically calling HTMLcleaner from the parent class with some preset configuration specifically set up for cleaning content going from the RTE into the db

Paramètres:
string Content to clean up
string Comma list of tags to specifically allow. Default comes from getKeepTags and is ""
Renvoie:
string Clean content
Voir également:
getKeepTags()

t3lib_parsehtml_proc::getKeepTags ( direction = 'rte',
tagList = '' 
)

Creates an array of configuration for the HTMLcleaner function based on whether content go TO or FROM the Rich Text Editor ($direction) Unless "tagList" is given, the function will cache the configuration for next time processing goes on. (In this class that is the case only if we are processing a bulletlist)

Paramètres:
string The direction of the content being processed by the output configuration; "db" (content going into the database FROM the rte) or "rte" (content going into the form)
string Comma list of tags to keep (overriding default which is to keep all + take notice of internal configuration)
Renvoie:
array Configuration array
Voir également:
HTMLcleaner_db()

t3lib_parsehtml_proc::divideIntoLines ( value,
count = 5,
returnArray = FALSE 
)

This resolves the $value into parts based on

-sections and

-sections and
-tags. These are returned as lines separated by chr(10). This point is to resolve the HTML-code returned from RTE into ordinary lines so it's 'human-readable' The function ->setDivTags does the opposite. This function processes content to go into the database.

Paramètres:
string Value to process.
integer Recursion brake. Decremented on each recursion down to zero. Default is 5 (which equals the allowed nesting levels of p/div tags).
boolean If true, an array with the lines is returned, otherwise a string of the processed input value.
Renvoie:
string Processed input value.
Voir également:
setDivTags()

t3lib_parsehtml_proc::setDivTags ( value,
dT = 'p' 
)

Converts all lines into

/

-sections (unless the line is a div-section already) For processing of content going FROM database TO RTE.

Paramètres:
string Value to convert
string Tag to wrap with. Either "p" or "div" should it be. Lowercase preferably.
Renvoie:
string Processed value.
Voir également:
divideIntoLines()

t3lib_parsehtml_proc::internalizeFontTags ( value  ) 

This splits the $value in font-tag chunks. If there are any

/

sections inside of them, the font-tag is wrapped AROUND the content INSIDE of the P/DIV sections and the outer font-tag is removed. This functions seems to be a good choice for pre-processing content if it has been pasted into the RTE from eg. star-office. In that case the font-tags are normally on the OUTSIDE of the sections. This function is used by eg. divideIntoLines() if the procesing option 'internalizeFontTags' is set.

Paramètres:
string Input content
Renvoie:
string Output content
Voir également:
divideIntoLines()

t3lib_parsehtml_proc::siteUrl (  ) 

Returns SiteURL based on thisScript.

Renvoie:
string Value of t3lib_div::getIndpEnv('TYPO3_SITE_URL');
Voir également:
t3lib_div::getIndpEnv()

t3lib_parsehtml_proc::rteImageStorageDir (  ) 

Return the storage folder of RTE image files. Default is $GLOBALS['TYPO3_CONF_VARS']['BE']['RTE_imageStorageDir'] unless something else is configured in the types configuration for the RTE.

Renvoie:
string

t3lib_parsehtml_proc::removeTables ( value,
breakChar = '<br />' 
)

Remove all tables from incoming code The function is trying to to this is some more or less respectfull way. The approach is to resolve each table cells content and implode it all by
chars. Thus at least the content is preserved in some way.

Paramètres:
string Input value
string Break character to use for linebreaks.
Renvoie:
string Output value

t3lib_parsehtml_proc::defaultTStagMapping ( code,
direction = 'rte' 
)

Default tag mapping for TS

Paramètres:
string Input code to process
string Direction To databsae (db) or from database to RTE (rte)
Renvoie:
string Processed value

t3lib_parsehtml_proc::getWHFromAttribs ( attribArray  ) 

Finds width and height from attrib-array If the width and height is found in the style-attribute, use that!

Paramètres:
array Array of attributes from tag in which to search. More specifically the content of the key "style" is used to extract "width:xxx / height:xxx" information
Renvoie:
array Integer w/h in key 0/1. Zero is returned if not found.

t3lib_parsehtml_proc::urlInfoForLinkTags ( url  ) 

Parse -tag href and return status of email,external,file or page

Paramètres:
string URL to analyse.
Renvoie:
array Information in an array about the URL

t3lib_parsehtml_proc::TS_AtagToAbs ( value,
dontSetRTEKEEP = FALSE 
)

Converting -tags to absolute URLs (+ setting rtekeep attribute)

Paramètres:
string Content input
boolean If true, then the "rtekeep" attribute will not be set.
Renvoie:
string Content output


Documentation des données membres

t3lib_parsehtml_proc::$headListTags = 'PRE,UL,OL,H1,H2,H3,H4,H5,H6,HR,ADDRESS,DL'

t3lib_parsehtml_proc::$recPid = 0

t3lib_parsehtml_proc::$elRef = ''

t3lib_parsehtml_proc::$relPath = ''

t3lib_parsehtml_proc::$relBackPath = ''

t3lib_parsehtml_proc::$procOptions = ''

t3lib_parsehtml_proc::$TS_transform_db_safecounter = 100

t3lib_parsehtml_proc::$rte_p = ''

t3lib_parsehtml_proc::$getKeepTags_cache = array()

t3lib_parsehtml_proc::$allowedClasses = array()

t3lib_parsehtml_proc::$preserveTags = ''


La documentation de cette classe a été générée à partir du fichier suivant :
Généré le Fri Aug 31 11:42:26 2007 pour OBLADY - Typo3 API v4.1.2 par  doxygen 1.5.3