X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2FSmilies.php;h=f4de32f8f8db4f3609594461e4575bb091d9f98c;hb=0cd9db9cb7f4c96f597e37590a536eaae123238d;hp=d67b92d8b00f60a4e38ab0664510adb794b336ae;hpb=f852f7aac0b44f243d3cd812aa92122f7b38067b;p=friendica.git diff --git a/include/Smilies.php b/include/Smilies.php index d67b92d8b0..f4de32f8f8 100644 --- a/include/Smilies.php +++ b/include/Smilies.php @@ -5,6 +5,8 @@ * @brief This file contains the Smilies class which contains functions to handle smiles */ +use Friendica\App; + /** * This class contains functions to handle smiles */ @@ -13,13 +15,13 @@ class Smilies { /** * @brief Function to list all smilies - * + * * Get an array of all smilies, both internal and from addons. - * + * * @return array * 'texts' => smilie shortcut * 'icons' => icon in html - * + * * @hook smilie ('texts' => smilies texts array, 'icons' => smilies html array) */ public static function get_list() { @@ -64,41 +66,41 @@ class Smilies { ); $icons = array( - '<3', - '</3', - '<\\3', - ':-)', - ';-)', - ':-(', - ':-P', - ':-p', - ':-\', - ':-\', - ':-x', - ':-X', - ':-D', - '8-|', - '8-O', - ':-O', - '\\o/', - 'o.O', - 'O.o', - 'o_O', - 'O_o', - ':\'(', - ':-!', - ':-/', - ':-[', - '8-)', - ':beer', - ':homebrew', - ':coffee', - ':facepalm', - ':like', - ':dislike', - '~friendica ~friendica', - 'redred#matrix', - 'redred#matrixmatrix' + '<3', + '</3', + '<\\3', + ':-)', + ';-)', + ':-(', + ':-P', + ':-p', + ':-\', + ':-\', + ':-x', + ':-X', + ':-D', + '8-|', + '8-O', + ':-O', + '\\o/', + 'o.O', + 'O.o', + 'o_O', + 'O_o', + ':\'(', + ':-!', + ':-/', + ':-[', + '8-)', + ':beer', + ':homebrew', + ':coffee', + ':facepalm', + ':like', + ':dislike', + '~friendica ~friendica', + 'redred#matrix', + 'redred#matrixmatrix' ); $params = array('texts' => $texts, 'icons' => $icons); @@ -121,7 +123,7 @@ class Smilies { * * @param string $s * @param boolean $sample - * + * * @return string HML Output of the Smilie */ public static function replace($s, $sample = false) { @@ -166,7 +168,7 @@ class Smilies { * * @param string $x * @return string HTML Output - * + * * @todo: Rework because it doesn't work correctly */ private function preg_heart($x) { @@ -174,7 +176,7 @@ class Smilies { return $x[0]; $t = ''; for($cnt = 0; $cnt < strlen($x[1]); $cnt ++) - $t .= '<3'; + $t .= '<3'; $r = str_replace($x[0],$t,$x[0]); return $r; }