By Stephen on Monday, 31 August 2015
Posted in General Issues
Replies 3
Likes 0
Views 424
Votes 0
I wonder if there is some reason why it is not possible to select which categories build a tag cloud? I am probably not the only user that would want a tag Cloud specifically for the category being viewed.
If I could select a category to pull tags from I could show a more relevant tag cloud for visitors looking at a specific category?
Could this be in a future release??
Hey Stephen,

I am really sorry for the delay of this reply as it is actually a public day off for us here. Hm, this is actually a little tricky. How are you going to associate tags with a category? If you eventually need to link to the blog post to get the relationship between a tag and a category, it's going to be extremely heavy.
·
Tuesday, 01 September 2015 01:17
·
0 Likes
·
0 Votes
·
0 Comments
·
I have done this for filter modules on K2 tags, it was a change to the sql search, a bit tricky but still ok. I am now able to build article lists from a specific category and tag. Great for dynamic menus and automatic landing page content.

My thoughts were to be able to use the Blog categories as separate categories because with a common tag cloud and common tag post list the whole idea of categories seems wrong to me. Everybody assumes a blog is just a WordPress type thing. I think it can be much more powerful.
My use case is on my current licensed URL (the test site listed in the notes) so take a look. I have different categories of blog and they are for different sets of visitors. My site is all about addiction and recovery. So I have several blogs, take the one for recovery stories, I would like to have a tag cloud for recovery stories that was built from only blogs in recovery stories. This way a visitor can now search recovery story blogs using tags. The current approach means if I use the tag cloud visitors may click a tag and get to a post about treatment or addiction, i.e. they move out of the category space. In my example want them to stay within the Recovery Story space and read stories on the tag topic not get pushed into treatment options etc.

So I think two changes are needed in the current tag cloud module, but first it needs a user selected list of categories, like you do in the popular blogs module.
[1] Instead of just counting the occurrences of tag id in the post tag table it would need to also check if a specific tag id was in the allowed group of categories. You get the post id as you count tags and then you can use the post category table to filter the required tags. Agreed this is an additional database lookup but the current post tag table does not have category there is no other option. This way you can build the tag cloud from posts in the specified categories.
[2] When a tag is clicked from the cloud it must be assumed there is a post in the desired categories (because of the work done in [1]). But how it seems you are then forming the list of posts will pull all posts with the selected tag. So the way you build the post list must also filter posts against the specified categories. Again a further database hit checking posts against the post category table.

I might be able to figure out doing this as a hack, but you have done a good job of coding so finding where you do the actual database searches from the tag module has escaped me for now.

I am happy with what I described, I still get the option to keep it working the current way by not specifying any specific categories. But it is now really powerful to be able to use tag intelligently so visitors can stay within a category using Tags.
·
Wednesday, 02 September 2015 01:42
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Stephen,

I am really sorry for the delay of this reply. Thank you for your kind feedback. However as my colleague Mark mentioned earlier, it gonna be extremely heavy in term of sql query as easyblog need to check each tags that are associated with the blog post and then get the categories that are associated with the blog post itself and as a result it could slow down your site drastically.

Perhaps you can voice out your idea inside our easyblog voice page so that other people can give some opinion and vote for it if they agree to your idea, http://stackideas.com/voices/easyblog .
·
Wednesday, 02 September 2015 19:24
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post