By Richard on Saturday, 12 April 2014
Posted in General Issues
Replies 9
Likes 0
Views 644
Votes 0
I have a restricted viewing area set up with categories in EasyBlog and EasyDiscuss using access levels and everything is working correctly.

However tags do not filter their output with reference to the user and the viewing access level they have, so all tags are shown, even for restricted viewing areas.

If a user clicks on a tag that takes him to an area he is not allowed to see, the blog displays a message "No entries created for this tag yet" and the forum displays a 404 error page.

Is there any way for a tag to reflect the viewing access level in a category for the user so that only the relevant tags (if any) are shown?

If not possible at the moment is it scheduled for a later release?

(Note: This problem applies to both Blog and Forum tags)
Hello Richard,

I am sorry but currently the tags doesn't have it's own access level. We might add this in the future but as of now, it's not possible to restrict tags to specific users.
·
Saturday, 12 April 2014 13:22
·
0 Likes
·
0 Votes
·
0 Comments
·
Sorry if my initial post was not clear Mark, I am not looking for a separate access level for tags or to restrict tags to specific users, only to remove the tags that are being displayed with 0 posts from the tag listing in the toolbar that are shown in addition to the (correct) tags with posts.

There is currently an option in Features in workflow to Hide Empty Categories, but an option to Hide Empty Tags (Y/N) is what I am looking for (or something similar).

The tags in the EasyBlog toolbar listing are working correctly by showing tags with the number of posts that match the categories that are allowed to be viewed by the user. However the listing also shows all the other tags available with a 0 beside them, because the user is not allowed to view the posts in the categories associated with those tags. If the tags with 0 beside them were not visible, it would solve the problem and make the EasyBlog toolbar listing perfect.
·
Saturday, 12 April 2014 20:48
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Richard,

I am sorry but this is currently not possible. You can however customize this by editing the theme file /components/com_easyblog/themes/default/blog.tagcloud.php .
·
Sunday, 13 April 2014 00:41
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you Mark, I have tried to customize the file to obtain the correct result of hiding tags with a zero post count, but my conditional coding is not great and I have been unsuccessful.

I tried variations of the code (in lines 4-6 below) at the top of the file in between the script tags::

EasyBlog.ready(function()
{
eblog.tags.search.init();
if ($('#tags ul li').post_count < 1) {
$('#tags').hide();
}
});


I know I am doing something wrong, perhaps it is a simple addition to the php code on line 48 at the start of the tag listing area.
·
Sunday, 13 April 2014 09:45
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Richard,

Kindly please understand that we will not be able to provide any more customizations as we have been bogged with users trying to request too much customizations. I will be able to help you out just this once. Download the attached file and upload it into /components/com_easyblog/themes/default/ and it will only display tags that are used.

In the future, if you do need customization, please write to us at https://crm.stackideas.com/staff/ and request for a quote. I do think that this would be more appropriate so that it would be fair for everyone.

Thanks for understanding.
·
Sunday, 13 April 2014 15:00
·
0 Likes
·
0 Votes
·
0 Comments
·
Not a problem Mark, thank you for your help.
·
Sunday, 13 April 2014 18:50
·
0 Likes
·
0 Votes
·
0 Comments
·
You are most welcome Does the file work?
·
Sunday, 13 April 2014 21:19
·
0 Likes
·
0 Votes
·
0 Comments
·
Perfect thank you, the code just after line 48 did the trick.

The tag list now accurately reflects the category viewing access for the user (see image below) compared to before when all 30 of my tags were shown (see image in post above).

The toolbar output for blog posts (home icon on left), categories, tags and archive as well as the rss feeds from that output now all reflect the category viewing access for the user perfectly.

I know the category, tag and archive modules will need similar adjustments but there should be enough code examples in the toolbar files for me to update the modules until they are officially updated in a future release.

The tag ACL fix just makes the already excellent EasyBlog component so complete and flexible, as it is not only about controlling visibility of output but making sure visitors/members are not even aware of output they should not see even though they cannot access it. We have fundraising available to all but iGaming is for over 18 only and it is important we get it right.

Thank you again, I really appreciate the 'extra mile' in support.
·
Sunday, 13 April 2014 23:51
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for the heads up on this Richard
·
Monday, 14 April 2014 10:57
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post