XF 2.0 Global template variables && BB Codes

Lukas W.

Well-known member
I'm currently working on a new font BB Code, that loads external fonts from google when required. However, instead of calling each individual font each time the BB Code is used, I was thinking of a way to bundle them into a single css link, or at least not include them twice. Any idea how this information could be shipped to the corresponding places? I think the more optimal place would be to actually ship it to the page head, but that would require to be able to ship it to the global template variables I believe. The easier case might be to load the font only the first time each individual font is loaded. That would still distribute the fonts to different css files, but at least no css file would be loaded twice. That, however, would require to be able to deliver the information to all bb code parsers that are called after the current one.

Any idea on how to achieve either of the possibilities? Or perhaps another idea on how this could be achieved?
 
Top Bottom