Hi, I want to know if there is a way to create a simple QA page using existing modules? I want a functionality to send question as an e-mail i.e. similar to how anyone can create a new post on the forum. Is it possible to get the question e-mailed to concerned person and that person comes back to the site answers the question.

Any help would be highly appreciated.

Thanks.

Comments

bwv’s picture

I created a question page with CCK; I use modr8 to allow to to moderate the questions I receive. Then I enable comment on the question page, and I reply using the comment field. You can see how I've done it at my record store website.

For email functionality, you can use the notifications module.

cgg7002’s picture

Ask a question page looks great. So, each time a person asks you a question, you receive it on your mail right? Can you explain me how to use modr8? I didn't knew about this module before. How do I set which kind of questions to allow??

Thanks a lot for your quick reply. I appreciate your help.

bwv’s picture

I have not set it up so that I am notified by email, so I do not know when someone has asked a question. But I check the moderated content list every couple of days anyway. If you use the notification module, you can set it up so that you do receive an email when someone asks a question. You will have to read about the module, how to use it, and experiment with it.

The modr8 module allows you to approve of content that is submitted by users before it is published. Again, I suggest you read about the module and experiment with it.

It is up to you what kind of question you allow. With the modr8 module, if you do not want to approve a question, you can just delete it, and it will never be displayed on your site.

cgg7002’s picture

Thanks for all your help. I highly appreciate it. This worked out well for me. I just have one last quick question, how did you create this page? http://classicvinyl.biz/questions/answers

bwv’s picture

I created a View that listed all the titles of the content type called "question." The titles are linked to their nodes. And I used node statistics for the column on the right which shows the number of times each question has been read. Its a very basic view. You can import it if you like, but you will need to tweak it for your content type.

$view = new view;
$view->name = 'question';
$view->description = 'List of questions';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('fields', array(
  'title' => array(
    'id' => 'title',
    'table' => 'node',
    'field' => 'title',
    'label' => 'Question',
    'link_to_node' => TRUE,
  ),
  'comment_count' => array(
    'id' => 'comment_count',
    'table' => 'node_comment_statistics',
    'field' => 'comment_count',
    'label' => 'Answers',
  ),
  'totalcount' => array(
    'label' => 'Views',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
    ),
    'set_precision' => FALSE,
    'precision' => 0,
    'decimal' => '.',
    'separator' => ',',
    'prefix' => '',
    'suffix' => '',
    'exclude' => 0,
    'id' => 'totalcount',
    'table' => 'node_counter',
    'field' => 'totalcount',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
));
$handler->override_option('sorts', array(
  'last_comment_timestamp' => array(
    'order' => 'DESC',
    'granularity' => 'second',
    'id' => 'last_comment_timestamp',
    'table' => 'node_comment_statistics',
    'field' => 'last_comment_timestamp',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
));
$handler->override_option('filters', array(
  'type' => array(
    'id' => 'type',
    'table' => 'node',
    'field' => 'type',
    'operator' => 'in',
    'value' => array(
      '0' => 'question',
    ),
  ),
  'status' => array(
    'id' => 'status',
    'table' => 'node',
    'field' => 'status',
    'value' => '1',
  ),
));
$handler->override_option('access', array(
  'type' => 'none',
  'role' => array(),
  'perm' => '',
));
$handler->override_option('cache', array(
  'type' => 'none',
));
$handler->override_option('title', 'Questions and answers');
$handler->override_option('header', '<hr><h4><p>In response to several inquiries about this site and about the albums listed herein, I have developed this question-and-answer section.  The most recently asked questions appear at the top of the list.</p>  

<p>To ask a question, please click <a href="../node/add/question">here</a>.  Questions are moderated, so please allow at least 24 hours for a response.  Thank you.</p></h4>
<hr>');
$handler->override_option('header_format', '3');
$handler->override_option('header_empty', 0);
$handler->override_option('footer', '<hr>
<hr>
');
$handler->override_option('footer_format', '3');
$handler->override_option('empty_format', '1');
$handler->override_option('items_per_page', '35');
$handler->override_option('use_pager', '1');
$handler->override_option('style_plugin', 'table');
$handler->override_option('style_options', array(
  'columns' => array(),
  'default' => '',
  'info' => array(
    'totalcount' => array(
      'sortable' => TRUE,
    ),
  ),
  'override' => FALSE,
  'order' => 'asc',
));
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->override_option('path', 'questions/answers');
$handler->override_option('menu', array(
  'type' => 'none',
  'title' => '',
  'description' => '',
  'weight' => 0,
  'name' => 'navigation',
));
$handler->override_option('tab_options', array(
  'type' => 'none',
  'title' => '',
  'description' => '',
  'weight' => 0,
));

john.kenney’s picture

this module may be of interest: http://drupal.org/project/faq_ask

don't know much about it myself, except that it exists for something similar to what you are doing.

cgg7002’s picture

Thanks Kenney. But, I specifically need a way e-mail question to the concerned purpose. I had looked into this module but it didn't help much.

sagar ramgade’s picture

Hi all,
We have module contributed for this functionality which uses cck content types for question and answer.
here's the link :
http://drupal.org/node/301632#comment-2617234
Great module already using on production sites.

Acquia certified Developer, Back end and Front specialist
Need help? Please use my contact form