My patch allow to display teasers also when "Hide Answers" is selected

I used DRUPAL-5 branch

Regards

CommentFileSizeAuthor
#1 faq_176628.patch16.44 KBstella
hide_answer_with_teaser.patch3.11 KBthepanz

Comments

stella’s picture

Assigned: Unassigned » stella
Status: Needs review » Fixed
StatusFileSize
new16.44 KB

I've attached a patch that will allow the usage of teasers, and hence also the "more" link, when the "hide answers" question layout is selected. Unlike the patch you provided, it also works in situations where categories are used and does not allow the use of a "back to top" link for this question layout, as it's not needed. I've also patched the javascript so you can actually configure these options when the "hide answers" layout is selected.

I've added the above to CVS for both drupal-5 and drupal-6 branches, so you can either try out the attached patch or check out the latest version from CVS. It will be included in the next release.

Cheers,
Stella

thepanz’s picture

Nice! I noticed after posting my patch that also faq.js needed to be edited to let teaser checkbox be enabled!

In my patch I moved

$output .= '<dd class="faq_answer">';

outside the if in theme_hide_answer() [near lines 1095 and 1102] 'cause it's always executed... the same edit can be done in theme_category_questions_top() [lines 990 and 997] and theme_category_hide_answer() [lines 1220 and 1236]

I noticed that the you added the t() to labels... nice! :)

Anonymous’s picture

Status: Fixed » Closed (fixed)
stella’s picture

Released in faq 5.x-2.5.

Cheers,
Stella