Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Another integration question - "wrapper" around vanilla output
In trying to do a seamless integration of Vanilla into Dolphin, both use classes to display their own pages. What I'd like is to be able to display the forum INSIDE the Dolphin page/theme. The Dolphin header & menus are dynamically generated, so I don't think I could use an add-on like Nugget to display it.
Option 1: If I were able to get Vanilla to port it's output to a variable, I might be able to build a custom page in Dolphin and echo the Vanilla output inside of it - not sure it this'll work.
Option 2: Do an include("dolphin_header") at the top of one of the Vanilla files and see if it'll work that way.
I'm not sure which would be easier, but I think either way it would be a pain.
Do any Vanilla geeks out there have any suggestions?
0
This discussion has been closed.
Comments
Option 2: this work well for me, I can even call my framework from there (see the very end of this page).
- override menu.php (removed the <div id="Session"> and used <?php $obj =& get_instance();echo $obj->load->view('my_menu', null, true); ?> to catch the menu I use everywhere on my site)
I might try the menu.php override. I settled on using an IFRAME, but it's not the best solution. You can see it here if you like.
Even if I override the menu.php, I'm still not sure how I would wrap the forum within the main template.
When I gave my menu.php example, it was just a hint. Max_B is right: head.php and foot.php are far better candidates.
note: ob_start() is called in appg/init_vanilla.php, so there's no need to call it once again
But I guess Max_B is talking about option 1. I still don't get how to WRAP the execution and the buffer in something. Is there a magic trick ?
I think that the iframe is not a clean solution, you won't be properly indexed by search engines, if you ever what to be...
- the first "traditional" is to use theme files to add the other layout.
- the second is to prevent vanilla from outputing anything out and get its output in a string (ob_get_clean()) then use this string the way you want in your layout. To achieve this you can design a theme without global tags (doctype, head, html, body). Vanilla is run from a given url, as usual, but the relevant logic called from head.php and/or foot.php traps the output and wraps it. Some tricky issues may require a custom extension.