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
2018-10-31   #1

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


));


2018-11-01   #2

How to pin the post forever until you cancel.

登录后方可回帖

登 录
信息栏

Carbon Forum是一个基于话题的高性能轻型PHP论坛

下载地址:Carbon Forum v5.9.0
QQ群:12607708(QQ我不常上)

donate

手机支付宝扫描上方二维码可向本项目捐款

粤公网安备 44030602003677号
粤ICP备17135490号

Loading...