Feature #32809 ยป hooks4typolinkpatch_4.5.x-4.6.x.patch
t3lib/class.t3lib_parsehtml_proc.php (Arbeitskopie) | ||
---|---|---|
unset($attribArray_copy['style']);
|
||
unset($attribArray_copy['rteerror']);
|
||
}
|
||
|
||
// remove additional params
|
||
if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_parsehtml_proc.php']['removeParams_PostProc']) && is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_parsehtml_proc.php']['removeParams_PostProc'])) {
|
||
$_params = array(
|
||
'conf' => &$conf,
|
||
'aTagParams' => &$attribArray_copy
|
||
);
|
||
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_parsehtml_proc.php']['removeParams_PostProc'] as $objRef) {
|
||
$processor = &t3lib_div::getUserObj($objRef);
|
||
$attribArray_copy = $processor->removeParams( $_params, $this);
|
||
}
|
||
}
|
||
|
||
if (!count($attribArray_copy)) { // Only if href, target and class are the only attributes, we can alter the link!
|
||
// Quoting class and title attributes if they contain spaces
|
||
$attribArray['class'] = preg_match('/ /', $attribArray['class']) ? '"' . $attribArray['class'] . '"' : $attribArray['class'];
|
||
... | ... | |
$href = $attribArray['external'] ? $attribArray['href'] : $info['url'] . ($info['query'] ? ',0,' . $info['query'] : '');
|
||
$bTag = '<link ' . $href . ($attribArray['target'] ? ' ' . $attribArray['target'] : (($attribArray['class'] || $attribArray['title']) ? ' -' : '')) . ($attribArray['class'] ? ' ' . $attribArray['class'] : ($attribArray['title'] ? ' -' : '')) . ($attribArray['title'] ? ' ' . $attribArray['title'] : '') . '>';
|
||
$eTag = '</link>';
|
||
$blockSplit[$k] = $bTag . $this->TS_links_db($this->removeFirstAndLastTag($blockSplit[$k])) . $eTag;
|
||
|
||
// modify params
|
||
if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_parsehtml_proc.php']['modifyParams_LinksDb_PostProc']) && is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_parsehtml_proc.php']['modifyParams_LinksDb_PostProc'])) {
|
||
$_params = array(
|
||
'conf' => &$conf,
|
||
'currentBlock' => $v,
|
||
'url' => $href,
|
||
'attributes' => $attribArray
|
||
);
|
||
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_parsehtml_proc.php']['modifyParams_LinksDb_PostProc'] as $objRef) {
|
||
$processor = &t3lib_div::getUserObj($objRef);
|
||
$blockSplit[$k] = $processor->modifyParamsLinksDb( $_params, $this);
|
||
}
|
||
} else {
|
||
$blockSplit[$k] = $bTag . $this->TS_links_db($this->removeFirstAndLastTag($blockSplit[$k])) . $eTag;
|
||
}
|
||
} else { // ... otherwise store the link as a-tag.
|
||
// Unsetting 'rtekeep' attribute if that had been set.
|
||
unset($attribArray['rtekeep']);
|
||
... | ... | |
$siteUrl = $this->siteUrl();
|
||
foreach ($blockSplit as $k => $v) {
|
||
$error = '';
|
||
$external = FALSE;
|
||
if ($k % 2) { // block:
|
||
$tagCode = t3lib_div::unQuoteFilenames(trim(substr($this->getFirstTag($v), 0, -1)), true);
|
||
$link_param = $tagCode[1];
|
||
... | ... | |
} else {
|
||
$fileChar = intval(strpos($link_param, '/'));
|
||
$urlChar = intval(strpos($link_param, '.'));
|
||
$external = FALSE;
|
||
// Parse URL:
|
||
$pU = parse_url($link_param);
|
||
// Detects if a file is found in site-root OR is a simulateStaticDocument.
|
||
... | ... | |
($error ? ' rteerror="' . htmlspecialchars($error) . '" style="background-color: yellow; border:2px red solid; color: black;"' : '') . // Should be OK to add the style; the transformation back to databsae will remove it...
|
||
'>';
|
||
$eTag = '</a>';
|
||
$blockSplit[$k] = $bTag . $this->TS_links_rte($this->removeFirstAndLastTag($blockSplit[$k])) . $eTag;
|
||
|
||
// modify params
|
||
if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_parsehtml_proc.php']['modifyParams_LinksRte_PostProc']) && is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_parsehtml_proc.php']['modifyParams_LinksRte_PostProc'])) {
|
||
$_params = array(
|
||
'conf' => &$conf,
|
||
'currentBlock' => $v,
|
||
'url' => $href,
|
||
'tagCode' => $tagCode,
|
||
'external' => $external,
|
||
'error' => $error
|
||
);
|
||
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_parsehtml_proc.php']['modifyParams_LinksRte_PostProc'] as $objRef) {
|
||
$processor = &t3lib_div::getUserObj($objRef);
|
||
$blockSplit[$k] = $processor->modifyParamsLinksRte( $_params, $this);
|
||
}
|
||
} else {
|
||
$blockSplit[$k] = $bTag . $this->TS_links_rte($this->removeFirstAndLastTag($blockSplit[$k])) . $eTag;
|
||
}
|
||
}
|
||
}
|
||
typo3/class.browse_links.php (Arbeitskopie) | ||
---|---|---|
'title' => $currentLinkParts[3],
|
||
'params' => $currentLinkParts[4]
|
||
);
|
||
|
||
$this->curUrlArray = (is_array(t3lib_div::_GP('curUrl'))) ?
|
||
array_merge($initialCurUrlArray, t3lib_div::_GP('curUrl')) :
|
||
$initialCurUrlArray;
|
||
|
||
// additional fields for page links
|
||
if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.browse_links.php']['extendUrlArray']) && is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.browse_links.php']['extendUrlArray'])) {
|
||
$_params = array(
|
||
'conf' => &$conf,
|
||
'linkParts' => $currentLinkParts
|
||
);
|
||
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.browse_links.php']['extendUrlArray'] as $objRef) {
|
||
$processor = &t3lib_div::getUserObj($objRef);
|
||
$processor->extendUrlArray( $_params, $this);
|
||
}
|
||
}
|
||
|
||
|
||
$this->curUrlInfo = $this->parseCurUrl($this->siteURL.'?id='.$this->curUrlArray['href'], $this->siteURL);
|
||
if ($this->curUrlInfo['pageid'] == 0 && $this->curUrlArray['href']) { // pageid == 0 means that this is not an internal (page) link
|
||
if (file_exists(PATH_site.rawurldecode($this->curUrlArray['href']))) { // check if this is a link to a file
|
||
... | ... | |
BrowseLinks.focusOpenerAndClose(close);
|
||
}
|
||
';
|
||
|
||
// extends JavaScript code
|
||
if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.browse_links.php']['extendJScode']) && is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.browse_links.php']['extendJScode'])) {
|
||
$_params = array(
|
||
'conf' => &$conf,
|
||
'wizardUpdate' => $update,
|
||
'addPassOnParams' => $addPassOnParams
|
||
);
|
||
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.browse_links.php']['extendJScode'] as $objRef) {
|
||
$processor = &t3lib_div::getUserObj($objRef);
|
||
$JScode .= $processor->extendJScode( $_params, $this);
|
||
}
|
||
}
|
||
// Finally, add the accumulated JavaScript to the template object:
|
||
$this->doc->JScode.= $this->doc->wrapScriptTags($JScode);
|
||
|
||
// Debugging:
|
||
if (FALSE) debug(array(
|
||
'pointer' => $this->pointer,
|
||
... | ... | |
</form>
|
||
';
|
||
// additional fields for page links
|
||
if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.browse_links.php']['addFields_PageLink']) && is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.browse_links.php']['addFields_PageLink'])) {
|
||
$_params = array(
|
||
'conf' => &$conf,
|
||
);
|
||
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.browse_links.php']['addFields_PageLink'] as $objRef) {
|
||
$processor = &t3lib_div::getUserObj($objRef);
|
||
$content .= $processor->addFields( $_params, $this);
|
||
}
|
||
}
|
||
// Target:
|
||
if ($this->act!='mail') {
|
||
$ltarget='
|
typo3/sysext/cms/tslib/class.tslib_content.php (Arbeitskopie) | ||
---|---|---|
if ($addGlobal) {
|
||
$aTagParams = ' ' . trim($GLOBALS['TSFE']->ATagParams . $aTagParams);
|
||
}
|
||
|
||
// extend params
|
||
if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['getATagParams_PostProc']) && is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['getATagParams_PostProc'])) {
|
||
$_params = array(
|
||
'conf' => &$conf,
|
||
'aTagParams' => &$aTagParams
|
||
);
|
||
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['getATagParams_PostProc'] as $objRef) {
|
||
$processor = &t3lib_div::getUserObj($objRef);
|
||
$aTagParams = $processor->process( $_params, $this);
|
||
}
|
||
}
|
||
|
||
return $aTagParams;
|
||
}
|
||
typo3/sysext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php (Arbeitskopie) | ||
---|---|---|
}
|
||
}
|
||
';
|
||
|
||
// Hook to overwrite or extend javascript functions
|
||
if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php']['extendJScode']) && is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php']['extendJScode'])) {
|
||
$_params = array(
|
||
'conf' => &$conf
|
||
);
|
||
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php']['extendJScode'] as $objRef) {
|
||
$processor = &t3lib_div::getUserObj($objRef);
|
||
$JScode .= $processor->extendJScode( $_params, &$this);
|
||
}
|
||
}
|
||
|
||
return $JScode;
|
||
}
|
||
... | ... | |
$lclass = $this->addClassSelector();
|
||
$ltitle = $this->addTitleSelector();
|
||
$rel = $this->addRelField();
|
||
|
||
// additional fields for page links
|
||
if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php']['addAttributeFields']) && is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php']['addAttributeFields'])) {
|
||
$_params = array(
|
||
'conf' => &$conf
|
||
);
|
||
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php']['addAttributeFields'] as $objRef) {
|
||
$processor = &t3lib_div::getUserObj($objRef);
|
||
$additionalAttributeFields .= $processor->getAttributefields( $_params, $this);
|
||
}
|
||
}
|
||
|
||
if ($lpageId || $queryParameters || $ltarget || $lclass || $ltitle || $rel) {
|
||
$ltargetForm = $this->wrapInForm($lpageId.$queryParameters.$ltarget.$lclass.$ltitle.$rel);
|
||
$ltargetForm = $this->wrapInForm($lpageId . $queryParameters . $ltarget . $lclass . $ltitle . $rel . $additionalAttributeFields);
|
||
}
|
||
return $ltargetForm;
|
||
}
|