CVS edit link for TheInspector

I want to create an simple chat that is based on comment module. Unlike the existing chat modules this will be more simple and more adapted for media websites where a moderator should be able to filter which messages will be shown and when.

Comments

manuel garcia’s picture

Status: Postponed (maintainer needs more info) » Needs work

Thanks for the interest in contributing to the community!

In order to proceed reviewing this application, please add the module as attachment so we can review it:

You must submit a finished, working module or theme for review along with your application. Upload an archive containing the code to review in the issue automatically created for you by the application. Our review will check for adherence to security best practices, usage of Drupal APIs, and coding standards compliance.

Make sure to have read and understood these two pages:
http://drupal.org/node/59
http://drupal.org/node/539608

avpaderno’s picture

Status: Needs work » Postponed (maintainer needs more info)
TheInspector’s picture

StatusFileSize
new4.67 KB

Here comes the module. It's a simple chat module that depends on the comment module. The difference between other Drupal chat modules is that this one supports a moderated chat where a moderator can choose which messages(comments) to show. To do this you have to change the permissions for the comments module so that not everyone can publish comments without approval. Unlike the comment module the anonymous users first login to the chat(not Drupal login) and then they can write their messages. To get a nice looking interface in the chat you have to write some css code, but in the first stable version of this chat a css file will be included. It's also important to copy the comment-wrapper.tpl.php to the theme path to get it working, I've tried to create a simplechat-wrapper.tpl.php in the module that can be overriden in the theme path, but I havent found a solution for this yet.

Other things on the road map:
-Ajax delete unpublished comments from the chat when they has been published(to avoid duplicates for the moderators).
-Ajax delete the comment form when the chat is closed(read only-mode for comments). This one is useful if you have a chat open just a specific time.
-Ajax update the node body so that the moderator can change the body when the chat has closen.
-Try to find a solution where it's possible for the moderator to answer an unpublished comment.
-Show how many users that is in the chat.
-Let the users customize the settings in the chat.
-Cache the chat.

manuel garcia’s picture

Status: Postponed (maintainer needs more info) » Needs review
TheInspector’s picture

StatusFileSize
new6.19 KB

Here's a new version where the css is included and the code have been checked through the coder module.

pcambra’s picture

Status: Needs review » Needs work

Hi,

In a module like this, where there are plenty of modules that do something similar, I believe you should provide a more explicit definition of what the module does and how it does it. Also, a demo site would be great to have.

Here are some things I've found reviewing the code, please revise http://drupal.org/node/539608 to see which one of them could be blocking.

  • Please, revise your info file, the header should be simply ;$Id$ and it shouldn't include so much information, check this for the info guideline: http://drupal.org/node/231036
  • Same header information goes for the module file, check this http://drupal.org/node/546 for how to implement the Id headers for each file, js files and css files should be corrected as well
  • There are some coding standard issues with the code, please use coder module to correct most of them: http://drupal.org/project/coder
  • I think you should secure simplechat_post_message function as it gets information directly from $_POST
  • In the hook_nodeapi call, you are only switching by $op but not for node type, this means that that code is executed in the view & load op of every node of every content type, this could be a performance issue.
  • There is some commented code that could drive to confusion if someone looks at the files.
  • README.txt file is required with information about what the module does and how to install and configure it to get it working
  • What are you using comment-wrapper.tpl.php for? Please bear in mind that a template with the same name exists in drupal core http://api.drupal.org/api/drupal/modules--comment--comment-wrapper.tpl.p...

Thanks!

TheInspector’s picture

Status: Needs work » Needs review
StatusFileSize
new7.09 KB

http://simplechat.prontodev.se/ is a demo site. The biggest difference between this module and other Drupal chat modules is that this one let users create moderated chats. And as the name says it's very plain and simple, no private chats and no smilies. The chat has been used to let users ask site moderator questions. It's similiar to chats that news papers use to arrange to let users ask an expert questions about a particular topic.

avpaderno’s picture

Issue tags: +Module review

Hello, and thank you for applying for a CVS account. I am adding the review tags, and some volunteers will review the code, pointing out what it needs to be changed.

drupalshrek’s picture

Status: Needs review » Needs work

Hi,

I'm not an expert, so treat the following comments carefully!

1) I see you use "variable_set()". I think this means you also need to do a clean-up by creating a simplechat.install file implementing hook_uninstall(), http://api.drupal.org/api/drupal/developer--hooks--install.php/function/...

2) I don't think you need $id$ in the README.txt

3) I think you need to add the ability to make your module themable. This is to HTML what t() is to translators. Lines like the following I guess cannot easily be themed:

$output .= "<p>" . t('No messages unpublished.') . "</p>";

Check out:
http://drupal.org/node/306
http://drupal.org/node/165706

TheInspector’s picture

Status: Needs work » Needs review
StatusFileSize
new7.16 KB

Now these changes are fixed.

zzolo’s picture

Component: Miscellaneous » miscellaneous
Status: Needs review » Postponed

Hi. Please read all the following and the links provided as this is very important information about your CVS Application:

Drupal.org has moved from CVS to Git! This is a very significant change for the Drupal community and for your application. Please read the following documentation on how this affects and benefits you and the application process:
Migrating from CVS Applications to (Git) Full Project Applications

  • The status of this application will be put to "postponed" and by following the instructions in the above link, you will be able to reopen it.
  • Or if your application has been "needs work" for more than 5 weeks, your application will be marked as "closed (won't fix)". You can still reopen it, by reading the instructions above.
avpaderno’s picture

Issue summary: View changes
Status: Postponed » Closed (won't fix)

As per previous comment, I am setting this issue as Won't fix.
Since new users can now create full projects, applications have a different purpose and they are handled on a different issue queue. See Apply for permission to opt into security advisory coverage for more information.

avpaderno’s picture

Component: miscellaneous » new project application