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

embed-friendly themes

RajioRajio
edited October 2010 in Vanilla 2.0 - 2.8
I want to make an embed-friendly theme for my vanilla forum. I'm going to use the official embed-friendly theme as a skeleton and work around modifying that to suit my needs. Other than colour changes, the only layout mods I'll probably do would be to remove the sidebar (and integrate it to a horizontal format for better embedding) Looking at it now, I have one question.

What is this /views/default.master.tpl file all about? Perhaps with some explanation I can leverage it to my advantage.
Tagged:

Comments

  • Oh also, the embed-friendly theme doesnt seem to be the same as this: http://embed.vanillaforums.com/ .... no sidebar. Any reason for the difference?
  • MarkMark Vanilla Staff
    The one on embed.vanillaforums.com is using a newer version of the embed-friendly theme that allows you to optionally switch the sidebar off. It will be coming out with the next release of vanilla (probably by the end of the month).

    /views/default.master.tpl is the master view for the theme. Every user-facing page (ie. not dashboard) uses it to draw the header and footer, and all content (panel, page content, etc) is placed within it. It uses a "tpl" extension because it uses smarty. If you want to start fresh with a PHP version instead of smarty, delete that file and copy in the php version from your /applications/dashboard/views/default.master.php
    DiscoDave
  • Very informative, thanks!
  • Releasing the embed.vanillaforums.com newer template version would be really nice. It also would be nice if there is an option to directly jump into an category. Maybe by sending the category via GET to your js-skript? Or is there still a way to manage this?
  • Releasing the embed.vanillaforums.com newer template version would be really nice.
    agreed. I've already got a head start on modifying my forum to be embed friendly, but the newer theme would really make it easier to roll out. even if its subject to change still.
  • The one on embed.vanillaforums.com is using a newer version of the embed-friendly theme that allows you to optionally switch the sidebar off. It will be coming out with the next release of vanilla (probably by the end of the month).
    Will you still be able to change categories with this version? - you cannot tell from the demo!
  • edited October 2010
    Hey I found out a method you jump directly into a category. No magic, I just defined a JS-Variable 'myp' before the remote.js include:

    <script type="text/javascript"> var myp='/categories/testcat'; </script>
    In remote.js I changed Line 132 (Version 1.8.3) to:

    return 'http://' + host + path + concat + 'remote=' + encodeURIComponent(embedUrl)+'&p=' + myp;
    So Vanilla jumps directly into the defined cat before. That seems to work.
  • RajioRajio
    edited October 2010
    I'm trying to learn theme editing beyond just CSS. I'm working off of the embed-friendly theme as a baseline in the newest version of vanilla.

    One thing it's noticably missing is the site logo/title. I would like to edit the default.master.tpl file to have
    < div id="Title">
    < h1>< a href="siteurl" title="title">< img src="logourl" alt="title" />< /a>< /h>
    < /div>
    after line 7. obviously such that siteurl, title, and logourl are populated with the correct values. How would I accomplish this?

  • RajioRajio
    edited October 2010
    I have it working now by just putting in {Logo} but that just pops in the < img> ... no linking :/
Sign In or Register to comment.