DataLife Engine English Support Site » DatalifeEngine Add-ons » Changing how the popular news display
Welcome,. Enter Username, or register.
Welcome,. Enter Username, or register.
ApadanaGroup's Hosting Services available now with Unbelievable LOW
PRICES,
Unlimited SPACE AND Unlimited Transfer ....Check it out !!!
http://unlimitpackage.net/
Changing how the popular news display
Taken from russian and translated...
This is a way to change how the news are displayed, we can make it so the popular news top item will be the most highly rated article you have.
Open topnews.php and find:
replace it with:
where the mysterious symbol X is equal to the necessary quantity of days.
This is a way to change how the news are displayed, we can make it so the popular news top item will be the most highly rated article you have.
Open topnews.php and find:
$sql_result = $db->query("SELECT id, title, date, alt_name FROM " .
PREFIX . "_post WHERE approve='1' ORDER BY rating DESC, comm_num DESC,
news_read DESC, date DESC LIMIT 0,10");
replace it with:
$sql_result = $db->query("SELECT id, title, date, alt_name FROM " . PREFIX . "_post
WHERE approve='1' ORDER BY rating / vote_num DESC, comm_num DESC, news_read DESC, date DESC
LIMIT 0,10");
WHERE approve='1' ORDER BY rating / vote_num DESC, comm_num DESC, news_read DESC, date DESC
LIMIT 0,10");
But is it possible to somehow make so that in 15 days from publication,
any news, with whatever rating it has, disappears from the topnews
forever?
$sql_result = $db->query("SELECT id, title, date, alt_name FROM ".
PREFIX . "_post WHERE approve='1' and TO_DAYS(now()) - TO_DAYS(date)
<= X ORDER BY rating / vote_num DESC, comm_num DESC, news_read DESC,
date DESC LIMIT 0,10");
where the mysterious symbol X is equal to the necessary quantity of days.
Your are currently a guest on this site. Please click here to register
- views: 800
-
Print
|
|
| |



Users: 0