aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChristian Vogeley <christian.vogeley@hotmail.de>2014-02-09 01:37:09 +0100
committerChristian Vogeley <christian.vogeley@hotmail.de>2014-02-09 01:37:09 +0100
commitc9192991c95a5145e5d515f7c6268c61e6400476 (patch)
treeb1d83e53023a48dc7d41dab777f2716827e1d3f1 /include
parente346aa7560b93d1e5a331fa4ad9b16c70fe83ef7 (diff)
downloadvolse-hubzilla-c9192991c95a5145e5d515f7c6268c61e6400476.tar.gz
volse-hubzilla-c9192991c95a5145e5d515f7c6268c61e6400476.tar.bz2
volse-hubzilla-c9192991c95a5145e5d515f7c6268c61e6400476.zip
Add class to bookmark links to make it better them able
E.g.: css (not yet included) .bookmark-identifier{ display:none; } .bookmark:hover:before{ text-decoration:none; content:"#^"; color:#000000; background:#FFFFFF; } .bookmark:hover{ color: #FFFFFF; background: #3465A4; }
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);
}