Support ⇒ Modules & Blocks ⇒ block-Featured_Downloads ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum IndexModules & Blocks

block-Featured_Downloads Reply to topic


Would like to changing the block to show download image much like the "Editors Pick" on Downloads page

if (!defined('CPG_NUKE')) { exit; } global $db, $prefix; $dl_mod = 'MapDB'; $dl_mod_prefix = $prefix.'_'.strtolower($dl_mod); $content = ''; if (!is_active($dl_mod)) { $content = 'ERROR'; return trigger_error($dl_mod.' module is inactive', E_USER_WARNING); } $a = 1; $result = $db->sql_query("SELECT lid, title FROM ".$dl_mod_prefix."_mapdb WHERE active=1 AND pick=1 ORDER BY title ASC LIMIT 0,10"); if ($db->sql_numrows($result) < 1) { $content = 'ERROR'; return trigger_error('There are no editor\'s picks in '.$dl_mod, E_USER_WARNING); } while (list($lid, $dtitle) = $db->sql_fetchrow($result)) { $content .= '<b>&#8226;</b>&nbsp; '.$a.': <a href="'.getlink($dl_mod.'&amp;file=details&amp;id='.$lid).'">'.$dtitle.'</a><br />'; $a++; } $db->sql_freeresult($result);

Can anyone help with the coding?

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Litespeed/Apache2.4.23/MySQL5.5.42/PHP 5.6.25/DF 9.4.0.0

All times are UTC


Jump to: