Showmore: A little html bug was fixed (missing </div>)

This commit is contained in:
Michael Vogel 2012-04-06 23:36:41 +02:00
parent 33df399574
commit 3689c821b6
2 changed files with 22 additions and 15 deletions

View file

@ -1365,12 +1365,16 @@ function fb_consume_stream($uid,$j,$wall = false) {
if($entry->description) if($entry->description)
$quote = $entry->description; $quote = $entry->description;
if ($entry->properties)
foreach ($entry->properties as $property) foreach ($entry->properties as $property)
$quote .= "\n".$property->name.": [url=".$property->href."]".$property->text."[/url]"; $quote .= "\n".$property->name.": [url=".$property->href."]".$property->text."[/url]";
if ($quote) if ($quote)
$datarray['body'] .= "\n[quote]".$quote."[/quote]"; $datarray['body'] .= "\n[quote]".$quote."[/quote]";
// Only import the picture when the message is no video
// oembed display a picture of the video as well
if ($entry->type != "video") {
if($entry->picture && $entry->link) { if($entry->picture && $entry->link) {
$datarray['body'] .= "\n" . '[url=' . $entry->link . '][img]'.$entry->picture.'[/img][/url]'; $datarray['body'] .= "\n" . '[url=' . $entry->link . '][img]'.$entry->picture.'[/img][/url]';
} }
@ -1381,6 +1385,7 @@ function fb_consume_stream($uid,$j,$wall = false) {
if($entry->link) if($entry->link)
$datarray['body'] .= fb_get_photo($uid,$entry->link); $datarray['body'] .= fb_get_photo($uid,$entry->link);
} }
}
if(trim($datarray['body']) == '') { if(trim($datarray['body']) == '') {
logger('facebook: empty body'); logger('facebook: empty body');
@ -1392,6 +1397,7 @@ function fb_consume_stream($uid,$j,$wall = false) {
if ($entry->icon) if ($entry->icon)
$datarray['body'] .= "[img]".$entry->icon."[/img] &nbsp; "; $datarray['body'] .= "[img]".$entry->icon."[/img] &nbsp; ";
if ($entry->actions)
foreach ($entry->actions as $action) foreach ($entry->actions as $action)
if (($action->name != "Comment") and ($action->name != "Like")) if (($action->name != "Comment") and ($action->name != "Like"))
$datarray['body'] .= "[url=".$action->link."]".$action->name."[/url] &nbsp; "; $datarray['body'] .= "[url=".$action->link."]".$action->name."[/url] &nbsp; ";

View file

@ -46,7 +46,8 @@ function showmore_addon_settings(&$a,&$s) {
$s .= '</div><div class="clear"></div>'; $s .= '</div><div class="clear"></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="showmore-submit" name="showmore-submit" class="settings-submit" value="' . t('Submit') . '" /></div>'; $s .= '<div class="settings-submit-wrapper" ><input type="submit" id="showmore-submit" name="showmore-submit" class="settings-submit" value="' . t('Submit') . '" /></div>';
// $s .= '<div class="showmore-desc">' . t('Use /expression/ to provide regular expressions') . '</div></div>'; // $s .= '<div class="showmore-desc">' . t('Use /expression/ to provide regular expressions') . '</div>';
$s .= '</div>';
return; return;
} }