Changeset 1055

Show
Ignore:
Timestamp:
04/04/07 14:21:25 (2 years ago)
Author:
ben
Message:

{{populartags}} now supports {{populartags:n}} where n is the number of tags you want to display.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • devel/lib/templates.php

    r1040 r1055  
    14561456        case "populartags": 
    14571457            $result = ""; 
    1458             if ($tags = get_records_sql("SELECT tag, count(ident) as numtags FROM `".$CFG->prefix."tags` WHERE access = 'public' and tag!='' group by tag having numtags > 1 order by ident desc limit 20")) { 
     1458            if (isset($vars[1])) { 
     1459                $vars[1] = (int) $vars[1]; 
     1460            } else { 
     1461                $vars[1] = "20"; 
     1462            } 
     1463            if ($tags = get_records_sql("SELECT tag, count(ident) as numtags FROM `".$CFG->prefix."tags` WHERE access = 'public' and tag!='' group by tag having numtags > 1 order by ident desc limit " . $vars[1])) { 
    14591464                $max = 0; 
    14601465                foreach($tags as $tag) {