Has anyone added this module into an xtemplate theme? I must admit I'm not sure exactly where to add it since it's docs are geared twoard some of the other template styles.

Any advice?

Thanks!

Comments

red_eye’s picture

bump
any suggestions for getting it working under 4.5 at all?

jon@www.jony.net’s picture

I found this file in cvs, i used it to patch xtemplate.engine and it works.
http://cvs.drupal.org/viewcvs/contributions/modules/taxonomy_image/contr...

red_eye’s picture

Running 4.5? Howd you get the patch meant for xtemplate.theme to apply to the engine?

jon@www.jony.net’s picture

In the current release of drupal 4.5.0 I noticed there no longer is a xtemplate.theme file. How ever, most of the code in xtemplate.engine is identical to the code in xtemplate.engine. I added the second and third and third changes to xtemplate.engine, but not the first change. I can't upload files on drupal.org so here is a link to a node on my site with my modified xtemplate.engine and my modified bluemarine/style.css. The style.css file was changed so that picture classes have a 0 pixel border, because the one pixel border normally around pics looked real bad around the catagory images. Anyways, hope this helps.

http://www.jony.net/node/10

red_eye’s picture

The xtemplate.engine link on your site is dead.

jon@jony.net’s picture

Yeah, I'm surprised no one else noticed this, I guess we're the only two xtemplate users that use taxonomy_image, anyways, very wierd the file was there, but the filestore aparenlty doesnt like .engine files, so i ziped it and put it back up, heres the new url for any one whos still interested.
http://www.jony.net/node/21

red_eye’s picture

Perfect! Thank you so much for the hand, I was lost.

red_eye’s picture

While I'm thinking about it. You should submit a diff for a patch to the module author!!

peekj’s picture

Thanks for this, I will try this too as I am trying to get this to work as well.

iraszl’s picture

I did replace the file with the one you kindly provided. The taxonomy_image module is set up properly. However the image doesn't show up in the Kubrick theme, but it does show in the bluemarine. Do I have to edit any of the template files to include the image?

Pls. give me some direction. Thanks!
---
http://creativebits.org

iraszl’s picture

On the home page the icons work flawless now, but when I open a specific node, either by clicking the title or the comments I don't get to see the taxonomy_image (icon) anymore.

Also, when previewing the new post I get the following error:

warning: Invalid argument supplied for foreach() in /Library/WebServer/Documents/creativebits/themes/engines/cb2k5/node.tpl.php on line 4.

However, the page remains functional and once I post it, it works fine.

I wonder why is this happening? Isn't the node.tpl.php part of all the pages? if it works on the home, shouldn't it work the same way on all the other pages?

Here is the code for the node.tpl.php:

<div class="node<?php print ($sticky) ? " sticky" : ""; ?>"> 
  <?php if ($page == 0): ?> 
  <?php
  foreach ($images as $image) {
    print "<div id=\"taxonomy_image\">" . $image . "</div>";
  }
  ?>
  <h2><a href="/<?php print $node_url ?>" rel="bookmark" title="Permanent Link to <?php print $title ?>"><?php print $title ?></a></h2> 
  <?php endif; ?> 
  <small><?php print $submitted ?></small> 
  <div class="entry"> <?php print $content ?> </div> 
  <?php if ($links): ?> 
  <p class="postmetadata">Posted in <?php print $terms ?> | <?php print $links ?> &#187;</p> 
  <?php endif; ?> 
</div>

here is the code for phptemplate.engine:

...
    if (module_exist('taxonomy_image')) {
      foreach (taxonomy_node_get_terms($node->nid) as $term) {
        $images[] = taxonomy_image_display($term->tid, "alt='$term->name'");
      }
    }
...

Tx!
Ivan

---
http://creativebits.org