#1 2008-06-14 06:21:34

Jive Bunny
Member
2007-10-12
50

Make private gallery public every 24 hours with cron

Is it possible to make a cron job where you can make the top 2 galleries that are private become public once every 24 hours or other set time periods?

If it is possible, can it be done in a random way too?

for instance, If you have quite a few private galleries like cars, planes and trains, scenery. It has a good chance of grabbing from different categories/sub categories and I like the idea of that and it would save lots of time from doing it manually setting the directories to public.

Does anyone have any insight into this?

Offline

 

#2 2008-06-14 09:42:41

VDigital
Former Piwigo Team
Paris (FR)
2005-05-04
17680

Re: Make private gallery public every 24 hours with cron

I understand your request but I don't understand a pretty logic...

Let me explain.

Step 1 -  Day 1 - 9:30 AM
2 private categories have a global hit of 1426 and 1216...
Cron decide to promote them public for 24 hours.
(Let say these categories are the 14th and the 12th).

Step 2 - Day 2 - 9:30 AM
2 top private categories have global hit of 1027 and 938...
Ok these ones (10 and 9) are going to be switch public for 24 hours.
What about 14th and 12th? They are going to return private.
They have been discovered by many people so their global hit are now 3211 and 3648.

Step 3 - Day 3 - ...
2 tops are again 14th and 12th (or 12th and 14th)
During that time 9 and 10 have been viewed 4381 and 5091 times...

What are we doing?
One day 12 and 14 are public and 9 and 10 are private, one day we switch them.
But all the time 9, 10, 12, 14 are closely public categories.
All other private ones won't become public.
And for google or other search engines, it is very bad because the url is broken 50% of the time.

So your idea is mature enough, you probably find a good selection way.
8-)


Piwigo.com: Start and run your own photo gallery. Signup and get 30 days to try for free, no commitment.
8-)

Offline

 

#3 2008-06-14 14:24:54

Jive Bunny
Member
2007-10-12
50

Re: Make private gallery public every 24 hours with cron

VDigital wrote:

I understand your request but I don't understand a pretty logic...

Let me explain.

Step 1 -  Day 1 - 9:30 AM
2 private categories have a global hit of 1426 and 1216...
Cron decide to promote them public for 24 hours.
(Let say these categories are the 14th and the 12th).

Step 2 - Day 2 - 9:30 AM
2 top private categories have global hit of 1027 and 938...
Ok these ones (10 and 9) are going to be switch public for 24 hours.
What about 14th and 12th? They are going to return private.
They have been discovered by many people so their global hit are now 3211 and 3648.

Step 3 - Day 3 - ...
2 tops are again 14th and 12th (or 12th and 14th)
During that time 9 and 10 have been viewed 4381 and 5091 times...

What are we doing?
One day 12 and 14 are public and 9 and 10 are private, one day we switch them.
But all the time 9, 10, 12, 14 are closely public categories.
All other private ones won't become public.
And for google or other search engines, it is very bad because the url is broken 50% of the time.

So your idea is mature enough, you probably find a good selection way.
8-)

Hi VDigital

Yes something like that, but I am not looking at switching them around. Just making them public and remain public. A one way system cron job.

The way I am working is

I Create galleries that are automatically private in the beginning. I use secure images plugin too. I do not know if this is relevent, but thought I would mention it just incase it may present problem or issue with cron.

Now if cron is used to make the galleries public, these galleries will remain public forever, so google problems hopefully will not happen as they will not be being made private again.

I just want the cron to make 2 galleries public randomly or in order every 24 hours. Random is what I would like to achieve but knowing both ways would be a bonus.

I am unsure how to use cron with phpwebgallery and have no idea what url would be relevent to place in the cron to do this type of thing.

I have hovered over buttons etc to try to find out, but I am lost as to which url path I should use to activate this functionality.

Any ideas where I should look?

Offline

 

#4 2008-06-14 15:42:32

