X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2FSmilies.php;h=f4de32f8f8db4f3609594461e4575bb091d9f98c;hb=f65d6531cafe625d6be011e135d132ae48fc7c06;hp=193f3b555ddd2986f7e3adf009928678eba0f57c;hpb=30c375d238af79795937b8df046abe9f0ee63db9;p=friendica.git
diff --git a/include/Smilies.php b/include/Smilies.php
index 193f3b555d..f4de32f8f8 100644
--- a/include/Smilies.php
+++ b/include/Smilies.php
@@ -1,9 +1,12 @@
smilie shortcut
* 'icons' => icon in html
- *
+ *
* @hook smilie ('texts' => smilies texts array, 'icons' => smilies html array)
*/
public static function get_list() {
@@ -63,41 +66,41 @@ class Smilies {
);
$icons = array(
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '~friendica
',
- 'red
matrix',
- 'red
matrix'
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '~friendica
',
+ 'red
matrix',
+ 'red
matrix'
);
$params = array('texts' => $texts, 'icons' => $icons);
@@ -120,8 +123,8 @@ class Smilies {
*
* @param string $s
* @param boolean $sample
- *
- * @return string
+ *
+ * @return string HML Output of the Smilie
*/
public static function replace($s, $sample = false) {
if(intval(get_config('system','no_smilies'))
@@ -164,14 +167,16 @@ class Smilies {
* @brief expand <3333 to the correct number of hearts
*
* @param string $x
- * @return string
+ * @return string HTML Output
+ *
+ * @todo: Rework because it doesn't work correctly
*/
private function preg_heart($x) {
if(strlen($x[1]) == 1)
return $x[0];
$t = '';
for($cnt = 0; $cnt < strlen($x[1]); $cnt ++)
- $t .= '
';
+ $t .= '
';
$r = str_replace($x[0],$t,$x[0]);
return $r;
}