The 7.x-1.5 release of this module works just fine except for the part that will only display content on pages that contain taxonomy terms. I found an issue that describes that the dev version has fixed that feature. But for some reason when I place the dev module onto my site I Cannot get anything to display at all. I'm really frustrated with this because I only need that one feature to work.

Comments

bloomt’s picture

Priority: Critical » Minor

I dropped a few lines of code from .module on the dev release into the official release. Works good.

  $this_node = NULL;
  if ($type == NULL && arg(0) == 'node' && is_numeric(arg(1)) && ! arg(2)) {
    $show = TRUE;
    // only check on node pages for now
    $this_node = node_load(arg(1));
    if (isset($this_node->nid)) {
      if (! empty($featured_content['visibility']['content_types']['selected']) &&
        ! in_array($this_node->type, $featured_content['visibility']['content_types']['selected'])) {
        $show = FALSE;
      }
      if (! empty($featured_content['visibility']['users']['selected']) &&
        ! in_array($this_node->uid, $featured_content['visibility']['users']['selected'])) {
        $show = FALSE;
      }
      if ($show) {
        $has_term = FALSE;
        foreach ($vocabularies as $vocabulary) {
          $vid = $vocabulary->vid;
          if (! empty($featured_content['visibility']['vocab'][$vid]['selected'])) {
            $terms = featured_content_taxonomy_node_get_terms($this_node);
            $tid_intersect = array_intersect($featured_content['visibility']['vocab'][$vid]['selected'], array_keys($terms));
            if (! empty($tid_intersect)) {
              $has_term = TRUE;
            }
          }
          if ($has_term) {
            break;
          }
        }
        $show = $has_term; // must have at least one term
      }
    }
  }
bloomt’s picture

Version: 7.x-1.x-dev » 7.x-1.5
Status: Active » Closed (fixed)