[TYPO3] inline user functions

Dmitry Dulepov [typo3] dmitry at typo3.org
Thu Nov 29 08:49:43 CET 2007


Hi!

Max Novikov wrote:
> Hello Dmitry,

<offtopic>Please, reply to news group only. There is no need to send a copy to me by e-mail :)</offtopic>

>       It's a bit more complicated than links overwriting. I have huge
> file repository, which should be distributed to users according to
> their access levels. I've seen several extensions which can do that,
> in theory, but I would prefer to stick to original (pre-typo3) code,
> since it's interconnected with lots of auto-scheduled tasks, like
> collecting feedback, statistics, uploading interface, etc.
> 
>       What I need is:
> 
> 1. Parse content for link to the file (= custom tag) - parseFunc can
> do that.

I do not think you should replace the whole parseFunc, you can just replace the tag (see next).

> 
> 2. Custom tag should be replaced with output from user function. That
> also seems to be doable with parseFunc, although I haven't seen exact
> examples in the net.

You can call your old code from your own TYPO3 extension to process a custom tag from RTE. Kickstarter will generate such extension with all code for you.

> 3. Tricky part: output of the user function depends on several
> variables. I see how to pass variables if they're part of the
> page setup/template, but I don't see (may be I'm dumb) any obvious way to
> pass them if they're part of the content. May be there's some way to
> get parameters from custom tags? I.e. can I somehow define parseFunc
> to read and parse things like <flink id="12" label="Meeting report"/>?

I think custom tag may contain parameters. TYPO3 has custom tag <LINK>, which has parameters. I think you will get them in your extension and extension will return actual HTML code.

> Can you provide me with just one example/lead on how to do
> something like that?

May be this extension can give you an idea how to implement it:
http://typo3.org/documentation/document-library/extension-manuals/de_custom_tags/0.6.2/view/toc/0/

I never tried this extension myself though.

-- 
Dmitry Dulepov
TYPO3 core team
Web: http://typo3bloke.net/
Skype: callto:liels_bugs


More information about the TYPO3-english mailing list