You are here

function faq_ask_page in FAQ_Ask 6

Same name and namespace in other branches
  1. 6.2 faq_ask.module \faq_ask_page()
  2. 7 faq_ask.module \faq_ask_page()

Get the ask question form.

1 call to faq_ask_page()
faq_ask_block in ./faq_ask.module
Implementation of hook_block(). This creates and populates the "unanswered questions" block.
1 string reference to 'faq_ask_page'
faq_ask_menu in ./faq_ask.module
Implementation of hook_menu().

File

./faq_ask.module, line 134
This module is an add-on to the FAQ module that allows users with the 'ask question' permission to create a question which will be queued for an 'expert' to answer.

Code

function faq_ask_page($tid = NULL) {
  $output = NULL;
  if ($tid) {
    $term = taxonomy_get_term($tid);
    $taxo_image = NULL;
    if (module_exists('taxonomy_image')) {
      $taxo_image = taxonomy_image_display($tid, 'align="left"');
    }
    $output .= '<table id="faq_ask_description"><tr><td>' . $taxo_image . filter_xss($term->description) . '</td></tr></table>';
    $output .= '<div class="clear-block"></div>';
  }
  $output .= drupal_get_form('faq_ask_form', $tid, NULL);
  return $output;
}