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.
Wrapping vs. Embedding?
tjforsythe
New
Rather than embedding Vanilla is there a way to simply wrap the site in a header and footer instead? I am using Wordpress. For other external pages, I just call get_header() before the content and get_footer() after to wrap the pages, and it works flawlessly.
Embedding Vanilla leaves me with several problems: cannot get pretty URLS, search engines don't index, when Vanilla uses the Wordpress login/register page, it redirects back to the main site by embedding it within the forum IFRAME, so they double up so to speak, and the http://www.domain.com/vanilla link still works, bypassing my website, which I am inclined to not prefer. There may be other issues I've not discovered yet, I've only been running the forum for a couple of days.
Embedding Vanilla leaves me with several problems: cannot get pretty URLS, search engines don't index, when Vanilla uses the Wordpress login/register page, it redirects back to the main site by embedding it within the forum IFRAME, so they double up so to speak, and the http://www.domain.com/vanilla link still works, bypassing my website, which I am inclined to not prefer. There may be other issues I've not discovered yet, I've only been running the forum for a couple of days.
0
Comments
I'm still new to vanilla, like two days, so I hope to get it figured out soon.
1. Copy
default.master.php
from/applications/dashboard/views
to your theme's views folder.2. create 3 files
header-meta.php
,body-header.php
and abody-footer.php
. Put inside header-meta.php the stuff you want loaded right after the<head>
tag. Put inside body-header.php the stuff you want loaded right after the<body>
tag and put in body-footer.php the stuff you want loaded just before the</body>
tag.3. create a folder somewhere on your site to keep your wrapper files.
4. include the files in the appropriate places in your
default.master.php
file. Note that the includes will be relative to your forum install, so for instance if your forum is installed atwww.domain.com/vanilla
and your wrappers are inwww.domain.com/wrappers
then you will include them usinginclude('../wrappers/header-meta.php');
etc. Also note that Vanilla will strip any unclosed HTML tags, so you cannot open a div tag inbody-header.php
and expect to close it inbody-footer.php
. You will need to add those div tags todefault.master.php
directly. It is safe to leave any unclosed HTML tags in the wrappers for use in other files however.[Edited to fix tags stripped during display]
@tjforsythe You seem to be the only person in the internet explaining the wrapping of a vanilla forum - thanks a lot for that!
I created all the files you mentioned and it seems to be ok. My problem, however, is that I don't know what to include in the three new files. I know where the wordpress header and footer are but thats it. Could you give a tip? It would be greatly appreciated!
Dont use wrap method for wordpress. ( by that don't use includes as mentioned )
There was an error rendering this rich post.
@422 why is that?
Same reason you dont use a screwdriver to paint a wall. Use embed.
There was an error rendering this rich post.
422 said:
Same reason you dont use a screwdriver to paint a wall. Use embed.
@422 why is that?
I have had remarkable results with a screwdriver - takes an awful long time though. oil-based paint works better though.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Lololol
There was an error rendering this rich post.
I am using embed right now and it is okay, but there's a lot of holes in it. It's easy for a user to land outside of embed and the theme looks pretty funky without the header or footer. I'm curious why the instance of using embed when it is so unrefined at the moment.
Embedding is impossible for me! I've done everything, tried everything, but I can't get the < script > code to stick in my page editor; it just keeps getting stripped no matter what I do. I'm using the Catalyst theme and it might be that, but the friendly folks on their forums don't seem to think so.
So that said, it seems like my only available tool for painting this wall is a screwdriver...unless 422 has a better idea for me, or unless there's a non-script HTML code I can use for this embedding business.