mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-17 04:15:15 +02:00
preliminary qcomment support, [nosmile] tag to disable smiley processing
This commit is contained in:
parent
f865939653
commit
03171fd7de
7 changed files with 45 additions and 4 deletions
|
@ -212,7 +212,7 @@ function bb2diaspora($Text,$preserve_nl = false) {
|
|||
$Text = preg_replace("/\[vimeo\]([0-9]+)(.*?)\[\/vimeo\]/ism", 'http://vimeo.com/$1',$Text);
|
||||
|
||||
|
||||
|
||||
$Text = str_replace('[nosmile]','',$Text);
|
||||
|
||||
// oembed tag
|
||||
// $Text = oembed_bbcode2html($Text);
|
||||
|
|
|
@ -174,7 +174,10 @@ upper-alpha;">$2</ul>' ,$Text);
|
|||
$Text = preg_replace("/\[table border=0\](.*?)\[\/table\]/sm", '<table border="0" >$1</table>' ,$Text);
|
||||
|
||||
$Text = str_replace('[hr]','<hr />', $Text);
|
||||
|
||||
|
||||
// This is actually executed in prepare_body()
|
||||
|
||||
$Text = str_replace('[nosmile]','',$Text);
|
||||
|
||||
// Check for font change text
|
||||
$Text = preg_replace("/\[font=(.*?)\](.*?)\[\/font\]/sm","<span style=\"font-family: $1;\">$2</span>",$Text);
|
||||
|
|
|
@ -522,6 +522,9 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
|
|||
if ($shareable) $likebuttons['share'] = array( t('Share this'), t('share'));
|
||||
}
|
||||
|
||||
// $qcomment = array(':-)','LOL','ROTFL','[smile]');
|
||||
$qcomment = null;
|
||||
|
||||
if(($show_comment_box) || (($show_comment_box == false) && ($override_comment_box == false) && ($item['last-child']))) {
|
||||
$comment = replace_macros($cmnt_tpl,array(
|
||||
'$return_path' => '',
|
||||
|
@ -529,6 +532,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
|
|||
'$type' => (($mode === 'profile') ? 'wall-comment' : 'net-comment'),
|
||||
'$id' => $item['item_id'],
|
||||
'$parent' => $item['parent'],
|
||||
'$qcomment' => $qcomment,
|
||||
'$profile_uid' => $profile_owner,
|
||||
'$mylink' => $a->contact['url'],
|
||||
'$mytitle' => t('This is you'),
|
||||
|
@ -634,7 +638,6 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
|
|||
// Build the HTML
|
||||
|
||||
$body = prepare_body($item,true);
|
||||
|
||||
|
||||
$tmp_item = replace_macros($template,array(
|
||||
'$type' => implode("",array_slice(split("/",$item['verb']),-1)),
|
||||
|
|
|
@ -878,7 +878,10 @@ function prepare_text($text) {
|
|||
|
||||
require_once('include/bbcode.php');
|
||||
|
||||
$s = smilies(bbcode($text));
|
||||
if(stristr($text,'[nosmile]'))
|
||||
$s = bbcode($text);
|
||||
else
|
||||
$s = smilies(bbcode($text));
|
||||
|
||||
return $s;
|
||||
}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue