Multicolumn (http://drupal.org/node/1181988/) is a text filter for Drupal 7. It transforms input such as
<multicolumn type="ol" cols="3">
one
two
three
four
five
</multicolumn>Into three lists, side by side:
|
|
|
The main virtue of this filter is simplicity. Decide how many columns you want, enter one list item per line, and let PHP do the work. It also produces more consistent results than using a single list with the CSS 3 column-count attribute.
The output is themeable. One theme function generates a render element for each column. These render elements are then passed to a second theme function, which arranges them side by side. A custom theme could rewrite only the second of these functions, yet still change the way the individual columns are themed.
The only related project I have found is the Columns filter. This project is listed as "Maintenance status: Minimally maintained; Development status: Maintenance fixes only." I opened an issue, asking if the maintainer was interested in adding my filter to the module. There has been no response in 8 weeks. In 2009, an issue was opened, asking for the functionality of my filter, but it seems that nothing was done. (I will scoot over there next and add a comment to that issue.)
I started this module for my own purposes. See the test page and the real page that will use this module the next time I update it.
My background: I am a web developer by hobby only. I have been learning Drupal for the past couple of years, and this is my first attempt at writing a module that someone else might want to use. I am currently using Drupal for a few web sites that I maintain:
- The Boston Chapter of the Appalachian Mountian Club (AMC)
- Three Mile Island Camp (AMC; my first site using Drupal 7)
- My Boy Scout troop
I have committed a few patches to the Bartik theme and the Examples for Developers project.
Comments
Comment #0.0
benjifisherReformat the example as a table.
Comment #1
benjifisherUpdate the status.
Comment #2
berkas1 commentedYou should add README.txt file to repository - http://drupal.org/node/7765
Comment #3
benjifisherDone. berkas1, thanks for the pointer.
Comment #4
klausi* Git release branch missing, see http://drupal.org/node/1015226
* Please remove all old CVS $Id$ tags, not needed anymore
* info file: only list files there that contain classes or interfaces
* dependencies: please specify all dependencies for your module in the info file (filter module?)
Comment #5
benjifisherklausi, thanks for the corrections.
1. I removed the CVS $Id$ tags.
2. The .test file defines a class, but I removed the .module file from the files section of multicolumn.info.
3. Are you sure I need to specify a dependency on the core Filter module? According to admin/modules, it is "Required by: Drupal." I think that means that you cannot run Drupal without it, and adding Filter as a dependency would just add noise to admin/modules. FWIW, the filter_example module does not list a dependency on the Filter module.
4. My module implements hook_help(), but the module will function properly even if Help is disabled, so I do not think I have to add Help as a dependency.
5. I added a 7.0-1.x-rc1 tag.
If you think I am wrong on point 3 or 4, I would appreciate a pointer to something in the Drupal docs that will clear the confusion.
Comment #6
klausiOh sorry, then of course you don't need the filter module as a dependency.
Did you forget to push your changes? I still see the CVS $Id$ tags in the master branch. Also a 7.x-1.x branch would be nice instead of master.
Comment #7
benjifisher@klausi, thanks for your patience.
I thought I had pushed the changes, but I must have forgotten.
The CVS $Id$ tags are now really gone. This time, I checked http://drupal.org/node/1181988/commits to make sure the commit is really there. (It munged my commit message, turning "$Id$" into "$".)
I added the branch 7.x-1.x and the release tag 7.x-1.0-rc1. In addition to the link you gave me, I found http://drupal.org/node/711070#branches-tags to be helpful.
Comment #8
klausiReview of the 7.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. Please report any bugs to klausi.
manual review:
"protected $web_user;": instance variables should be lowerCamleCase named, see http://drupal.org/node/608152
Otherwise I would say this is excellent work and well documented. RTBC for me.
Comment #9
benjifisher@klausi,
Thank you. I made the three changes you suggested and committed them, referencing this issue.
Then I ran the unit tests and two assertions failed. :-( I realized that I changed the code to output a little less whitespace in the HTML code. I opened the first issue on my issue queue, #1327884: Tests fail because of whitespace changes in code., posted a patch there, and committed it. In the future, if anyone shows an interest in the module, I will wait for someone else to mark my patches RTBC before committing them.
Comment #10
gregglesThanks for your contribution, benjifisher! Welcome to the community of project contributors on drupal.org.
I've granted you the git vetted user role which will let you promote this to a full project and also create new projects as either sandbox or "full" projects depending on which you feel is best.
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
As you continue to work on your module, keep in minde: Commit messages - providing history and credit and Release naming conventions.
Comment #11
benjifisherThank you, klausi and greggles!
Comment #12.0
(not verified) commentedRearrange the list at the bottom. Fix a mis-matched tag.