Sometimes some terms just have so many nodes to not become useful to display in the cloud. Can I blacklist terms from the cloud?
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | tag_blacklist.patch | 2.14 KB | bjacob |
| #13 | tag_blacklist_D6.patch | 2.33 KB | bjacob |
Sometimes some terms just have so many nodes to not become useful to display in the cloud. Can I blacklist terms from the cloud?
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | tag_blacklist.patch | 2.14 KB | bjacob |
| #13 | tag_blacklist_D6.patch | 2.33 KB | bjacob |
Comments
Comment #1
lut4rp commentedThat would need a drastic change in the module. I wonder if this should be implemented?
Comment #2
Flying Drupalist commentedHello, this would be an excellent, excellent feature for me, and is much much desired. Thank you for considering it, though of course whether or not to implement it is up to you. :)
Comment #3
phdhiren commented@Miraploy: Can you give the exact example?
I think if the term is really blacklisted then should be delete, I'm not getting why it need to be blacklisted and not showing on cumulus block?
Comment #4
alliax commentedThe example would be :
a blog about several companies products, instead of having two vocabularies "compagny" and "tags" you use only one and make sure that in all your product page you write the company name along with some tags related to the product (I know it shouldn't be done like that, but if people prefer it that way)
then in a 3D tag cloud you would like to show the most popular tags, but without the company names, so you would add the company names to a blacklist and only the tags would show in the 3D cloud.
Of course we understand that 3D cumulus is based on tagadelic, so when tagadelic outputs X most popular tags, if we have 4 words in the blacklist, the 3D tag cloud will display only X-4 tags.
Comment #5
Flying Drupalist commentedWell my example is this, I have all news items tagged as 'news'. But it's not helpful for 'news' to be on the cloud, because it's 1. too general of a term, and 2. easily accessible from the front page. I would like it to not appear on the cloud, saving the cloud for what the news items are ABOUT. Thanks.
Comment #6
bjacob commented@lut4rp: Why do you think it's a drastic change? Right now I have to think about such a feature more deeply but I think it should be no problem. We add a new textare were users can enter terms. I've written something like that already. If you guys need it and lut4rp is okay with it I can integrate such a feature. I'll go to bed now and tell you tomorrow if it's a problem or not ;)
Comment #7
phdhiren commentedIf this is really required, we need to think how it would be architect? wrong architect in the beginning will create problem at later stage.
Either we need to have separate table, Another way is we have to handle at variables level using get / set variable.
Comment #8
bjacob commentedphdhiren, what do you think would be a disadvantage of using get/ set variables? Why don't we do it like that:
1. Get all tags using tagadelic API.
2. Compare tags with blacklist.
3. Render tags and pass it to the Flash.
In the block settings the user can enter a list of terms. That's it. What do you think?
Comment #9
phdhiren commentedUsing get /set variable
I think only black listed terms should be saved in variables
Advantage:
- Easy to code
Disadvantage:
- If black list term list is huge then may be performance issue
Using table
Advantage
- Separate data, so not affecting the main stream of data
Disadvantage
- Headache to handle one more table, from schema to insert/update
Personally I vote for variable method.
Comment #10
bjacob commentedThat's absolutelly right. There is no question about it. I would also suggest using the variable method. Later it's still possible to integrate a table based solution. I'll code some lines today and upload a patch asap.
Comment #11
lut4rp commentedHmm... Possible to store all blacklisted values in an array.
Comment #12
dman commentedI had a use case for that last year (for a tagadelic style block). We had 100 case studies tagged as such, among other data, but that (and a few other really generic terms for the site) just overwhelmed the tag cloud to the point where we just turned it off.
I think there will only be a handful of dominant words that need to be blacklisted, so the variables table is fine.
Comment #13
bjacob commentedI've created a patch. Please try it out and let me know if it works for you guys.
EDIT: This patch is for D5. I'll create a new patch for D6 as well. Please try it out!
EDIt 2: Here's the patch for D6.
Comment #14
lut4rp commentedThese patches aren't in the correct format. You need to make them from inside the module folder, so that it doesn't carry the full path like C:\ or D:\
In such a case, a Linux or Mac user will not be able to test this. Also, the second patch has no header.
Comment #15
kars-t commentedThe Views version will give you a high level of customization options. I believe this will make it possible to exclude terms.