You are here

answers.readme.txt in Answers 7

Same filename and directory in other branches
  1. 6.2 answers.readme.txt
  2. 6 answers.readme.txt
  3. 7.2 answers.readme.txt
Non-displayable characters.

File

answers.readme.txt
View source
  1. This file gives a brief guide to the Answers Module.
  2. Last Updated: 5/21/11 by Chip Cleary
  3. This module is based on:
  4. • The original D5 "answers" module written by Amanuel Tewolde.
  5. • The original D6 conversion of that module written by Inders Singh
  6. • The original features version of the module written by Greg Harvey
  7. • The updated features version of the module written by me.
  8. There are 5 relevant roles (these are not drupal system roles but rather types of users for the module):
  9. 1 Viewers: Those who view questions and answers
  10. 2 Question Authors: Those who ask a question.
  11. 3 Answer Authors: Those who answer a question
  12. 4 Site Administrator: Those who have the "administer settings" privilege and who can set up the module
  13. 5 Site Developer: Those who code sites using modules
  14. What the module does:
  15. • Users can create new questions by going to the path 'node/add/question' (in this approach, users are taken directly to the new question form)
  16. • Users can create new questions by going to the path 'questions/start_ask' (in this approach, users are asked to review questions that match theirs first)
  17. • Viewers can review a list of all questions. This is available at the path 'questions/all'
  18. • Viewers can review a list of unanswered questions. This is available at the path 'questions/unanswered'
  19. • Viewers can review a list of questions that match a search query. This is available at the path 'questions/search'
  20. • When viewing the list of questions, viewers can sort by title, post date, and page views
  21. • When displaying a question, the system shows all the answers to that question.
  22. • When deleting a question, also delete all of the answers to it.
  23. 1. Viewer Role:
  24. • The module offers some predefined views to see lists of questions
  25. - 'questions/all': A list of all questions
  26. - 'questions/unanswered': A list of questions without answers
  27. - 'questions/search': A form to search for questions
  28. • Users can view an individual question along with its responses.
  29. • Users can vote a question thumbs up or thumbs down is he has permission.
  30. 2. Question Author Role:
  31. • Users can ask a new question if they have permission. They can do so at 'node/add/question' or by using the Create Content -> Question menu item
  32. • When a user asks a new question, the user can specify whether they want to be notified by email when an answer is posted. This is a checkbox setting on the form used to create the question.
  33. 3. Answer Author Role:
  34. • When viewing a question, a user can enter a new answer if he has permission. This is done by using the 'Post an Answer' link on the question node view.
  35. 4. Site Administrator Role: Site Administrators can define:
  36. • Which drupal system roles can view questions and answers (by setting the permission 'access content')
  37. • Which drupal system roles can ask a new question (by setting the permission 'create question content')
  38. • Which drupal system roles can answer questions (by setting the permission 'create answer content')
  39. • Which drupal system roles can vote responses up/down (by setting the permission 'use vote up/down on nodes')
  40. • Which drupal system roles can see the tally of up/down votes(by setting the permission 'use vote up/down on nodes')
  41. • Whether users can edit or delete their own or others questions and answers (by setting the corresponding permissions)
  42. • The subject and body templates for an email notification (using the path 'admin/settings/answers')
  43. 5. Site Developer Role:
  44. 5.1 To set up the module:
  45. • Install the module
  46. • Configure the administration options (see "Administrator Role" above)
  47. 5.2 A few pointers on how it works:
  48. • The module was developed using the Features module
  49. • It defines two CCK types: Question and Answer
  50. • It defines a couple of views: all_questions and question answers
  51. • It defines a couple of strongarm variables: 'answers_answer_notification_subject' and 'answers_answer_notification_body'
  52. • It employs a small amount of custom code to:
  53. • Provide administrative settings
  54. • Send notification emails
  55. • Make some nice adjustments to the search and new question forms
  56. • Hide the notification option when anonymoous users add questions.
  57. 5.3 Site Developer tips:
  58. • If you want to automatically search for questions that contain a string ...
  59. => You can use the path 'questions/search?keys=your-string'
  60. • If you want to lock a question so that viewers can no longer post new answers
  61. => Set $question_node->field_question_locked_p[0]['value'] = 1; (Or set it to 0 to unlock a question)
  62. • If you want users to ask a question but search for it first, send them to:
  63. => 'questions/start_ask' (if they don't yet have a question)
  64. => 'questions/continue_ask?keys=question-string' (if you do have a question string already)