Learning to code Drupal modules for familytravelog

I'm finally getting around to learning how to code Drupal modules. Well, maybe I should say how to more effectively hack Drupal modules. I've spent the last few weeks working on familytravelog, a new weblog I'm going to be publishing soon on family travel resources. I think I started this project mainly to learn how Drupal modules work, but I'm actually into the idea of doing a different kind of blog now.


[screenshot of familytravelog.com]

I've been deconstructing the page module to learn how to add a new node type to my blog, review.module. I'm using this module to create forms that input the fields used to generate reviews of resorts. See this first review to get an idea of what I'm trying to do. I have the basic review table functioning (inserting/updating, etc.) with the review.module. The next steps for me are to figure out how to generate a query of reviews based on the ratings fields I'm using -- the rating_overall and rating_overall fields are used to generate the stars. What I'd like there is the ability to click on the stars to view other reviews with an equal number of stars. Then I'd like to be able to sort from high to low -- values are 0 to 5. Am sure this won't be difficult.

I also hacked the article.module code to produce my article_browser.module and weblink_browser.module. I found this module to present results by taxonomy a little more to my liking than taxonomy_html or _dhtml. Would be nice if someone came up with a module that functions like facetmap some day. Maybe I will take that on if I have the chops.

Overall, the experience of figuring out how to create a simple node module was really quite painless for me. I have enough know how of PHP to figure out how things work (esp. functions that are in libraries elsewhere), but for someone afraid to figure out this system, I can see how it might be daunting. If you want a lot of control over every little detail that Drupal puts out, the learning curve might seem steep at first. It is still to a great extent, a developer's platform, rather than a naive blogger's platform, unless as a naive blogger you are happy with just publishing your site as Drupal wants to out of the box. Much of Drupal still needs to be better documented in digestable format. I found it easier to just trace the path lback through functions to figure out how one function is called by another rather than finding it in the documents. For instance, not all the form_ functions are documented, so I had to look inside one of the included libraries to figure out what the parameters are for form_select. But if you have the patience to do all of this, I think it's worth it. In the end, I think it will be much easier for me to produce this new site with Drupal than to use some other package or to code it myself -- ugh, I shudder at the thought of that. The possibilities for my sites just seemed to grow immensely in these few weeks.

Comments

01 Jamin Collins
09/26/05 @ 12:14

I notice a reference here to a review module that you were working on. However, the link to an example is broken. Do you still have this module? If so, would you be willing to share it?

02 jibbajabba
09/26/05 @ 14:54

No, never got to it, but still have the need to make one for another project. Sorry.

Advertisement

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <b> <strong> <dd> <dl> <dt> <i> <li> <ol> <u> <ul> <code> <blockquote> <fieldset> <legend> <h6> <span> <img> <div> <p>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options