mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-16 20:05:14 +02:00
Vier: Some more changes to the theme.
Added a switch to suppress displaying of the tags.
This commit is contained in:
parent
8bb6b51967
commit
86e19dda22
5 changed files with 55 additions and 38 deletions
|
@ -158,22 +158,24 @@ class Item extends BaseObject {
|
|||
$hashtags = array();
|
||||
$mentions = array();
|
||||
|
||||
$taglist = q("SELECT `type`, `term`, `url` FROM `term` WHERE `otype` = %d AND `oid` = %d AND `type` IN (%d, %d) ORDER BY `tid`",
|
||||
intval(TERM_OBJ_POST), intval($item['id']), intval(TERM_HASHTAG), intval(TERM_MENTION));
|
||||
if (!get_config('system','suppress_tags')) {
|
||||
$taglist = q("SELECT `type`, `term`, `url` FROM `term` WHERE `otype` = %d AND `oid` = %d AND `type` IN (%d, %d) ORDER BY `tid`",
|
||||
intval(TERM_OBJ_POST), intval($item['id']), intval(TERM_HASHTAG), intval(TERM_MENTION));
|
||||
|
||||
foreach($taglist as $tag) {
|
||||
foreach($taglist as $tag) {
|
||||
|
||||
if ($tag["url"] == "")
|
||||
$tag["url"] = $searchpath.strtolower($tag["term"]);
|
||||
if ($tag["url"] == "")
|
||||
$tag["url"] = $searchpath.strtolower($tag["term"]);
|
||||
|
||||
if ($tag["type"] == TERM_HASHTAG) {
|
||||
$hashtags[] = "#<a href=\"".$tag["url"]."\" target=\"external-link\">".$tag["term"]."</a>";
|
||||
$prefix = "#";
|
||||
} elseif ($tag["type"] == TERM_MENTION) {
|
||||
$mentions[] = "@<a href=\"".$tag["url"]."\" target=\"external-link\">".$tag["term"]."</a>";
|
||||
$prefix = "@";
|
||||
if ($tag["type"] == TERM_HASHTAG) {
|
||||
$hashtags[] = "#<a href=\"".$tag["url"]."\" target=\"external-link\">".$tag["term"]."</a>";
|
||||
$prefix = "#";
|
||||
} elseif ($tag["type"] == TERM_MENTION) {
|
||||
$mentions[] = "@<a href=\"".$tag["url"]."\" target=\"external-link\">".$tag["term"]."</a>";
|
||||
$prefix = "@";
|
||||
}
|
||||
$tags[] = $prefix."<a href=\"".$tag["url"]."\" target=\"external-link\">".$tag["term"]."</a>";
|
||||
}
|
||||
$tags[] = $prefix."<a href=\"".$tag["url"]."\" target=\"external-link\">".$tag["term"]."</a>";
|
||||
}
|
||||
|
||||
/*foreach(explode(',',$item['tag']) as $tag){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue