Nice module! Just want to know if its possible to have a description/instructions paragraph on top of all the questions. May be have this in the settings area.
thanks 4 this useful module.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | faqnew.zip_.txt | 7.24 KB | nancydru |
| #7 | faq.module_1.txt | 28.19 KB | stella |
| #5 | faq.jpg | 104.5 KB | dnuss |
| #2 | faq.module_descriptions.patch | 2.39 KB | pearcec |
Comments
Comment #1
stella commentedHi,
Could you provide more detail on what these instructions might be? I don't totally follow you.
Cheers,
Stella
Comment #2
pearcec commentedI took a stab at what was requested. I am looking for similar functionality. This page adds a description setting in the FAQ Admin section. It is added to the top of the FAQ page. I also added the description of the category term below the category name as well.
You might want to clean up the code a bit, and add css where desired.
Comment #3
nancydruThis patch seems to work fine as it's coded. Here are some comments:
1) The description is wrapped in paragraph tags. I'd rather leave the HTML to the admin who set it up.
2) Since you mentioned CSS, I'd like to see a DIV wrapper on this.
3) The most critical, IMHO, is that there is only one description. I'd rather see a description for each category (taxo term).
The first two are easily fixed by changing one line (401):
from:
$output = '<div class="content"><div class="faq"><p>'. t($faq_description). '</p>'. $output. $output_answers ."</div></div>\n";to:
$output = '<div class="content"><div class="faq"><div class="faq_description">'. t($faq_description). '</div>'. $output. $output_answers ."</div></div>\n";I'll work on #3 shortly.
Comment #4
pearcec commentednancyw
3) I pull the description from the category description. I figured that made the most sense. And that is how I am using it right now. It works perfectly.
1,2) sounds good to me.
Comment #5
dnuss commentedI have been watching this thread for a few days and have experimented with "wrapping" the category displayed in the content area with a "box" that includes the taxonomy term as the title. I have attached a little screen snippet that shows what it looks like. The "wrapper"
I can supply more info if you would consider adding it into what you are doing now.
Dave
Comment #6
stella commenteddnuss: if you want to submit a patch I'll certainly consider adding it to the module, assuming it works appropriately with the different layouts of categories and questions. It looks pretty good with the 'categories inline' one. I may/may not add the css to CVS as not everyone will want boxes but we may be able to make it configurable.
pearcec: thanks for the patch. I'm currently working on integrating it with the module. As it currently is, it doesn't work correctly with all layouts and actually breaks the 'Clicking on category opens/hides questions and answers under category' option on my browser.
nancyw: I agree with you on points #1 and #2. I'd prefer to use divs rather than paragraphs. For point #3 I think using the category term description is the easiest method.
A new version of the module will be available later today.
Thanks for all your input.
Cheers,
Stella
Comment #7
stella commentedA new version of faq.module can be found in CVS and is also attached to this comment (you will need to drop the .txt extension and backup your existing file before overwriting).
It includes changes for including a FAQ general description (only displayed on main FAQ page, not category FAQ pages) and also the category descriptions. There are some additional changes, including a different layout for 'categories inline' when questions are listed at the top. It is also possible to toggle the display of the category header for answer sections when questions are listed at the top.
If people could tell me whether this suits their needs or if they encounter any problems, that would be great.
Cheers,
Stella
Comment #8
nancydruI still have to learn how to use diff, so I'm attaching the whole module. There are changes to the module, install, and CSS pieces. They do not include any patches made today.
Here's a summary of my changes.
variable_del('faq_category_name');to ".install".<div class="faq_qa_description">and<p>. It turns out that the paragraph tag is a good idea.I was going to go for a more "elegant" solution based on what Image Gallery does, but decided that the patch submitted by pearcec is acceptable.
Warning: If you test the uninstall code, do it in a test system, because it will delete all FAQ nodes.
Comment #9
hectorplus commentedThank you guys, that's what i was trying to explain.
Just some simple text on top of the FAQ page would be nice to inform users how to use it or for whatever other reason, maybe an image?
Thanks everyone.
Comment #10
stella commentedHi,
nancyw - I've added most of the changes you provided, except for the 'faq_category_name' stuff which didn't quite work. I'm also not sure
it should be implemented because it implies that there must be one vocabulary for the FAQ nodes, while the code can support multiple. Also, no questions will appear on the FAQ page with categories enabled until they have both set up some terms in the vocab and edited the individual FAQ nodes to associate them with the appropriate term.
The latest code can be got from CVS.
Oh for producing patch files, you can either do a comparsion against CVS: e.g.
cvs diff -u faq.module > mypatch. Or on unix you can dodiff -u oldfile newfile > mypatchordiff -up oldfile newfile > mypatch. The -p option prints the function name that the difference occurs in. See http://drupal.org/patch and http://drupal.org/diffandpatch for more info.Cheers,
Stella
Comment #11
pearcec commentedhectr,
I don't want to speak for the auther, but I think adding an image would complicate the simplicity of the providing a simple description for the FAQ or FAQ Category. Unless there is a way to embed HTML in this description, I am not certain.
snpower,
Everything works great for what I need. I especially like the enabling the display of the category name. The options aren't completely easy to understand. Fortunately there aren't very many of them. I think we just need to stress to the individuals trying the faq module they should test all the options before complaining something doesn't meet their needs. But that just might be a vain attempt, I am easily as guilty of doing the same thing.
I say roll a release.
Comment #12
nancydru+1 on the release.
Yes, I'm pretty sure the text can contain HTML. I don't see why it couldn't. However, it can be formatted (CSS)differently on different pages, so be careful using images.
Comment #13
hectorplus commentedIt's ready, realease it.
If its a text box, standard textarea, then there should be an option of choosing php, full HTML, or whatever filter the user has added. From here, you could as easily add an image.
I am happy for just plain text, of course.
Comment #14
stella commentedReleased in 5.x-1.2