Quote
khaman wrote:
Looks great, simple and very professional 10/10!. This is how PF themes should look like. Is it custom made theme?
Quote
BlackDragon wrote:
Please man I just need for my website to have listed news from specific category :).
$cat = "2"; // News category id
$limit = "5"; // Number of news shown
$result = dbquery(
"SELECT tn.*, tc.*, tu.user_id, tu.user_name, tu.user_status
FROM ".DB_NEWS." tn
LEFT JOIN ".DB_USERS." tu ON tn.news_name=tu.user_id
LEFT JOIN ".DB_NEWS_CATS." tc ON tn.news_cat=tc.news_cat_id
WHERE ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().")
AND (news_end='0'||news_end>=".time().") AND news_draft='0'
AND news_cat='".$cat."'
GROUP BY news_id
ORDER BY news_sticky DESC, news_datestamp DESC LIMIT $limit"
);
opentable("News");
if(dbrows($result) != 0) {
echo "<table width='100%' cellpadding='0' cellspacing='0'>\n<tr>\n";
while($data = dbarray($result)) {
$date = $data['news_datestamp'];
$n_date = showdate("%d/%m/%y-%H.%I", $date);
echo "<td class='small' align='center'><a href='".BASEDIR."news.php?readmore=".$data['news_id']."' title='".$data['news_subject']."' class='side'><img src='".get_image("nc_".$data['news_cat_name'])."' alt='".$data['news_cat_name']."' /></a><br />\n";
echo "<span style='background:#999; color:#fff; height:24px; padding:5px;'>".$n_date."</span><br /><br />";
echo "<a href='".BASEDIR."news.php?readmore=".$data['news_id']."' title='".$data['news_subject']."' class='side'><b>".$data['news_subject']."</b></a>\n";
echo "</td>\n";
}
echo "</tr>\n</table>\n";
}
closetable();
Quote
$cat = "2"; // News category id
$limit = "5"; // Number of news shown
Category Forum
Post Your SiteLabels
None yet
Statistics
11 participants
Notifications
You are not receiving notifications from this thread.
Related Questions