. Hi, all.
I want auto node view popular in a day by user add to nodequeue .
So, my node queue can auto change by time.
It's possiable.
Any idea can help me!

Comments

ezra-g’s picture

Status: Active » Postponed (maintainer needs more info)

Sorry, but I don't understand what you're asking for. Are you talking about keep track of which nodes have been added to a queue the most times in a day?

cuxi’s picture

Yes, I want add auto node most popular in a day to queue.
In a time. example when cron run then node add to queue.

ezra-g’s picture

Interesting feature idea. How would you determine which node is the most popular?

cuxi’s picture

Hi ezra-g .
Example I get 2 node most popular in a day of term id.
If node <> empty then i add it to queue of term. Else i get node old.

$time = $day * 24 * 60 * 60;
	  
			if ($queues[$subqueue->qid]->owner == 'smartqueue_taxonomy') {
	  $args[] = $subqueue->reference;      
      $sql = "SELECT node.nid AS nid, node.title AS node_title,node_counter.totalcount AS node_counter_totalcount FROM {node} node LEFT JOIN {node_counter} node_counter ON node.nid = node_counter.nid INNER JOIN {term_node} term_node ON node.vid = term_node.vid WHERE (node.created >= UNIX_TIMESTAMP() - $time) AND (node_counter.totalcount >= 0) AND node.type IN ($placeholders) AND (term_node.tid = %d) ORDER node_counter_totalcount"; 
      $result = db_query_range($sql, $args, 0, 2);
        if (!empty($result)) {
      while ($row = db_fetch_object($result)) {
      if ($row->nid <> 0) {
        nodequeue_subqueue_add($subqueue, $subqueue, $row->nid);
	  }

But when have not node most popular in time. Then queue empty.
I want when when have not node most popular in time then queue get node old.

marvix’s picture

Really nice idea ... this will be great, reducing the effort of selecting nodes !

amateescu’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

IMO, not going to get in nodequeue, and should be coded in a separate custom module. Feel free to reopen if you have a patch...