php - Drupal's ticketyboo module - limit results -


i'm using ticketyboo module drupal , i'm trying module pick last 3 node items. module doesn't have function built in this.

the module php code follows;

   // build ticker contents    switch ($selection) {       case 'node':          $nodes = explode(',', $nodes);          break;       case 'type':          $r = db_query("select distinct nid {node} type ='%s'", trim($nodes));          $nodes = array();          while ($n = db_fetch_array($r)) {$nodes[] = $n['nid'];}          break;       case 'taxonomy':          $r = db_query("select distinct nid {term_node} tid in (%s)", $nodes);          $nodes = array();          while ($n = db_fetch_array($r)) {$nodes[] = $n['nid'];}          break;    }    $ret = '';    $i=0;    foreach ($nodes $nid) {       $node = node_load(trim($nid));       if ($i > 0) {          $ret .= '<div style="'.$pad_style.'"></div>';       }       $ret .= '<div id="ticketyboo_'.$delta.'_'.$i.'" class="ticketyboo_teaser" style="'.$item_style.'">';       $ret .= '<a href="/node/'.$node->nid . '">'.$node->title . '</a>';       $ret .= '</div>';       $i++;    } 

i thinking use limit, looks need build query in case 'node'.

i grateful if might able help. :)

thank you.

you're more answers in issue queue of module @ http://drupal.org/project/ticketyboo - file support request


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -