Drupal
GeSHi - Generic Syntax Highlighter for Drupal
Since howforge.com has lots of contents related to programming techniques and source codes, I have been looking for a good syntax highlighter that supports all codes published in this site such as Python, HTML, XML, bash, C, Java, C#, CSS, JavaScript, SQL, Ruby, and PHP. Today, while editing XML code in DokuWiki, I found it has very powerful syntax highlighter provided by GeSHi. GeSHi is a generic syntax highlighter written in pure PHP. The advantage of GeSHi is its purity, in my opinion. You don’t have to deploy any additional software stacks like perl. Anyway, GeSHi is such a library for developer to call at run-time. To use it as a filter in Drupal, there must be a filter module that wraps GeSHi. Fortunately, vfilby has done geshifilter module for Drupal already. Actually, geshifilter covers all functions existing in codefilter module so you don’t need codefilter anymore.
- sugree's blog
- Add new comment
- Read more
- 1542 reads
Generate .pot files of custom modules in Drupal
Since I developed my own modules in Drupal, now it’s time to translate them into Thai. In order to translate custom modules, I need to generate .pot files from all PHP codes. Drupal provides extractor.php in the translation templates or you may directly get it from CVS. Note that you need PHP command line interface to run extractor.php. In Ubuntu, you can install php4-cli or php5-cli which match to your installation. To generate .pot files, follow below instruction.
- sugree's blog
- Add new comment
- Read more
- 1319 reads
Issues after upgrading to Drupal 4.7.0 beta 6
zendz found some problem regarding to Hall of Fame module. Its menu at the top of all pages has disappeared. I tried to directly access https://howforge.com/hof. The error message was "access denied". Fortunately, I found a patch at http://drupal.org/node/53875. Thanks chrisd and Steven for the patch of External URL support for menus broken by SA-2006-001.
- sugree's blog
- Add new comment
- Read more
- 876 reads
Smooth procedure to upgrade Drupal 4.7.0 beta 5 to beta 6
I have just received the urgent security notification regarding to Drupal all versions. If you are using Drupal, please upgrade immediately! According to the announcement, the latest version are as follows.
- Drupal 4.6.6
- Drupal 4.5.8
- Drupal 4.7.0-beta6
I upgraded howforge.com to beta 6 in last minute. Though, even it is just bugs fix version, there are lots of change from beta 5 to beta 6. Anyway, it is very easy to upgrade. Below is my instruction.
- sugree's blog
- 2 comments
- Read more
- 1150 reads
Fixing incorrect gamma in PNG and Internet Explorer
Yesterday, I would like to create a new logo image for howforge.com, the current one was the default logo. The current logo was in PNG format without transparency since the background was just a plain color #6699cc. Well then, I used PhotoShop to modify that logo to mine and saved it through "Save for web" option aka ImageReady. Unfortunately, my logo was displayed correctly in Firefox but not Internet Explorer. The problem is transparency. Internet Explorer can’t render transparent PNG correctly. So, I managed to add background with color #6699cc and tried again. It didn’t work on IE again, #6699cc in the logo didn’t match to the background in CSS. This seems to be problem of gamma.
- sugree's blog
- 1 comment
- Read more
- 1350 reads
Incompatibility in Drupal 4.7.0 beta 5
Since I have just upgraded howforge.com to Drupal 4.7.0 beta 5, the common task is to test the functionality of all modules. The first module I found bug is ip2cc module. The symptom is that you will never see all flags. This is because Drupal 4.7.0 beta 5 doesn’t rely on base tag anymore! This is very interesting and exciting feature since Drupal use base tag to simplify path creation for so long. For all module maintainers, they have to call url() function to make sure all URLs are valid. Below is the list of modules I have to patch in Drupal 4.7.0 beta 5. Most of them has problem with CSS.
- sugree's blog
- Add new comment
- Read more
- 1472 reads
Recent comments
3 years 34 weeks ago
3 years 39 weeks ago
3 years 39 weeks ago
3 years 40 weeks ago
3 years 40 weeks ago
3 years 42 weeks ago
3 years 42 weeks ago
3 years 42 weeks ago
3 years 43 weeks ago
3 years 43 weeks ago