Code / Work

my not-so-boring coding attempts

Drupal Notifier - desktop notification app for Mac

As a part of learning desktop software development I had an idea to bring updates from a Drupal website to the desktop. There have been successful attempts in past to update oneself for updates (like new comments, new content, etc.) from their websites, via e-mail, twitter, etc., but nothing for the desktop.

Initially, I worked on the notifier using Python and Qt framework, however, Cocoa turned out to be more interesting. The current implementation of the notifier is made in Cocoa, which means it'll work only on Mac OS X. I have a working PyQt version too, but it's at a buggy state as I didn't dedicate much time to it. I'll work on the PyQt version sometime soon, so that the Drupal Notifier is well received by Linux and Windows users as well. Smile

This notifier is much generic already to be adopted by other web CMSs supporting XMLRPC protocol. However, I still labelled it with the word "Drupal". Angel ( continue reading... )

Clean URLs for nodes paginated using Paging module

A limitation of Drupal's pager system, that comes as a disappointment to some SEO "freaks" Tongue is the separate "page" query in the URLs to browse multiple pages. Say, a third page on a paginated node would have node/1?page=0,2 in the URL. Instead here's a method to accomplish a better looking version (like node/1/page/3). "Paging Sweet Urls" is a module that converts the "page/X" part in the URL into the actual "page" query that the pager system understands. We also need to override theme_pager_links() to set proper hyperlinks in pager navigation. Still this implementation has a limitation that it cannot handle the functionality with aliased URLs (see below). I believe, it'll need a mod_rewrite apache directive to be able to handle URL aliases. But I'll take up with it some other time.

Also, there's Clean Pagination module providing similar functionality, but not for node pages. It can, however, handle views, etc. URLs. Find the code and instructions ahead.


Download "Paging Sweet Urls" module

( continue reading... )

Drupal Association Badges for Members

If you are a member of the Drupal Association, you are eligible to display a cool badge on your website. Choose one according to your membership status, from either here or here or here:


These tiny (88x31) banners resemble the "Powered By Drupal" banner shipped with Drupal.


Medium size (180x50) copies.


The largest (325x90) of the set. Quite simple and straight forward design with a little shine.

The tiny ones are the real gem, I believe. If you are reading this and use Drupal directly or indirectly, help the Drupal Association and in turn help yourself. Become a Drupal Association Member! Thumb Up

Did I also mention it's Drupal's Birthday today - 15th January!! Happy 8th B'Day Drupal! Party


Download these banners/badges

Squid + VideoCache on Mac OS X Leopard

As the VideoCache website (http://cachevideos.com/ yay Drupal lol ) says:

"VideoCache is a squid URL rewriter plugin written in Python which traps the requests to squid for various audio/video websites and cache the audio/videos in the local storage on proxy server for serving the subsequent requests for the same audio/video. It caches the audio/video independently of squid caching system. The cached files are stored in a browsable fashion."

In short, it caches (i.e. maintains a reusable copy of) all the Youtube, Google Videos, Metacafe, and other services' videos that you play. The fun starts when, upon a page refresh on a youtube video, you don't have to re-download the video. Rather the VideoCache Squid(proxy) plugin comes into action and taps the video request to the one already existing on the hard drive! An awesome solution for LANs and ISPs!

To install Squid and VideoCache on Mac OS X Leopard (10.5) ( continue reading... )