**/templets/article_add.htm
**/article_add.php
**/article_edit.php
首先打开模板目录下的article_add.htm,即第一个文件**/templets/article_add.htm
然后搜索:“ 简略标题 ”
然后定位到该段:
<tr>
<td height="24" colspan="5" class="bline">
<table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="90"> 文章标题:</td>
<td width='408'><input name="title" type="text" id="title" value="<?php echo $title; ?>" style="width:388px" /></td>
<td width="90"> 简略标题:</td>
<td>
<input name="shorttitle" type="text" id="shorttitle" style="width:150px" />
</td>
</tr>
</table>
</td>
</tr>
在下面接着加入下面这一小段:
<tr>
<td width="100%" height="24" colspan="2" class="bline">
<table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="90"> 推送链接:</td>
<td><input name="auto_submit_baidu" type="checkbox" class="np" id="auto_submit_baidu" value="1" />推送到百度</td>
</tr>
</table>
</td>
</tr>
添加完成后,看起来应该是这样的:

此时在文章发布页将看到推送到百度的框框:

找到该文件并打开进行编辑,然后搜索:“ $artUrl = $cfg_phpurl."/view.php?aid=$ ”
例如,搜索到的为:
if($artUrl=='')
{
$artUrl = $cfg_phpurl."/view.php?aid=$arcID";
}
在 “ } ”后加入下面的代码:
else{
if($auto_submit_baidu)
{
$urls = array('http://'.$_SERVER['HTTP_HOST'].$artUrl);
$api = 'http://data.zz.baidu.com/urls?site=https://www.thrfur.com&token=**************';
$ch = curl_init();
$options = array(
CURLOPT_URL => $api,
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POSTFIELDS => implode("\n", $urls),
CURLOPT_HTTPHEADER => array('Content-Type: text/plain'),
);
curl_setopt_array($ch, $options);
$result = curl_exec($ch);
echo "百度提交成功:".$result."提示:remain为剩余可推送量;success为推送成功数";
}
}
添加完成后,看起来应该是这样的:

步骤3与步骤2操作一致,按照步骤2进行操作,然后清空浏览器缓存发篇文章看看效果。