- b2evolution CMS Support Forums
- Archives
- Older bugs
- Bugs in 2.4.x
- [2.4.5] tagcloud and allblogs
1 chrissie1 Jan 11, 2009 12:14
I found that in 2.4.5 the tagcloud wasn't showing in the allblogs blog. I fixed it pertty easily.
by changing this in the following file inc/widgets/widgets/_coll_tag_cloud.widget.php
$sql = 'SELECT LOWER(tag_name) AS tag_name, COUNT(DISTINCT itag_itm_ID) AS tag_count
FROM T_items__tag INNER JOIN T_items__itemtag ON itag_tag_ID = tag_ID
INNER JOIN T_postcats ON itag_itm_ID = postcat_post_ID
INNER JOIN T_categories ON postcat_cat_ID = cat_ID
INNER JOIN T_items__item ON itag_itm_ID = post_ID
WHERE cat_blog_ID = '.$Blog->ID.'
AND post_status = "published" AND post_datestart < NOW()
GROUP BY tag_name
ORDER BY tag_count DESC
LIMIT '.$this->disp_params['max_tags'];
to this
if($Blog->ID == theallblogid)
{
$sql = 'SELECT LOWER(tag_name) AS tag_name, COUNT(DISTINCT itag_itm_ID) AS tag_count
FROM T_items__tag INNER JOIN T_items__itemtag ON itag_tag_ID = tag_ID
INNER JOIN T_postcats ON itag_itm_ID = postcat_post_ID
INNER JOIN T_categories ON postcat_cat_ID = cat_ID
INNER JOIN T_items__item ON itag_itm_ID = post_ID
WHERE post_status = "published" AND post_datestart < NOW()
GROUP BY tag_name
ORDER BY tag_count DESC
LIMIT '.$this->disp_params['max_tags'];
}
else
{
$sql = 'SELECT LOWER(tag_name) AS tag_name, COUNT(DISTINCT itag_itm_ID) AS tag_count
FROM T_items__tag INNER JOIN T_items__itemtag ON itag_tag_ID = tag_ID
INNER JOIN T_postcats ON itag_itm_ID = postcat_post_ID
INNER JOIN T_categories ON postcat_cat_ID = cat_ID
INNER JOIN T_items__item ON itag_itm_ID = post_ID
WHERE cat_blog_ID = '.$Blog->ID.'
AND post_status = "published" AND post_datestart < NOW()
GROUP BY tag_name
ORDER BY tag_count DESC
LIMIT '.$this->disp_params['max_tags'];
}
Where I changed theallblogid with our actual id.
See here for the solution http://blogs.lessthandot.com/index.php/WebDev/WebDesignGraphicsStyling/b2evo-and-the-tagcloud
3 chrissie1 Jan 11, 2009 13:32
Yep that worked even better, well the same but shorter.
4 yabba Jan 11, 2009 13:50
Cool, updated in cvs ;)
¥
See if this works for you instead :
¥