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.
Automatically switch theme when embedded?
Is there a good way to show users one theme when the forum is embedded, and another theme when users access the forum directly?
Tagged:
0
Answers
I've done this over at VeganShare (Embedded: https://www.facebook.com/pages/VeganShare/208941239225250?sk=app_190322544333196 Full: http://veganshare.co.il/) using responsive rules. While it might not be the optimal way to go, it works quite alright
Kasper Kronborg Isager (kasperisager) | Freelance Developer @Vanilla | Hit me up: Google Mail or Vanilla Mail | Find me on GitHub
@kasperisager: That's almost exactly what I want to do.
I'm not sure what you mean by responsive rules, though. Could you please elaborate a bit?
Also, very cool that it works well to embed Vanilla in a Facebook tab like that. Nice to know. Nice work.
@zcopley: Glad you like it and thanks for your compliments!
Responsive CSS rules are a way of only applying styles when the width of the clients browser window matches certain values. It's pretty much the fundament of responsive design An example could look like this:
@media (max-width: 979px) { body { padding-top: 0; #font > .facebook; } }
These styles will only be applied to the body element when the browser window is below 980px and therefore these styles will only apply when the VeganShare forum is embedded in a Facebook page. This can adapted to any embedded forum though, you can find the full code here: https://github.com/kasperisager/VeganShare/blob/master/design/less/custom.less
Kasper Kronborg Isager (kasperisager) | Freelance Developer @Vanilla | Hit me up: Google Mail or Vanilla Mail | Find me on GitHub
My question is not directly relevant to the issue in discussion here, but people in this thread are capable of answering my query.
Is it necessary to have https: enabled website to be able to embed it in facebook? Is
there any workaround available?
I recall this was not the case before.
I think it's just sort of a requirement for Facebook applications in general. For Facebook to be able to support SSL-enabled browsing, all the canvas apps have to be also support it. Someone please correct me if I'm wrong.