SimplePortal

Customization => Blocks and Modifications => Block Requests => Topic started by: davidjms on November 08, 2010, 05:11:03 AM

Title: Downloads Block from specific Category
Post by: davidjms on November 08, 2010, 05:11:03 AM
Hi, im using this code for a Download System Block. i take the code from this link http://simpleportal.net/index.php?topic=770.msg30100#msg30100

Code: [Select]
global $db_prefix, $scripturl, $smcFunc;

$request = $smcFunc['db_query']('',"SELECT f.ID_FILE, f.ID_MEMBER, f.date, f.ID_CAT, f.title AS ftitle,
c.title, m.real_Name, m.ID_MEMBER AS mID_MEMBER
FROM {$db_prefix}down_file AS f, {$db_prefix}down_cat AS c, {$db_prefix}members AS m
WHERE f.ID_CAT = c.ID_CAT
AND f.approved = '1'
AND f.ID_MEMBER = m.ID_MEMBER
ORDER BY f.ID_FILE DESC
LIMIT 35");
while($row = $smcFunc['db_fetch_assoc']($request)) {
echo '<table width="100%" cellpadding="2" cellspacing="0">
<tr>
<td valign="top" class="smalltext">', sp_embed_image('dot'), ' <a href="',$scripturl,'?action=downloads;sa=view;id=',$row['ID_FILE'],'">',$row['ftitle'],'</a></td>
<td valign="top" class="smalltext" align="right">',$row['totaldownloads'],'</td>
</tr>
</table>';
}

The question is, it is possible to get the downloads only from a specific CATEGORY?

I will upload files that will bee only available for a specific kind of members like "VIP user" or something like this. so i like to put two different blocks of download one with downloads for everyone  (CATEGORY 1) and  other one with download only for VIPS users (CATEGORY 2).

thanks in advance.
SimplePortal 2.3.8 © 2008-2024, SimplePortal