fetch image and filter

Author Message

stephane couzinier

Saturday 23 December 2006 1:58:50 am

It will be use full to filter/sort image by ratio (width/height)
Actually the width and height are store on a XML fields, but there is no way to make a fast SQL query.

With a photo Gallery , sometime I need to find the first image with a ratio greater than 1 another I need to display an image width a ratio less than 1.

To resolve this pb:
- I create a new table ( i store the id,width,height,ratio of all images)
- Every time a image is upload, I update my table
- I add a new extended attribute filter to get images by ratio

It's work, but It's will be better for me ;-) to have this on ez

don't flush the cache

alan robert

Monday 02 April 2007 9:07:17 am

This is good idea, I just need something like this,
but I don't use sort image by ratio, I need use table to control image for another using.

do you can provide your code or demo in somewhere?

Thanks in advance.

http://www.softsea.com/

Janet Kellman

Sunday 08 July 2007 3:20:13 am

alan robert, I also need something like this. can you write code example for using ?
thanks!

http://rbytes.net/software/

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 11:00:29
Script start
Timing: Jan 18 2025 11:00:29
Module start 'layout'
Timing: Jan 18 2025 11:00:29
Module start 'content'
Timing: Jan 18 2025 11:00:29
Module end 'content'
Timing: Jan 18 2025 11:00:29
Script end

Main resources:

Total runtime0.0165 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0057 589.0234152.6250
Module start 'layout' 0.00570.0036 741.648439.4453
Module start 'content' 0.00930.0050 781.093889.1953
Module end 'content' 0.01420.0022 870.289130.3047
Script end 0.0164  900.5938 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002615.8995140.0002
Check MTime0.00127.3268140.0001
Mysql Total
Database connection0.00063.585910.0006
Mysqli_queries0.003621.731130.0012
Looping result0.00000.098510.0000
Template Total0.001811.110.0018
Template load0.00085.043410.0008
Template processing0.00106.009810.0010
Override
Cache load0.00063.603310.0006
General
dbfile0.00031.845880.0000
String conversion0.00000.049340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs