[Plugin: NextGEN Gallery] PHP functions to resize and chache (like nggSinglePicture)
-
Dear All,
I would like to add a resize feature for mobile devices, but I can’t find any complete example how to implement it using PHP classes developed by Axel.
What I would like to have is a resize and caching of resized images the same way it’s done in nggSinglePicture() function, but I’m a bit puzzled on how to apply filters (probably ‘ngg_image_object’), could someone please point me on how to use it, or PHP files to closely look at?That’s part of my code:
$results = $wpdb->get_results("SELECT * FROM $wpdb->nggpictures" . $sql_where . " ORDER BY " . $sql_order . $sql_limit); ... foreach($results as $result) { $gallery = $wpdb->get_row("SELECT * FROM $wpdb->nggallery WHERE gid = '" . $result->galleryid . "'"); foreach($gallery as $key => $value) { $result->$key = $value; } $image = new nggImage($result); //output in div... ... <img src=\"" . $image->imageURL . "\""> ... } ...
p/s/ I noticed that that function is used for DB query
$picturelist = nggdb::get_gallery($galleryID, $ngg_options['galSort'], $ngg_options['galSortDir']);
So I guess my two DB queries can be replaced by this one?
Sincerely yours,
Denis.
- The topic ‘[Plugin: NextGEN Gallery] PHP functions to resize and chache (like nggSinglePicture)’ is closed to new replies.