[TYPO3-dev] PI language labels
Dmitry Dulepov
dmitry at typo3.org
Mon Aug 30 12:53:42 CEST 2010
Hi!
J. Lingott wrote:
> I am fetching the config by using $this->conf =
> $GLOBALS['TSFE']->tmpl->setup['plugin.'][$this->extKey.'.'], as it is
> not a plugin, but a XCLASS hook class. Either if doing it before or
> after pi_loadLL() the result is the same. Maybe the way of getting the
> config with using pi_loadLL() is not working?
>
> Also, for testing issues moved the config fetching and pi_loadLL() into
> the hook method, but same result.
Well, you can continue doing it your way if you want but it is still
incorrect for the reasons that I told you in the previous post.
> What I meant is loading is done by $this->pi_loadLL(), fetching by
> $this->pi_getLL() and not by using the parent object of tt_news which
> would be provided by the hook method processSingleViewLink($linkWrap,
> $url, $params, $obj). But as well, if using the parent object the result
> is the same.
Sorry, in one pof previous messages you told you XCLASS tt_news, now you
talk about the hook. What do you use exactly: the hook or XCLASS? There are
two different things.
> Pastebin'd the source code if you want to have a look: http://pastebin.com/Vk8upbe7.
Well... I would not let any such code into any of my systems for several
reasons:
- it uses pibase but it is not a plugin. pibase is for plugins only.
- pibase classes are not for BE
- it parses TypoScript on its own causing performance and compatibility issues
- your code will not work if tt_news is instantiated from TS with a
customized config
- your manipulates RealURL tables, which do not belong to you. It is like
going to your neighbour and taking his TV without his permission.
- you use pi_loadLL() before setting $this->conf
- preg_match("/SINGLE/", $obj->config['code']
- $TSO = t3lib_div::makeInstance('t3lib_tsparser_ext'); $TSO =
t3lib_div::makeInstance('t3lib_tsparser_ext');
In other words: this code is a big mess :(
--
Dmitry Dulepov
TYPO3 core&security team member
Twitter: http://twitter.com/dmitryd
Read more @ http://dmitry-dulepov.com/
More information about the TYPO3-dev
mailing list