I find out that metatags doesn't show on Ubercart catalog pages (they have path like "catalog/$tid") so I modify the function _nodewords_detect_type_and_ids() and some extra "case"

switch (arg(0)) {
    case 'node':
      // Node paths: node/$nid
      if (is_numeric(arg(1))) {
        return array('type' => 'node', 'ids' => arg(1));
      }
      break;

    case 'user':
      // User paths translated into nodes: user/$uid -> node/$bio_nid
      if (is_numeric(arg(1)) && module_exists('bio') && variable_get('bio_profile_takeover', 0)) {
        if (($bio_nid = bio_for_user(arg(1)))) {
          return array('type' => 'node', 'ids' => $bio_nid);
        }
      }
      break;

    case 'taxonomy':
      // Taxonomy paths: term/$tid , term/$tid1+$tid2 , vocabulary/$vid
      if (arg(1) == 'term' || arg(1) == 'vocabulary') {
        $ids = preg_split('![+, ]!', arg(2));
        if (count($ids)) {
          return array('type' => arg(1), 'ids' => $ids);
        }
      }
      break;

    case 'catalog':
      // Catalog paths: catalog/$tid [+] by Eugef !!!!!! <------------
      if (is_numeric(arg(1))) {
        return array('type' => 'term', 'ids' => arg(1));
      }
      break;

    case 'forum':
      // Forum paths: forum/$tid , forum/
      if (is_numeric(arg(1))) {
        return array('type' => 'term', 'ids' => arg(1));
      }
      elseif (is_null(arg(1))) {
        return array('type' => 'vocabulary', 'ids' => variable_get('forum_nav_vocabulary', 0));
      }
      break;

    case 'image':
      // Image gallery paths: image/ , image/???/$tid
      if (is_null(arg(1))) {
        return array('type' => 'vocabulary', 'ids' => variable_get('image_gallery_nav_vocabulary', 0));
      }
      else if (is_numeric(arg(2))) {
        return array('type' => 'term', 'ids' => arg(2));
      }
      break;

    case 'taxonomy_menu':
      // Taxonomy menu paths: taxonomy_menu/$vid, taxonomy_menu/$vid/$tid
      if (!is_null(arg(2)) && is_numeric(arg(2))) {
        return array('type' => 'term', 'ids' => arg(2));
      }
      else if (is_numeric(arg(1))) {
        return array('type' => 'vocabulary', 'ids' => arg(1));
      }
      break;
  }

This code works great for me!

Comments

Eugene Fidelin’s picture

One more code version

  case 'catalog':
      // Catalog paths: catalog/$tid [+] by Eugef
      if (is_numeric(arg(1))) {
        return array('type' => 'term', 'ids' => arg(1));
      } else {
        return array('type' => 'vocabulary', 'ids' => variable_get('uc_catalog_vid', 0));
      }
      break;
himagarwal’s picture

great work, i was searching for the same thing. is there a way this code can be added to template.php file, since changing the core module will make it hard for upgrade process.....

asak’s picture

works great!

wflorian’s picture

is there a way this code can be added to template.php file, since changing the core module will make it hard for upgrade process.....

I would be also interested in this...

avpaderno’s picture

Status: Needs review » Closed (won't fix)

As the Drupal 5 version is not supported anymore, I am changing the status of this report.