Simple PHP Blog 問題集 
Wednesday, November 18, 2015, 11:23 PM - 工作日誌   (同類別文章列表)
Posted by Administrator
1.
部份文章閱讀後、系統自動於該文章目錄產生文章之專屬目錄,
並生成view_counter.txt檔案…

若有類別文章裡頭有view_counter.txt時、似乎會造成讀取問題,
文章無法檢視…

修改sb_comments.php,之96行,將其註解掉、即可不產生檔案…
sb_write_file( $dir . '../view_counter.txt' , $view_counter );
目前正常、不確定有無後遺症,待研究… 2015/11/18

此問題經套用第3點修正後、已無需註解掉,應該正常… 2015/11/19

2.
外觀顯示及字型大小等等、始終不是很滿意,
可進網站的themes目錄、自行修改user_style.php、themes.php,
有個style.css、但是不會用!!有必要研究一下… 2015/11/19

ps:記得修改id.txt的內文、那裡才是themes的真正名字

3.
Bug Fix
上述討論串中、提及sb_display.php的70行,原為:

$entry_array[ 'comment' ][ 'count' ] = _sb('sb_view_counter_pre') . $view_counter . _('sb_view_counter_post');

改為:
$entry_array[ 'comment' ][ 'count' ] = _sb('sb_view_counter_pre') . $view_counter . _sb('sb_view_counter_post');
即可修正。

另發現languages目錄、中文語系的string.po中、msgid "sb_view_counter_pre"及"sb_view_counter_plural_pre"沒有值,
導致顯示不正常,經加入翻譯字串值後即正常…

4.
佈告回應系統、在寫完回應後送出、畫面呈現一片空白…
經修改comment_add_cgi.php之190行、將其註解掉,
@session_unregister( 'capcha_' . $_GET[ 'entry' ] );
目前看似正常…

5.
部份時候、IE的中文判讀會有問題、導致一片空白,修正sb_header.php,原文:

<title><?php echo $title; ?></title>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $GLOBALS['lang_string']['html_charset']; ?>" />

將兩者調換上下順序如下:

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $GLOBALS['lang_string']['html_charset']; ?>" />

<title><?php echo $title; ?></title>

2015/11/20

6.
自寫TKTCategoryList.php、並修正.\scripts\plugins\sidebar\Categories\plugin.php,
使其點選分類文章時、可直接秀內文或顯示列表…

2015/11/23

7.
新版之編輯器無法發揮作用,因為在add.php及addstatic.php中,
有一行:
$head .= sb_editor_js('blog_text');
應更正為:
$header .= sb_editor_js('blog_text');

2015/11/28

8.
貼文用的編輯器自訂按鈕、或設定按鈕指令,位置在:
根目錄\scripts\plugins\markitup\markitup\sets\sphpblog\set.js

2015+/??/?? (很久前就改了、但我不知道是啥時)

9.
可用的特殊標籤語言為:

文中的〔 〕應代換為[],因為會被判讀為標籤、故改以全型表示
  • 文章內縮〔blockquote〕xxx〔/blockquote〕
  • 預先排版〔pre〕xxx〔/pre〕
  • 斜體字型〔em〕xxx〔/em〕
  • 粗體字型〔strong〕xxx〔/strong〕
  • 底線字型〔u〕xxx〔/u〕
  • 標題字型〔h?〕xxx〔/h?〕 (?=1-6)
  • 刪除字型〔strike〕xxx〔/strike〕
  • 插入圖案〔img=http://example.com/image.jpg width=x height=x popup=true/false float=left/right〕
  • 插入連結〔url=http://example.com new=true/false〕link text〔/url〕
  • 物件置中〔center〕xxx〔/center〕 (entry only, not static pages)
  • 詳閱內文〔more〕

處理標籤的檔案在「根目錄\scripts\sb_formatting.php」


10.
將整個Blog移植在非根目錄之Web Server時,顯示會不正常!主因是風格檔(CSS)存取路徑錯誤,系統會企圖以根目錄為起點尋找,修改「根目錄\scripts\config.php」即可:

找到下列行數、將原來之「return "/";」、改為「return "./";」:
function getbaseurl($root_dir, $docroot) {
return "./"; //TKT 20190926 使用相對路徑

上述改法有問題,造成部份連結不正常

網路搜尋資料、重寫config.php之function getbaseurl($root_dir, $docroot)及sb_login.php之function baseurl(),較正常了點、但搜尋資料似乎有誤…

11.
搜尋資料有問題、主要是因為新版PHP不建議使用split函數,導致在新版機器上會 無法搜尋。將sb_search.php的內容改為下列即可:

//$words=@split( ' ', strtoupper( $search_str ) );
$words=preg_split( '/[\s,]+/', strtoupper( $search_str ) );


12.
若將機器放在不同主機(主機名稱或port更改時),最新文章及隨機文章的連結有問題,
(https的判定有誤之故)

修改DogBlog\scripts\plugins\sidebar\RecentEntries\plugin.php<br>
以及DogBlog\scripts\plugins\sidebar\RandomEntry\plugin.php<br>
找到$base_permalink_url = baseurl();<br>
改為$base_permalink_url = '';即可,(可直接下方加此行<br>




發表回應 ( 共計534閱讀人次 )   |  permalink   |  $star_image$star_image$star_image$star_image$star_image ( 3 / 541 )

<<第一頁 <前一頁 | 843 | 844 | 845 | 846 | 847 | 848 | 849 | 850 | 851 | 852 | 下一頁> 最後>>