Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - cc

Pages: [1]
1
I use lightroom for all my images (almost 200,000) and have used its export facilities to export to flickr and facebook...in both cases it allows you to either upload to a new gallery/set etc or an existing one.

My guess is we would need to write some kind of API into 4images that the lightroom plugin could query (to get existing categories etc), and then some API functions to do the insert into the 4images tables and ftp the images up to the server...

I'm a programmer by profession, but not in lua, but I'd like to have a go at this...except I don't get much time :(

2
I know this is a very old thread, but it looks like no-one has solved this issue? So I decided to share what I did to implement a way of showing counts for a category hierarchy that includes the total images in subcategories. However, I found that it increased the number of SQL statements executed per page from around 25 to over 800, thus slowing down my pages. This was for a hierarchy of 163 categories up to 4 levels deep.

It involves a recursive function that starts from the top level and for each category finds all of its children, and all of its children's children, and so on, to build up a subcategory list for each category, which is then used to query the image table to get the total hierarchy counts.

I put the recursive function in functions.php and call it from globals.php to update the cat_cache with the results. I had then to put a fix into page_header.php otherwise the total_images value will double/triple/etc count the images in subcategories.

However because of the performance hit I decided to implement this in a different way which works for my site but may not be appropriate for other sites (I use my site as a way of distributing my catwalk fashion images to publishing clients, so I am the only person who uploads images and I normally do this in bulk via ftp). I made a plugin that does the same recursive hierarchy count but stores the results in a new field added to the categories table for each category. The population of cat_cache in globals.php is now just a single query to retrieve these values. Every time I do a bulk upload I run this plugin.

HTH,
Rob

   

Pages: [1]