[TYPO3-core] RFC: #8995: felogin: replace user fields in display messages
Francois Suter
fsuter at cobweb.ch
Tue Aug 26 10:24:13 CEST 2008
Hi,
> You already can use ###USER### in display message.
> Now i enhanced this, and you can use any field from fe_user using stdWrap.
> So it is possible to display the Name of user, email link, homepage
> link, image etc
The title says it all, this is about being able to place user fields
inside display messages. I must say what I would have expected is to be
able to use user fields anywhere inside the template and not just inside
the messages. Is that difficult to implement? I could imagine searching
for patterns like ###FEUSER_(.*)### (just a rough example) and replacing
the field if it exists.
Furthermore, inside getDisplayText() you use:
$fields = $GLOBALS['TYPO3_DB']->admin_get_fields('fe_users');
to get the list of fields of the fe_users table. But getDisplayText()
can be called several times per display, so you should at least cache
the result of that query and spare the DB a little bit.
One last thing, you use tslib_content::substituteMarkerArrayCached().
Have you seen Dmitry's article against the use of that method [1]? Are
Dmitry's remarks relevant to your code?
And a small question: what's that syntax:
$replace['###USER###'] = $replace{'###FEUSER_USERNAME###'};
with the curly braces? I've never seen it in use. Is it equivalent to
square brackets? An old syntax from Perl?
So -1 for now.
Cheers
--
Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch
[1]
http://typo3bloke.net/post-details/why_substitutemarkerarraycached_is_bad/
More information about the TYPO3-team-core
mailing list