I want to add the following line into the header on all pages, unfortunately I can't seem to find where I would put this...
<script type="text/javascript"> <!-- if( top != self ){ top.location=self.document.location; } //--> </script>
It's to break the page out of frames as otherwise the login doesn't work on my server.
0 • •
Comments
if (@$Head) {
$Head->AddScript($Context->StyleUrl."framebreaker.js");
}
and then have your js in an external file.
i looked at the PanelHider extension and just quickly edited it down.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •$Head->AddScript("/path/to/your/js/file.js");- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •My Extension
<?php
/*
Extension Name: Break Frames
Extension Url: http://soul-scape.com/
Description: Should add a script on every page to allow the site to break free from the constricting frames.
Version: 1.0
Author: Ben
Author Url: http://www.soul-scape.com/
*/
$Head->Addscript("./js/BreakFrames.js");
?>
My Javascript
if( top != self ){ top.location=self.document.location; }
Now this still doesn't seem to be working, I'm not familiar with the intricacies of JavaScript so any help would be appreciated... :)
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •while you're at it, give me a discussion list auto-refresher! ;)
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •/*
Extension Name: Break Frames
Extension Url: http://soul-scape.com/
Description: Should add a script on every page to allow the site to break free from the constricting frames.
Version: 1.0
Author: Ben
Author Url: http://www.soul-scape.com/
*/
if (in_array($Context->SelfUrl, array("index.php")) && $Context->Session->UserID > 0) {
$Head->Addstring("META TAG TO REFRESH THE PAGE");
}
?>
thhat would probably work
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Warning: Cannot modify header information - headers already sent by (output started at /home/soul-sca/public_html/vanilla/extensions/BreakFrames.php:15) in /home/soul-sca/public_html/vanilla/library/Vanilla.Session.class.php on line 27- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •if (@$Head) {
}
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •