X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Ftext.php;h=6d557ed84e8c62706cca664776d0e71337137055;hb=59b45f7fc12027c387f04a2121ea398c1d534626;hp=ed37326df3190760708f63ba3d3df88cee1fb606;hpb=e9b33a6f1f42899a4d46cb23421085cdc2bbbaa6;p=friendica.git diff --git a/include/text.php b/include/text.php index ed37326df3..6d557ed84e 100644 --- a/include/text.php +++ b/include/text.php @@ -712,6 +712,7 @@ function smilies($s, $sample = false) { ';-)', ':-(', ':-P', + ':-p', ':-"', ':-"', ':-x', @@ -732,9 +733,8 @@ function smilies($s, $sample = false) { ':homebrew', ':coffee', ':facepalm', - ':headdesk', '~friendika', - '~friendica', + '~friendica' ); @@ -746,6 +746,7 @@ function smilies($s, $sample = false) { ';-)', ':-(', ':-P', + ':-p', ':-\', ':-\', ':-x', @@ -767,7 +768,7 @@ function smilies($s, $sample = false) { ':coffee', ':facepalm', '~friendika ~friendika', - '~friendica ~friendica', + '~friendica ~friendica' ); $params = array('texts' => $texts, 'icons' => $icons, 'string' => $s); @@ -939,6 +940,36 @@ function prepare_body($item,$attach = false) { $s .= '
' . t('Filed under:') . ' ' . $x . '
'; } + // Look for spoiler + $spoilersearch = '
'; + + // Remove line breaks before the spoiler + while ((strpos($s, "\n".$spoilersearch) !== false)) + $s = str_replace("\n".$spoilersearch, $spoilersearch, $s); + while ((strpos($s, "
".$spoilersearch) !== false)) + $s = str_replace("
".$spoilersearch, $spoilersearch, $s); + + while ((strpos($s, $spoilersearch) !== false)) { + + $pos = strpos($s, $spoilersearch); + $rnd = random_string(8); + $spoilerreplace = '
'.sprintf(t('Click to open/close')).''. + '