$Recommend = $Cache->get_value('recommend');
$Recommend_artists = $Cache->get_value('recommend_artists');
if (!is_array($Recommend) || !is_array($Recommend_artists)) {
$DB->query("SELECT
tr.GroupID,
tr.UserID,
u.Username,
tg.Name,
tg.TagList
FROM torrents_recommended AS tr
JOIN torrents_group AS tg ON tg.ID=tr.GroupID
LEFT JOIN users_main AS u ON u.ID=tr.UserID
ORDER BY tr.Time DESC LIMIT 10
");
$Recommend = $DB->to_array();
$Cache->cache_value('recommend',$Recommend,1209600);
$Recommend_artists = Artists::get_artists($DB->collect('GroupID'));
$Cache->cache_value('recommend_artists',$Recommend_artists,1209600);
}
if (count($Recommend) >= 4) {
$Cache->increment('usage_index');
?>
Latest vanity house additions
(Show)
foreach($Recommend as $Recommendations) {
list($GroupID, $UserID, $Username, $GroupName, $TagList) = $Recommendations;
$TagsStr = '';
if ($TagList) {
// No vanity.house tag.
$Tags = explode(' ', str_replace('_', '.', $TagList));
$TagLinks = array();
foreach ($Tags as $Tag) {
if ($Tag == 'vanity.house') {
continue;
}
$TagLinks[] = "$Tag ";
}
$TagStr = "
\n".implode(', ', $TagLinks).'
';
}
?>
=Artists::display_artists($Recommend_artists[$GroupID]) ?>
=$GroupName?> (by =Users::format_username($UserID, false, false, false)?>)
=$TagStr?>
|
} ?>
}
$Count = 0;
foreach ($News as $NewsItem) {
list($NewsID,$Title,$Body,$NewsTime) = $NewsItem;
if (strtotime($NewsTime) > time()) {
continue;
}
?>
=$Text->full_format($Title)?> =time_diff($NewsTime);?>
if(check_perms('admin_manage_news')) {?>
-
Edit
} ?>
=$Text->full_format($Body)?>
if (++$Count > 4) {
break;
}
}
?>