Some of my answers are pretty long, it would be helpful to allow teasers.

CommentFileSizeAuthor
#1 faq.module.txt23.39 KBstella

Comments

stella’s picture

Assigned: Unassigned » stella
StatusFileSize
new23.39 KB

Try out the version from CVS. I've also attached it to this comment. The changes were too numerous to make a patch for. Just rename faq.module.txt to faq.module. Please back up your existing copy before you overwrite it!

Stella

nancydru’s picture

Great!

However, we might want to eliminate the more link if the answer is shorter than the teaser length:

    if ($display_vars['use_teaser']) {
      $more_link = '';
      if ($display_vars['more_link'] != '') {
	  $more_link = '&nbsp;&nbsp;<span class="faq_more_link">'.  l($display_vars['more_link'], "node/$node->nid") .'</span>';
      }
      if (strlen($node->teaser) == strlen($node->body)) {
        $answers .= "<dd>". t($node->body). $back_to_top ."</dd>\n";
        }
       else {
          $answers .= "<dd>". t($node->teaser). $more_link. $back_to_top ."</dd>\n";
        }
    }
    else {
      $answers .= "<dd>". t($node->body). $back_to_top ."</dd>\n";
    }
stella’s picture

Status: Active » Fixed

released in 5.x-1.1

stella’s picture

Status: Fixed » Closed (fixed)