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.

vanilla.embed.js & vanilla.embed.local.js


I'm working on
I know some of you guys don't agree to the idea and that I should make a plugin, but I'm 98% sure that what I'm trying to do cannot be done in a plugin. And I need this stuff in production soon :)

Anyway, I was wondering if vanilla.embed.js and vanilla.embed.local.js are still in use?
Can I remove those?



  • BleistivtBleistivt Moderator
    edited April 2015

    It looks like vanilla.embed.local.js is:✓&q="embed.local.js"

    I don't think serving a forum both in embedded form and non-embedded, is a common use-case or recommended, though.

    It is not that I'm against your request, I think it is a reasonable thing to want if you really need to serve two versions of your forum.
    But I think a there should rather be one or more new event hooks for this so it can be done as a plugin.

    Sure, it only shows, when embedding is turned on, but every new option in the dashboard potentially creates friction and requires the documentation to be updated. (Vanillaforums will have to support this for their hosted customers.)

    If something can't be done with a plugin or application, a new event hook should be added to the core.
    This has certain benefits:

    • New hooks will make it in the core relatively fast, as it is a safe change.
    • You could even patch this in easily (probably just a single line) if you need it in production soon.
    • Less code to maintain and update in the core.
    • Other developers will benefit from a new hook in the right place. (Particulary in this case, as the request for a different themr for embedded blog comments has come up a few times.)

    I took a look through your PR:

    It looks like you need a lot of changes in the ThemeManager.
    Gdn_ThemeManager is a factory. You can use your own by defining it in bootstrap.early.php

    Embed theme options, management screen
    - New setting screens can easily be added with a plugin

    CssPath() in AssetModel
    - This could be a good place for a new event hook.

    - You can override functions and if that doesn't suffice, you could even swap out the JS files with a plugin and serve your own embed.js

    If you specify where you think it can't be done in a plugin, we may be able to assist you.

Sign In or Register to comment.