I wanted to categorize my content types a special way which basically required a database joint between a taxonomy term (categorie) and content types, the Views module couldn't answer my needs. I went ahead and learnt Drupal in the process.
The module is now completed and I hope it's clean enough to be accepted here, it has a fair use of Drupal API functions.
I give you a clear overview of my module ideas here (with pictures):
http://ifzenelse.net/en/dev-note/ifzenelsenet-drupal-7-module-categorize...
http://ifzenelse.net is my website which is making use of the module, see the left sidebar 'Categorie' block and you can navigate through links to get an idea.
If you want any changes or need help with the code, don't hesitate to ask.
The sandbox page : http://drupal.org/sandbox/ZenMaster/1409284
It's a Drupal 7 module.

Comments

misc’s picture

Status: Needs review » Needs work

Hi there,

You have some coding standards issues, you could check them out here: http://ventral.org/pareview/httpgitdrupalorgsandboxzenmaster1409284git

You work in the master branch, you should not do that, you should work in 7.x-1.x, more about branching here: http://drupal.org/node/1015226.

b2f’s picture

Ok thanks for replying, all these issues has been adressed. Anyone would like to handmake a review of my module ? Please ?

Automated review result :
http://ventral.org/pareview/httpgitdrupalorgsandboxzenmaster1409284git

git clone http://git.drupal.org/sandbox/ZenMaster/1409284.git catagorized_content_menu__ccm_

b2f’s picture

Status: Needs work » Needs review

Changed status to needs review, work done.

misc’s picture

Status: Needs review » Needs work

There are still two errors:

FOUND 2 ERROR(S) AFFECTING 2 LINE(S)
--------------------------------------------------------------------------------
528 | ERROR | Whitespace found at end of line
530 | ERROR | Use "elseif" in place of "else if"
--------------------------------------------------------------------------------

http://ventral.org/pareview/httpgitdrupalorgsandboxzenmaster1409284git

It could take week or months to have a in depth review, usually we modules there are last in the queue is reviewed first (my own sandbox project have been in queue for a while... but I thought If I help out with code standards reviews, maybe someone else have the time to do in depth reviews :-))

b2f’s picture

Yes I it's because I made some changes since the last post... I already done too much commit imo, so I let these two pass.

I understand you have not the time to make a full review, anyway thank you for your support, I learnt indepth PEAR coding standards.

By the way, do I have to commit changes each time I want to check the PAReview.sh script online ? Unfortunatly I run windows 7 and don't feel like installing cygwin.

edit: commit last changes, no more coding style error. need work -> need review

b2f’s picture

Status: Needs work » Needs review
misc’s picture

You could user tools like coder and coder tough love locally without having to install cygwin or similar. But you should do you development work in a separate branch (dev), and that you could commit to and use the PAReview.sh script online on just that branch.

b2f’s picture

Good ideas, thanks for the new branch advice. I already used coder though, it was not as verbose as PAReview.sh.

b2f’s picture

Issue summary: View changes

ifzenelse.net link updated

asifnoor’s picture

Status: Needs review » Needs work

I did a manual review of your module and i notice that the variables need to be fully sanitized.

1. use check_plain and check_markup functions for the variables
2. use check_url functions wherever you are returning url
3. use translate functions t() in hook_help

b2f’s picture

thanks i'll check that, I'm also planning to split the .module in multiple .inc files to improve maintenance & lisibility.

b2f’s picture

Status: Needs work » Needs review

I made a lot of changes, seems good for a review.

- splitted the .module in inc files
- added security checks
- new features added to main module
- created a sitemap submodule which take benefit of categories
- installed pear & phpcs on my computer to try to commit less (still vantral seems to find more errors than my phpcs...)

Anyway, the question I think is, can my module be useful to others ?

misc’s picture

Good, you still have a couple of coding standards issues:

10 | WARNING | Format should be "* Implements hook_foo()." or "Implements
| | hook_foo_BAR_ID_bar() for xyz_bar."
52 | WARNING | Format should be "* Implements hook_foo()." or "Implements
| | hook_foo_BAR_ID_bar() for xyz_bar."
82 | WARNING | Format should be "* Implements hook_foo()." or "Implements
| | hook_foo_BAR_ID_bar() for xyz_bar."

You have included images, where do they come from, is your own work?

I will try to do a manual review later this week if no one else do it fist.

misc’s picture

Status: Needs review » Needs work
b2f’s picture

Alright, no coding standards issues left, added refactoring to sitemap submodule and licenses for images in readmes.
Thanks for your support.
By the way, I had a hard time installing pareview.sh and drush on cygwin... but still it doens't show as mush warning & errors as in vantral.

b2f’s picture

Status: Needs work » Needs review
misc’s picture

It is really a complex module, and it is going to take some time to review it. I start of some small things...

ccm.install
You module seems to be dependent on the vocabulary Categorie, what if the user wants to use another vocabulary, or already uses a vocabulary with that name in another context?
You also create a field on install, field_ccm_categorie, I think it should be better if the the users could define which field they want to use
ccm.module
ccm_uninstall() should be in ccm.install, not ccm.module

More later on...

(You seem to have good documented code, that is going to do the job easier :-))

misc’s picture

Status: Needs review » Needs work

Continue...

Git branch
The branch name 7.x-1.x-dev is not correct, you should remove or rename it. See http://drupal.org/node/1015226
Images
I am not sure if you could include the images, Visual Pharm has another license than Drupal has, and Ajaxload do not specify which license the images have. But that is more than I know....
All variables should have unistall function
You define a couple of variables, they should have the possibility to be unistalled
ccm_help()
You should check if the help module is activated before linking to a help text

I installed the module and tried to add paths for my content types, without luck...

b2f’s picture

Thanks for the review, I'd like to know more about the error you had when installing the module. I really should have made it less case specific.

I also would like to know, if I cancel this module, can I submit another for appliance, one which would be quite different ?

Edit : About the dev branch, my release is not in there but in 7.x, the dev branch was made to check coding style errors according to what you proposed :

But you should do you development work in a separate branch (dev), and that you could commit to and use the PAReview.sh script online on just that branch.

misc’s picture

Dev should be used for your own work - not the work you have for review - that should be in 7.x-1.x.

It is no problem to close this application and open another one.

klausi’s picture

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

Closing due to lack of activity. Feel free to reopen if you are still working on this application.

klausi’s picture

Issue summary: View changes

url changed