Announcement

  •  » Requests
  •  » Who can download this photo?

#16 2014-11-25 19:15:54

rstevens
Member
2014-11-17
16

Re: Who can download this photo?

Can you translate that into English for me--a newcomer programmer to piwigo? Perhaps give step-by-step, reproducible instructions?

Offline

 

#17 2014-11-25 19:46:57

flop25
Piwigo Team
2006-07-06
6965

Re: Who can download this photo?


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

 

#18 2014-11-26 02:23:35

rstevens
Member
2014-11-17
16

Re: Who can download this photo?

Thanks for that tip.

Let me see if I can provide the remaining solution and explain it for future newcomers so new, registered users can download the high-resolution photo (but the guest user cannot):

The concept here is that piwigo has configuration variables saved in the file include/config_default.inc.php but they don't want you to modify that file. Instead, they want you to create a new file called local/config/config.inc.php to override the variables you wish to modify.

So create a new user, give it the properties you wish, and configure piwigo so it is the default user. Then new, registered users get the properties you wish them to have--from the default user.

Here are steps that seem to work for me:

1. Create a new user (from Administration Home click Manage > Add a user

2. Check the checkbox "High definition enabled" and then click to save

3. Install and activate the plugin LocalFiles Editor

4. Under Plugins, click LocalFilesEditor. Under the tab "Local config" you should see an edit box with a gray background. Yes, in this version, 2.7.2, gray still means the edit box is enabled :)

5. Type this config value and save:
$conf['default_user_id'] = 2;

NOTE: If 2 is not the id of the new user you just created, then find the id's number. With new installations you may at this point have just three users (admin, guest and your new user) so the id 2 may be a good guess. In my case I created and deleted a user, so 3 worked.

Saving the file crashed my piwigo install so I had to sftp to my website, replace the local/config/config.inc.php file with the config.inc.bak.php file or with one of zero length. Later I realized the problem--Piwigo saved it as:

<?php$conf['default_user_id'] = 3;?>

So I edited and saved the file to add spaces for the PHP tags:
<?php $conf['default_user_id'] = 3; ?>

Now new, registered users after logging in can finally download files.

Offline

 

#19 2014-11-26 07:49:30

flop25
Piwigo Team
2006-07-06
6965

Re: Who can download this photo?

Good news
for the id, it can be obtained when managing the permissions for that user and checking the url, using admin tools and checking the url on the user preferences page etc but the most direct way is by the database
for the bad formatting of the config file, that's the first time I see this. Could you open a new thread about that issue and try to reproduce? 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

 
  •  » Requests
  •  » Who can download this photo?

Board footer

Powered by FluxBB

github twitter facebook google+ newsletter Donate Piwigo.org © 2002-2019 · Contact