How to detect if forum is running in an iframe or not?
I thought I had this answered after looking at a comment from @hgtonight about the Jump To Top plugin, but it turns out his plugin just checks to see if embedding is enabled or not
My problem: I run an un-embedded forum, but have embedding enabled so that we can use VF for our Wordpress comments. However, I want to be able to check in my themehooks file to see whether the current instantiation of the forum is the unembedded full forum, or the embedded comments iframe.
Anyone know if I can do this (and the obvious follow-up question, how)?
I can tell you why I want to do it if you'd like, but it's probably boring and you might want to pummel me with a stick if you knew how twisted my VF/WP installation really is.
Best Answer
-
AaronWebstey ✭✭✭
Never mind, I just didn't grep hard enough. From the Signatures plugin:
strcasecmp(Gdn::Controller()->RequestMethod, 'embed') == 0
8
Answers
Never mind, I just didn't grep hard enough. From the Signatures plugin:
strcasecmp(Gdn::Controller()->RequestMethod, 'embed') == 0
Anyone know how I can mark this as answered, even though I answered it myself?
@AaronWebstey I can mark it as answered! Thanks for sharing your result.
(on a side note, I have noticed this too, one cannot select one's answer as correct unless one is a mod or admin).
Thank you @Adrian !