'text' => $owner->name,
));
$author_text = elgg_echo('blog:author_by_line', array($owner_link));
-if ($blog->tags) {
- $tags = "<p class=\"elgg-tags\">" . elgg_view('output/tags', array('tags' => $blog->tags)) . "</p>";
-} else {
- $tags = "";
-}
+$tags = elgg_view('output/tags', array('tags' => $blog->tags));
$date = elgg_view_friendly_time($blog->publish_date);
// The "on" status changes for comments, so best to check for !Off
'size' => 'small'
));
-if ($file->tags) {
- $tags = "<p class=\"elgg-tags\">" . elgg_view('output/tags', array('tags' => $file->tags)) . "</p>";
-} else {
- $tags = "";
-}
+$tags = elgg_view('output/tags', array('tags' => $file->tags));
$date = elgg_view_friendly_time($file->time_created);
$comments_count = elgg_count_comments($file);
<?php
/**
* Elgg tags
- * Displays a list of tags, separated by commas
*
* Tags can be a single string (for one tag) or an array of strings
*
* @subpackage Core
*
* @uses $vars['tags'] The tags to display
- * @uses $vars['tagtype'] The tagtype, optionally
+ * @uses $vars['type'] The entity type, optional
+ * @uses $vars['subtype'] The entity subtype, optional
*/
if (!empty($vars['subtype'])) {
}
if (!empty($vars['tags'])) {
- $tagstr = "";
if (!is_array($vars['tags'])) {
$vars['tags'] = array($vars['tags']);
}
+ echo '<ul class="elgg-tags">';
foreach($vars['tags'] as $tag) {
- if (!empty($tagstr)) {
- $tagstr .= ", ";
- }
if (!empty($vars['type'])) {
$type = "&type={$vars['type']}";
} else {
$type = "";
}
+ $url = elgg_get_site_url() . 'pg/search/?q=' . urlencode($tag) . "&search_type=tags{$type}{$subtype}{$object}";
if (is_string($tag)) {
- $tagstr .= "<a rel=\"tag\" href=\"".elgg_get_site_url()."pg/search/?q=".urlencode($tag) . "&search_type=tags{$type}{$subtype}{$object}\">" . htmlspecialchars($tag, ENT_QUOTES, 'UTF-8') . "</a>";
+ echo '<li>';
+ echo "<a rel=\"tag\" href=\"$url\">" . htmlspecialchars($tag, ENT_QUOTES, 'UTF-8') . "</a>";
+ echo '</li>';
}
}
- echo $tagstr;
+ echo '</ul>';
}