How to list 5 random FEATURED sites on the front page? (phpld)
in the index.php change the red code for the one listed
$random_link = $db->GetAll("SELECT * FROM {$tables['link']['name']} WHERE FEATURED = 1 AND STATUS=2 ORDER BY RAND() LIMIT 5");
$tpl->assign('random_link', $random_link);
Instead of using this in the main.tpl:
{if $category.ID eq 0 and not $p and not $qu}
use this from tojo:
{if !$uid & !$search & empty($category.ID) & !$list & $scriptname == "index"}
also you need to add this to the init.php right before the ?>
$tpl->assign('scriptname' , basename($_SERVER[PHP_SELF], ".php"));
this works
|