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

Google Fonts BbCode [Deleted]

Discussion in 'Add-on Releases' started by katsulynx, Apr 24, 2015.

  1. katsulynx

    katsulynx Well-Known Member

    katsulynx submitted a new resource:

    Google Fonts BbCode - Extend XenForos [FONT]-Tag to support the full range of Google Fonts

    Read more about this resource...
  2. katsulynx

    katsulynx Well-Known Member

  3. katsulynx

    katsulynx Well-Known Member

  4. silence

    silence Well-Known Member

    Would it be possible to do single requests based on all the fonts used on a page? As to prevent dozens of requests?
  5. katsulynx

    katsulynx Well-Known Member

    I don't really see any improvement this could bring. The fonts are required one by one from Google anyway as they are different files.
  6. DaniD

    DaniD Active Member


    I don't see the included readme in the files you provided. Might you know where I can find this?
  7. katsulynx

    katsulynx Well-Known Member

    Sorry, it got lost in the event of updating. If it is about deactivating the call to my server:

    -> Head to your ACP -> Tools -> Cron Jobs and deactivate or delete the "Google Webfonts Build Cache" Cron Job.
  8. DaniD

    DaniD Active Member


    That wasn't the reason - just wanted to make sure I was doing everything correctly. Your addon works like a charm - thanks!
    katsulynx likes this.
  9. katsulynx

    katsulynx Well-Known Member

    @DaniD I've read your review. What exactly do you mean with "save fonts for easier access"? Saving them on your webserver doesn't really grant any benefits, or do you want to load them with every page no matter if used? Or do you mean in the font list of the editor?
  10. DaniD

    DaniD Active Member

    @katsulynx - I'm pretty sure you said it was impossible, but it'd be nice if a few fonts could be selected/used in the font list of the editor, so people can either use those fonts on their own, or so that someone can find them easier, as you have to refer to google's list in order to figure out which fonts you can even use.

    Just wishful thinking, though!
  11. katsulynx

    katsulynx Well-Known Member

    The AddOn itself already maintains a list of the google webfonts, so that shouldn't be any problem. I was already thinking about expanding the font list, but wasn't sure on how to do it simply by the fact we have over 600 google fonts, which would be too much to add to the editor alltogether. I'll see what I can do however.
    DaniD likes this.
  12. DaniD

    DaniD Active Member

    I know it would be a crazy amount of load on the server to have all of those font preloaded and easily accessible, so I understand that is out of the question.

    That was why I suggested maybe one or two fonts, like how the default fonts are readily accessible and there are only a few of them accessible (times, arial, etc). Being able to set your own default google font(s) for the editor would be nice, too. Like a max of 2, as to avoid load issues. I appreciate you looking into this feature, though. :)!
  13. Brandon Rhea

    Brandon Rhea New Member

    Any way to choose a style/font weight in the bbcode?
  14. katsulynx

    katsulynx Well-Known Member

    Just the default ones along with what's possible to achieve in combination with other BBCodes at the moment.
  15. Gossamer

    Gossamer Active Member

    I installed this add-on a little while ago and it was working great at first. But now my members are reporting that it looks like the google font isn't being called for all letters it's being wrapped around.

    I found this error in my error log:
    This is what the other admin on my board showed me:
  16. katsulynx

    katsulynx Well-Known Member

  17. katsulynx

    katsulynx Well-Known Member

    @Gossamer please report back if the error is fixed now.
  18. The Dark Wizard

    The Dark Wizard Well-Known Member


            if(in_array($tag['option'],$this->_webfonts)) {
                $webfont = str_replace(' ','+',$tag['option']);
                return $this->_wrapInHtml('
                    <link href=\'https://fonts.googleapis.com/css?family='
                        .'\' rel=\'stylesheet\' type=\'text/css\'>
                    <span style="font-family: ' . htmlspecialchars($tag['option']) . '">', '</span>', $text);
    This code here in Base.php needs to use https for the link to the googleapis.com. Other wise it won't load on sites that use https unless the user allows "insecure content". Setting it to https should not have any side effects to sites that don't use ssl as Google Recommends to use https of their links.
    katsulynx likes this.
  19. katsulynx

    katsulynx Well-Known Member

  20. iorG19

    iorG19 Member

    i don't understand how to use it, could you please help me?

Share This Page