CVS edit link for chipcleary

I want to help develop the 'answers' module and a set of associated helper modules. 'Answers' might be better called 'Community Questions'. It allows users to raise questions which other users can then answer.

As a start, I have developed a module that allows a site to have what I have called 'Relevant Answers' associated with each page. This works by using hooks to extend 'Answers' so that questions can be associated with specific paths. Once this is done, the questions for a path can then be displayed on the page for that path.

The module provides two blocks which can be used to display these questions. Each block also has a link which enables users to create new questions, if they have the privileges required by the 'Answers' module. Finally, each block has a maximum number of questions it will show. If this number is exceeded, the block adds a 'more' link which will take the user to a listing of all the questions associated with the path.

A demo site is available at: www.relevant-answers.chipcleary.com. From the home page of the demo site:

---
This site provides a playground for the 'Relevant Answers' module.

Relevant Answers enables users to ask questions and get answers about specific pages on a site. A separate set of questions can be created for each distinct drupal path. These questions can be displayed using two blocks which the module provides: 'Popular Questions' and 'Recent Questions'.

For the demo, permissions are set to enable all users to both ask and answer questions. Also, the 'Popular Questions' and 'Recent Questions' blocks are set to appear on every page.

Feel free to post or answer questions (see the blocks on the right sidebar). The site will be reset periodically.

You may want to start by looking at the wattlework fort.

Enjoy.
---

- Chip

Comments

chipcleary’s picture

StatusFileSize
new4.09 KB

Somehow I missed where to attach the code for the module itself. Attached here. - Chip

avpaderno’s picture

See the correct procedure to follow when you want to help co-maintaining a project.

avpaderno’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

Hello, and thanks for applying for a CVS account. The procedure to follow in these cases is different, and creating the CVS application would be the last step to do.

chipcleary’s picture

Thanks for the rapid response. I'm new at this so would appreciate a little more guidance. I have read the docs you suggested.

Reading my submission, I think I understand your response. That said, I also think I wasn't entirely clear on my goal here. As far as co-maintaining the 'Answers' module itself, I have offered help for that directly and that wasn't the reason for the CVS request. I see that as a separate contribution run through the 'Answers' project.

The reason for the CVS request is different. I have developed one module that provides 'bolt-on' functionality to the main 'Answers' project (that's the module in my submission). I anticipate developing others. The goal of these is *not* to rework 'Answers' but rather to provide helpful extensions. (I guess I had in mind the model of where some people offer new field types which bolt-on to support CCK).

Would it be a helpful thing for me to do to: a) define these 'bolt-on' modules and b) offer them through the CVS process? Or is the idea that all such extensions would be clumped into the main project?

Thanks ... would appreciate your guidance on this.

- Chip

avpaderno’s picture

Status: Closed (won't fix) » Needs review

From what you reported as motivation, I misunderstood why you were applying for a CVS account.

chipcleary’s picture

I see. Did what I said above help make my motivation more clear? Are there other questions you have? (I'm a bit unclear on next steps).

Thanks.

- Chip

avpaderno’s picture

Issue tags: +Module review

I am adding the review tags, and some volunteers will review your code, pointing out what needs to be changed.

avpaderno’s picture

Assigned: Unassigned » avpaderno

I will review the code tomorrow morning (which means 18 hours from now).

avpaderno’s picture

Status: Needs review » Needs work
  1. Strings used in the user interface should be in sentence case.
  2. See http://drupal.org/coding-standards to understand how a module should be written. In particular see which string handling functions the code should use (which is generally valid for each function made available from Drupal), and how the code should be formatted.
chipcleary’s picture

StatusFileSize
new3.99 KB

Thanks for your review.

I have made these changes:

  • Used sentence case in the user interface
  • Used drupal version of string functions
  • Modified how the code is formatted (in particular function comments and array formatting)

Would you be able to review the update?

avpaderno’s picture

Status: Needs work » Needs review
avpaderno’s picture

Status: Needs review » Fixed
db_query('SELECT * FROM {quests} WHERE path = \'%s\'', $path);

Don't escape the string delimiter inside a SQL query; if you need to use the string delimiter inside the query, then use the other delimiter for the string.

Thank you for your contribution! I am going to update your account.
These are some recommended readings to help with excellent maintainership:

You can find more contributors chatting on the IRC #drupal-contribute channel. So, come hang out and stay involved.
Thank you, also, for your patience with the review process.
Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

I thank all the dedicated reviewers as well.

Status: Fixed » Closed (fixed)
Issue tags: -Module review

Automatically closed -- issue fixed for 2 weeks with no activity.

avpaderno’s picture

Component: Miscellaneous » new project application
Issue summary: View changes