I am using nextgen gallery plugin with this code:
$galleries = $wpdb->get_results(
"SELECT t.*, tt.*
FROM $wpdb->nggallery AS t
INNER JOIN $wpdb->nggpictures AS tt ON t.gid = tt.galleryid
WHERE tt.exclude != 1
GROUP BY tt.galleryid ORDER by tt.galleryid");
echo do_shortcode('[nggallery id='.$galleries[0]->gid.' template=galleryview images=0]');
echo '<ul>';
foreach ( $galleries as $gallery ) {
$img_date = explode("-", $gallery->imagedate);
$ano = $img_date[0];
$mes = $img_date[1];
$img_gallery_url = get_bloginfo('url').'/wp-content/uploads/'.$ano.'/'.$mes.'/'.$gallery->filename;
// $gallery->filename trazendo lowercase
echo
'<li>
<img width="139px" height="83px" src="'.$img_gallery_url.'" alt="'.$gallery->alttext.'"/>
<a href="#">'.$gallery->name.'</a>
</li>';
}
echo '</ul>';
But the $gallery->filename is coming lowercase.
My images are being saved without being mandatory to be lowercase.
- How could I fix this ?
- Is there a way to make mandatory lowercase in wordpress image upload (nextgen gallery)?
- Is there a way to make
$gallery->filenamebring the right filename, without making it lowercase ?