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.

Embedding conflicts with my site's backbone.js hashtags

Hi guys, I'm trying to embed vanilla comments below content in my backbone.js application. Backbone, of course, uses hashtags for navigation. Vanilla seems to get confused when I try to embed a comments page because it thinks the hashtags are for it.

My page URL is
When I try to embed Vanilla on that page by injecting a script tag, it tries to load forums/index.php?p=/entry/123&remote= which gets a 404 because Vanilla doesn't have a page called /entry/123; that hashtag was for my app. Normally, when you try to embed on a regular web page, it tries to load forums/index.php?p=/discussion/embed/ which is the comments page.

Any way around this or am I doomed for using a backbone site? :-/



  • edited June 2014

    Hm, this seems to be working with an iframe instead of using embed.js

    Although it won't let me set the page title when I load index.php?p=/discussion/embed/&vanilla_title=xyz - it still pulls the title from the vanilla_url URL (which is incorrect)

  • Got it, it's &title=xyz (and it has to be URL encoded)

  • x00x00 MVP
    edited July 2014

    Since the embed system relies heavily on url fragments (what you call hash), I think coinciding with another system that does that also is a tall ask. You are asking for trouble.

    Embed uses an iframe that is how it works. But is a bit more than just an iframe, there is the whole navigation, and integration. Just an iframe is a poor substitution.

    Personally If you can avoid embedding it is lot better around. The best thing is a vanilla theme to blend into your site, or simply a nice look forum (making all the pages on the site look the same has been done to death, sometime it actually makes sense to differentiate sections).

    It is onyl if you don't care about he SEO of your site, or it a private community that I would recommend using embed.

    grep is your friend.

  • Thanks x00, it is a private community

  • well since backbone.js is a tool to develop your site, I suppose you can resolve any conflict in the architecture yourself.

    Regarding embed vanilla comments, it gains the post content by scraping (not ideal but there isn't one based on a proper API, and if the article part of your site was private it therefore wouldn't work). This means is goes through some fall backs as far as detecting the article title, and content, ti is not an exact science. So the template of the that part of the site matters. If it working as expect fine, just thought I'd mention it.

    grep is your friend.

Sign In or Register to comment.