I wrote a new function extending function taxonomy_image_display().
The api function taxonomy_image_url() can get a taxonomy image for any URL within the site. I hope you will accept this small addition to the contributed modules of taxonomy image.
The only missing feature here is adding the alt="xxx" and title="xxx" whenever the default image is used at the end of this function.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | taxonomy_image_url.zip | 2.25 KB | promes |
| taxonomy_image_url.zip | 2.2 KB | promes |
Comments
Comment #1
nancydruI will consider this (even though 5.x is frozen) after you fix some problems:
* No tabs are allowed in Drupal.
* The indentation is not consistent - you have levels coming back out to the left instead of being indented more.
You might want to look at installing the Coder module.
Comment #2
promesHello Nancy,
I am sorry I didn't think of using the coder module. I was told half a year ago this is a must before submitting a new module. But this is my first one to submit to the community.
I am on a tight schedule at this very moment, but I will come back somewhere next week.
PROMES
Comment #3
chasz commented+1
Comment #4
promesI used the coder module. No errors/comments are left.
I don't understand your sentence: "* The indentation is not consistent - you have levels coming back out to the left instead of being indented more.". As far as I know the intentation is correct. Maybe the tabs confused you.
I hope it confirms to the standard now and I hope a lot of people was have fun with my module.
Comment #5
thepanz commented@promes: in Drupal conding standard, no "tabs" (\t) are allowed, replace tabs with two spaces.
Comment #6
promesAs far as I know I replaced all tabs in the second upload. The Coder module doesn't give any warnings anymore on this version.
So why this remark ThePanz? I cannot find any tab anymore ! Just use the second upload file.
Comment #7
thepanz commented@promes: sorry, I was replying to your question about "The indentation is not consistent".
Comment #8
nancydruComment #9
klonostaxonomy_image_display() can be used like so:
taxonomy_image_display($term->tid)to retrieve the taxonomy image for a term and display it.taxonomy_image_url() can be used to get a taxonomy image for any URL within the site.
taxonomy_image_get_url() can be used to retrieve the taxonomy image's URL.
What I need is a function, say... taxonomy_image_url_display() that would be used like so:
taxonomy_image_url_display($term->tid)and that would retrieve the taxonomy image for a term and display it as well as the term's URL.In other words, taxonomy_image_display() returns a
<img>tag while what I am looking for is a<a>tag with the term's associated image liking to the term's page (taxonomy/term/term-nameorcategory/[vocab-raw]/[catpath-raw]if using pathauto).Any help? Or should this be an issue of its own?
Comment #10
pomliane commentedThis version of Taxonomy Image is not supported anymore. The issue is closed for this reason.
Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.
This issue has been automagically closed by a script.