Member
Member
scorch   2007-02-01, 07:25
#1

i'd like to be able to trigger thumbnail creation via script, after adding a large number of files, to save generating them on the fly. with over 10GB of images & adding about 1GB per month, it makes sense to be able to do this in advance, to keep load down

Developer
Developer
trisweb   2007-02-02, 00:23
#2

Quite easy. This will load a page of all thumbnails and default-sized images in your gallery:

`

`

Member
Member
scorch   2007-02-03, 09:01
#3

thanks!

I dropped this in zen/* with all the other bits as rebuild.php, stripped out the zen/ path header & ran it, with a ."\n" at the end of the echo line for readability:

php rebuild.php

Developer
Developer
trisweb   2007-02-03, 21:16
#4

Oh right, that may help.... heh. Try this (Improved in other ways as well):

`

`

Member
Member
scorch   2007-02-13, 01:40
#5

that works nicely thanks - but only if it's under zenphoto/rebuild.php

is it possible to change to run from zephoto/zen/ & then leave it in SVN? that would be a useful addition.

e.g. as http://muse.net.nz/zenphoto/zen/rebuild.php

Developer
Developer
trisweb   2007-02-13, 05:21
#6

To change it for that, just take the zen/ out of the require_once path string. I don't think I'll check it in to SVN just yet, perhaps a similar functionality will be in the 1.1 admin though.

Member
Member
scorch   2007-02-23, 03:49
#7

thanks! just a point - this takes hours to run through. if you ever move it into svn, it would be a good move to add it as a button to a folder level "regenerate" for example.

Member
Member
permesso   2007-07-09, 02:27
#8

Sorry to revive an old thread but I am really looking for this functionality but I heavily use sub-albums and this script is not decending into the sub-albums. Is there a quick change to the script that would help? Thanks in advance.

Member
Member
edasque   2007-08-27, 19:11
#9

same here, any hope for a recursive version of this ?

Member
Member
aitf311   2007-08-30, 22:16
#10

Anyone figure out a way to get this working for subalbums yet? This would be a very useful script to have in the admin page.

Member
Member
sbillard   2007-09-02, 01:01
#11

Here is a routine which will do what you want. Copy it into your zen folder with the rest of the php files. Then point your browser to it.

`

`

If you don't want to do your whole gallery, just pass the file an album parameter with the name of the album you wish to process.

e.g. http://myalbum.zenphoto.com/zenphoto/zen/loadAlbums.php?album=newalbum

Member
Member
grantonstar   2009-01-15, 09:30
#12

I'm using the latest script from sbillard on zenphoto 1.2.2. getNumImages() returns the count of images for each album but next_image() doesn't seem to be returning any images.

Any ideas why? Does anyone have an updated cache script? (I need it for my gallery migration)

Thanks,

grantonstar

Member
Member
sbillard   2009-01-15, 19:47
#13

1.1.2 has the pre-cache images utility, why don't you use that.

Member
Member
grantonstar   2009-01-16, 03:20
#14

THe main reason why is because it is unable to cache 17k images at once. Either it times out or the browser crashes.

The reason I want to pre-cache is to run the Gallery migration utility.

Member
Member
sbillard   2009-01-16, 04:13
#15

Pre-cache by album/subalbum. What makes you think the above script will not also time out? It is, after all, basically the same code as the pre-cache utility.

Junior Member
Junior Member
nonzero   2013-04-19, 07:23
#16

Are there any includes or bootstrapping code I need to add to the script to run it from the command line of the web server rather than through a browser? I'm working with images that are hundreds of MB, and I'm not allowed to change the web server's memory limits, but I can override the PHP memory limit on the command line.

Administrator
Administrator
acrylian   2013-04-19, 07:59
#17

This topic is really old. Zenphoto features a cache_manager plugin that took over the older precache functionality.

Administrator
Administrator
acrylian   2013-04-19, 07:59
#18

This topic is really old. Zenphoto features a cache_manager plugin that took over the older precache functionality.

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