You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 56 guest(s) and 1 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Frame-busting Javascript in header.php [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
This forum is locked: you cannot post, reply to, or edit topics.  This topic is locked: you cannot edit posts or make replies.printer-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
revspalding
Premium
Premium


Joined: Jan 31, 2003
Posts: 125

Location: Badlands of NW Colorado

PostPosted: Thu Aug 07, 2003 11:47 am Reply with quoteBack to top

Far be it from me to complain, and consider this trivial Rolling Eyes , 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...
Find all posts by revspaldingView user's profileSend private messageVisit poster's website
sixonetonoffun
Major
Major


Joined: Jan 13, 2003
Posts: 892


PostPosted: Thu Aug 07, 2003 12:24 pm Reply with quoteBack to top

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
Find all posts by sixonetonoffunView user's profileSend private message
revspalding
Premium
Premium


Joined: Jan 31, 2003
Posts: 125

Location: Badlands of NW Colorado

PostPosted: Fri Aug 08, 2003 10:21 am Reply with quoteBack to top

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...
Find all posts by revspaldingView user's profileSend private messageVisit poster's website
Zhen-Xjell
Nuke Cops Founder
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939


PostPosted: Sat Aug 09, 2003 6:24 am Reply with quoteBack to top

Hmm, good spot. If that isn't fixed soon, remind me please.

_________________
Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki]
Find all posts by Zhen-XjellView user's profileSend private messageSend e-mailVisit poster's website
TavisJohn
Nuke Cadet
Nuke Cadet


Joined: Oct 28, 2003
Posts: 2

Location: CyberSpace

PostPosted: Tue Oct 28, 2003 11:58 am Reply with quoteBack to top

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?
Find all posts by TavisJohnView user's profileSend private messageVisit poster's website
revspalding
Premium
Premium


Joined: Jan 31, 2003
Posts: 125

Location: Badlands of NW Colorado

PostPosted: Wed Nov 05, 2003 4:42 pm Reply with quoteBack to top

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...
Find all posts by revspaldingView user's profileSend private messageVisit poster's website
Meta
Nuke Soldier
Nuke Soldier


Joined: Nov 04, 2003
Posts: 30

Location: NY USA

PostPosted: Thu Nov 06, 2003 6:01 pm Reply with quoteBack to top

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()'>"

_________________
Image Image
Find all posts by MetaView user's profileSend private messageSend e-mailVisit poster's websiteAIM AddressYahoo MessengerMSN MessengerICQ Number
Zhen-Xjell
Nuke Cops Founder
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939


PostPosted: Thu Nov 13, 2003 5:02 pm Reply with quoteBack to top

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]
Find all posts by Zhen-XjellView user's profileSend private messageSend e-mailVisit poster's website
Display posts from previous:      
This forum is locked: you cannot post, reply to, or edit topics.  This topic is locked: you cannot edit posts or make replies.printer-friendly view
View previous topic Log in to check your private messages View next topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.193 Seconds - 206 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::