diff options
Diffstat (limited to 'include/text.php')
-rw-r--r-- | include/text.php | 80 |
1 files changed, 42 insertions, 38 deletions
diff --git a/include/text.php b/include/text.php index cc4bee268..409d40d59 100644 --- a/include/text.php +++ b/include/text.php @@ -656,6 +656,10 @@ function search($s,$id='search-box',$url='/search',$save = false) { if(! function_exists('valid_email')) { function valid_email($x){ + + if(get_config('system','disable_email_validation')) + return true; + if(preg_match('/^[_a-zA-Z0-9\-\+]+(\.[_a-zA-Z0-9\-\+]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)+$/',$x)) return true; return false; @@ -750,40 +754,40 @@ function smilies($s, $sample = false) { ); $icons = array( - '<img src="' . $a->get_baseurl() . '/images/smiley-heart.gif" alt="<3" />', - '<img src="' . $a->get_baseurl() . '/images/smiley-brokenheart.gif" alt="</3" />', - '<img src="' . $a->get_baseurl() . '/images/smiley-brokenheart.gif" alt="<\\3" />', - '<img src="' . $a->get_baseurl() . '/images/smiley-smile.gif" alt=":-)" />', - '<img src="' . $a->get_baseurl() . '/images/smiley-wink.gif" alt=";-)" />', - '<img src="' . $a->get_baseurl() . '/images/smiley-frown.gif" alt=":-(" />', - '<img src="' . $a->get_baseurl() . '/images/smiley-tongue-out.gif" alt=":-P" />', - '<img src="' . $a->get_baseurl() . '/images/smiley-tongue-out.gif" alt=":-p" />', - '<img src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-\"" />', - '<img src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-\"" />', - '<img src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-x" />', - '<img src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-X" />', - '<img src="' . $a->get_baseurl() . '/images/smiley-laughing.gif" alt=":-D" />', - '<img src="' . $a->get_baseurl() . '/images/smiley-surprised.gif" alt="8-|" />', - '<img src="' . $a->get_baseurl() . '/images/smiley-surprised.gif" alt="8-O" />', - '<img src="' . $a->get_baseurl() . '/images/smiley-surprised.gif" alt=":-O" />', - '<img src="' . $a->get_baseurl() . '/images/smiley-thumbsup.gif" alt="\\o/" />', - '<img src="' . $a->get_baseurl() . '/images/smiley-Oo.gif" alt="o.O" />', - '<img src="' . $a->get_baseurl() . '/images/smiley-Oo.gif" alt="O.o" />', - '<img src="' . $a->get_baseurl() . '/images/smiley-Oo.gif" alt="o_O" />', - '<img src="' . $a->get_baseurl() . '/images/smiley-Oo.gif" alt="O_o" />', - '<img src="' . $a->get_baseurl() . '/images/smiley-cry.gif" alt=":\'(" />', - '<img src="' . $a->get_baseurl() . '/images/smiley-foot-in-mouth.gif" alt=":-!" />', - '<img src="' . $a->get_baseurl() . '/images/smiley-undecided.gif" alt=":-/" />', - '<img src="' . $a->get_baseurl() . '/images/smiley-embarassed.gif" alt=":-[" />', - '<img src="' . $a->get_baseurl() . '/images/smiley-cool.gif" alt="8-)" />', - '<img src="' . $a->get_baseurl() . '/images/beer_mug.gif" alt=":beer" />', - '<img src="' . $a->get_baseurl() . '/images/beer_mug.gif" alt=":homebrew" />', - '<img src="' . $a->get_baseurl() . '/images/coffee.gif" alt=":coffee" />', - '<img src="' . $a->get_baseurl() . '/images/smiley-facepalm.gif" alt=":facepalm" />', - '<img src="' . $a->get_baseurl() . '/images/like.gif" alt=":like" />', - '<img src="' . $a->get_baseurl() . '/images/dislike.gif" alt=":dislike" />', - '<a href="http://project.friendika.com">~friendika <img src="' . $a->get_baseurl() . '/images/friendika-16.png" alt="~friendika" /></a>', - '<a href="http://friendica.com">~friendica <img src="' . $a->get_baseurl() . '/images/friendica-16.png" alt="~friendica" /></a>' + '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-heart.gif" alt="<3" />', + '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-brokenheart.gif" alt="</3" />', + '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-brokenheart.gif" alt="<\\3" />', + '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-smile.gif" alt=":-)" />', + '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-wink.gif" alt=";-)" />', + '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-frown.gif" alt=":-(" />', + '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-tongue-out.gif" alt=":-P" />', + '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-tongue-out.gif" alt=":-p" />', + '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-\"" />', + '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-\"" />', + '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-x" />', + '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-X" />', + '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-laughing.gif" alt=":-D" />', + '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-surprised.gif" alt="8-|" />', + '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-surprised.gif" alt="8-O" />', + '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-surprised.gif" alt=":-O" />', + '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-thumbsup.gif" alt="\\o/" />', + '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-Oo.gif" alt="o.O" />', + '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-Oo.gif" alt="O.o" />', + '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-Oo.gif" alt="o_O" />', + '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-Oo.gif" alt="O_o" />', + '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-cry.gif" alt=":\'(" />', + '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-foot-in-mouth.gif" alt=":-!" />', + '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-undecided.gif" alt=":-/" />', + '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-embarassed.gif" alt=":-[" />', + '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-cool.gif" alt="8-)" />', + '<img class="smiley" src="' . $a->get_baseurl() . '/images/beer_mug.gif" alt=":beer" />', + '<img class="smiley" src="' . $a->get_baseurl() . '/images/beer_mug.gif" alt=":homebrew" />', + '<img class="smiley" src="' . $a->get_baseurl() . '/images/coffee.gif" alt=":coffee" />', + '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-facepalm.gif" alt=":facepalm" />', + '<img class="smiley" src="' . $a->get_baseurl() . '/images/like.gif" alt=":like" />', + '<img class="smiley" src="' . $a->get_baseurl() . '/images/dislike.gif" alt=":dislike" />', + '<a href="http://project.friendika.com">~friendika <img class="smiley" src="' . $a->get_baseurl() . '/images/friendika-16.png" alt="~friendika" /></a>', + '<a href="http://friendica.com">~friendica <img class="smiley" src="' . $a->get_baseurl() . '/images/friendica-16.png" alt="~friendica" /></a>' ); $params = array('texts' => $texts, 'icons' => $icons, 'string' => $s); @@ -823,7 +827,7 @@ function preg_heart($x) { return $x[0]; $t = ''; for($cnt = 0; $cnt < strlen($x[1]); $cnt ++) - $t .= '<img src="' . $a->get_baseurl() . '/images/smiley-heart.gif" alt="<3" />'; + $t .= '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-heart.gif" alt="<3" />'; $r = str_replace($x[0],$t,$x[0]); return $r; } @@ -1059,12 +1063,13 @@ function feed_salmonlinks($nick) { if(! function_exists('get_plink')) { function get_plink($item) { $a = get_app(); - if (x($item,'plink') && ((! $item['private']) || ($item['network'] === NETWORK_FEED))){ + if (x($item,'plink') && ($item['private'] != 1)) { return array( 'href' => $item['plink'], 'title' => t('link to source'), ); - } else { + } + else { return false; } }} @@ -1532,7 +1537,6 @@ function undo_post_tagging($s) { function fix_mce_lf($s) { $s = str_replace("\r\n","\n",$s); - $s = str_replace("\n\n","\n",$s); return $s; } |