diff options
author | friendica <info@friendica.com> | 2014-02-09 18:49:31 +1100 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-02-09 18:49:31 +1100 |
commit | 96881e833041f708174e48046555d09fc1eb67a8 (patch) | |
tree | c2a75a19b720818202728fc682d3355bb32949db /include | |
parent | e346aa7560b93d1e5a331fa4ad9b16c70fe83ef7 (diff) | |
parent | 176b0881ce6fd9b820c9dffaa926b542007f98df (diff) | |
download | volse-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.php | 4 |
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); } |