11
Cuidiu
Re: Leeching websites in an iFrame - can it be prevented?
  • 2006/12/19 21:29

  • Cuidiu

  • Quite a regular

  • Posts: 358

  • Since: 2006/4/23


I don't think Google is offended if we use a frame buster on our pages. I get a lot of referrals from Google images on one site (non CMS) and use the code there for every page. What happens is the page jumps directly to my site instead of viewing part of it through Google's frame. So no harm done. It doesn't prevent Google from spidering.

That being said, I can't say for sure Google isn't offended. These days it doesn't take much to offend the Big G and the rules of G's game are always changing. Who knows if this will be a problem in the future but so far, it hasn't been. I don't think a site owner should be penalized for trying to keep his pages from being displayed on someone else's site.

Quote:

irmtfan wrote:
this topic deserved for a faq.
@Cuidiu :
is there any way to except some sites? (like google , yahoo and ...)
[size=x-small]Working sites:
XOOPS 2.0.16 PHP 5.2.2, MySQL 5.0.24a-standard-log, Apache/2.0.54 (Unix)
XOOPS 2.2.4, PHP 4.3.10, MySQL 3.23.58, Apache/1.3.33 (Unix)[/size]

12
Peekay
Re: Leeching websites in an iFrame - can it be prevented?
  • 2006/12/19 23:49

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


The Cuidiu-Lance method (which sounds like something from a good sex guide ) is fine for our prototype site, where the only viewers are supposed to be clients following a privileged link.

I wish however that I could find a solution that did this without having to add code to each web page.
A thread is for life. Not just for Christmas.

13
irmtfan
Re: Leeching websites in an iFrame - can it be prevented?
  • 2006/12/20 6:02

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


you dont need to add it every where.

just open include/xoops.js and add codes there:
if (parent.frames.length 0window.location="http://www.mydomain.co.uk/fu_a_hole.htm"// escape from frame -->


i believe it can be added in 2.0.14+ with this method too:

<{$xoTheme->addscript('code.js')}>

14
Cuidiu
Re: Leeching websites in an iFrame - can it be prevented?
  • 2006/12/20 6:45

  • Cuidiu

  • Quite a regular

  • Posts: 358

  • Since: 2006/4/23


Maybe adding the code to an external js will work in XOOPS but I found it did not work for me in my non CMS site. I couldn't figure out why but it only worked in the head tags.
Quote:
just open include/xoops.js and add codes there
[size=x-small]Working sites:
XOOPS 2.0.16 PHP 5.2.2, MySQL 5.0.24a-standard-log, Apache/2.0.54 (Unix)
XOOPS 2.2.4, PHP 4.3.10, MySQL 3.23.58, Apache/1.3.33 (Unix)[/size]

15
Peekay
Re: Leeching websites in an iFrame - can it be prevented?
  • 2006/12/20 9:47

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


I found it works on my static site using an external javascript, as long as you remember to omit the script tags from the js file.

In the head section of the web page:
<script language="javascript1.1" type="text/javascript" src="noframe.js">
</
script>

noframe.js
if (parent.frames.length 0window.location="http://www.mysite.co.uk/noframe.htm"// escape from frame -->
A thread is for life. Not just for Christmas.

16
Cuidiu
Re: Leeching websites in an iFrame - can it be prevented?
  • 2006/12/20 16:42

  • Cuidiu

  • Quite a regular

  • Posts: 358

  • Since: 2006/4/23


Quote:
I found it works on my static site using an external javascript, as long as you remember to omit the script tags from the js file.

Yes. I did omit the script tags... but I didn't usehttp://www.mydomain.com for window location as you have done. Perhaps that's why.
[size=x-small]Working sites:
XOOPS 2.0.16 PHP 5.2.2, MySQL 5.0.24a-standard-log, Apache/2.0.54 (Unix)
XOOPS 2.2.4, PHP 4.3.10, MySQL 3.23.58, Apache/1.3.33 (Unix)[/size]

Login

Who's Online

156 user(s) are online (107 user(s) are browsing Support Forums)


Members: 0


Guests: 156


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits