[bbDev] function tag_heat_map

Aditya Naik aditya at adityanaik.com
Thu Nov 16 15:20:07 GMT 2006


Hello
the function brings the $tag from global pool into the function. this causes
the tag-single.php to fail if the function is called before the main content
of the page is displayed.

i changed the function from

    global $tag;
    $tags = get_top_tags( false, $limit );
    if (empty($tags))
        return;
    foreach ( $tags as $tag ) {
        $counts{$tag->raw_tag} = $tag->tag_count;
        $taglinks{$tag->raw_tag} = get_tag_link();
    }

to

    //global $tag;
    $tags = get_top_tags( false, $limit );
    if (empty($tags))
        return;
    foreach ( $tags as $tag ) {
        $counts{$tag->raw_tag} = $tag->tag_count;
        $taglinks{$tag->raw_tag} = get_tag_link($tag->tag);
    }

please let me know your thoughts about anybetter way to fix the problem


regards
Aditya

-- 
drop by at http://www.adityanaik.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://comox.textdrive.com/pipermail/bbdev/attachments/20061116/c9a6e423/attachment.htm


More information about the bbDev mailing list