Views Tagadelic Port to drupal 6 with views 2
thebaron88 - July 21, 2008 - 11:34
| Project: | Views Tagadelic |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | critical |
| Assigned: | thebaron88 |
| Status: | needs review |
Description
I have rewritten the code to work with drupal 6 and the new views 2 plugin system. Can the code please be reviewed and if appropriate submitted to the repository.
N.B. The patch file does not delete the original files as i cant figure out how, it does however empty the files so they do not interfere.
| Attachment | Size |
|---|---|
| views_tagadelic.patch | 24 KB |

#1
I have tested this new version for Drupal 6 and it works perfectly. I think this is certainly ready for a beta release.
I noticed that the new version of the module uses the name views_tagadelic. While this is certainly a more appropriate name, as was stated on the project home page, it might be a bit problematic to change the name of the module in an existing project. Perhaps, given that this new version is a complete rewrite, it should go into a new project called views_tagadelic and this old tagadelic_views module remains for Drupal 5.
#2
subscribe
#3
#4
I haven't reviewed the patch, but the first thing I notice is the GPL notice. IIRC, All Drupal modules come implicitly with the GPL v2. Would it be OK with you if I didn't include the LICENSE.TXT. I don't include it on any of my other modules... And if I were to add one, I'd probably add the GPL v3.
#5
I haven't been able to successfully patch 5.x-1.x-dev up to 6, so if you can release a 6 dev version that would probably work. Sounds like it's ok for the more competent patchers above. ;)
Looking forward to this - thanks!
Al,
#6
I was able to apply the patch, but I wasn't able to create a tag cloud view.
If someone would care to tell me, what did I wrong, I would be very grateful.
I installed all the modules, and created a new view:
I selected the Term view type, and then selected the tagadelic view style.
Then the interface told me I had to define some fields, I entered first the Taxonomy: Term, then the Taxonomy: Weight fields, but in neither cases could I get any output, the Live preview section showed an empty result set.
I do not have other ideas how to solve the problem, so could you tell me, how did you create a Tagadelic view?
#7
Yea, its fine if you miss out the licence, im a bit new to this so i wasnt sure whats needed.
Create a view of item type node.
Add a field such as title so that the nodes are output by views.
Select 'Tagadelic' as the view style.
Leave the advanced options and press update.
A cloud should now be visable with all the tags from the first 10 nodes.
To include more nodes increase the 'Items to display' to a higher number.
If you wish to restrict the items by vocabulary then select this in the settings for the style (comma seperated list).
Seeing as i dont have cvs and its not really a patch I uploded the latest version as a zip to this post.
#8
Thank you for your help, but then the new module is not capable of what I wanted to do with it...
I wanted a similar thing that the built-in tagadelic, so the top 10 or so tags for all of the nodes (it is what tagadelic does out of the box), but I want to filter the result (I don't want some tags to be visible in the output).
I'm not sure about the coding part, but I think, the Term View type is for this reason built (I can get from there even the weight of a tag - how many times had it been used), so I only need a different visualisation for that node type.
But as your solution showed, it is not possible with your implementation.
#9
Yea, sorry, you can only filter the nodes that the tags are collated from and optionally the vocab.
Why would you wish to filter terms, why not make a new vocab with all the terms you want?
#10
When I last time had another vocabulary, it dropped another tag line to the editor - which is plain ugly. :)
Yes, I know I have my special needs, then I have nothing left then produce a special solution. But thank you for your help.
#11
#7 works fine on drupal 6.4. When the views_tagadelic project will be opened?
Edit: I experienced problems with Views 2 RC3 (6.x-2.0-rc3): the patch should be rewritten for RC3 new API.
#12
Version which works with view API 2. I would role a patch but the project doesn't seem to appear in my CVS browser.
#13
Thanks marcingy, now Views Tagadelic 6 works again. I hope the CVS will be updated soon and a dev version will be made available on the project page. Note: the project Views Tagadelic (views_tagadelic) doesn't exists, it should be created from scratch if tagadelic_views is unfit to 6.x.
#14
subscribing
#15
Rename module - not sure how that got transposed.
Plus remove the patch file. I'll get a proper patch rolled this weekend
#16
subscribing - thanks for this module.
#17
subscribing. great module. thanks a lot!
#18
any idea how to move this to the project page for more use and testing?
#19
Hi.
Please, where is this???
3. Download the 6.x version of the views_tagadelic and place its directory into your Drupal
modules directory.
Thanks.
#20
up 4 comments - http://drupal.org/node/285245#comment-1031033 ;-)
#21
I installed the 6.x version and I don't see anything change in Views 2.
All I see for Style options are ... Grid List Table Unformatted. I don't see tagadelic. Am I doing anything wrong?
#22
Same here. I installed the version 6 module and nothing shows up in views 2 under style options.
#23
Actually the module in #15 doesn't work with Views 2, however the module in #12 does (http://drupal.org/node/285245#comment-1030229).
#24
I can confirm #12 works. #15 does not.
#25
I installed #12 and tried to use "tagedelic" style which gave me this error:
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ',,,,,,,,,,,,,,,,,,,,,,,,,,,,) GROUP BY d.tid, d.name, d.vid ORDER BY count DESC ' at line 1 query: SELECT COUNT(*) AS count, d.tid, d.name, d.vid FROM term_data d INNER JOIN term_node n ON d.tid = n.tid WHERE n.nid IN (,,,,,,,,,,,,,,,,,,,,,,,,,,,,,) GROUP BY d.tid, d.name, d.vid ORDER BY count DESC LIMIT 0, 30 in /home/juicy/public_html/modules/views_tagadelic/theme/theme.inc on line 48.
#26
Hi,
I can also confirm #12 works. #15 does not. Could someone make a 6.x-1.x-dev version?
have fun, bye!tom
#27
Subscribe, anyone create a 6.x version please.
#28
It has been created, look into comment #12.
Szy.
#29
Yes your right. But I mean a "real" version that can be checked out of cvs or downloaded as a file - so more "officially".
Currently this module is only available for D5 and there is no version for D6. As we tested the code from comment #12 and the result seems to work for some people it would be nice, if the maintainer could start a release of this module for D6. Maybe DEV-only or a BETA1 of the mentioned code from comment #12.
#30
I just discovered the good news: the version for Drupal 6 is finally in CVS, see http://drupal.org/cvs?commit=167924. Many thanks to indytechcook.
#31
gustav. Thank you for the love. A stable release will be made available once reviewed by douggreen
#32
I have tested the patch. It's good but I think we don't need to restrict weight field options because their some field is number-type but don't inherit from views_field_numeric
#33
Ich have the same problem sammyman #25. Does somebody know how to fix that?
#34
Changing title back.
#35
I've fixed the problem with the MySQL Error. The Tagcloud appears now in the preview, but I cant see the Block in the Sidebar, after i activated the Block.
#36
Hello,
I also have the same problem as #25…
Drupalone, how did you fix it?
Thanks in advance.
#37
subscribe
#38
In order to fix this, you have to replace nid by tid in theme.inc file…
But have the same problem with block display :(
Help welcome!…
Thanks a lot.
#39
MYSQL error issue #376578: SQL error with tagadelic views
I am unable to reproduce the issue. Please give details on the other issue.
#40
I've just installed the 6.x-1.x-dev (2009-Feb-02) version and I've got the same error of comment #25. I've reproduced the bug creating a new views (type: term).
If I create a new view with type: node, the bug is not reproducible.
#41
yes with type: term in views
i have the same warning for the query in theme.inc
when i create a view with type:node, it 's ok
i can see my terms in preview.
but after enabled the block, i don't see it on my page ... no tagadelic blog
subcsribe
#42
I am unclear on how to use this.
I setup a view of type node
I selected the Tagadelic option for style
I cannot add anything to fields. I get the following message under Fields once the Tagadelic style is selected "The style selected does not utilize fields."
I click on the widget next to Tagedelic to see settings.
It asks
Vocabs to use.:
Option 1: I type in "1" which is the vid of my vocabulary interests.
I get "Can't find 1!"
Option 2:
I type in "Interests" which is the name of my vocab
I get:
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ',,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,) AND d.vid IN (1) GROUP BY d.ti' at line 1 query: template_preprocess_views_view_tagadelic /* admin : template_preprocess_views_view_tagadelic */ SELECT COUNT(*) AS count, d.tid, d.name, d.vid FROM term_data d INNER JOIN term_node n ON d.tid = n.tid WHERE n.nid IN (,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,) AND d.vid IN (1) GROUP BY d.tid, d.name, d.vid ORDER BY count DESC LIMIT 0, 500 in /drupal/sites/all/modules/tagadelic_views/theme/theme.inc on line 48.
#43
I have the same errors as activelyOUT, but they are appears in "Term" view type, but we should use "Node" view type with optionally "Vocabs to use" filled with name of vocabulary.
P.S. Please remove "." from labels (now it looks like "Vocabs to use.:").
#44
Strangely the block does appear if it has no content - so if I enter a non-existent vocab in "vocabs to use", the block appears with "Could not find " displayed. Surely there is a small error somewhere when rendering the block? Anyone managed to fix this?
#45
subscribing
#46
I have the same error. The where clause is strange (appart from (,,,,) it says "... ON d.tid = n.tid WHERE n.nid IN (,,,,,) ...":
I found that $view->result is an array of objects with Term IDs (tid) attributes. So we are not dealing with node IDs (nid). Thats why the query should be "WHERE n.tid IN '. $tid_restrictor ..." (I fixed this and attached a patch, please review).
The issue #382858: Block shows up on blocks page, but no content in sidebar solves the problem to show the block (this is also in the patch).
Now it seems to work, but the module does not make much sense, because the tagadelic modul also can provide a tag cloud. I thought the advantage of this module is that we can filter the result (see #141682: access control aware tag clouds #20). For example: I only want the terms of published nodes ... at the moment I can only filter by tid and vid.
#47
I don't know how to filter on node attributes. At the moment I changed the SQL-query in the function template_preprocess_views_view_tagadelic (in file theme.inc) to:
'SELECT COUNT(*) AS count, d.tid, d.name, d.vid FROM {term_data} d INNER JOIN {term_node} t ON d.tid = t.tid INNER JOIN {node} n ON t.nid = n.nid WHERE t.tid IN '. $tid_restrictor . $vid_restrictor .' AND n.status = 1 GROUP BY d.tid, d.name, d.vid ORDER BY count DESC'But I don't like this solution, because it's not dynamic and does not respect other access restrictions by other modules.
Edit:
I have opened a support request issue: #491678: How to incorporate access restrictions and node status
#48
subscribing... i am getting
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ',,,,,,,,) AND d.vid IN (1) GROUP BY d.tid, d.name, d.vid ORDER BY count DESC LIM' at line 1 query: SELECT COUNT(*) AS count, d.tid, d.name, d.vid FROM term_data d INNER JOIN term_node n ON d.tid = n.tid WHERE n.nid IN (,,,,,,,,,) AND d.vid IN (1) GROUP BY d.tid, d.name, d.vid ORDER BY count DESC LIMIT 0, 100 in ..../sites/all/modules/tagadelic_views/theme/theme.inc on line 48.
It's a pretty basic setup for Tagadelic Views...
#49
+1