[TYPO3] inline user functions

Dmitry Dulepov [typo3] dmitry at typo3.org
Wed Nov 28 16:50:47 CET 2007


Max Novikov wrote:
> Can anyone, please, provide me with working example of how to combine
> parseFunc and userFunc (I think they should do it, shouldn't they?),
> so that user function can read several variables from content piece
> and make appropriate substitution?

What kind of sunstitution? There is a hook to generally alter content before it is sent to the browser. But I am not sure this is exactly what you need.

> E.g., the way I do it without typo3:
> ---
> ...here you can get <?php my_user_function(5,"updated brochure"); ?> for the...
> ---
> The first variable is database id of the file, the second - the text
> to appear on the link. Depending on the user access it should render
> either url to download script or error.

Do you mean rewriting of links? There are several "secure download" extensions in TER. You can check their source code for information about rewriting links.

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

More information about the TYPO3-english mailing list