im trying to create a cloud of node titles (titles of forum topics to be exact) weighted by number of comments. i have succeeded in getting a weighted cloud of numbers (all of which link to the front page of the site, oddly) and an unweighted (all the same size) cloud of forum topic titles. here's what ive got right now thats giving me a weighted cloud of numbers:

Defaults Default settings for this view.
View settings
Tag: None
Basic settings
Name: Defaults
Title: forum title cloud
Style: Unformatted
Row style: Fields
Use AJAX: No
Use pager: No
Items to display: Unlimited
More link: No
Distinct: No
Access: Unrestricted
Caching: None
Exposed form in block: No
Header: None
Footer: None
Empty text: None
Theme: Information

Relationships
None defined

Help Arguments
Node: Comment count
Style: Cloud
Taxonomy: Term ID
Style: Cloud

Fields
Node: Title Title

Sort criteria
None defined

Filters
Node: Type = Forum topic
Node: Published Yes

query looks like this

SELECT node_comment_statistics.comment_count AS node_comment_statistics_comment_count,
COUNT(node.nid) AS num_records
FROM node node
INNER JOIN node_comment_statistics node_comment_statistics ON node.nid = node_comment_statistics.nid
WHERE (node.type in ('forum')) AND (node.status <> 0)
GROUP BY node_comment_statistics_comment_count
ORDER BY node_comment_statistics_comment_count DESC

Comments

mlncn’s picture

It looks like the node title is not being selected in the query? That is odd. Also, i haven't looked at the table, but i think node comment statistics should be giving the count of comments on a node without the weirdness of counting the node nid. I'm probably wrong though.

If the goal is a list of node titles, ordered by most recent, with size varying according to number of comments, probably the Views Cloud module can be dispensed with entirely and the rewrite field capability of Views used to add a class of the number of comments to a link to the node, wrapped around the title field (and possibly with http://drupal.org/project/semanticviews to clean up / remove other markup).

benjamin, agaric

ed523’s picture

hey ben.
thanks for the tip. i'll try this tomorrow. i havent messed with the rewrite field thing before.

ed523’s picture

so if my field is the node title and i rewrite it to include a class, that class is going to apply to all the node titles. it seems like i would need multiple classes, one for each text size in the cloud and some way to apply the right class to the right node title... not sure how id do that.

also i noticed in the view using this cloud module the titles all have classes written by the module (views-cloud-size-1 to be exact) but they are the same class, like it cant tell what to weight them by or something...

mlncn’s picture

That's funny about the module, with just Views i was thinking that as long as you can get the number of comments as a field, you can put that field above the node title field, tell it not to display, and use its token in the rewrite of the node title field.

quicksketch’s picture

Status: Active » Closed (fixed)

You don't need an argument to accomplish what you're trying to do. Just change the View Style from "Unformatted" to "Cloud". See the README.txt file and follow the instructions for "Configuration for a Cloud based on arbitrary integers".