All pastes #895892 Raw Edit

Stuff

public php v1 · immutable
·published 2008-02-08 04:13 UTC
rendered paste body
// Display only Best For vocab termsfunction topnotchthemes2_print_terms($nid) {  $replacements['17'] = array(    'src' =>  '/sites/dev.topnotchthemes.com/themes/topnotchthemes2/images/bestfor-media-on.gif',    'alt' =>  'Best for Media',    'id'  =>  'media',    'width' =>  '',    'height'  =>  '',    'class' =>  'taxonomy_image',  );  $terms = taxonomy_node_get_terms_by_vocabulary($nid, 5);  if ($terms) {     $links = array();    foreach ($terms as $key => $term) {      if ( array_key_exists($term->tid, $replacements) ) {        dpr($replacements[$key]['src']);        $links[] = "<img src=\"$replacements[$key]['src']\">"."media"."</img>";//dpr($links);      } else {         $links[] = l($term->name, taxonomy_term_path($term), array('class' => 'taxonomy_term_'.$term->tid,'rel' => 'tag', 'title' => strip_tags($term->description)));      }    }    $output .= implode(', ', $links);dpr($output);  }  retur