| Author |
Message |
revspalding
Premium


Joined: Jan 31, 2003
Posts: 125
Location: Badlands of NW Colorado
|
Posted:
Thu Aug 07, 2003 11:47 am |
  |
Far be it from me to complain, and consider this trivial , because it doesn't affect the operation of Nuke.
But shouldn't the frame busting javascript that is located in the root header.php file be in the includes/javascript.php file instead? That would be in keeping with the original intent of the programming conventions. |
_________________ When the blind lead the blind, they both fall in the ditch... |
|
    |
 |
sixonetonoffun
Major


Joined: Jan 13, 2003
Posts: 892
|
Posted:
Thu Aug 07, 2003 12:24 pm |
  |
I don't think includes/javascript.php gets called early enough for many scripts to run as intended from it. At least that is the experience I've had with it. But your right about the programming convention. It is a great idea it just doesn't work in this case as intended. IMHO |
|
|
   |
 |
revspalding
Premium


Joined: Jan 31, 2003
Posts: 125
Location: Badlands of NW Colorado
|
Posted:
Fri Aug 08, 2003 10:21 am |
  |
Actually, in header.php, the line that includes includes/javascript.php is called about 9 lines before the javascript frame busting script begins.
| Code: |
echo "<title>$sitename $pagetitle</title>\n";
include("includes/meta.php");
include("includes/javascript.php");
if (file_exists("themes/$ThemeSel/images/favicon.ico")) {
echo "<link REL=\"shortcut icon\" HREF=\"themes/$ThemeSel/images/favicon.ico\" TYPE=\"image/x-icon\">\n";
}
echo "<LINK REL=\"StyleSheet\" HREF=\"themes/$ThemeSel/style/style.css\" TYPE=\"text/css\">\n\n\n";
include("includes/my_header.php");
echo "<SCRIPT LANGUAGE=\"JavaScript\">\n";
echo "<!--\n";
echo "function FrameBuster(){\n";
echo "if (top !=self)\n";
echo "top.location=self.location;\n";
echo "}\n";
echo "// -->\n";
echo "</script>\n";
echo "\n\n\n</head>\n\n";
themeheader();
}
|
Maybe I'm just too tidy... |
_________________ When the blind lead the blind, they both fall in the ditch... |
|
    |
 |
Zhen-Xjell
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939
|
Posted:
Sat Aug 09, 2003 6:24 am |
  |
Hmm, good spot. If that isn't fixed soon, remind me please. |
_________________ Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki] |
|
     |
 |
TavisJohn
Nuke Cadet


Joined: Oct 28, 2003
Posts: 2
Location: CyberSpace
|
Posted:
Tue Oct 28, 2003 11:58 am |
  |
I just need a little help as to where exactly to put the ONLOAD=\"FrameBuster();return true\" line in the Theme.PHP file. Whenever I add it I loose all content of my site. All I get is a blank screen that is the color of the background. Any sudjestions as to where to place this line? |
|
|
    |
 |
revspalding
Premium


Joined: Jan 31, 2003
Posts: 125
Location: Badlands of NW Colorado
|
Posted:
Wed Nov 05, 2003 4:42 pm |
  |
I would think that it should go inside the body tag, but I hadn't pursued this past the original question. I guess I haven't been concerned about being framed in someone else's site. So just for the record, where is the function called? |
_________________ When the blind lead the blind, they both fall in the ditch... |
|
    |
 |
Meta
Nuke Soldier


Joined: Nov 04, 2003
Posts: 30
Location: NY USA
|
Posted:
Thu Nov 06, 2003 6:01 pm |
  |
Great ideas, Great ideas! I added the OnLoad function to my body tags from within the file /themes/mytheme/theme.php as follows...
| Code: |
| echo "<body bgcolor=\"$bgcolor5\" text=\"#000000\" link=\"0000ff\" topmargin=\"0\" leftmargin=\"0\" OnLoad='FrameBuster()'>" |
|
_________________
 |
|
         |
 |
Zhen-Xjell
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939
|
Posted:
Thu Nov 13, 2003 5:02 pm |
  |
I ran some tests with the code implementation and it does work. I'm not sure I follow? Academic perhaps? |
_________________ Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki] |
|
     |
 |
|
|