Announcement

#1 2012-06-23 00:16:08

mendip_discovery
Member
Mendip Hills, Somerset, UK
2012-05-19
91

How do you remove the Download Original Link on Piwigo 2.4

I have just noticed that when you select the various size options in the gallery it gives you a link to the Original File without the Watermarking.

Offline

 

#2 2012-06-23 00:37:18

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: How do you remove the Download Original Link on Piwigo 2.4

I didn't a simplier way than use a personal plugin (create it with LocalFilesEditor and activate it)

Code:

<?php
/*
Plugin Name: Remove Original Link
Version: 1.0
*/

add_event_handler('loc_end_picture', 'remove_original_link');

function remove_original_link()
{
  global $template;
  $template->set_prefilter('picture', 'remove_original_link_prefilter');
}

function remove_original_link_prefilter($content, &$smarty)
{
  return str_replace('{if isset($U_ORIGINAL)}', '{if false}', $content);
}

?>

Offline

 

#3 2012-06-23 07:04:11

rvelices
Former Piwigo Team
2005-12-29
1960

Re: How do you remove the Download Original Link on Piwigo 2.4

also you can disable originals per user basis from the admin / user management (there is a user property historically called High definition ...)

Offline

 

#4 2012-06-23 11:12:33

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: How do you remove the Download Original Link on Piwigo 2.4

1) this parameter sould be renamed
2) we should add a global parameter on the multisize config screen

Offline

 

#5 2012-06-23 19:06:40

mendip_discovery
Member
Mendip Hills, Somerset, UK
2012-05-19
91

Re: How do you remove the Download Original Link on Piwigo 2.4

Do I need to post this as a feature request to the bug tracker?

I thought I had set the option to not allow access to the hi-res but the upgrade might of changed a few things. Would be nice for the option to not use multisize. As I don't need it for my site as I show images at 600px to prevent others from just thieving the images. I run a event photography website so the lower the res the more chance they will buy.

Offline

 

#6 2012-10-21 23:04:51

GertK
Member
Denmark
2012-10-17
25

Re: How do you remove the Download Original Link on Piwigo 2.4

Hi,

I tried to add the above code:
-------------------------------------------
<?php
/*
Plugin Name: Remove Original Link
Version: 1.0
*/

add_event_handler('loc_end_picture', 'remove_original_link');

function remove_original_link()
{
  global $template;
  $template->set_prefilter('picture', 'remove_original_link_prefilter');
}

function remove_original_link_prefilter($content, &$smarty)
{
  return str_replace('{if isset($U_ORIGINAL)}', '{if false}', $content);
}

?>
-------------------------------------------

through the LocalFilesEditor after that i just got a blanck page and I cant load anything. Where is the code saved and how do I remove it again when i just have a blanck page?

I have treid to search for the above in my MySQL (phpMyAdmin) database for the gallery but cant find the code anywhere.

Please help.

Offline

 

#7 2012-10-21 23:16:35

GertK
Member
Denmark
2012-10-17
25

Re: How do you remove the Download Original Link on Piwigo 2.4

Found it here: /local/config/

Anyway why does it not work when I add the above code?

Offline

 

#8 2012-10-22 12:07:25

flop25
Piwigo Team
2006-07-06
7037

Re: How do you remove the Download Original Link on Piwigo 2.4

hum could you send me by email your file please ? thx


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#9 2012-10-22 12:11:51

GertK
Member
Denmark
2012-10-17
25

Re: How do you remove the Download Original Link on Piwigo 2.4

sure, what email address to use?

Offline

 

#10 2012-10-22 12:16:49

flop25
Piwigo Team
2006-07-06
7037

Re: How do you remove the Download Original Link on Piwigo 2.4

GertK wrote:

sure, what email address to use?

the one on my profile ? ^^


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#11 2012-10-22 12:46:43

flop25
Piwigo Team
2006-07-06
7037

Re: How do you remove the Download Original Link on Piwigo 2.4

okay you misunderstood how use the plugins : there are different tabs, and use the Personal plugin one to add this code
Don't forget to enable the plugin


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#12 2012-10-23 09:14:15

GertK
Member
Denmark
2012-10-17
25

Re: How do you remove the Download Original Link on Piwigo 2.4

Thanks - working now.

What effect will it have on Piwig if I remove the original photos from the server. The original photos are about 10mb each and if I got like 500 photos then im using 5GB only on the original photos?

Offline

 

#13 2012-10-23 10:40:49

flop25
Piwigo Team
2006-07-06
7037

Re: How do you remove the Download Original Link on Piwigo 2.4

other question=other thread ;)


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact