bbcode: New mode for conversion of shared content that will be used for g+ and facebook export.
This commit is contained in:
parent
dbcfe58ea8
commit
46c7cb5b72
1 changed files with 11 additions and 5 deletions
|
@ -452,7 +452,7 @@ function bb_ShareAttributes($share, $simplehtml) {
|
||||||
case 2:
|
case 2:
|
||||||
$text = $preshare.html_entity_decode("♲ ", ENT_QUOTES, 'UTF-8').' '.$userid_compact.": <br />".$share[3];
|
$text = $preshare.html_entity_decode("♲ ", ENT_QUOTES, 'UTF-8').' '.$userid_compact.": <br />".$share[3];
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3: // Diaspora
|
||||||
$headline = '<div class="shared_header">';
|
$headline = '<div class="shared_header">';
|
||||||
$headline .= '<span><b>'.html_entity_decode("♲ ", ENT_QUOTES, 'UTF-8').$userid.':</b></span>';
|
$headline .= '<span><b>'.html_entity_decode("♲ ", ENT_QUOTES, 'UTF-8').$userid.':</b></span>';
|
||||||
$headline .= "</div>";
|
$headline .= "</div>";
|
||||||
|
@ -484,15 +484,21 @@ function bb_ShareAttributes($share, $simplehtml) {
|
||||||
case 5:
|
case 5:
|
||||||
$text = $preshare.html_entity_decode("♲ ", ENT_QUOTES, 'UTF-8').' '.$userid_compact.": <br />".$share[3];
|
$text = $preshare.html_entity_decode("♲ ", ENT_QUOTES, 'UTF-8').' '.$userid_compact.": <br />".$share[3];
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6: // app.net
|
||||||
$text = $preshare.">> @".$userid_compact.": <br />".$share[3];
|
$text = $preshare.">> @".$userid_compact.": <br />".$share[3];
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7: // statusnet/GNU Social
|
||||||
$text = $preshare.html_entity_decode("♲ ", ENT_QUOTES, 'UTF-8')." @".$userid_compact.": ".$share[3];
|
$text = $preshare.html_entity_decode("♲ ", ENT_QUOTES, 'UTF-8')." @".$userid_compact.": ".$share[3];
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8: // twitter
|
||||||
$text = $preshare."RT @".$userid_compact.": ".$share[3];
|
$text = $preshare."RT @".$userid_compact.": ".$share[3];
|
||||||
break;
|
break;
|
||||||
|
case 9: // Google+/Facebook
|
||||||
|
$text = $preshare.html_entity_decode("♲ ", ENT_QUOTES, 'UTF-8').' '.$userid_compact.": <br />".$share[3];
|
||||||
|
|
||||||
|
if ($link != "")
|
||||||
|
$text .= "<br /><br />".$link;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
$headline = trim($share[1]).'<div class="shared_header">';
|
$headline = trim($share[1]).'<div class="shared_header">';
|
||||||
if ($avatar != "")
|
if ($avatar != "")
|
||||||
|
@ -775,7 +781,7 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true, $simplehtml = fal
|
||||||
$Text = preg_replace("/#\[url\=[$URLSearchString]*\]\^\[\/url\]\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/i",
|
$Text = preg_replace("/#\[url\=[$URLSearchString]*\]\^\[\/url\]\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/i",
|
||||||
"[bookmark=$1]$2[/bookmark]", $Text);
|
"[bookmark=$1]$2[/bookmark]", $Text);
|
||||||
|
|
||||||
if (in_array($simplehtml, array(2, 6, 7, 8))) {
|
if (in_array($simplehtml, array(2, 6, 7, 8, 9))) {
|
||||||
$Text = preg_replace_callback("/([^#@])\[url\=([^\]]*)\](.*?)\[\/url\]/ism","bb_expand_links",$Text);
|
$Text = preg_replace_callback("/([^#@])\[url\=([^\]]*)\](.*?)\[\/url\]/ism","bb_expand_links",$Text);
|
||||||
//$Text = preg_replace("/[^#@]\[url\=([^\]]*)\](.*?)\[\/url\]/ism",' $2 [url]$1[/url]',$Text);
|
//$Text = preg_replace("/[^#@]\[url\=([^\]]*)\](.*?)\[\/url\]/ism",' $2 [url]$1[/url]',$Text);
|
||||||
$Text = preg_replace("/\[bookmark\=([^\]]*)\](.*?)\[\/bookmark\]/ism",' $2 [url]$1[/url]',$Text);
|
$Text = preg_replace("/\[bookmark\=([^\]]*)\](.*?)\[\/bookmark\]/ism",' $2 [url]$1[/url]',$Text);
|
||||||
|
|
Loading…
Reference in a new issue