Patch (to be ported)
Project:
Content Taxonomy
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
22 Mar 2010 at 14:17 UTC
Updated:
24 Jun 2014 at 10:48 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
JoeMcGuire commentedI've extended the formatters to allow comma separated strings, ordered list and unordered list for both links and default text.
I've tried to add it in a way which is scalable for additional formatters.
Comment #2
xjmMarked #303486: Display Type - List as duplicate of this issue.
Comment #3
xjmMarked #581362: Retrieve multiple values for theming as duplicate.
Comment #4
xjmMarked #759556: Display content taxonomy values inline as duplicate. If you'd like this feature, test the patch and post feedback on whether it works and meets your need.
Comment #5
YK85 commentedsubscribing
Comment #6
caschbre commentedI installed the patch and have started to use the link (comma separated) and so far so good. It only took me five minutes to remember to flush the cache. :-)
Comment #7
mpaler commentedpatch works perfectly for me. +1 for inclusion.
Comment #8
JoeMcGuire commentedCan we get this committed to dev?
Comment #9
naero commentedHi there, JoeMcGuire:
I want to report that this patch did not work for me. I applied the patch to the 6.x-1.x-dev module. After uploading the changed files and clearing my caches, I can see the changed "Format" select box with the new formats, however, these formats do not work:
The result is an empty value.
Please let me know how I can help out further. I've modified the status of this issue to "needs work".
Comment #10
naero commentedAn update: it is working now. I had to upgrade CCK to the latest version, so all is well now.
I'm changing the status back to "reviewed & tested by the community". Sorry if this held things up at all. Great job!
Comment #11
YK85 commentedYes, this works great!
+1 for commit
Comment #12
rhymeswithcamera commentedThis patch/functionality is exactly what I was looking for. I have a lot of shared CCK Content Taxonomy fields, and I'm using Display Suite to lay out most of the site. Being able to *easily* apply different formats to these fields for the different build modes is awesome - e.g. label above or inline, comma-separated with or without links, lists with or without links. Great job!
+1 for commit
Comment #13
Annie Rothenberg commentedAre there plans to commit this to the module? I'd really like this functionality but applying a patch is a bit over my head.
Comment #14
rhymeswithcamera commentedI've been developing with this patched version. Some of my fields are multi-value Content Taxonomy fields with a max limit of 5 values. I render these fields as checkboxes and users are allowed to tick off 1 to 5 values. They are required fields, so they have to tick off at least one value.
When I use the field formatter on these max-5 fields, I always get 4 commas in the output - regardless of whether I have one value or 5 values.
Example: Family, Seniors,,,
Is this caused by this patch?
Comment #15
sethviebrock commentedRe: #14
Seems like there might be an issue deeper in Content Taxonomy -- deeper than I have time to explore for my particular project's launch date.
To get around this for now, I added a seemingly harmless if statement in a content_taxonomy.module patched with the patch in comment #1, adding "if( !empty($item['#item']['value']) ){...." in the following function:
Comment #16
rhymeswithcamera commentedSorry for my delayed response. Just tested this workaround. Works great. Thanks!
Comment #17
mstrelan commented+1 for patch in #1
Works a charm and is something that is really lacking
Comment #18
mstrelan commentedChanged my mind... if the field is empty it still shows an empty list item when using Unordered List. Feel free to set back to RTBC or commit if you can't replicate this.
Comment #19
mstrelan commentedUpdate of the patch in #1 to check if the field is empty or not. PS what's up with CVS? 6.x-1.x-dev is not HEAD?
Comment #20
mstrelan commentedAnd here's the same patch but against CVS (6.x-1.x-dev)
Comment #21
kbk commentedComment #22
ck9 commentedcould somebody kindly provide a patched version of the content_taxonomy file? i've tried doing it in windows manually and using cygwin, netbeans, and wingnu32, but with no success. thanks
Comment #23
mstrelan commentedOK apparently my patch above never worked because I was passing the wrong thing to content_taxonomy_content_is_empty(). Here is a re-roll.
@ck9 - patched file below
Comment #24
BeaPower commentedAny updates?
Comment #25
spidersilk commentedJust used the patch in #23 - worked great! Another vote to commit.
Comment #26
BeaPower commentedI applied the patch through ssh but saw no changes. Here is the message:
[root@ip-323 content_taxonomy]# patch -p0 < content_taxonomy_multiple_formatters_cvs_0.patch
(Stripping trailing CRs from patch.)
patching file content_taxonomy.module
Reversed (or previously applied) patch detected! Assume -R? [n] y
patch unexpectedly ends in middle of line
Hunk #4 succeeded at 247 with fuzz 1.
[root@ip-323 content_taxonomy]# patch < content_taxonomy_multiple_formatters_cvs_0.patch
(Stripping trailing CRs from patch.)
patching file content_taxonomy.module
patch unexpectedly ends in middle of line
Hunk #4 succeeded at 309 with fuzz 1.
[root@ip-3233 content_taxonomy]#
Comment #27
spidersilk commentedBeaPower - from the "patch unexpectedly ends in middle of line" part, it sounds like maybe the patch file didn't completely download or upload? Re-applying it when it was already partially applied might cause problems, so it would probably be best to just upload the fully patched file - content_taxonomy.module.txt from comment #23. Just take the .txt off the end and upload it to replace your existing content_taxonomy.module file.
Comment #28
mstrelan commentedJust used #23 on another site and it worked perfectly again, bump for commit
Comment #29
xjmComment #30
japanitrat commentedfor some reason I get the the list output and after it the normal output (links/text in separate divs) without the first item. It seems to me that the formatter processes the first item as list including all items and then goes on with printing the rest of the items normally.
I got the latest version of drupal, cck and content_taxonomy
Comment #31
LGLC commented#23 works amazingly well for me. Thanks!
Comment #32
3dloco commentedThanks! #23 works for me too!
Comment #33
Anonymous (not verified) commentedthanks for this. This issue gave me plenty of headaches today. not anymore.
#23 works great for me so far.
Comment #34
he0x410 commentedWill apply patch #23
Comment #35
Melissamcewen commentedhas this been committed?
Comment #36
xjmDoesn't look like @artem.taranyuk committed it:
https://docs.google.com/present/view?id=0ARCZ5QIal5NIZGhoemJmcTJfNDljc2c...
It sounds like maybe the patch needs to be rerolled against the newer branch?
Comment #37
hanno commentedsubscribe
Comment #38
caponey commentedI have been wondering about this for a long, long, time; this is great. Thank you mstrelan for the patched FILE. I have tried several times to patch modules, and fail, every single time, so when you guys give us patched files, it truly is a generous act, and very much appreciated. Just wanted to chime in with a giant thanks!
Comment #39
Iritscen commentedmstrelan, you are awesome. Thanks so much for the list feature, it's just what I needed. Now if only someone would commit this....
Comment #40
mstrelan commentedHey no worries. I would suggest if you don't want to patch this module just try out Text Formatter. I haven't tried it on D6, but it's very useful on D7 and much more flexible as it doesn't just apply to taxonomy terms.
Comment #41
hockey2112 commentedThanks, this worked great for me!
Comment #42
yan commentedI don't know if this actually ever commited, but at least in the latest version for Drupal 6 is still 6.x-1.0-rc2 (from 2009-Aug-19!). Is there any hope that this feature will make it somehow into a (more or less) stable release?