4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: Sun Zaza on July 19, 2009, 12:46:14 AM

Title: Stast: Counting the FLV, WMV, JPG files
Post 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
Title: Re: Stast: Counting the FLV, WMV, JPG files
Post by: Rembrandt on July 20, 2009, 03:52:52 PM
Hi!
...I want to count the quantity of the FLV, WMV, JPG.. file on my galery. For example:
...

find in Index.php
Quote
//--- 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
Title: Re: Stast: Counting the FLV, WMV, JPG files
Post by: Sun Zaza on July 21, 2009, 12:35:41 AM
Thanks mate. It works perfect :D