Hi,
I need to remove some results from the global biblio result page while they should be shown on other pages with $inline=TRUE. This is a very special case, but the problem is that I must remove those results in biblio_show_results itself. I I just redefine theme_biblio_list I could get a biblio-year div without any results following if all results were to be removed for a certain year.

So I'm going to patch biblio.pages.inc for myself, but I wonder if I could do it in a fashion that it would be a useful features for others and make it a submittable patch. This could be sth. like

function biblio_show_results($result, $count = 0, $attrib = array("sort" => 'year', 'order' => 'DESC'), $args = null,$inline=false) {
:
 while ($node = db_fetch_object($result)) {
    foreach (module_implements('biblio_preprocess_result') as $module) {
      $function = $module . '_biblio_preprocess_result';
      $function ($node, $attrib, $inline);
      if (!isset($node)) continue 2; // break out of 'foreach' and skip one step in 'while'.
   }

  node->biblio_contributors = biblio_load_contributors($node->vid);
:

The isset($node)) is what I would need here, but this way any module could process the result in any way it wants before it gets processed (up to unsetting it to avoid its display).

Any thoughts on this? Could such a patch be useful? If it's just good for me I guess it wouldn't make sense to add it.

Comments

Liam Morland’s picture

Status: Active » Closed (outdated)

This version is no longer maintained. If this issue is still relevant to the Drupal 7 version, please re-open and provide details.