PHP
How to display information based on geo location using ip2cc
I developed IP to Country module for Drupal last year. The original purpose was to see who visited my site through Search Keywords module. Anyway, it is also possible to use ip2cc module for automatically display information based on geo location.
- sugree's blog
- Add new comment
- Read more
- 2524 reads
How to authenticate Pure-FTPd by Drupal
Pure-FTPd supports various authentication source. I have an application to offer a private storage to Drupal user. In particular, every users share the same data storage since they are all friends. The scenario is that I would like to limit number of concurrent connection for each user to prevent parallel fetching by FlashGet or its friends. So I gave an individual user and limited the concurrent connection instead.
Anyway, I don't want to have duplicated accounts for both Drupal and Pure-FTPd. It would be nice if the account is shared among the two system so users may change their password by themselves.
- sugree's blog
- Add new comment
- Read more
- 1527 reads
What if PHP gives blank page
Last night I saw something weird at Codenone. Actually, it was just a blank page returned from Drupal. PHP was set maximum memory limit to 64MB. It should be sufficient for a small site like Codenone. I noticed that the blank page often occurred on pages with comments. Below are my investigations.
- Blank page will occur only on some nodes with some amount of comments.
- There was no logs in Drupal.
- There was no logs in virtualhost level.
- sugree's blog
- Add new comment
- Read more
- 1802 reads
How to properly change logo in Garland theme
One of the most wonderful thing in Drupal 5 is Garland theme. It is very flexible and simple to modify. In addition, Garland theme is really usable in production site. However, the very first step to make it usable in production site is to change logo and favicon to match what you have. If you notice the header area, Garland allows us to set gradiant from top to bottom of that region. This feature is a good and a bad. It looks good but the question is how to produce the logo to match this gradiant.
As far as I know, transparent PNG is not supported in IE6 and earlier version. The transparent color will be displayed as white. As a result, transaprent PNG must not be used for production site that visitors may use IE to browse the site. In other words, we should produce a logo with the gradiant as its background. The next problem is how to make it align. Actually, Garland theme doesn't provide the template to produce the logo.
The secret is that changing logo in Garland theme is very simple and template is absolutely unnecessary.
- sugree's blog
- 4 comments
- Read more
- 2048 reads
Performance improvement of Drupal 5 against 4.7
Drupal 5 has been released for a while. It comes with lots of changes in APIs as well as in the core engine. One of the reason to drive changing the core engine of Drupal is performance. If you remember the performance comparision of Ruby on Rails, Django and Symfony (read here) last year, the performance result was Django, Ruby on Rails and Symfopy, respectively. Django was outperformed because Python is generally run faster than the rest. Moreover, PHP is always the slowest one even with any kind of accelerator.
Anyway, Drupal may break above results. It's just a matter of time. Drupal 6 is one of the promising CMS I imagine.
- sugree's blog
- 2 comments
- Read more
- 1483 reads
Old theme and new layout
If you notice some weird in this site, there are something wrong since I used this theme. This theme is bluebreeze. It is nearly perfect especially for SEO except only one big problem regarding anchor (see issue). Well, it is also beautiful at least for me. The theme is good but the layout is too advanced for standard CSS. I found another good layout in Aberdeen. Anyway, the theme is not for me at all. So my solution is to use Aberdeen's layout with the bluebreeze's theme.
- sugree's blog
- Add new comment
- Read more
- 1351 reads
Recent comments
3 years 29 weeks ago
3 years 34 weeks ago
3 years 35 weeks ago
3 years 35 weeks ago
3 years 36 weeks ago
3 years 38 weeks ago
3 years 38 weeks ago
3 years 38 weeks ago
3 years 38 weeks ago
3 years 38 weeks ago