Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Post Installation Help
Author Message
12345678
New Member
New Member



Joined: Jun 11, 2005
Posts: 2

PostPosted: Wed Jun 22, 2005 12:02 am Reply with quote

Oh dear....

I used to use a javascript to popup webcam images on my old html site. I displayed a thumbnail and, if you clicked it, a full/resized image popped-up. It's here :-

http://www.codelifter.com/main/javascript/autosizeimagepopup.html

Then I moved to phpnuke (wow!). I realised my images were being stolen by all and sundry and used on their own sites and the bandwidth was costing me a fortune.

So I got this :-

http://www.thesitewizard.com/archive/protectimages.shtml

It works a treat.

But how on earth do I combine the 2 things in my news item ... I can get it to popup and I can protect the image. But I can't figure out how to do both. DOH!

Have a look at www.bubworld.net and click on a camera image - all I need to to do the same, but with the protection as above.

Sorry, I'm a bit thick when it comes to PHP and some help would be massively appreciated.

Thanks.
 
View user's profile Send private message
hitwalker
Sells PC To Pay For Divorce



Joined:
Posts: 5661

PostPosted: Wed Jun 22, 2005 6:12 pm Reply with quote

well maybe its the sun i dont know or the heat,but i think i know what you mean...or not Smile

Any way..prevent linking could be solved if you make a htaccess file in your root and put this code in it..

Code:


RewriteCond %{HTTP_REFERER} !^http://(www\.)?yoursite.com(/)?.*$     [NC]


Surely replace yoursite.coim with your name..


second solution is to put the below code in yoor header.php..
just copy it and put int in there near the bottom...
Do that so it looks like..

Code:


themeheader();
if(!is_admin($admin) && !is_user($user)) {
  include("includes/noclick.js");
}

}

online();
head();



The code :
Code:
if(!is_admin($admin) && !is_user($user)) {


The code works only for anonymous people,so the admin and users can click...



Now listen...
The included noclick.js can be anything....like a simple no right click...

But you can also put this in it :

Code:


<!--
function hp_drc(e){if(document.all){if((event.button==2)||(event.button==3)){alert("This page covers the basic definitions regarding copyrights.");return false}}if(document.layers){if(e.which==3){alert("This page covers the basic definitions regarding copyrights.");return false}}}if(document.layers){document.captureEvents(event.mousedown)}document.onmousedown=hp_drc;document.onselectstart=new Function("return false");function hp_nls(){window.status="";setTimeout("hp_nls()",10)}hp_nls();function hp_dp1(){for(i=0;i<document.all.length;i  ){if(document.all[i].style.visibility!="hidden"){document.all[i].style.visibility="hidden";document.all[i].id="hp_id"}}};function hp_dp2(){for(i=0;i<document.all.length;i  ){if(document.all[i].id=="hp_id")document.all[i].style.visibility=""}};window.onbeforeprint=hp_dp1;window.onafterprint=hp_dp2;//-->



Put that one in a file called like noclick.js !

The code protects more things...he..he
But realise,anyone can still get your stuff ...but its not so easy now...
 
View user's profile Send private message
12345678







PostPosted: Wed Jun 22, 2005 11:59 pm Reply with quote

Hi,

Yeah, I tried all those things ... the htaccess method stops anyone who's firewall is blocking referrer info from seeing anything so it's no good for my purposes and I already got the norightclick stuff installed.

All I need is a mod of the chimage.php script to include the favascript functionality of the popup script.

Sounds easy, it' probably is, but I can't work it out DOH!
 
hitwalker







PostPosted: Thu Jun 23, 2005 5:02 am Reply with quote

well dont waste to much time on the security but ever seen my snippet database?
Maybe this one helps..
http://www.hitwalker.nl/Snippet_library/index.php?cat_select=Phpnuke_related&show=Cool_image_popup_windows
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Post Installation Help

View next topic
View previous 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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©