"2" => get_string("postrating2", "forum"),
"1" => get_string("postrating1", "forum") );
-$FORUM_LONG_POST = 600;
+$FORUM_SHORT_POST = 300; // Less than this is "short"
+
+$FORUM_LONG_POST = 600; // More than this is "long"
+
/// FUNCTIONS ///////////////////////////////////////////////////////////
}
function forum_shorten_post($message) {
- global $FORUM_LONG_POST;
+ global $FORUM_LONG_POST, $FORUM_SHORT_POST;
if (strlen($message) > $FORUM_LONG_POST) {
- // Look for the first return between 100 and $FORUM_LONG_POST
- $shortmessage = substr($message, 100, $FORUM_LONG_POST);
+ // Look for the first return between $FORUM_SHORT_POST and $FORUM_LONG_POST
+ $shortmessage = substr($message, $FORUM_SHORT_POST, $FORUM_LONG_POST);
if ($pos = strpos($shortmessage, "\n")) {
- return substr($message, 0, 100 + $pos);
+ return substr($message, 0, $FORUM_SHORT_POST + $pos);
} else {
return substr($message, 0, $FORUM_LONG_POST)."...";
}