Posted by NancyDru on November 1, 2007 at 3:45pm
| Project: | Frequently Asked Questions |
| Version: | 5.x-2.5 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | stella |
| Status: | closed (fixed) |
Issue Summary
It would be a great little addition to be able to show the Taxonomy Image in front of the term (faq category) on the FAQ page. If I get a few spare minutes, I might even code a patch for you because this is pretty simple (http://drupal.org/node/101682).
Comments
#1
Oh, yes, I do mean on the "questions/answers in a new page" format.
#2
Here's a patch for this. As you can see, it's pretty simple.
#3
Hi,
I liked this idea but unfortunately not the implementation. I've created a new patch which has the same functionality. The major differences are:
I'd appreciate it if you could try out the new patch and let me know what you think before I commit it to CVS or port it to drupal6.
Cheers,
Stella
#4
Great - better than my patch.
One thing: I don't think the check for "access taxonomy images" is necessary. If they don't have it, the returned image will be null.
Okay, now to try to remember how to apply a patch...
#5
Good point, I didn't realise that. I've attached a new patch which doesn't do this permission check which you should use in place of the other one. If you've already applied the other one then don't mind, it shouldn't break anything.
You can apply a patch on linux systems like "patch -p1 < foo.patch".
Cheers,
Stella
#6
I tried both 2.5 and the -dev release and neither would apply.
#7
Hi Nancy,
I'm not sure why that is, so I've attached a tgz file containing the new faq.module and faq.css. Just copy these over your existing files, but be sure to back them up first!
Cheers,
Stella
#8
I got it now. Thanks.
It works great - far better than what I had done.
One small thing, if your CSS knowledge is better than mine: Since the pictures can be different widths, the category names don't end up in a straight column. I tried adding a wrapper around the image with a width specified, but that didn't fix it.
Any way - RTBC.
#9
Ok checked into CVS, and should be available in the dev release made later today.
Cheers,
Stella
#10
Thanks for doing this. I'm this close || to ready to pull the trigger on my new feature.
#11
CSS question - you'd need to remove the "float: left;" from the img.faq_tax_image in the css file first. You could then add a div around the image and specify a width for that I think.
#12
I believe I did that, but I will try it again.
#13
Okay, I got it working. Here's what I added to my css. I'm submitting a patch to Taxonomy Image to add the wrapper (that way it gets all the places you call it).
.taxonomy_image_wrapper {
float: left;
width: 70px;
margin-bottom: 0.5em;
padding: 0px 0px 0px 0px;
}
img.faq_tax_image {
padding: 0px 0px 0px 0px;
}
.faq_qa_description p {
margin: 5px 0px 0px 0px;
}
.faq .item-list .faq_qa_description a {
font-size: 100%;
font-weight: normal;
}
.faq .item-list li a {
font-size: 120%;
font-weight: bold;
}
.faq_qa .item-list li a {
color: chocolate;
font-size: 110%;
font-weight: normal;
}
.faq_question a {
color: #663300;
padding-left: 20px;
font-size: 115%;
font-family: "Times New Roman", Times, serif;
background-image: url(/files/lullacons/lullacons_pack1/arrow-single-right-red.png);
background-position: left;
background-repeat: no-repeat;
}
#14
Automatically closed -- issue fixed for two weeks with no activity.
#15
Released in faq 5.x-2.6.
Cheers,
Stella