I may have misunderstood the purpose of this module. I'm trying to use it with advanced profile to allow users to select their interests from a list, and then click on their interests and see other users who share them. I can't seem to make the terms clickable though - is this something this module is meant to do, and if so how? If not what do I need instead?

Thanks
Matt

Comments

bflora’s picture

I'm having the same problem at the moment...

thinguy’s picture

Same here

eggthing’s picture

Me too, is there a way to turn the terms into link?

pierrelord’s picture

this would be great indeed!!

daniel wentsch’s picture

That's the exact same question I was about to ask.
(I want to use taxonomy fields to let authors add links to taxonomy-based galleries within their content types)

Has somebody made any progress on that issue yet?

daniel wentsch’s picture

Component: Miscellaneous » Code

Okay, I had a quick look on the module itself and hacked it so that it's working the way, I need it to.
It's quick and dirty, but it does the job for me, so if somebody is interested, here's the code.
Starting on line 173 I only changed the return value for $name inside the function cck_taxonomy_field_formatter as follows:

function cck_taxonomy_field_formatter($field, $item, $formatter, $node) {
  switch ($formatter) {
    default:
      $name = db_result(db_query('SELECT name FROM {term_data} WHERE tid = %d', $item['tid']));
      // workaround to create a link to the selected taxonomy term
      // build url and return it
      // attention! hardcoded path for image galleries
      $myurl = 'http://'.$_SERVER['HTTP_HOST'].$GLOBALS['base_path'].'image/tid/'.$item['tid'];
      $name = '<a href="'.$myurl.'">'.$name.'</a>';
      return $name;
  }
}

The way my URL is build is very unflexible, as I hardcoded the path to match the URLs build by image_galley module.
I needed a quick solution and couldn't think of a nicer way.
Maybe it's a starting point for someone else to do more improvement on it.

Regards,
Daniel