No Pic Stealing In Php

admin

Administrator
Staff member
Hi,<br />I have set up a nice looking photo gallery with coppermine, but is there any ways i can prevent thieves as i can with usual no right click-scripts (and other things) in "normal" html-pages, in other words can i insert any scripts etc to the coppermine php files? If so, please tell me in the easy way cause its the first time i worked with php (except for a mail me form) and got it to work. <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" /> <br /><br />-Thomas<!--content-->
This will cover hot linking protection - <!--QuoteBegin-coppermine.sourceforge.net/faq.php+--><div class='quotetop'>QUOTE(coppermine.sourceforge.net/faq.php)</div><div class='quotemain'><!--QuoteEBegin-->Prevent "hotlinking" by creating a .htaccess file in the albums folder and adding this:<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->SetEnvIfNoCase Referer "^http://www.yourdomian.com/" locally_linked=1<br />SetEnvIfNoCase Referer "^http://******/" locally_linked=1<br />SetEnvIf Referer "^$" locally_linked=1<br /><FilesMatch "\.(gif|png|jpe?g)$"><br />  Order Allow,Deny<br />  Allow from env=locally_linked<br /></FilesMatch><!--c2--></div><!--ec2--><!--QuoteEnd--></div><!--QuoteEEnd--><br /><br />You could also use this hack to limit viewing to only registered users - <br /><!--QuoteBegin-same source as above+--><div class='quotetop'>QUOTE(same source as above)</div><div class='quotemain'><!--QuoteEBegin-->How can I prevent unregistered user from viewing the gallery? <br />edit<br />displayimage.php<br />and search for<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->/**************************************************************************<br />* Local functions definition<br />**************************************************************************/<!--c2--></div><!--ec2--><br />and add before it<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->if (!USER_ID) cpg_die(ERROR, 'You need to register to access this page', __FILE__, __LINE__);<!--c2--></div><!--ec2--><!--QuoteEnd--></div><!--QuoteEEnd--><br /><br />I haven't found a no-right click hack yet, but you should probably check out the Coppermine Discussion forums (coppermine.sf.net).<!--content-->
Hm... I did all that and it sure works. No pics are showing (no thumbs or full size), all I see is the little red x纾
 
Back
Top