From: sparky4 Date: Fri, 18 Feb 2011 07:10:44 +0000 (-0600) Subject: modified: lib/lib_common.php X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=d28862a8de227dcd8d5a2b2d0dca2eebb9cd15fa;p=test.git modified: lib/lib_common.php --- diff --git a/lib/lib_common.php b/lib/lib_common.php index 959f510..287095a 100755 --- a/lib/lib_common.php +++ b/lib/lib_common.php @@ -3,7 +3,7 @@ * Pixmicat! Common Library * * 存放常用函式供主程式引入 - * + * * @package PMCLibrary * @version $Id: lib_common.php 690 2009-04-06 01:30:13Z scribe $ * @date $Date: 2009-04-06 09:30:13 +0800 (星期一, 06 四月 2009) $ @@ -11,7 +11,7 @@ /* css data */ $style_load = false; -$style_bar = false; +$style_bar = ''; if(file_exists(DATA_DIR.CSV_SS)){ // Load FuuR4 CSS data $style_data = DATA_DIR.CSV_SS; @@ -48,6 +48,7 @@ if(str_replace('[]', '', $style_bar) == '') $style_load .= ''; if(SHOWTITLETXT) $title .= '
'; @@ -65,7 +66,7 @@ function head(&$dat,$resno=0){ if(SHOWTITLETXT) $title .= '
'; } if(SHOWTITLETXT) $title .= TITLE; - +//++++---- $pte_vals = array('{$TITLE}'=>TITLE,'{$TITLEHEAD}'=>$title,'{$TITLECOM}'=>strip_tags(TITLECOM),'{$RESTO}'=>$resno?$resno:'','{$STYLE_LOAD}'=>$style_load,'{$STYLE_BAR}'=>$style_bar,'{$JS_DIR}'=>JS_DIR,'{$CSS_DIR}'=>CSS_DIR,'{$JSDONK}'=>$jsdonk,'{$FAV_ICON}'=>FAV_ICON,'{$LANGUAGE}'=>PIXMICAT_LANGUAGE); $dat .= $PTE->ParseBlock('HEADER',$pte_vals); $PMS->useModuleMethods('Head', array(&$dat,$resno)); // "Head" Hook Point @@ -166,7 +167,7 @@ function foot(&$dat){ /* 網址自動連結 */ /* オートリンク */ -function auto_link_callback($matches){ +function auto_link_callback($matches){ return (strtolower($matches[3]) == "") ? $matches[0] : preg_replace('/(https?|ftp|news|gopher)(:\/\/[\w\+\$\;\?\.\{\}%,!#~*\/:@&=_-]+)/u', '$1$2', $matches[0]); } function auto_link($proto){ @@ -332,7 +333,7 @@ function getREMOTE_ADDR(){ return $_SERVER['REMOTE_ADDR']; } -/*css style sheet */ +/* css style sheet */ function format_js_var($var_name){ return("'".$var_name."'"); } @@ -356,8 +357,8 @@ function identify_apng($filename){ return $apng = FALSE; // not APNG } -/* total amount of ommited posts/images */ -function _res($posts, $images=0){ +/* total amount of ommited posts/images */ // suigintou v.3.0+ code +function _res($posts, $images = 0){ $omitp = ($posts) ? sp(_T('notice_omitted_posts'), $posts) : false; $omiti = ($images) ? sp(_T('notice_omitted_images'), $images) : false; return($omitp.$omiti); @@ -395,7 +396,8 @@ function sp($string, $value, $shownull = false){ if($plu_word) return($plu_word); else return($string); } - +//++++---- +//++++---- /* comment too long function */ // truncate $str to $max_lines lines and return $str and $abbr // where $abbr = whether or not $str was actually truncated