Member
Member
breglis   16-02-2010, 09:31
#1

Hi,
before my question I wanted thank the creators of ZP quickly. The more I work with it the more I appreciate it. It is not only the technology under the hood but also the functional range which is soo spot on. It has everything any serious photo website needs but nothing more !
This is just what I try to do with my photography !

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away."
-- Antoine de Saint-Exuper

to my question:
I have finished the permutation of all possible tag combinations now. I run it every 24h and it works nicely: http://www.dev.bregler.net/gallery
I order by RAND() and also look for a minimum of 3 pictures. This means the created albums in db change a great deal.
what I would like to do is to automatically refresh the DB after every call.
I this possible without replicating the whole of admin-refresh-metadata.php into a custom function ?
could I call something like this ?
$html = implode ('', file("/zp_admin/admin-refresh-metadata.php&prune"));

but this admin page requires a login. any ideas ?

Administrator
Administrator
acrylian   16-02-2010, 11:45
#2

There is the gallery classs method named garbageCollect() but I am not sure if that is all for db refresh. Best you wait what sbillard says...;-)

Member
Member
sbillard   16-02-2010, 18:02
#3

Be aware that refreshing the gallery often takes more time than servers/browsers will allow, so you would need to deal with that. I am not sure that the database refresh is really what you need, either. I presume what you want is to be sure that any new albums/images are discovered? If you know which albums you have created, just instantiate them as part of your function. If you are removing any "expired" albums, just use the delete method to get rid of them.

Member
Member
breglis   16-02-2010, 18:48
#4

ok, how do I initiate them? So far I was just creating the .alb files with fopen,fwrite and fclose. Is there a better way to do this?

Member
Member
sbillard   16-02-2010, 19:36
#5

use new Album() after you have created the file. (see the function documentation for details)

Member
Member
breglis   16-02-2010, 20:24
#6

ahh of course, thanks

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.