文章有特殊標籤仍會自動截取的修改
作者: 老鳥學飛 日期: 2008-07-16 11:09
設定自動或手動截取字數後
原來:文章中若碰到特殊標籤如檔案附件,自動截取變無效。
修改:文章中若碰到特殊標籤如檔案附件,自動截取仍有效。
修改檔案:admin/logs.php
修改情形:(新增紅色部分)
/*
if (strpos(";".$logContent,"<!--more-->")>0) $autoSplit=0;
if (strpos(";".$logContent,"<!--nextpage-->")>0) $autoSplit=0;
if (strpos(";".$logContent,"<!--hideBegin-->")>0) $autoSplit=0;
if (strpos(";".$logContent,"<!--galleryBegin-->")>0) $autoSplit=0;
if (strpos(";".$logContent,"<!--fileBegin-->")>0) $autoSplit=0;
if (strpos(";".$logContent,"<!--mfileBegin-->")>0) $autoSplit=0;
*/
也就是略去/* 和 */之間的語法。
原來:文章中若碰到特殊標籤如檔案附件,自動截取變無效。
修改:文章中若碰到特殊標籤如檔案附件,自動截取仍有效。
修改檔案:admin/logs.php
修改情形:(新增紅色部分)
/*
if (strpos(";".$logContent,"<!--more-->")>0) $autoSplit=0;
if (strpos(";".$logContent,"<!--nextpage-->")>0) $autoSplit=0;
if (strpos(";".$logContent,"<!--hideBegin-->")>0) $autoSplit=0;
if (strpos(";".$logContent,"<!--galleryBegin-->")>0) $autoSplit=0;
if (strpos(";".$logContent,"<!--fileBegin-->")>0) $autoSplit=0;
if (strpos(";".$logContent,"<!--mfileBegin-->")>0) $autoSplit=0;
*/
也就是略去/* 和 */之間的語法。
評論: 2 |
引用: 0 |
閱讀: 1167
谢谢博主的分享,这篇对我蛮有用的。
if (strpos(";".$logContent,"<!--fileBegin-->")>0) $autoSplit=0;
if (strpos(";".$logContent,"<!--mfileBegin-->")>0) $autoSplit=0;
可能对于我这两个略去更有需要些。
不过不知道会不会影响到文章的显示,尤其是mfileBegin那个。对于这个博主可有测试?
if (strpos(";".$logContent,"<!--fileBegin-->")>0) $autoSplit=0;
if (strpos(";".$logContent,"<!--mfileBegin-->")>0) $autoSplit=0;
可能对于我这两个略去更有需要些。
不过不知道会不会影响到文章的显示,尤其是mfileBegin那个。对于这个博主可有测试?
mfile那個我沒試過
不過顯示應該沒問題的
不過顯示應該沒問題的
發表評論
訂閱
上一篇
返回
下一篇
標籤:


修改 layout.css (2008-06-23 20:52)
自動擷取字數 (2008.7.6更正) (2008-06-20 14:54)
連結頁面排序 (2008-06-20 11:46)
新的網誌 (2008-05-26 11:25)