In the 'Developing for Drupal' docs, under 'Module developer's guide', the Creating
Drupal 7.x modules
has no tutorial, as the D6 and D5 sections do. I'll work on this.

Comments

arianek’s picture

Issue tags: +developer, +d7docs

tags

jn2’s picture

When I created this issue, I overestimated the time I would have for this project. Helping to test Git before the migration took me on an important detour, and there has been more to do on the dev side than I anticipated.

Now that I've returned to the tutorial, I find that someone else (geoffreyfishing) has begun work on it. I edited one of the pages: Getting Started. It's ready for review and needs the comment removed.

jn2’s picture

Assigned: jn2 » Unassigned
Status: Active » Needs review

Changing status and unassigning myself. If others want to work on this, that's fine. I'll work on it as I can.

jn2’s picture

The Introductory page is also ready to review, if needed. Won't include the outline there until the whole set of pages is farther along.

arianek’s picture

Just gave this a quick look through...

http://drupal.org/node/1074360

- for the "Other modules, including contrib and core" bullet, you might want to link to the main modules page http://drupal.org/project/modules
- for "Drupal documentation" it should link to /documentation

http://drupal.org/node/1074362

- shouldn't the initial module file go into /sites/all/modules? i'm not a "developer" really, but i'm not sure why it would go elsewhere particularly if it's *not* a multisite install. (definitely want a second opinion here!)
- under "coding standards" the "As per the Coding standards, omit the closing ?> tag." closing php tag should probably be in code tags inline.

http://drupal.org/node/1075072

- re: help hooks. they really shouldn't be considered optional, but recommended. there is a standard for d7 help hooks: http://drupal.org/node/632280 that should be followed for contrib (all core modules use this). would be great to link to the standard page.

hope that's relatively helpful! we should try and grab someone for a technical review for sure. try on irc? if you need any comments deleted, ping me. ;)

jn2’s picture

http://drupal.org/node/1074360
I made the two link changes to the introductory page.

http://drupal.org/node/1074362
Sites/default/modules is where 'Drupal 7 Module Development' recommends saving custom modules to separate them from contrib from d.o. Makes a lot of sense to me. But if this is just a quirk of that book and not generally recommended, I can change it. I think the explanation could be clearer, so I'll look into that.

http://drupal.org/node/1075072
This page is not ready yet. What you looked at is what geoffreyfishing put up. I'll have the edit up later this evening (3-16), incorporating your suggestion about the help standards.

Will ping you to discuss some of this.

arianek’s picture

Ah interesting re: the location of custom modules. I would think the book author probably knows better than me, so unless we get an opinion saying otherwise, should be fine. ;)

That's great for the last page. Not sure if I'll be online much later, but probably tomorrow (before I fly home Friday). Will keep an eye on here though!

jn2’s picture

As of 3/16/11:

http://drupal.org/node/1074362
Rewrote the section on folder location for clarity.

http://drupal.org/node/1075072
Split this into two pages. This page now covers only the .info file.

http://drupal.org/node/1095546
This page covers doc block for Doxygen comments and hook_help.

arianek, I'll try to check in with you tomorrow on IRC.

jhodgdon’s picture

Putting custom modules in sites/default/modules vs. sites/all/modules is indeed just a matter of opinion. We recommend putting all custom and contrib modules into sites/all/modules in the INSTALL.txt file distributed with Drupal, so I think we should stick to the same idea in our module dev guide.

jn2’s picture

Okay that's settled. I'll make the change.

jn2’s picture

Assigned: jn2 » Unassigned
Status: Active » Needs review
jn2’s picture

Assigned: Unassigned » jn2
Status: Needs review » Active

Update: Aspilicious has done a tech review as of 3/20/11. These pages may still change some, so hold off on further review for now. I'll change the status back to 'needs review' when I have more up. I'm working on several more pages to finish the block part of the tutorial.

arianek’s picture

Assigned: Unassigned » jn2
Status: Needs review » Active

great - i'll keep checking in on this whenever i skim the queue. ;)

jn2’s picture

Status: Active » Needs review

Ready again for review.

I made some small changes to the first three pages:
http://drupal.org/node/1074362
http://drupal.org/node/1075072
http://drupal.org/node/1095546

Aspilicious has reviewed them in their current state and found no problems. Another look wouldn't hurt, but they should be okay.

These are brand new and have had no review:
http://drupal.org/node/1104464
http://drupal.org/node/1104482
http://drupal.org/node/1104498
http://drupal.org/node/1104510

With these last 4 pages, someone working through the tut will be able to write a working block module. There is more to be adapted, but I want to have the remaining pages all ready to post at once.

arianek’s picture

Status: Needs review » Needs work

Just looked at first three:

