function theme_flickr_tags_list in Flickr 7
Same name and namespace in other branches
- 5 tags/flickr_tags.module \theme_flickr_tags_list()
- 6 tags/flickr_tags.module \theme_flickr_tags_list()
Theme Flickr tags list.
1 theme call to theme_flickr_tags_list()
- flickr_tags_list in tags/
flickr_tags.module - Returns a given user's tags.
File
- tags/
flickr_tags.module, line 185 - The Flickr tags module.
Code
function theme_flickr_tags_list($variables) {
$uid = $variables['uid'];
$nsid = $variables['nsid'];
$tags = $variables['tags'];
$output = "<ul id='flickr_taglist'>\n";
$first_char = '';
foreach ($tags as $tag) {
if ($first_char != substr($tag, 0, 1)) {
$new_item = TRUE;
}
else {
$new_item = FALSE;
}
if ($first_char != '' && $new_item) {
$output .= "</ul></li>\n";
}
if ($new_item) {
$first_char = substr($tag, 0, 1);
$output .= "<li><ul>\n";
}
$output .= "<li>";
$output .= l($tag, "flickr/{$uid}/tag/{$tag}");
$output .= "</li>\n";
}
if ($first_char != '') {
$output .= "</ul></li>\n";
}
$output .= "</ul>\n";
return $output;
'';
}