From a265afe7eb43bfe494669ee245c97bd7460fb671 Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 6 Mar 2012 20:44:53 +0000 Subject: [PATCH] added beard smileys --- images/beard.jpg | Bin 0 -> 989 bytes images/whitebeard.jpg | Bin 0 -> 951 bytes include/text.php | 43 ++++++++---------------------------------- 3 files changed, 8 insertions(+), 35 deletions(-) create mode 100644 images/beard.jpg create mode 100644 images/whitebeard.jpg mode change 100755 => 100644 include/text.php diff --git a/images/beard.jpg b/images/beard.jpg new file mode 100644 index 0000000000000000000000000000000000000000..d65e0c33b685335a8ba07a8cf73fa0dafd3590ce GIT binary patch literal 989 zcmex=_1P|rX?qqI0P zFI~aY%U!`Mz|~!$%*;qrN1?DZF(@WcOG z3_L*XOoGgU4E79L;&0S1yvbL+Yu}@o*}j1ncc(?n)Hwd|#@T1_nisc~&$2$XWAf*# zyJRIDgF}@yXKl{gm+E3|5oI0ZY#TL6$78edjaL`!9bQ|=`(JO3p2NbK6R$ zeAZ3#?>cZZdKYhZk9_g;1M(8JreDmj&)^V`IlcJUl83R${kgk$el6X$#avS7YQ5`n zz9*IX2$PPfnf&#<<2bJnAbyhjHoailUoFALp1d$0OezUu`M`D(QS7yBG0 zc|OpcGS`NyF!#QbMw{I!#U-;OoOeiCqzR?Xteuz~bkk|&lcG(&OK0utJtpI1G)szS z#(##}D-Nz|DqB>%+c3K6S;Uc$MLTvFvfj!POr9XDq`mCM@|;;}9!~=c!Y^tFF>5GJ zmN+|6&Y`X1lk%Q4#zSF>ED2MxK2C9!p7n8JU$NYA)3Zg37OlS7!q_Lsz$C%I$fL** z)x_bVwwO(kqy99T;>HyRdwbms*Sc*L6cj!m@WGt1_ChSf)eEulrsd&hLqAtV{bwk? ze}2E+SK)_8R4(|}M4X>1Wiz92*&e2n9Us+&43`~cY0a7u_)KaaV=6;_#u6bO^O@^Q z5>~4?axSZ!Ww_<2W6x4IQ!d9=j)#U%T>i~FXtA{5*3+_1P|rX?qqI0P zFI~aY%U!`Mz|~!$%*;qrN1?DZF(@H|W}sdMCMITx0w9-_ zjfI^-P>4fVL{t%|Mx2p>8AU$>10x#;P(odhfq{*Yg^7V3W;WPlK{f_!a_m98N`L=p}>{p-C=kwlK z8bs*!)mzWInz7#U>z}&C({>(uy5-uu{^=^S-+%h^)7JOvKILu8zHi^6*KdCB*E`RR zZ=Sp6M`v%&*t-1H^4Gife15mfdV7Y^t)AamRaSHE-Rl;9v0mnVz3JDyzFoJQm+zZ& zTEEc!TA9t=HM#2gtlwF6@3ZmiPWaCdD*kuc>~4P73oo1!8uNis#$2Z%#zgGK}%{ut{-#)&hX{#@L$4@M>m*38nT${ALuz$kNFDAn389NKN zztH-kB$RUTh-b4zPrFm@Hkmyl-4!pzg3cGkSXFBje%6`OZF%gH;EzieN_C$lUup|7 z`OtGU=BXjq2QRt9G6xENOkStay&%#)F~q0$?xGuu?wa&9c9s6U%d&j+La!=Ge&=g^ z-jf`z?DUZ^-Ri@skaUBUjg7@A*}y4SSorhHMy>#+DNIXsT*S6^G+kp9P+(vNVnZe+ zLjh$$Ao%>YfXPIRxkTK-v_w42JiN5#YP|W%+~6dETF%O)ZeKc^V!WBM8ZQ}Kj8;=Q z5X~TPP^iN~@b9Afh(9hO8;vv8u&z}-9LZpC%;`~L!Qqa-ec~(u0>SocL=OD3H~#$m q41?tZyVWnO7jVDc_2~CHy&V_q5B!b2{^;MW9X~%mKkv5x|4jf!kxXF# literal 0 HcmV?d00001 diff --git a/include/text.php b/include/text.php old mode 100755 new mode 100644 index c8c03174e6..2667ddddc4 --- a/include/text.php +++ b/include/text.php @@ -14,13 +14,7 @@ if(! function_exists('replace_macros')) { function replace_macros($s,$r) { global $t; - //$ts = microtime(); - $r = $t->replace($s,$r); - //$tt = microtime() - $ts; - - //$a = get_app(); - //$a->page['debug'] .= "$tt
\n"; - return $r; + return $t->replace($s,$r); }} @@ -737,7 +731,9 @@ function smilies($s, $sample = false) { ':headdesk', '~friendika', '~friendica', -// 'Diaspora*' + 'Diaspora*', + ':beard', + ':whitebeard' ); $icons = array( @@ -778,7 +774,9 @@ function smilies($s, $sample = false) { ':headdesk', '~friendika ~friendika', '~friendica ~friendica', -// 'DiasporaDiaspora*', + 'DiasporaDiaspora*', + ':beard', + ':whitebeard' ); @@ -792,7 +790,6 @@ function smilies($s, $sample = false) { } } else { - $params['string'] = preg_replace_callback('/<(3+)/','preg_heart',$params['string']); $s = str_replace($params['texts'],$params['icons'],$params['string']); } @@ -811,18 +808,7 @@ function smile_decode($m) { return(str_replace($m[1],base64url_decode($m[1]),$m[0])); } -// expand <3333 to the correct number of hearts -function preg_heart($x) { - $a = get_app(); - if(strlen($x[1]) == 1) - return $x[0]; - $t = ''; - for($cnt = 0; $cnt < strlen($x[1]); $cnt ++) - $t .= '<3'; - $r = str_replace($x[0],$t,$x[0]); - return $r; -} if(! function_exists('day_translate')) { @@ -1014,7 +1000,7 @@ function lang_selector() { } $ll = substr($l,5); $ll = substr($ll,0,strrpos($ll,'/')); - $selected = (($ll === $lang && (x($_SESSION, 'language'))) ? ' selected="selected" ' : ''); + $selected = (($ll === $lang && (x($_SESSION['language']))) ? ' selected="selected" ' : ''); $o .= ''; } } @@ -1219,16 +1205,3 @@ function reltoabs($text, $base) return $text; } -function item_post_type($item) { - if(intval($item['event-id'])) - return t('event'); - if(strlen($item['resource-id'])) - return t('photo'); - if(strlen($item['verb']) && $item['verb'] !== ACTIVITY_POST) - return t('activity'); - if($item['id'] != $item['parent']) - return t('comment'); - return t('post'); -} - - -- 2.39.5