Some notes on submitting code to Drupal.org

Posted: May 27th, 2010 | Author: | Filed under: Drupal | Tags: , , , , , , , | No Comments »

The web browsers have improved by leaps and bounds. However it is still a pain for academics to communicate and present their formulas and graphs. Good thing there are now Javascript solutions like MathJAX and JSXGraph to bridge the gap (not to mention relatively cheap bandwidth). However there aren’t that many off the shelf plugins/modules that integrates easily to CMS systems like Drupal.

Recently I helped a friend create a Drupal plugin for JSXGraph. Since all the code is GNU. I applied for CVS access at Drupal.org. Here are some notes:
The code itself:
Formatting: Tab is 2 spaces. Give the Coding Standard document a quick read through.
3rd party code: In my case, the JSXGraph core files are not created by me, so they are not allowed into the drupal.org repository.

    Apply for CVS access:

  1. Have your source code production ready and have them in a zip file.
  2. Make an account on drupal.org.
  3. Apply for CVS access here. Once approved, it is attached to your drupal.org account.
  4. Attached the zip file into the review queue, and set the status tag to “need review”
  5. Patiently wait for volunteers to review your code and suggest changes

    Configure your client for CVS:

  1. I use TortoiseCVS under //s and Windows.
  2. Install Tortoise and create a local directory for CVS files (non zipped) to reside.
  3. Once your code has been reviewed, your Drupal account will be CVS enabled.
  4. Right click on the directory in Step 2 and select Check Out, paste in the CVSROOT information. You will check out all the directories in contribution/modules directory.
  5. Alternatively, I find it easier just to do a cvs checkout -l contributions/modules
  6. Once you have checked out the modules directory, you can create your own.
  7. For more information refer to here.
  8. Move your source files via Explorer into the directory you set Tortoise to in step 2.
  9. You can then Add and Commit the files and files will be added to the CVS!.

    Project Page

  1. Create your project page.
  2. Create a new release node BEFORE you create a new release, if not it will give you some weird errors like ‘The Patch-level must be “x” for snapshot release from a branch (or HEAD)’, even when you got everything right.
  3. Click on “Add New Release” at the Project page.

    Advantages of submitting your code to Drupal.org:

  1. Users of your module will able get to get the latest plugins on their Drupal installations automatically.
  2. You can use drupal.org to handle all feature requests and bug fixes.
  3. It is good to contribute to the greater good of the world.


Leave a Reply

You must be logged in to post a comment.