- so i think the first lines of those pages "Main topic described:" should be removed. though useful, they break from our standard page format and the info can be moved into the introductory sentence if it's not totally clear in the page title (which would be optimal).

- headings/title should use sentence case (only capitalize first word and any proper names). it's not consistent, and should be updated on all pages so that titles and all headings use this. only exception is headings with filenames at the start, like on http://drupal.org/node/1075072 ".Info File Details" should actually be non caps because of the file name --> ".info file details"

- any page paths should be formatted like this "...bla bla on the Modules administration page (Administer > Modules or http://example.com/admin/modules)..." don't think this was in too many spots but i caught one.

(will review the others in a bit!)

arianek’s picture

And the last 4:

Also just noticed where you do "Important: ..." we normally do a separate paragraph in italics starting with "Please note:" just a small nitpick. ;)

And on second thought, those bolded first lines... despite being not so in line with our typical page style, I'm starting to realize they might actually be really good for people to know they're on the right page. Let's just leave em!

Style looks great. Not sure if you need another tech review, if so post and I'll try and find someone to do one.

Might I add: THESE DOCS ARE FANTASTIC. The writing style, clarify, formatting, etc. are all top notch. So glad to have you on board!

jn2’s picture

Status: Needs work » Needs review

Thanks, arianek. It's nice to be appreciated.

The last 4 pages do need tech review:
http://drupal.org/node/1104464
http://drupal.org/node/1104482
http://drupal.org/node/1104498
http://drupal.org/node/1104510

The original tut had those bold lines at the top. I thought they were helpful to someone who might remember the topic was covered in the tut but not remember which page. They also tell people what to look for as they are reading, sort of to help those things stick in the memory.

I'll go through and check the paths and the title cases, and change 'Important:' to 'Please note:'.

jn2’s picture

Three more pages up that need review, both technical and otherwise:

http://drupal.org/node/1111212
http://drupal.org/node/1111260
http://drupal.org/node/1111280

@arianek
I'm not sure whether it's better to ask for a technical review of sections, 3-4 pages at a time, or all the unreviewed pages at once. There are 7 pages that need technical review now. There will be another 3-4 pages before it's finished.

arianek’s picture

Style/format reviewed those - looking great! Wow, I have no edits to suggest!

Only nitpick is that I'd prefer the paths to config pages to have both the clickthrough path and the URL like the example in the bullets on http://drupal.org/contribute/documentation/guide/style#paths eg. "...on the Modules administration page (Administration > Modules or http://example.com/admin/modules). It's just a suggested format to add that, but I think a lot of people find it useful to be able to cut and paste the path rather than click.

I'll keep doing style reviews if you post more pages here, and if nobody gets a tech review in then once you have a full list of pages to review, I can try and find someone to do the tech review.

jn2’s picture

Another three pages ready for review:

http://drupal.org/node/1118210
http://drupal.org/node/1118216
http://drupal.org/node/1118218

Two more to go, and I think that will be it for now.

arianek’s picture

Can you post a full list of URLs for the pages needing technical review once they're all there? Once they're ready I'll see if I can find someone to do a full read through. :)

jn2’s picture

The tutorial is finished, at least for the moment.

The first three pages have been reviewed by aspilicious. Any reviewer is welcome to read them, if you want to start from the beginning:
http://drupal.org/node/1074362 - Naming the module, where to save it.
http://drupal.org/node/1075072 - .info file
http://drupal.org/node/1095546 - doc blocks and hook_help

The remaining pages all need technical review. A reviewer can start with the first, then follow the book links to the end and catch them all. I'll post all the URLs here:
http://drupal.org/node/1104464
http://drupal.org/node/1104482
http://drupal.org/node/1104498
http://drupal.org/node/1104510
http://drupal.org/node/1111212
http://drupal.org/node/1111260
http://drupal.org/node/1111280
http://drupal.org/node/1118210
http://drupal.org/node/1118216
http://drupal.org/node/1118218
http://drupal.org/node/1128278
http://drupal.org/node/1128366
http://drupal.org/node/1134754

jhodgdon’s picture

Great effort! I will give this all a read-through as soon as I find the time. Thanks!

kim-day’s picture

Assigned: jn2 » kim-day
eliza411’s picture

We should explain the choice of -A in git add -A. I'm glad to edit it myself but don't have time at the moment. I added the explanation.

kim-day’s picture

This documentation is very well done! I reviewed the first 7 pages today and marked them as "No known problems". I'll continue reviewing the rest of the tutorial this week.

jn2’s picture

@kim-day
Thanks for doing this!

apaderno’s picture

Assigned: kim-day » Unassigned
Issue summary: View changes
Status: Needs review » Closed (outdated)