forked from friendica/friendica-addons
fbpost: When posting comments, now links don't disappear anymore
This commit is contained in:
parent
2ee50af605
commit
9ffc6f3897
|
@ -207,7 +207,7 @@ function fbpost_content(&$a) {
|
||||||
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="'
|
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="'
|
||||||
. $a->get_baseurl() . '/addon/fbpost/fbpost.css' . '" media="all" />' . "\r\n";
|
. $a->get_baseurl() . '/addon/fbpost/fbpost.css' . '" media="all" />' . "\r\n";
|
||||||
|
|
||||||
$o .= '<h3>' . t('Facebook') . '</h3>';
|
$o .= '<h3>' . t('Facebook Export/Mirror') . '</h3>';
|
||||||
|
|
||||||
if(! $fb_installed) {
|
if(! $fb_installed) {
|
||||||
$o .= '<div id="fbpost-enable-wrapper">';
|
$o .= '<div id="fbpost-enable-wrapper">';
|
||||||
|
@ -293,7 +293,7 @@ function fbpost_content(&$a) {
|
||||||
function fbpost_plugin_settings(&$a,&$b) {
|
function fbpost_plugin_settings(&$a,&$b) {
|
||||||
|
|
||||||
$b .= '<div class="settings-block">';
|
$b .= '<div class="settings-block">';
|
||||||
$b .= '<a href="fbpost"><h3>' . t('Facebook') . '</a></h3>';
|
$b .= '<a href="fbpost"><h3>' . t('Facebook Export/Mirror') . '</a></h3>';
|
||||||
$b .= '</div>';
|
$b .= '</div>';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -634,7 +634,7 @@ function fbpost_post_hook(&$a,&$b) {
|
||||||
|
|
||||||
logger('fbpost_post_hook: original msg=' . $msg, LOGGER_DATA);
|
logger('fbpost_post_hook: original msg=' . $msg, LOGGER_DATA);
|
||||||
|
|
||||||
// To-Do: if it is a reply, then only do a simple bbcode2plain conversion
|
if ($toplevel) {
|
||||||
$msgarr = fbpost_createmsg($b);
|
$msgarr = fbpost_createmsg($b);
|
||||||
$msg = $msgarr["msg"];
|
$msg = $msgarr["msg"];
|
||||||
$link = $msgarr["link"];
|
$link = $msgarr["link"];
|
||||||
|
@ -650,6 +650,16 @@ function fbpost_post_hook(&$a,&$b) {
|
||||||
|
|
||||||
if(!strlen($msg))
|
if(!strlen($msg))
|
||||||
$msg = $image;
|
$msg = $image;
|
||||||
|
} else {
|
||||||
|
require_once("include/bbcode.php");
|
||||||
|
require_once("include/html2plain.php");
|
||||||
|
$msg = bb_CleanPictureLinks($msg);
|
||||||
|
$msg = bbcode($msg, false, false, 2, true);
|
||||||
|
$msg = trim(html2plain($msg, 0));
|
||||||
|
$link = "";
|
||||||
|
$image = "";
|
||||||
|
$linkname = "";
|
||||||
|
}
|
||||||
|
|
||||||
// If there is nothing to post then exit
|
// If there is nothing to post then exit
|
||||||
if(!strlen($msg))
|
if(!strlen($msg))
|
||||||
|
@ -1106,7 +1116,7 @@ function fbpost_fetchwall($a, $uid) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($content)
|
if ($content)
|
||||||
$_REQUEST["body"] .= "\n\n";
|
$_REQUEST["body"] .= "\n";
|
||||||
|
|
||||||
if ($type)
|
if ($type)
|
||||||
$_REQUEST["body"] .= "[class=type-".$type."]";
|
$_REQUEST["body"] .= "[class=type-".$type."]";
|
||||||
|
|
Loading…
Reference in a new issue