Great module! I'm not a php coder and never done patches, but I'm trying to hack the module or combine statements in such a way that I get the desired output. I'm basically trying to putput the block "tags for the current post" the same way as the different vocabulary blocks. Basically, instead of appearing as a list, it should be output the terms with several terms per line and no title in the block (as the vocabulary block appear now).
I have been moving around with the statements in "tagadelic_block" and "tagadelic_tags_lists", to output several terms per line as the vocabolary block, but no success so far. There might be even an easier way to do it, but with my lack of php knowledge I cannot see what function or statements print the output as I wish.
Functions I've been playing around with:
function tagadelic_block($op = 'list', $delta = O, $edit = array()) {
if ($op == 'view') {
if ($voc = taxonomy_get_vocabulary($delta)) {
$blocks['subject'] = variable_get('tagadelic_block_title_'. $delta, t('tags in @voc', array('@voc' => $voc->name)));
$tags = tagadelic_get_weighted_tags(array($voc->vid),6, variable_get('tagadelic_block_tags_'. $delta, 12));
$tags = tagadelic_sort_tags($tags);
$blocks['content'] = theme('tagadelic_weighted', $tags);//return a chunk of 12 tags
$blocks['content'] .= theme('tagadelic_more', $voc->vid);//add more link
}
elseif(arg(0) == 'node' && is_numeric(arg(1)) && $node = node_load(arg(1))) {
$blocks['subject'] = t('tags for @title', array('@title' => $node->title));
$blocks['content'] = tagadelic_tags_lists($node);
$blocks['content'] .= theme('tagadelic_more', $voc->vid);//add more link
}
}
function tagadelic_tags_lists($node) {
if (is_array($node->tags)) {
foreach($node->tags as $vid => $terms) {
$vocabulary = taxonomy_get_vocabulary($vid);
$title = l($vocabulary->name, "tagadelic/chunk/$vid");
$items = array();
foreach ($terms as $term) {
$items[] = l($term->name, taxonomy_term_path($term), array('title' => t('view all posts tagged with "@tag"', array('@tag' => $term->name))));
}
$output .= theme('item_list', $items);
}
return $output;
}
}
Comments
Comment #1
Bèr Kessels commentedClosing old feature and support-requests. If they are not answered or picked up by now, they probably are not relevant any longer.