4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: Sun Zaza on July 19, 2009, 12:46:14 AM
-
Hello,
I want to count the quantity of the FLV, WMV, JPG.. file on my galery. For example:
FLV files: 100
WMV files: 200
JPG files: 300
PNG files: 400
Can someone help please?
Any support will be very appreciated.
Cruxy
-
Hi!
...I want to count the quantity of the FLV, WMV, JPG.. file on my galery. For example:
...
find in Index.php
//--- Print Out ---------------------------------------
insert before:
$sql = "SELECT count(image_media_file)count_jpg
FROM ".IMAGES_TABLE."
WHERE image_active = 1 AND cat_id NOT IN (".get_auth_cat_sql("auth_viewcat", "NOTIN").") AND image_media_file LIKE '%.jpg' ";
$result = $site_db->query($sql);
$row = mysql_fetch_object($result);
$count_jpg = $row->count_jpg;
$site_template->register_vars("count_jpg", $count_jpg);
in your home.html, wherever you want: {count_jpg}
mfg Andi
-
Thanks mate. It works perfect :D