要修改的文件有两个,一个是 你的模版里的 edit_post.html ,另一个是include/postedit.inc.php ,修改前,前先备份这两个文件。

第一步:打开 edit_post.html

在你喜欢的地方加上

<strong>重新发布</strong> <input type="checkbox" name="repost" value="1" class="checkbox" />

第二步:打开 include/postnew.inc.php

找到 $DB->db_query("UPDATE {$db_prefix}tinfo SET ".$updateinfosql." ishtml = ".(int)$ishtml.", ifconvert = ".(int)$convert." WHERE tid = $tid");

在这句的下面加入
//重新回到顶部
$repost= intval($_POST['repost']);
if(isset($repost))
{
$DB->db_query("UPDATE {$db_prefix}threads SET diggdate = $timestamp WHERE tid = $tid");
}

可以了。这样子,你发布文章的时候,想要文章重新出现在首页第一条的话就把“重新发布”钩上吧。

相关文章:

  • 2021-09-03
  • 2021-09-01
  • 2022-12-23
  • 2022-03-08
  • 2022-12-23
  • 2022-12-23
  • 2022-01-10
  • 2022-12-23
猜你喜欢
  • 2021-05-24
  • 2021-05-26
  • 2021-06-21
  • 2022-01-16
  • 2021-07-26
  • 2021-07-09
  • 2022-01-30
相关资源
相似解决方案