[TYPO3] Mark external links

Robert Markula robert.markula at gmx.net
Wed Jul 12 20:07:46 CEST 2006


Peter Klein wrote:
> Hi Robert. I can't find it anywhere myself either :(
> I made a recreation of it, except for the mailto: part, which is a bit 
> trickier, as you need to split the content one more.. (Im not sure if it has 
> been run through "spamProtect" at this stage or not, but if it has, you 
> can't test for the "@" char).
> But you can play around with that yourself.. Here's the TS snippet..
> 
> -- cut --
> 
> # Redefine lib.parseFunc.tags.link
> lib.parseFunc.tags.link >
> lib.parseFunc.tags.link = COA
> lib.parseFunc.tags.link {
> 
>   # Test and see if the 1st parameter is numeric
>   # (Internal link)
>   10 = TEXT
>   10.value = [I]
>   10.if.isTrue.cObject = COA
>   10.if.isTrue.cObject {
>     10 = TEXT
>     10.data = parameters : allParams
>     10.split {
>       token.char = 32
>       cObjNum = 1 || 2
>       1.current = 1
>     }
>     10.intval = 1
>   }
> 
>   # Test and see if the 1st parameter is NOT numeric
>   # (External link)
>   20 < .10
>   20.value = [E]
>   20.if.negate = 1
> 
>   30 = TEXT
>   30.current = 1
> 
>   stdWrap.typolink.parameter.data = parameters : allParams
>   stdWrap.typolink.extTarget = {$styles.content.links.extTarget}
>   stdWrap.typolink.target = {$styles.content.links.target}
>   stdWrap.parseFunc.constants =1
> }
> 
> # Also copy it into lib.parseFunc_RTE.tags.link
> lib.parseFunc_RTE.tags.link >
> lib.parseFunc_RTE.tags.link < lib.parseFunc.tags.link
> 
> -- cut --

Hi Peter!
Thanks for the code! I've spent hours trying to understand it and get it 
to work, but I fear my TypoScript knowledge is simply too little. Argh!! 
I'm feeling so close yet so far away...

*frustrated*
Ro



More information about the TYPO3-english mailing list