Porting geshifilter.module to Drupal 5

Actually, I have never used GeSHiFilter for so long since I switched to marksmarty. It is possible to use them both simultaneously but I was too lazy to add

 
or   around the code. Anyway, GeSHiFilter is very useful for code discussion site, e.g., Codenone. That's why I ported this module so far. In addition, this site also has some posts using GeSHiFilter.

Porting a filter from Drupal 4.7 to Drupal 5 is not so difficult.

  1. Create geshifilter.info.
  2. Explicit hook_menu() for system settings.
  3. Rename validate function of the system settings form.

Lastly, I added a checkbox called geshifilter_manual_css to the system settings form. My purpose is to let site admin to override style specified in geshifilter.css in themes. For example, this site has special style for pre so that long code are wrapped in a block properly. The style pre.geshifilter specified in geshifilter.css overrides this perfect setup so the output is very ugly. If you check this checkbox, geshifilter.css will be ignored.

The issue for porting to Drupal 5 was posted. Please try my patch.

Tags: , ,

Post new comment