Thaana date formatting for PHP 5

Here is a PHP 5 class that provides a drop-in function replacement/equivalent for the built-in PHP date() function to output formatted dates in Thaana/Dhivehi. It follows the standard method of writing Gregorian dates in Thaana by using transliterations of the English month names and using the native Dhivehi names for the week days. It accepts all the usual formatting arguments permitted by the original date() function thus allowing the same degree of formatting freedom as the original. The output returned from the function uses ASCII Thaana and, if needed, can then be converted to Unicode/UTF-8 by using the Thaana Conversions class. This class does not support Hijri dates (yet).

The class is being released under the Open Source MIT License.

Functions exposed

format()
Returns a Dhivehi date string formatted according to the given format string using the given integer timestamp

Usage

<?php
// Load class include
require 'thaana_date.obj.php';

// Format date
$thaanatoday = Thaana_Date::format('j M Y', time());
?>

Download

- Thaana_Date.zip (v0.2, 1.4KB)

Drop me a line if you have comments/queries. Enjoy :-)

Thaana Unicode<->Ascii conversions PHP class

Here is something that would probably be very handy to Maldivian web developers dabbling with Dhivehi sites. This PHP class addresses the need for converting text to and from Thaana in Ascii and Thaana in Unicode.

The class makes it easy to standardize text into one format irrespective of how it was/is written. This means that you can take text written in Accent, MS Word 97 (and prior) or written using Unicode as featured on recent MS Word editions and use the class to present output in the format of your choice without the need for imposing restrictions on the people who write the text. The class comes in even more handy when you have a form submission that takes input in Unicode but needs to be stored in the database or presented later as Ascii, or vice versa.

The class was something I originally wrote around 2001 and was used in the free Online Document Converter that featured on maldivianunderground.net. I rewrote it for PHP 5 recently for use in a project I am working on. The original class had support for Letin dhivehi -> Unicode/Ascii conversions as well which I haven't included in this release but will add it a future update.

Usage should be pretty straightforward but here is an example just to illustrate:

Example:
<?php
require 'thaana_conversions.obj.php';
$thaana = new Thaana_Conversions();

echo $thaana->convertUnicodeToAscii('&#1931;&#1960;&#1928;&#1964;&#1920;&#1960;');
echo $thaana->convertAsciiToUnicode('rWacje');
?>

Download:
- Thaana_Conversions.zip (v0.1, 2KB)

Enjoy :-)

Update (7-May-2008): This version is now superseded by v0.2.

Updated: PHP script for Hulhule flight info

I'm releasing an update to the Hulhule FlightInfo PHP class I released late last year as a response to a feature request I received recently. The update adds support for flight information for all the days as available on the Flight Information Services site rather than the current-day-only mode that the original script supported. A small demo script is packaged in the download to highlight the usage details.

The Hulhule Flight Info class simplifies access to the flight information by doing the dirty work of grabbing the HTML page from the FIS site, parsing it, extracting the required information and making it accessible as a multidimensional array. It supports grabbing both the arrival and departure information and is easy to use. It has since been integrated into a few sites by different people.

- Download the flightinfo class v0.2

Enjoy :-)

Blobsy 2 RC 8 released

Blobsy 2 just had another release checked out today. This latest release - Blobsy 2 RC8 - is, as usual, available at the Blobsy website.

I've fixed a few bugs in this latest release that hindered optimal performance and a few more that prevented desired functionality - including one that prevented the bot from starting conversations by itself. I have also updated the included Demo handler and added another handler to demonstrate the conversation starting abilities more clearly. This has been something that users have been whining for quite a while. Good that I got around to doing this finally :-P

Microsoft has recently allowed bots on its network. It is even running a bot development competition called Invasion of the Robots. They are offering cool cash prizes for the best bots. This is probably a move to promote the new Live Messenger series.

Anyway, I intend on updating Blobsy to the functionality introduced/updated in Windows Live Messenger. Blobsy will be updated/rewritten to be compatible with MSN P13, the communications protocol used by Live Messenger. The rewrite will probably see day light as Blobsy 3 sometime next month.

Blobsy 2 ( beta RC6 ) released

Blobsy 2 ( beta, rc6 ) has been made official today. The release brings together a number of minor updates from various cvs commits over time as well as a few major feature additions by a few other developers. The release comes after a long time of inactivity in the project but hopefully marks a rekindling of more intense development work to keep up with the changes coming with Windows Live Messenger rollout.

Change log
- Upgraded to support MSNP10, MSNP11 and MSNP12
- Personal Status Message support
- Added Challenge Response Generation Object (chl.obj.php)
- Fixed SB WLM8 compatibility bugs
- Fixed SB MSG headers bug
- Removed redundant configuration file entries
- Added Unicode encode/eecode functions
- Fixed MSNFTP bugs and added multiple simultaneous File Transfer support
- Modified MSNP2P functions
- Updated UserRelated to utilise $msn functions


Go to Blobsy homepage

WebSMS for phpBB

In the wee hours of this morning, in a moment of boredom, I wrote up (yet another) little script to send SMS via the Dhiraagu WebSMS facility. This particular one integrates into phpBB forums. I have been bugged for quite some time by several people to write them such a script, so finally here it is!

The script is the result of a quick and dirty job but is decent enough to be used without any problems. There are no configuration options that need to be setup and the script creates the necessary database tables upon first run. The user interface and back-end code has been mixed up into one file to make matters simpler. I may add features in the future to let it be skinned using separate phpBB style templates.

The installation is as simple as placing it in the root phpBB folder and accessing it via a browser. Refer to the "readme.txt" file included for step-by-step install and setup instructions. The script is free for use on your forums/portals. Please keep the credits intact or alternatively add a link to my blog on your site. Enjoy!

Download WebSMS 4 phpBB Version 0.1 (5Kb Zip file)