By smazsyr on
Yes a beer. Hell, maybe a burger. To whoever can take the promising Taxonomy Images module and get it in sync with Garland (Drupal 5.x) so I can get it up and running on ScienceBlog.com.
I've banged my head against the wall with this module for a few days, and can't finally get it to do what it's meant to. No doubt I'm missing steps (the really old documentation doesn't help much, nor the many pages of people with similar problems that I've found here.) Now I'm out of ideas. In lieu of a beer and burger, I'll Paypal you $50.
Comments
Can you be a bit more specific
What are you trying to achieve with the taxonomy image module, I might be able to help.
I have a set of icons I'd
I have a set of icons I'd like to associate with my news categories, Slashdot-style. The icons would appear float right in the frontpage teasers. They may or may not appear inside on the stories themselves. Haven't decided.
I have been able to install the module, and upload a test icon. I have then tried to modify the Garland theme, and node.tpl files to call the taxonomy image function and pull the image into place. But it just doesn't work (for me).
I had a false eureka! moment when I thought the problem was that my stories are set by default to limited, as opposed to full html input. But that was a red herring.
What I'd like specifically is modified versions of the Garland theme, node and page files that correctly implement the calls I can't seem to do right.
I suppose on delivery if it turns out it still doesn't show the icons, I'd like a few minutes help looking at whether I've managed to mess up the module install istelf (though I really don't think this is the case.)
Hmm...
I use taxonomy image in Garland without touching the theme at all. But I'm also calling it in a custom module. It works fine for me.
Does the code snippet in http://drupal.org/node/101682 not work?
Nancy W.
Drupal Cookbook (for New Drupallers)
Adding Hidden Design or How To notes in your database
NancyDru
Here is a start
Here is a modified node.tpl.php file for the Garland theme, the key piece is this part which loops through each of the terms and prints the associated taxonomy image. I used the dev version of the module, you can find it here: http://drupal.org/project/taxonomy_image, look under Development snapshots. The code may not be exactly where you want the images but you should be able to move the code to a different part of the template file, just be careful that if you put the code between an existing set of php tags you only need the foreach loop.
node.tpl.php for Garland theme modified to call taxonomy image function
A different solution via template.php...
I just tried using the 5.x-1.0-beta1 release of taxonomy_image, but it didn't store the images properly when I attempted to add them. There was a line like this near the start of the taxonomy_image_form module:
This was leading to an empty action and messing up the form. Simply commenting out this line made the module itself work perfectly. I suspect this is fixed in CVS as others seem to have got it working.
To actually use the images, I followed the instructions at http://drupal.org/node/101682, but noted that this could be done directly in the theme instead of the module. If you want all existing taxonomy images to be used for all node types, you can clone Garland and add this function to your phptemplate template.php:
This just uses the node API code from the taxonomy_image documentation and makes use of it as nodes pass through the themer. There may even be enough information to make this function switch on and off depending on the node type, but I've not looked at that.
I hope that helps.
Andy J
---------
http://anjackson.net/