phpmps文章页添加信息来源

 21-10-16发布来源:来自网络

在admin/article.php  第51行添加

$source      = trim($_POST['source']);//文章来源

第65行改为

$sql = "INSERT INTO {$table}article (title,source,typeid,keywords,description,content,listorder,addtime,is_index,is_pro) VALUES ('$title','$source','$typeid','$keywords','$description','$content','$listorder','$addtime','$is_index','$is_pro')";

在admin/article.php  第90行添加

$source      = trim($_POST['source']);//文章来源

第104行改为

$sql = "update {$table}article SET title='$title',source='$source',typeid='$typeid',keywords='$keywords',description='$description',content='$content',listorder='$listorder',is_index='$is_index',is_pro='$is_pro' where id='$id' ";


在admin/模板/edit_article.html  19行添加

 <tr bgcolor="#FFFFFF">
    <td height="25" align="right">来源:</td>
    <td>
<input type="text" name="source" size="60" maxlength="100" value="<?=$article['source']?>"/> (新闻来源,用|分割网站名称和URL。如“<?=$CFG[webname]?>|<?=$CFG[weburl]?>”)
</td>
  </tr>

在admin/模板/add_article.html  19行添加

   <tr bgcolor="#FFFFFF">
    <td height="25" align="right">来源:</td>
    <td>
<input type="text" name="source" size="60" maxlength="100" value="<?=$CFG[webname]?>|<?=$CFG[weburl]?>"/> (新闻来源,用|分割网站名称和URL。如“<?=$CFG[webname]?>|<?=$CFG[weburl]?>/jump.html?url=”)
</td>
  </tr>

在文章页添加

来源:<a href="{$source_arr[1]}" target="_blank">{$source_arr[0]}</a>


在数据加字段 source

商家黄页 客服电话 官方首页 会员中心 快速发布
×