if(! function_exists('escape_tags')) {
function escape_tags($string) {
- return(htmlspecialchars($string));
+ return(htmlspecialchars($string, ENT_COMPAT, 'UTF-8', false));
}}
return file_get_contents("$d/$lang/$b");
$theme = current_theme();
-
+
if(file_exists("$d/theme/$theme/$b"))
return file_get_contents("$d/theme/$theme/$b");
$s = preg_replace('/\[code\](.*?)\[\/code\]/sm','',$s);
+ // ignore anything in a bbtag
+
+ $s = preg_replace('/\[(.*?)\]/sm','',$s);
+
// Match full names against @tags including the space between first and last
// We will look these up afterward to see if they are full names or not recognisable.
return($s);
}}
+function get_poke_verbs() {
+
+ // index is present tense verb
+ // value is array containing past tense verb, translation of present, translation of past
+
+ $arr = array(
+ 'poke' => array( 'poked', t('poke'), t('poked')),
+ 'ping' => array( 'pinged', t('ping'), t('pinged')),
+ 'prod' => array( 'prodded', t('prod'), t('prodded')),
+ 'slap' => array( 'slapped', t('slap'), t('slapped')),
+ 'finger' => array( 'fingered', t('finger'), t('fingered')),
+ 'rebuff' => array( 'rebuffed', t('rebuff'), t('rebuffed')),
+ );
+ call_hooks('poke_verbs', $arr);
+ return $arr;
+}
+
+function get_mood_verbs() {
+
+ // index is present tense verb
+ // value is array containing past tense verb, translation of present, translation of past
+
+ $arr = array(
+ 'happy' => t('happy'),
+ 'sad' => t('sad'),
+ 'mellow' => t('mellow'),
+ 'tired' => t('tired'),
+ 'perky' => t('perky'),
+ 'angry' => t('angry'),
+ 'stupefied' => t('stupified'),
+ 'puzzled' => t('puzzled'),
+ 'interested' => t('interested'),
+ 'bitter' => t('bitter'),
+ 'cheerful' => t('cheerful'),
+ 'alive' => t('alive'),
+ 'annoyed' => t('annoyed'),
+ 'anxious' => t('anxious'),
+ 'cranky' => t('cranky'),
+ 'disturbed' => t('disturbed'),
+ 'frustrated' => t('frustrated'),
+ 'motivated' => t('motivated'),
+ 'relaxed' => t('relaxed'),
+ 'surprised' => t('surprised'),
+ );
+
+ call_hooks('mood_verbs', $arr);
+ return $arr;
+}
+
/**
*
function fix_mce_lf($s) {
$s = str_replace("\r\n","\n",$s);
+// $s = str_replace("\n\n","\n",$s);
return $s;
}