phpLD – This mod will list Featured Links above other links in New Listings, Popular Listings, and Top Rated Listings.
(http://phplinkdirectory.com/forum/showthread.php?t=1536)
I found this intersting mod listed here, wrks gr8 for one. just made a quick hack to seperate the two!
Open index.php, and change:
Code:
[code lang="php"]
case 'd':
$links = $db->GetAll("SELECT * FROM {$tables['link']['name']} WHERE STATUS=2 $expire_where ORDER BY DATE_ADDED desc limit 0, ".LINKS_TOP);
$path[] = array ('ID' => '0', 'TITLE' => _L('New Listings'), 'TITLE_URL' => '', 'DESCRIPTION' => '');
break;
case 'h':
$links = $db->GetAll("SELECT * FROM {$tables['link']['name']} WHERE STATUS=2 $expire_where ORDER BY hits desc limit 0, ".LINKS_TOP);
$path[] = array ('ID' => '0', 'TITLE' => _L('Popular Listings'), 'TITLE_URL' => '', 'DESCRIPTION' => '');
break;
[/code]
To:
[code lang="php"]
case 'd':
if (FTR_ENABLE) {
$feat_links = $db->GetAll("SELECT * FROM {$tables['link']['name']} WHERE STATUS=2 AND FEATURED=1 $expire_where ORDER BY DATE_ADDED desc limit 0, ".LINKS_TOP);
$tpl->assign('feat_links', $feat_links);
$links = $db->GetAll("SELECT * FROM {$tables['link']['name']} WHERE STATUS=2 AND FEATURED=0 $expire_where ORDER BY DATE_ADDED desc limit 0, ".LINKS_TOP);
} else {
$links = $db->GetAll("SELECT * FROM {$tables['link']['name']} WHERE STATUS=2 $expire_where ORDER BY DATE_ADDED desc limit 0, ".LINKS_TOP);
}
$path[] = array ('ID' => '0', 'TITLE' => _L('Top ' . LINKS_TOP . ' New Listings'), 'TITLE_URL' => '', 'DESCRIPTION' => '');
break;
case 'h':
default :
if (FTR_ENABLE) {
$feat_links = $db->GetAll("SELECT * FROM {$tables['link']['name']} WHERE STATUS=2 AND FEATURED=1 $expire_where ORDER BY hits desc limit 0, ".LINKS_TOP);
$tpl->assign('feat_links', $feat_links);
$links = $db->GetAll("SELECT * FROM {$tables['link']['name']} WHERE STATUS=2 AND FEATURED=0 $expire_where ORDER BY hits desc limit 0, ".LINKS_TOP);
} else {
$links = $db->GetAll("SELECT * FROM {$tables['link']['name']} WHERE STATUS=2 $expire_where ORDER BY DATE_ADDED desc limit 0, ".LINKS_TOP);
}
$path[] = array ('ID' => '0', 'TITLE' => _L('Top ' . LINKS_TOP . ' Popular Listings'), 'TITLE_URL' => '', 'DESCRIPTION' => '');
break;
[/code]
Hope this helps someone!
M.