Exclude certain tags?

Aug 30, 2012 at 4:02 PM

Hi there,

Fantastic web part this is! I was wondering if you'd considered altering the source to allow for certain tags (by guid) to be excluded? If so, might you be able to share the alteration needed to the source? If not, I'll give it a go and post what I come up with, any guidance is appreciated :-)



Aug 30, 2012 at 4:14 PM

Hi Ben,


I have no plans to do anything with this webpart in nearest future. 

But you very welcome to improve this webpart. I'll be happy to accept the patch.


Kind Regards,


Aug 31, 2012 at 9:16 AM

Ok here's what I've done, this code is clearly not at all optimized and it's all hard coded which suits my needs but won't others. I simply changed the GetTags() method to be as follows (changes underlined):

if (items == null || items.Length == 0)

                wrapper.InvokeNonPublic("EnsureDataAvailable", null);
                var terms = wrapper.TryGetPropertyValue<SocialTerm[]>("Terms");
                SocialTerm[] _terms = (terms as SocialTerm[]);
                SocialTerm[] _newTerms = new SocialTerm[_terms.Length - 1];//The minus 1 is because I KNOW there is an I like it tag to remove
                int i = 0;
                foreach (SocialTerm term in _terms)
                    if (term.Term.Name != "I like it")
                        _newTerms[i] = term;
                var terms2 = _newTerms;
                items = GetTagCloudItemsFromSocialTerms(terms2);
            return items;

Once I've optimized this I will put it here, but I'm going to leave it hard coded to exclude "I like it" as that's what I'm after. Hopefully enough to get anyone started and know where they need to intervene in order to effect which tags are displayed :-)

Cheers again!