getDB(); $repository = remositoryRepository::getInstance(); $remUser = $interface->getUser(); // Find out $Itemid $base_url = 'index.php?option=com_remository'; // Base URL string $base_url .= '&Itemid='.$this->remos_getItemID('com_remository'); $base_url .= '&func=fileinfo&id='; /*********************Configuration*********************/ // Set to '1' to Show the Description, set to 0 to not show it $showsmall = $this->remos_get_module_parm($params,'showsmall',0); // Max number of entries to show $max = $this->remos_get_module_parm($params,'max',5 ); // Max number of description characters $maxchars = $this->remos_get_module_parm($params,'maxchars',100); // Date format for display $date_format = $this->remos_get_module_parm($params,'dateformat','%b.%g'); // Category from which to select files $category = $this->remos_get_module_parm($params,'category', 0); // Number of days to go back in the log file $days = $this->remos_get_module_parm($params, 'days', 30); $max = max($max,1); $maxchars = max($maxchars,20); /*******************************************************/ $tabclass_arr=explode(",",$repository->tabclass); // Newest 5 Downloads $newdownloads = remositoryFile::popularLoggedFiles ($category, $max, $days, $remUser); if ($category AND 0 == count($newdownloads)) $newdownloads = remositoryFile::popularLoggedFiles (0, $max, $days, $remUser); // $this->remos_module_CSS (); $content = << START_CATS; $tabcnt = 0; foreach ($newdownloads as $newdownload) { $sdesc = '
'.$newdownload->downloads; if ($showsmall) { if (($newdownload->description<>'') AND ($newdownload->autoshort)) $sdesc.='
'.strip_tags($newdownload->description); elseif ($newdownload->smalldesc<>'') $sdesc.='
'.strip_tags($newdownload->smalldesc); if (strlen($sdesc)>$maxchars) $sdesc=substr($sdesc,0,$maxchars-3).'...'; } $curicon = $newdownload->icon ? $newdownload->icon : 'generic.png'; $url = $interface->sefRelToAbs($base_url.$newdownload->id); $class = $tabclass_arr[$tabcnt]; $content .= "".strftime($date_format, strtotime($newdownload->filedate)); $content .= "
"; $content .= "".$repository->RemositoryImageURL('file_icons/'.$curicon,16,16); $content .= $newdownload->filetitle."$sdesc\n"; $tabcnt = 1 - $tabcnt; } $content .= "\n"; } }