'{$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);
}