Merge pull request #4586 from annando/issue-4115
Issue 4115: Events are now formatted better for Diaspora
This commit is contained in:
commit
324705aa90
|
@ -40,7 +40,7 @@ function format_event_html($ev, $simple = false) {
|
||||||
if ($simple) {
|
if ($simple) {
|
||||||
$o = "<h3>" . BBCode::convert($ev['summary']) . "</h3>";
|
$o = "<h3>" . BBCode::convert($ev['summary']) . "</h3>";
|
||||||
|
|
||||||
$o .= "<div>" . BBCode::convert($ev['desc']) . "</div>";
|
$o .= "<p>" . BBCode::convert($ev['desc']) . "</p>";
|
||||||
|
|
||||||
$o .= "<h4>" . L10n::t('Starts:') . "</h4><p>" . $event_start . "</p>";
|
$o .= "<h4>" . L10n::t('Starts:') . "</h4><p>" . $event_start . "</p>";
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ function format_event_html($ev, $simple = false) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strlen($ev['location'])) {
|
if (strlen($ev['location'])) {
|
||||||
$o .= "<h4>" . L10n::t('Location:') . "</h4><p>" . $ev['location'] . "</p>";
|
$o .= "<h4>" . L10n::t('Location:') . "</h4><p>" . BBCode::convert($ev['location']) . "</p>";
|
||||||
}
|
}
|
||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
|
|
|
@ -1604,9 +1604,7 @@ class BBCode
|
||||||
$text = preg_replace_callback(
|
$text = preg_replace_callback(
|
||||||
"/\[map\](.*?)\[\/map\]/ism",
|
"/\[map\](.*?)\[\/map\]/ism",
|
||||||
function ($match) {
|
function ($match) {
|
||||||
// the extra space in the following line is intentional
|
return str_replace($match[0], '<p class="map">' . Map::byLocation($match[1]) . '</p>', $match[0]);
|
||||||
// Whyyy? - @MrPetovan
|
|
||||||
return str_replace($match[0], '<div class="map" >' . Map::byLocation($match[1]) . '</div>', $match[0]);
|
|
||||||
},
|
},
|
||||||
$text
|
$text
|
||||||
);
|
);
|
||||||
|
@ -1615,9 +1613,7 @@ class BBCode
|
||||||
$text = preg_replace_callback(
|
$text = preg_replace_callback(
|
||||||
"/\[map=(.*?)\]/ism",
|
"/\[map=(.*?)\]/ism",
|
||||||
function ($match) {
|
function ($match) {
|
||||||
// the extra space in the following line is intentional
|
return str_replace($match[0], '<p class="map">' . Map::byCoordinates(str_replace('/', ' ', $match[1])) . '</p>', $match[0]);
|
||||||
// Whyyy? - @MrPetovan
|
|
||||||
return str_replace($match[0], '<div class="map" >' . Map::byCoordinates(str_replace('/', ' ', $match[1])) . '</div>', $match[0]);
|
|
||||||
},
|
},
|
||||||
$text
|
$text
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue