UNO: Hide bookmark tools in items (#^ and in menu)

This commit is contained in:
jeroenpraat 2016-03-10 19:39:38 +01:00
parent fbcb711945
commit 107f80892a
2 changed files with 6 additions and 1 deletions

View File

@ -241,7 +241,7 @@ class Item extends BaseObject {
$has_bookmarks = false;
if(is_array($item['term'])) {
foreach($item['term'] as $t) {
if($t['type'] == TERM_BOOKMARK)
if(!UNO && $t['type'] == TERM_BOOKMARK)
$has_bookmarks = true;
}
}

View File

@ -593,6 +593,11 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $cache = false)
$Text = preg_replace("/\[zrl\]([$URLSearchString]*)\[\/zrl\]/ism", '<a class="zrl" href="$1" target="_blank" >$1</a>', $Text);
$Text = preg_replace("/\[zrl\=([$URLSearchString]*)\](.*?)\[\/zrl\]/ism", '<a class="zrl" href="$1" target="_blank" >$2</a>', $Text);
}
// Remove bookmarks from UNO
if (UNO)
$Text = str_replace('<span class="bookmark-identifier">#^</span>', '', $Text);
// Perform MAIL Search
if (strpos($Text,'[/mail]') !== false) {
$Text = preg_replace("/\[mail\]([$MAILSearchString]*)\[\/mail\]/", '<a href="mailto:$1" target="_blank" >$1</a>', $Text);