is it possible for you to make a filter plugin for views (similar to the "node expire" module), to get the state of a node in the queue in every view and not only in the auto generated ones?

Comments

wstopa’s picture

Hey runzipel, I ran into this same issue and notified the developer about it. I can provide you with an easy fix if you would like.

oblacoder’s picture

wstopa, bravo for easy fix! I couldn't find one.
Please, can you share it here, wise man?
Thnx

wstopa’s picture

Sure, sorry I actually created a ticket for this issue, but have yet to post my solution.

For some reason this module only accounts for the auto-generated views, the way around this is to actually modify a function in the module itself or just write a small module to override the function (more elegant).

If you open up the "nodequeue_scheduler.module" file and scroll to the very bottom, you'll see the hook nodequeue_scheduler_views_query_alter()

By default the module provides:

if (strpos($view->name, 'nodequeue_') === 0) {
    $query->where[0]['clauses'][] = nodequeue_scheduler_get_sql_where_clause();
  }

So just add your own elseif:

if (strpos($view->name, 'nodequeue_') === 0) {
    $query->where[0]['clauses'][] = nodequeue_scheduler_get_sql_where_clause();
  }
 else if(strpos($view->name, 'viewname') === 0){
    $query->where[0]['clauses'][] = nodequeue_scheduler_get_sql_where_clause();
 }