• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Lack of interest Event inside XenForo_Phrase

R

ragtek

Guest
#1
It would be nice, if there would be event, so we could add "global variables/phrases" to the phrases.

E.g. i'd like to add 5 "sub phrases":D which i'd like to use inside of other Phrases


$globalPhrases = array();

if (...){
$globalPhrases['joinPremium'] = '<a href=".">' . new XFPHrase('join_premium');
}

...

so i could just add sub texts which i need often to the phrase
phrase_foo would then be:
Bla bla... lonf text
{joinPremium}
ATM there's no way to do this, because there's no factorymethod and no event...

I could use placeholders and then change them before the ouput ( template_post_render ), but this would IMO waste unnecessary reccources...[/quote]