aboutsummaryrefslogtreecommitdiffstats
path: root/include/bbcode.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/bbcode.php')
-rw-r--r--include/bbcode.php17
1 files changed, 16 insertions, 1 deletions
diff --git a/include/bbcode.php b/include/bbcode.php
index c7dea53c5..f3ecbd9e9 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -382,7 +382,7 @@ function bb_ShareAttributes($match) {
// Bob Smith wrote the following post 2 hours ago
$fmt = sprintf( t('%1$s wrote the following %2$s %3$s'),
- '<a href="' . (($auth) ? zid($profile) : $profile) . '" >' . $author . '</a>',
+ '<a href="' . (($auth) ? zid($profile) : $profile) . '" ><bdi>' . $author . '</bdi></a>',
'<a href="' . (($auth) ? zid($link) : $link) . '" >' . $type . '</a>',
$reldate
);
@@ -1111,6 +1111,12 @@ function bbcode($Text, $options = []) {
if (strpos($Text,'[/footer]') !== false) {
$Text = preg_replace("(\[footer\](.*?)\[\/footer\])ism", "<div class=\"wall-item-footer\">$1</div>", $Text);
}
+
+ // Check for bdi
+ if (strpos($Text,'[/bdi]') !== false) {
+ $Text = preg_replace("(\[bdi\](.*?)\[\/bdi\])ism", "<bdi>$1</bdi>", $Text);
+ }
+
// Check for list text
$Text = preg_replace("/<br \/>\[\*\]/ism",'[*]',$Text);
@@ -1231,9 +1237,18 @@ function bbcode($Text, $options = []) {
if (strpos($Text,'[/img]') !== false) {
$Text = preg_replace("/\[img\](.*?)\[\/img\]/ism", '<img style="max-width: 100%;" src="$1" alt="' . t('Image/photo') . '" />', $Text);
}
+ // [img=pathtoimage]image description[/img]
+ if (strpos($Text,'[/img]') !== false) {
+ $Text = preg_replace("/\[img=http(.*?)\](.*?)\[\/img\]/ism", '<img style="max-width: 100%;" src="http$1" alt="$2" title="$2"/>', $Text);
+ }
+ // [zmg]pathtoimage[/zmg]
if (strpos($Text,'[/zmg]') !== false) {
$Text = preg_replace("/\[zmg\](.*?)\[\/zmg\]/ism", '<img class="zrl" style="max-width: 100%;" src="$1" alt="' . t('Image/photo') . '" />', $Text);
}
+ // [zmg=pathtoimage]image description[/zmg]
+ if (strpos($Text,'[/zmg]') !== false) {
+ $Text = preg_replace("/\[zmg=http(.*?)\](.*?)\[\/zmg\]/ism", '<img class="zrl" style="max-width: 100%;" src="http$1" alt="$2" title="$2"/>', $Text);
+ }
// [img float={left, right}]pathtoimage[/img]
if (strpos($Text,'[/img]') !== false) {