aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-02-09 18:49:31 +1100
committerfriendica <info@friendica.com>2014-02-09 18:49:31 +1100
commit96881e833041f708174e48046555d09fc1eb67a8 (patch)
treec2a75a19b720818202728fc682d3355bb32949db /include
parente346aa7560b93d1e5a331fa4ad9b16c70fe83ef7 (diff)
parent176b0881ce6fd9b820c9dffaa926b542007f98df (diff)
downloadvolse-hubzilla-96881e833041f708174e48046555d09fc1eb67a8.tar.gz
volse-hubzilla-96881e833041f708174e48046555d09fc1eb67a8.tar.bz2
volse-hubzilla-96881e833041f708174e48046555d09fc1eb67a8.zip
Merge pull request #306 from cvogeley/master
Add class to bookmark links to make it better themable
Diffstat (limited to 'include')
-rw-r--r--include/bbcode.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/bbcode.php b/include/bbcode.php
index bd2c7d11a..9cd5ad58c 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -443,10 +443,14 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) {
}
}
if (strpos($Text,'[/url]') !== false) {
+ $Text = preg_replace("/\#\^\[url\]([$URLSearchString]*)\[\/url\]/ism", '<span class="bookmark-identifier">#^</span><a class="bookmark" href="$1" >$1</a>', $Text);
+ $Text = preg_replace("/\#\^\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '<span class="bookmark-identifier">#^</span><a class="bookmark" href="$1" >$2</a>', $Text);
$Text = preg_replace("/\[url\]([$URLSearchString]*)\[\/url\]/ism", '<a href="$1" >$1</a>', $Text);
$Text = preg_replace("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '<a href="$1" >$2</a>', $Text);
}
if (strpos($Text,'[/zrl]') !== false) {
+ $Text = preg_replace("/\#\^\[zrl\]([$URLSearchString]*)\[\/zrl\]/ism", '<span class="bookmark-identifier">#^</span><a class="zrl bookmark" href="$1" >$1</a>', $Text);
+ $Text = preg_replace("/\#\^\[zrl\=([$URLSearchString]*)\](.*?)\[\/zrl\]/ism", '<span class="bookmark-identifier">#^</span><a class="zrl bookmark" href="$1" >$2</a>', $Text);
$Text = preg_replace("/\[zrl\]([$URLSearchString]*)\[\/zrl\]/ism", '<a class="zrl" href="$1" >$1</a>', $Text);
$Text = preg_replace("/\[zrl\=([$URLSearchString]*)\](.*?)\[\/zrl\]/ism", '<a class="zrl" href="$1" >$2</a>', $Text);
}