Index: t3lib/class.t3lib_softrefproc.php =================================================================== --- t3lib/class.t3lib_softrefproc.php (revision 6288) +++ t3lib/class.t3lib_softrefproc.php (working copy) @@ -647,6 +647,18 @@ $finalTagParts['LINK_TYPE'] = 'mailto'; $finalTagParts['url'] = trim($link_param); + } elseif ($this->isLinkhandlerValue($link_param)) { + + // Check for link-handler keyword: + list($linkHandlerKeyword, $linkHandlerValue) = explode(':',trim($link_param), 2); + if ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_softrefproc.php']['typolinkLinkHandler'][$linkHandlerKeyword] && strcmp($linkHandlerValue, '')) { + $linkHandlerObj = t3lib_div::getUserObj($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_softrefproc.php']['typolinkLinkHandler'][$linkHandlerKeyword]); + + if( $linkHandlerObj instanceof softref_typolinkLinkHandlerHook ) { + $linkHandlerObj->getTypoLinkParts($finalTagParts, $link_param, $this); + } + } + } else { $isLocalFile = 0; $fileChar = intval(strpos($link_param, '/')); @@ -705,6 +717,20 @@ } /** + * Inndicate that the given $linkParam is a value from a registered linkhandler. + * + * @param string $linkParam Contains the value of the href attribute. + * + * @return boolean + * + * @author Michael Klapper + */ + protected function isLinkhandlerValue($linkParam) { + list ($linkHandlerKeyword, , ) = explode(':', $linkParam); + return array_key_exists($linkHandlerKeyword, $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['typolinkLinkHandler']); + } + + /** * Recompile a TypoLink value from the array of properties made with getTypoLinkParts() into an elements array * * @param array TypoLink properties @@ -758,6 +784,18 @@ } else return $content; } else return $content; break; + case 'linkhandler': + // Rebuild linkhandler reference + list($linkHandlerKeyword, $linkHandlerValue) = explode(':',trim($content), 2); + if ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_softrefproc.php']['typolinkLinkHandler'][$linkHandlerKeyword] && strcmp($linkHandlerValue, '')) { + $linkHandlerObj = t3lib_div::getUserObj($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_softrefproc.php']['typolinkLinkHandler'][$linkHandlerKeyword]); + + if( $linkHandlerObj instanceof softref_typolinkLinkHandlerHook ) { + $linkHandlerObj->setTypoLinkPartsElement($tokenID, $content, $elements, $idx, $this); + } + } + + break; case 'page': // Rebuild page reference typolink part: $content = '';