Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
arianek CreditAttribution: arianek commentedtags
Comment #2
jn2 CreditAttribution: jn2 commentedWhen 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.
Comment #3
jn2 CreditAttribution: jn2 commentedChanging status and unassigning myself. If others want to work on this, that's fine. I'll work on it as I can.
Comment #4
jn2 CreditAttribution: jn2 commentedThe Introductory page is also ready to review, if needed. Won't include the outline there until the whole set of pages is farther along.
Comment #5
arianek CreditAttribution: arianek commentedJust 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. ;)
Comment #6
jn2 CreditAttribution: jn2 commentedhttp://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.
Comment #7
arianek CreditAttribution: arianek commentedAh 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!
Comment #8
jn2 CreditAttribution: jn2 commentedAs 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.
Comment #9
jhodgdonPutting 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.
Comment #10
jn2 CreditAttribution: jn2 commentedOkay that's settled. I'll make the change.
Comment #11
jn2 CreditAttribution: jn2 commentedAll published pages are now ready for review, including:
http://drupal.org/node/1074362
http://drupal.org/node/1075072
http://drupal.org/node/1095546
Comment #12
jn2 CreditAttribution: jn2 commentedUpdate: 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.
Comment #13
arianek CreditAttribution: arianek commentedgreat - i'll keep checking in on this whenever i skim the queue. ;)
Comment #14
jn2 CreditAttribution: jn2 commentedReady 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.
Comment #15
arianek CreditAttribution: arianek commentedJust 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!)
Comment #16
arianek CreditAttribution: arianek commentedAnd 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!
Comment #17
jn2 CreditAttribution: jn2 commentedThanks, 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:'.
Comment #18
jn2 CreditAttribution: jn2 commentedThree 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.
Comment #19
arianek CreditAttribution: arianek commentedStyle/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.
Comment #20
jn2 CreditAttribution: jn2 commentedAnother 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.
Comment #21
arianek CreditAttribution: arianek commentedCan 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. :)
Comment #22
jn2 CreditAttribution: jn2 commentedThe 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
Comment #23
jhodgdonGreat effort! I will give this all a read-through as soon as I find the time. Thanks!
Comment #24
kim-day CreditAttribution: kim-day commentedComment #25
eliza411 CreditAttribution: eliza411 commentedWe should explain the choice of -A inI added the explanation.git add -A
. I'm glad to edit it myself but don't have time at the moment.Comment #26
kim-day CreditAttribution: kim-day commentedThis 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.
Comment #27
jn2 CreditAttribution: jn2 commented@kim-day
Thanks for doing this!
Comment #28
apaderno