define("USE_QUOTESYSTEM", 1); // 是否打開引用瀏覽系統 [自動轉換>>No.xxxx文字成連結並導引] (是:1 否:0)
//++++----
//define("KB", 1); // Kilobytes or Bytes on the image file size display (Kilobytes:1 Bytes:0)
-$config['KB'] = 0; // Kilobytes or Bytes on the image file size display (Kilobytes:1 Bytes:0)
+$config['KB'] = false; // Kilobytes or Bytes on the image file size display (Kilobytes:true Bytes:false)
//++++----
define("SHOW_IMGWH", 1); // 是否顯示附加圖檔之原檔長寬尺寸 (是:1 否:0)
define("SHOW_FILENAME", 1); // 是否顯示附加圖檔之原檔文件名 (是:1 否:0)
define("MAX_RES", 1000); // 強制sageレス数 // 回應筆數超過多少則不自動推文 (關閉:0)
define("MAX_AGE_TIME", 0); // 強制sageまでの時間 0で強制sageなし // 討論串可接受推文的時間範圍 (單位:小時,討論串存在超過此時間則回應皆不再自動推文 關閉:0)
define("COMM_MAX", 18000); // 內文接受Bytes數 (注意:中文字為2Bytes)
-define("MAX_LINES", 16); // The number of lines in the comment feild that are displayed in the index (unlimited:0)
+$config['LINE_NUMBER'] = 24; // 1レスに表示する行数 (しない:0) // The number of lines in the comment feild that are displayed in the index (unlimited:0)
define("NO_TEXTONLY", 0); // no text only? behavior with the no image switch (Ost [Eastern]:2 Futaba:1 Yotsubanome [OLD]:0)
define("BR_CHECK", 0); // 改行を抑制する行数 しない:0 // 文字換行行數上限 (不限:0)
define("STATIC_HTML_UNTIL", -1); // 更新文章時自動生成的靜態網頁至第幾頁止 (全部生成:-1 僅入口頁:0)
$language['info_basic_cr_limit'] = 'Comment row limit (<br> check)';
$language['info_basic_cr_after'] = ' Row(s) (unlimited:0)';
//----$language['info_basic_timezone'] = 'Time zone';
-$language['info_basic_max_lines_limit'] = 'Comment line limit';
-$language['info_basic_max_lines_after'] = ' Line(s) (unlimited:0)';
+$language['info_basic_line_number_limit'] = 'Comment line limit';
+$language['info_basic_line_number_after'] = ' Line(s) (unlimited:0)';
$language['info_basic_threadcount'] = 'Total threads count';
$language['info_basic_theme'] = 'Theme';
$language['info_dsusage_top'] = 'Data source usage';
$language['info_basic_cr_limit'] = '改行を抑制する行数 (<br> check)';\r
$language['info_basic_cr_after'] = ' 行 (しない:0)';\r
//----$language['info_basic_timezone'] = '時間帯設定';\r
-$language['info_basic_max_lines_limit'] = '改行を抑制する行数';\r
-$language['info_basic_max_lines_after'] = ' 線 (しない:0)';\r
+$language['info_basic_line_number_limit'] = '1レスに表示する行数';\r
+$language['info_basic_line_number_after'] = ' 行 (しない:0)';\r
$language['info_basic_threadcount'] = '現在のスレ数';\r
$language['info_basic_theme'] = 'テーマ';\r
$language['info_dsusage_top'] = 'データソース使用量';\r
$language['info_basic_cr_limit'] = '文字換行行數上限 (<br> check)';\r
$language['info_basic_cr_after'] = ' 行 (不限:0)';\r
//----$language['info_basic_timezone'] = '時區設定';\r
-$language['info_basic_max_lines_limit'] = '文字換行行數上限';\r
-$language['info_basic_max_lines_after'] = ' 線 (不限:0)';\r
+$language['info_basic_line_number_limit'] = '文字換行行數上限'/'/++++----';\r
+$language['info_basic_line_number_after'] = ' 行 (不限:0)';\r
$language['info_basic_threadcount'] = '目前總討論串篇數';\r
$language['info_basic_theme'] = '主題風格';\r
$language['info_dsusage_top'] = '記錄檔使用量';\r
'{$FORM_NOATTECHMENT_FIELD}' => '<input type="checkbox" name="noimg" id="noimg" value="on" />');
}
}
- if(OPTION || USE_UPSERIES){ //++++ more options will be added on later
+ if(OPTION){ //++++ more options will be added on later
$pte_vals['{$FORM_OPTION1_TEXT}'] = _T('form_option1');
- }
- if(USE_UPSERIES){ // 啟動連貼機能
- $pte_vals['{$FORM_CONTPOST_FIELD}'] = '<input type="checkbox" name="up_series" id="up_series" value="on"'.((isset($_GET["upseries"]) && $resno)?' checked="checked"':'').' />';
- $pte_vals['{$FORM_CONTPOST_TEXT}'] = _T('form_contpost');
- }
- if(OPTION){ //options hook
+ if(USE_UPSERIES){ // 啟動連貼機能
+ $pte_vals['{$FORM_CONTPOST_FIELD}'] = '<input type="checkbox" name="up_series" id="up_series" value="on"'.((isset($_GET["upseries"]) && $resno)?' checked="checked"':'').' />';
+ $pte_vals['{$FORM_CONTPOST_TEXT}'] = _T('form_contpost');
+ }
+ // options hook
$pte_vals['{$FORM_OPTION_HOOK}'] = '';
}
if(USE_CATEGORY){
$return_str = $return_str.'…';
break;
}
- }
+ }
return $return_str;
}
if($plu_word) return($plu_word); else return($string);
}
+
//++++----
//++++----
/* comment too long function */
-// truncate $str to $max_lines lines and return $str and $abbr
+// truncate $str to $config['LINE_NUMBER'] lines and return $str and $abbr
// where $abbr = whether or not $str was actually truncated
function abbreviate($str, $max_lines){
- if(!defined('MAX_LINES')){
- if(defined('BR_CHECK')) define('MAX_LINES', BR_CHECK);
- else define('MAX_LINES', 24);
-
- $max_lines = MAX_LINES;
- }
$lines = explode("<br />", $str);
if(count($lines) > $max_lines){
$abbr = 1;
$lines = array_slice($lines, 0, $max_lines);
$str = implode("<br />", $lines);
}else $abbr = 0;
- //close spans after abbreviating
- //XXX will not work with more html - use abbreviate_html from shiichan
+ // close spans after abbreviating
+ // XXX will not work with more html - use abbreviate_html from shiichan
$str .= str_repeat("</span>", substr_count($str, "<span") - substr_count($str, "</span"));
return array($str, $abbr);
}
if(AUTO_LINK) $com = auto_link($com);
$com = quoteLight($com);
$com = quoteLight2($com);
- if(!$resno && MAX_LINES) list($com, $abbreviated) = abbreviate($com, MAX_LINES);
- if(isset($abbreviated) && $abbreviated && MAX_LINES) $com .= '<br /><span class="abbrev">'._T('long_comment').'<a href="'.PHP_SELF.'?res='.$tree[0].'#r'.$no.'">'._T('long_here').'</a>'._T('long_see').'</span>';
+ if(!$resno && $config['LINE_NUMBER']) list($com, $abbreviated) = abbreviate($com, $config['LINE_NUMBER']);
+ if(isset($abbreviated) && $abbreviated && $config['LINE_NUMBER']) $com .= '<br /><span class="abbrev">'._T('long_comment').'<a href="'.PHP_SELF.'?res='.$tree[0].'#r'.$no.'">'._T('long_here').'</a>'._T('long_see').'</span>';
if(USE_QUOTESYSTEM && $i){ // 啟用引用瀏覽系統
if(preg_match_all('/((?:>|>)+)(?:No\.)?(\d+)/i', $com, $matches, PREG_SET_ORDER)){ // 找尋>>No.xxx
if(file_exists(DATA_DIR.CSV_SS)){
$style_data = DATA_DIR.CSV_SS;
$style_mode = _t('admin_editing');
- //---- }else{
- //---- $style_data = CSS_DIR.CSVSS;
- //---- $style_mode = _t('admin_imported');
+//---- }else{
+//---- $style_data = CSS_DIR.CSVSS;
+//---- $style_mode = _t('admin_imported');
}
echo '<div class="banner"><table width="100%"><tr><th class="bar_managecss">
'.str_replace('[file]', $style_data, $style_mode).'
}
// Read data from R3 DAT
- //---- else if(file_exists(CSS_DIR.CSVSS)){
- //---- $style_data = CSS_DIR.CSVSS;
- //---- $lines = explode("\n", file_get_contents($style_data));
- //---- $j = 0;
- //---- foreach($lines as $null => $line){ // Line has data, or line is not commented out
- //---- if(substr($line, 0, 2) != '//' && $line != ''){
- //---- $bits = explode('[*]', $line);
- //---- $j++;
- //---- $style_name = $bits[0];
- //---- $style_path = CSS_DIR.$bits[2];
- //---- if(file_exists($style_path)){
- //---- $style_short = $bits[1];
- //---- if($bits[3]) $style_rel = ' checked="checked"';
- //---- else $style_rel = false;
- //---- $class = ($j % 2) ? 'row1' : 'row2'; // BG colour
- //---- echo '<tr class="'.$class.'"><td align="left" colspan="2"><label><input name="default" type="radio"'.$style_rel.' value="'.$style_name.'" /> '.$style_path.'</label><input type="hidden" name="path['.$style_name.']" value="'.$bits[2].'" /></td><td align="left"><input name="names['.$style_name.']" value="'.$style_name.'" size="25" /></td><td align="left"><input name="short['.$style_name.']" value="'.$style_short.'" size="5" /></td><td align="left"><input name="order['.$style_name.']" size="2" value="'.$j.'" /></td></tr>';
- //---- }
- //---- }
- //---- }
- //---- }
+//---- else if(file_exists(CSS_DIR.CSVSS)){
+//---- $style_data = CSS_DIR.CSVSS;
+//---- $lines = explode("\n", file_get_contents($style_data));
+//---- $j = 0;
+//---- foreach($lines as $null => $line){ // Line has data, or line is not commented out
+//---- if(substr($line, 0, 2) != '//' && $line != ''){
+//---- $bits = explode('[*]', $line);
+//---- $j++;
+//---- $style_name = $bits[0];
+//---- $style_path = CSS_DIR.$bits[2];
+//---- if(file_exists($style_path)){
+//---- $style_short = $bits[1];
+//---- if($bits[3]) $style_rel = ' checked="checked"';
+//---- else $style_rel = false;
+//---- $class = ($j % 2) ? 'row1' : 'row2'; // BG colour
+//---- echo '<tr class="'.$class.'"><td align="left" colspan="2"><label><input name="default" type="radio"'.$style_rel.' value="'.$style_name.'" /> '.$style_path.'</label><input type="hidden" name="path['.$style_name.']" value="'.$bits[2].'" /></td><td align="left"><input name="names['.$style_name.']" value="'.$style_name.'" size="25" /></td><td align="left"><input name="short['.$style_name.']" value="'.$style_short.'" size="5" /></td><td align="left"><input name="order['.$style_name.']" size="2" value="'.$j.'" /></td></tr>';
+//---- }
+//---- }
+//---- }
+//---- }
$j++; $class = ($j % 2) ? 'row1' : 'row2';
$all = $sp[0];
unset($sp);
}
- //---- return (int)($all / 1024);
+//---- return (int)($all / 1024);
if(!$config['KB']) return (int)($all);
else return (int)($all / 1024);
}
<tr><td>'._T('info_basic_showid').'</td><td colspan="3"> '.DISP_ID.' '._T('info_basic_showid_after').'</td></tr>
<tr><td>'._T('info_basic_cr_limit').'</td><td colspan="3"> '.BR_CHECK._T('info_basic_cr_after').'</td></tr>
<!--<tr><td>'._T('info_basic_timezone').'</td><td colspan="3"> GMT </td></tr>-->
-<tr><td>'._T('info_basic_max_lines_limit').'</td><td colspan="3"> '.MAX_LINES._T('info_basic_max_lines_after').'</td></tr>
+<tr><td>'._T('info_basic_line_number_limit').'</td><td colspan="3"> '.$config['LINE_NUMBER']._T('info_basic_line_number_after').'</td></tr>
<tr><td>'._T('info_basic_theme').'</td><td colspan="3"> '.$PTE->BlockValue('THEMENAME').' '.$PTE->BlockValue('THEMEVER').'<br/>by '.$PTE->BlockValue('THEMEAUTHOR').'</td></tr>
<tr><td align="center" colspan="4">'._T('info_dsusage_top').'</td></tr>
<tr align="center"><td>'._T('info_basic_threadcount').'</td><td colspan="'.(isset($piosensorInfo)?'2':'3').'"> '.$counttree.' '._T('info_basic_threads').'</td>'.(isset($piosensorInfo)?'<td rowspan="2">'.$piosensorInfo.'</td>':'').'</tr>