VDigital
Former Piwigo Team
Paris (FR)
2005-05-04
17680

Re: Make private gallery public every 24 hours with cron

I am in front of a concept problem.
I understood what you want.

In fact, new categories' default status is private in your case.
$conf['newcat_default_status'] = 'private';

And you want to switch them to public via a cron task. Is that right?


My problem is : "private" is used not only for a restricted group of people but also to hide physical organisation of directories.
Physical folder have no access defined at all and I associate pictures to public categories.
So I need "private" to stay as private.
I don't see how with a such cron I can preserve some categories as private.
8-?


Piwigo.com: Start and run your own photo gallery. Signup and get 30 days to try for free, no commitment.
8-)

Offline

 

#5 2008-06-14 17:44:40

Jive Bunny
Member
2007-10-12
50

Re: Make private gallery public every 24 hours with cron

VDigital wrote:

I am in front of a concept problem.
I understood what you want.

In fact, new categories' default status is private in your case.
$conf['newcat_default_status'] = 'private';

And you want to switch them to public via a cron task. Is that right?

Yes, 2 per day.


VDigital wrote:

My problem is : "private" is used not only for a restricted group of people but also to hide physical organisation of directories.
Physical folder have no access defined at all and I associate pictures to public categories.
So I need "private" to stay as private.
I don't see how with a such cron I can preserve some categories as private.
8-?

I'm not worried about people seeing the physical directory structure regarding where images are located at first or ever.

so what your saying is with such a cron I can only make whatever is private, public in one go so if there is 10 private galleries then they would all become public regardless of only wanting 2 executed?

I plan on google/yahoo having free access for a period of time then I plan to activate secureimages just before making my private galleries..

secureimages should be able stop any indexing of the private categories from there on in. You can't even leech the galleries once it is installed with the .htaccess in place, so discovering new categories is probably unlikly as everything should get a 403 on gallery directories from that point.

Also making a rewrite so when any the images are clicked on from google it will redirect to my hompage after the implementation above.

If you can just let me know how to do it then it is on my back to test it out. The only user accounts on the website will be mine and no external users whatsoever. 2 main groups being used are admin and guest. I don't know if that makes any difference to the situation.

Offline

 

#6 2008-06-14 22:50:12

VDigital
Former Piwigo Team
Paris (FR)
2005-05-04
17680

Re: Make private gallery public every 24 hours with cron

Jive Bunny wrote:

I'm not worried about people seeing the physical directory structure regarding where images are located at first or ever.

You're not, and we are.

Jive Bunny wrote:

so what your saying is with such a cron I can only make whatever is private, public in one go so if there is 10 private galleries then they would all become public regardless of only wanting 2 executed?

It can be limited to 1 or 2 as you want.

Jive Bunny wrote:

I plan on google/yahoo having free access for a period of time then I plan to activate secureimages just before making my private galleries..

secureimages should be able stop any indexing of the private categories from there on in. You can't even leech the galleries once it is installed with the .htaccess in place, so discovering new categories is probably unlikly as everything should get a 403 on gallery directories from that point.

Also making a rewrite so when any the images are clicked on from google it will redirect to my hompage after the implementation above.

I am not convinced you can obtain what you said.

Jive Bunny wrote:

If you can just let me know how to do it then it is on my back to test it out. The only user accounts on the website will be mine and no external users whatsoever. 2 main groups being used are admin and guest. I don't know if that makes any difference to the situation.

I will try to do it for you.
8-)


Piwigo.com: Start and run your own photo gallery. Signup and get 30 days to try for free, no commitment.
8-)

Offline

 

#7 2008-06-15 01:21:47

Jive Bunny
Member
2007-10-12
50

Re: Make private gallery public every 24 hours with cron

Thanks, I appreciate it as I have no idea where to start with it :)

I don't mind trying to work at it,  but I don't see where I can be of any help.

Offline

 

Board footer

Powered by FluxBB

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