Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Plugin Request - Typekit Fonts

edited January 2011 in Vanilla 2.0 - 2.8
Don't know how familiar everyone is with Typekit. But it allows you to use alternative, webfonts on any website. By embedding a little javascript code into your site, you pull down and display your chosen fonts.

A lot of people talk about how users of Vanilla don't often customize their installation. Typography is one of those areas that allows for a lot of customization. Typekit is a great and easy way to do something really cool fast.

I'm not a coder, but if someone around here who is also thinks typography is important, maybe take a look at Typekit and see if there is someway to build up a plugin for it.

More info: http://typekit.com

Comments

  • MarkMark Vanilla Staff
    edited January 2011
    This is actually really really easy. The hardest part is creating an admin page where you can enter the typekit code you want inserted.

    For anyone who wants to get started writing their own plugins, @Tim wrote a great example plugin that is heavily documented and can be used as a base for building something awesome:

    http://vanillaforums.org/addon/example-plugin

    I bet if Tim was asked nicely, he'd update it to include saving some values on a custom administration page :)

    For the record, here's how you could write a function in your plugin to add custom strings to the head of a page:
    function Base_Render_Before($Sender) {
    if (property_exists($Sender, 'Head') && is_object($Sender->Head)) {
    $Sender->Head->AddString('
    alert("This could be dangerous!");
    ');
    }
    }
    Which includes that javascript in the head of every page of the application.
Sign In or Register to comment.