Add auto node popular to node queue

cuxi - October 3, 2009 - 17:09
Project:Nodequeue
Version:6.x-2.4
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:postponed (maintainer needs more info)
Description

. 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!

#1

ezra-g - October 3, 2009 - 17:11
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?

#2

cuxi - October 4, 2009 - 19:14

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.

#3

ezra-g - October 24, 2009 - 20:57

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

#4

cuxi - October 31, 2009 - 18:01

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.

#5

marvix - December 10, 2009 - 12:36

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

 
 

Drupal is a registered trademark of Dries Buytaert.