所以想有種語法可以自動刪除引言過長而由"..."取代\r
搜尋過了,好像沒有這種mod
而依夢兒大的"[問題]限制引言字數"有點複雜和不同自己想的那種^^"
http://phpbb-tw.net/phpbb/viewtopic.php ... %A6r%BC%C6
自己
代碼: 選擇全部
#計算行數?
$bit_content = explode("
",$old_content);
#如果行數大於5就只出1-5行和........
if (count($bit_content) > 5){$old_content = "$bit_content[0]
$bit_content[1]
$bit_content[2]
$bit_content[3]
$bit_content[4]
.......";}以下uote原為quote,因BBCode 代碼省略q
打開posting.php
尋找\r
代碼: 選擇全部
$message = '[uote="' . $quote_username . '"]' . $message . '[/uote]';代碼: 選擇全部
$bit_content = explode("
",$message);
if (count($bit_content) > 5){
$message = '[uote="' . $quote_username . '"]' . $bit_content['0'] . $bit_content['1'] . $bit_content['2'] . '................' . '[/uote]';
}就是如果文章如果使用BBCode,如color=red
您 可以 在這個版面發表文章
您 可以 在這個版面回覆文章
您 可以 在這個版面編輯文章
您 無法 在這個版面刪除文章
您 可以 在這個版面進行投票\r
您 可以 在這個版面發表文章
您 可以 在這個版面回覆文章
您 可以 在這個版面編輯文章
您 無法 在這個版面刪除文章
您 可以 在這個版面進行投票\r
引言判斷只抓了color=red,而/color因超出判斷的5行,所以引言便是\r
代碼: 選擇全部
quote]color=red]您 可以 在這個版面發表文章
您 可以 在這個版面回覆文章
您 可以 在這個版面編輯文章
................/quote]很亂的文,希望大大們能明白