how to pin post on top? 如何把帖子置顶?
By
hoogw
at 2018-10-31 • 1人收藏 • 1413人看过
点一次上浮,可以置顶7天,但是如果来永久置顶,不用每7天点上浮?
I know when edit post, you can click 'Rise' button to pin it on top for 7 days.
If you click again, add 7 more days, and so on.
But I want to permanent pin post on top, no need to click click again again for 7 days.
2 个回复 | 最后更新于 2018-11-01
登录后方可回帖
Solution is make 7 days to 7000 days, by modify code
C:\Apache24\htdocs\carbon\controller\manage.php
// edit post, click sink, sink 7 days = 604800 second,
// I want 7000 days = 604800000
$this->db->query("UPDATE " . PREFIX . "topics SET LastTime = LastTime-604800000 WHERE ID=:ID", array(
"ID" => $this->id
// edit post, click rise, will pin top for 7 days = 604800 second,
// I want 7000 days = 604800000
$this->db->query("UPDATE " . PREFIX . "topics SET LastTime = LastTime+604800000 WHERE ID=:ID", array(
"ID" => $this->id
));