Anti-Copy Mod : Complete Image Overlay, Hide Image Links, and other features... - Page 2 Anti-Copy Mod : Complete Image Overlay, Hide Image Links, and other features... - Page 2
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Anti-Copy Mod : Complete Image Overlay, Hide Image Links, and other features...

Started by pftq, August 03, 2007, 12:54:41 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


russell235

Quote from: pftq on August 03, 2007, 12:54:41 PM
--* Non-image files can now use custom intermediate images if uploaded (default normal_ prefix)

I haven't gotten this part to work at all.  I can't see in the files provided where you would have coded this change.  Are you certain you included the correct file for this?

pftq

It works basically like uploading a thumbnail for videos/files, except you use the normal_ prefix instead of thumb_.

This does not apply to videos (no image overlay before video plays) - that requires a flash player.  This is in reference to having a picture to click on instead of a plain file-icon when hosting zips/documents etc.

russell235

Quote from: pftq on October 18, 2007, 05:31:12 AM
It works basically like uploading a thumbnail for videos/files, except you use the normal_ prefix instead of thumb_.

I assumed that.  I uploaded a normal_ and thumb_ file, but only the thumb_ shows as intermediate image.  And I can't find anywhere in your code that it should display the normal_ file for the intermediate.  so that's why I asked if you were sure there wasn't another change that maybe didn't get included in this package.   :-[

Even though I know it's not the major feature of your mod, this is the part that interests me most because I don't like the little thumbs used as intermediate images.

russell235

i guess i can't edit my post, but wanted to add that I tried on a .zip file

pftq

The feature is in the imagix.php (root one).  It replaces the theme_html_picture() function with a modified one.  However, if an updated one already exists in the theme.php, it will be ignored.

You probably have the function in your theme.php - if you don't mind, removing it should fix the issue.  Or you can add the change yourself:

Find: elseif ($mime_content['content']=='document')
} elseif ($mime_content['content']=='document') {
        $pic_thumb_url = get_pic_url($CURRENT_PIC_DATA,'thumb');
        if(file_exists(str_replace($CONFIG['thumb_pfx'], $CONFIG['normal_pfx'], $pic_thumb_url))) $pic_thumb_url=str_replace($CONFIG['thumb_pfx'], $CONFIG['normal_pfx'], $pic_thumb_url);
        $pic_html = "<a href=\"{$picture_url}\" target=\"_blank\" class=\"document_link\"><img src=\"".$pic_thumb_url."\" border=\"0\" class=\"image\" /></a>\n<br />";
        $pic_html=imaginx($pic_html);
    }

russell235

you are right.  that was exactly the help that i needed.  thank you very much.  :)

pftq

     Slight problem with the mod I discovered recently.  The mod seemingly just stop working for no apparent reason and reduce the image view size to 1×1px.

     The cause turned out to be the filepath of the image, which might contain a space but shows up as %20 from the URL.  The code does not know how to handle this and renders a faulty image.

     This has been corrected and the download has been updated.  For those who have the previous version, simply replace the root imagix.php (not the theme one).

     Download: Coppermine Anti-Copy 1.02

Apologies, but I still haven't been able to get around the resource consumption.  The mod is based entirely on the PHP image functions, which by nature seem to use heavy amounts of memory (directly proportional to the size of the image itself; smaller images = less memory use).  If anyone has any tips on how to around this that'd be great.


wuschel_lux

Hi all,

I want to install your great Mod on my site (www.volleyball.lu/fotogallery/) but I tested it on an offline version of my gallery. There was the problem that no image was shown at all, even Tumb, Itermediate, an Fullsize.

Could someone give me a hint or more detailed instructions how do this Mod?

Thanks in advance. Regards, Francis

pftq

Hi is the size of the image correct? Describe a bit more what you mean.

If the sizes are correct and it is only the image which is blank, try raising the time setting on the image generator file (one with really random-lettered name) as this means the image generator is having too narrow a timeslot for your server to extract the image.

It'd also help if you could set up a seperate temporary gallery to show what problems you are experiencing.

wuschel_lux

Hi, infact the image size should be correct (e.g. the thubs are schon 150x100px) but the original image in background isn't shown at all.
Do you mean this ($marx=15;) variable?
For the moment I have jhust one CPG install in production. I will try to macke a copy.
Thanks

wuschel_lux

Hi, I prepared a test CPG gallery with your mod. you will find it under test.volleyball.lu. There is the same phenomen. Maybe this will help.

Thanks for your time.

pftq

Hi sorry for the delay.

Does your server support Apache? It appears that the image generator file (random-looking extension) is not being recognized as a jpeg filetype.

wuschel_lux

Quote from: pftq on January 18, 2008, 10:25:12 PM
Hi sorry for the delay.

Does your server support Apache? It appears that the image generator file (random-looking extension) is not being recognized as a jpeg filetype.
Hi, no problem. I think the server supports Apache. I found in the phpinfo following line:
Server API    Apache 2.0 Handler
There are also a lot of parameter under the point apache2handler and Apache Environment.

But what they all means, no idea  ???
Francis

pftq

You should not have to change anything then... The code that lets your server recognize the filetype is in the .htaccess file in the albums/ folder.  Maybe you forgot to copy it over?

wuschel_lux

Quote from: pftq on January 19, 2008, 10:04:11 PM
You should not have to change anything then... The code that lets your server recognize the filetype is in the .htaccess file in the albums/ folder.  Maybe you forgot to copy it over?
Hi, I copied the file in the albums location. If I try to enter the URL for a pic under albums, I get with te htacces file a 500 server error. If I delete the htacces I can acces this file. So it seams that the htacces works.

pftq


wuschel_lux

Quote from: pftq on January 20, 2008, 09:45:51 AM
Hi, try copying the .htaccess to the root gallery folder as well.
done but now I get when access the page an 500 error

pftq


wuschel_lux

Quote from: pftq on January 20, 2008, 10:07:32 AM
Can I see the code you put in the .htaccess file?
#Set your site to recognize your custom php file, if you change the extension

AddType application/x-httpd-php .jfASjaweaxSPAt

AddHandler application/x-httpd-php .jfASjaweaxSPAt

#Deny access to image files for those who figure out the code

RewriteEngine on

RewriteBase /gallery/albums/ #Path to pictures

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

RewriteCond %{HTTP_REFERER} !^http://(www.)?sitename.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https?://12.34.56.7890/.*$ [NC]  # This is site ip address, optional

RewriteCond %{REQUEST_URI} ^.*\.(gif|GIF|jpe?g|png|JPE?G|PNG)$

ReWriteRule (.*) /404 [L] # Where to send those snooping bastards...