예제 #1
0
$data['siterate'] = $dtfunc->ratingStars($item->getVar('siterate'));
$fg = $item->fileGroups(true);
$data['filegroups'] = array();
foreach ($fg as $g) {
    $files = $g->files(true);
    $data['filegroups'][$g->id()]['name'] = $g->name();
    foreach ($files as $file) {
        $data['filegroups'][$g->id()]['files'][] = array('file' => $file->file(), 'size' => $rmu->formatBytesSize($file->size()), 'date' => $tf->format($file->date()), 'title' => $file->title(), 'remote' => $file->remote(), 'hits' => $file->hits(), 'link' => $file->permalink());
    }
}
// Imágenes de la Descarga
$imgs = $item->screens(true);
$xoopsTpl->assign('screens_count', $item->getVar('screens'));
$data['screens'] = array();
foreach ($imgs as $img) {
    $data['screens'][] = array('id' => $img->id(), 'title' => $img->title(), 'image' => $img->url(), 'ths' => $img->url('ths'));
}
unset($imgs, $img);
//Etiquetas
$tags = $item->tags(false);
$relatedTags = array();
$data['tags'] = array();
foreach ($tags as $tag) {
    $otag = new DTTag();
    $otag->assignVars($tag);
    $data['tags'][] = array('id' => $tag['id_tag'], 'name' => $tag['tag'], 'link' => $otag->permalink());
    $relatedTags[] = $tag['id_tag'];
}
unset($tags, $otag, $tag);
// Categories
$cats = $item->categories(true);