Something like:
- Code: Select all
<?php
$number = "20";
$category = "Forum";
$sort = array ('latest_reply', 'DESC');
include ('show_news.php');
?>
Is there any way to do this?
<?php
$number = "20";
$category = "Forum";
$sort = array ('latest_reply', 'DESC');
include ('show_news.php');
?><?php
include('./head.php');
$sql->altertable(array(
'table' => 'news',
'name' => 'latest_comment',
'action' => 'insert',
'values' => array(
'type' => 'int',
'default' => '0'
)
));
?>$sql->update(array(
'table' => 'news',
'where' => array("id = $id"),
'values' => array('comments' => count($sql->select(array('table' => 'comments', 'where' => array("post_id = $id")))))
));$sql->update(array(
'table' => 'news',
'where' => array("id = $id"),
'values' => array('comments' => count($sql->select(array('table' => 'comments', 'where' => array("post_id = $id")))),
'latest_comment' => $time
)
));'category' => $category,'category' => $category,
'latest_comment' => $added_time,FI-DD wrote:You need to do step #3 in quest.php as well.
erlendfl wrote:HellO!
Tried this mod, and it works perfectly.
Only one problem, when I combine this with the guest-can-add-news-hack the guest-added news shows up at the bottom, not on top.
I don't have that problem when I publish new articles from the admin-panel into the same include-code. I've tried figure it out, but all I'm doing is messing up the code.
Thanks for all your help!
Users browsing this forum: No registered users and 0 guests