Avro Phonetic Web User Control for ASP.NET

The idea is pretty simple: A web user control for ASP.NET that loads the Avro Phonetic keyboard and binds the text inputs and text areas.

The control can be downloaded from: http://masnun.googlecode.com/files/Avro.zip

How to use it?

1) Extract Avro.zip and you shall get two files in the Avro folder: “Avro.ascx” and “Avro.ascx.cs”. First one is the user control and second one is the codebehind file.

2) Crate a new website project in Visual Studio or open your existing project.

3) Copy the above mentioned two files (NOT the entire directory, just the files) into your project. For better organization you might want to create a “Controls” directory (if you haven’t already). Paste the two files inside your desired directory.

4) Now, we add the controls to a web form. Open a page, say Default.aspx. Just below the Page directives, add the following Register directives to register the control:

Here, Src is the location to the Avro.ascx file. TagPrefix and TagName makeup the custom tag that loads the control. In this case, you now have a <asp:Avro> tag which you can use to load the control.

5) Let’s add the control:

The control accepts two attributes – “Bangla” and “Callback”. Setting Bangla to “true” or “false” enables or disables Bangla by default. The Callback attribute accepts the name of a Javascript function which is called when the keyboard state changes.

6) Let’s test the control by adding a text area and the defined callback function:

Load the web page in your browser. If you have Firebug installed in Firefox, the callback should print out state of the Bangla layout on the console.

For brevity, here is my entire Default.aspx file:

Avro Phonetic Plugin for WordPress

Rifat vai has released an awesome jQuery plugin which adds Avro Phonetic layout to your text inputs. I converted it into a WordPress Plugin. Hats off to Rifat vai for the awesome job!

How to use it?

Click on the download link below. It should show you the raw php source of the plugin file. Save it as “avro-phonetic.php” and upload the file to “wp-content/plugins/” directory. Now go to your “Plugins” page from WP Dashboard. Activate the plugin.

Download: https://raw.github.com/masnun/Avro-Phonetic-WP-Plugin/master/avro-phonetic.php

Github Repo: https://github.com/masnun/Avro-Phonetic-WP-Plugin

Official Page: http://torifat.github.com/jsAvroPhonetic/

Knows Issues:

  • Doesn’t work with the Visual Editor (TinyMCE) of WordPress. Please use the HTML editor.
  • Doesn’t show any visual clue of which language (English or Bangla) is active.

    It now shows a black box with language identification

    Thanks to the Avro team for the nice icons.

  • Ctrl + M toggles between Bangla and English. It’s your responsibility to let the users know how to use it. The plugin doesn’t have any fancy instructions displayed to the users.

    It now has a widget. Add the widget to your sidebar.

  • Forces to load jQuery 1.7.2 without caring if an older version is already loaded. Had to do this because wp_enque_script() was not loading jQuery on some themes/setup.

    Thanks to Mehdi vai, the loading is now done using JS after checking if a version is loaded already! 🙂

Feel free to fork the codes on Github and send me pull requests. If you’re not used to Git, send me the modifications over email. I shall merge them and commit. My email address is available on masnun.com 🙂

Have fun!

PhpTube: A PHP Class to get download links from Youtube Watch URLs


Let me get to it straight: I wrote a php class that takes a youtube watch url (the typical url to watch a video, the url has a “watch” GET parameter in it) and returns the download links for different available formats of the video. Please note that these links will be valid for the requesting IP address. That is you can not download the videos from other IP addresses except the only one IP adress that actually originated the download request. So if you put it on your server and send these links to your users, they’ll certainly not be able to download from these links since their IP addresses will be different from your server IP address. In that case, you should first download it to your server and then link to those downloaded videos.

You can download the source codes from my github repo: https://github.com/masnun/phptube 🙂

An example:


Quick Hash – A tool to generate hashes on the fly

I very often need md5 hash in my day to day development works. I used to use php or python to generate the md5 hashes by writing a short script.

Today, while trying .NET, I built a GUI tool to generate md5 hash and base64 encoded strings on the fly. The app requires .NET framework 3.5 SP1. It’ll run fine on Windows 7 (and Windows Vista as well, I think) without any additional installations. On earlier systems, you may be required to install .NET framework. You can use it on Linux or Mac via Mono (though I haven’t tested it myself).

I have plans to extend the program and open the source. Will do sometime soon.

Download, Install and give me feedback! 🙂

Firefox Users, Get rid of low quality image from GP Internet

If you’re a Grameen Phone Internet subscriber, you might have noticed that GP Internet users are getting low quality images these days. Here’s a solution I developed. It works only on Firefox. You need to install a special add-on (extension or plugin or whatever you wanna call it) and a script. Please read on for more details.

  1. First download and install the Grease Monkey add on.
  2. Restart firefox.
  3. Install this greasemonkey script after installing Grease Monkey. Click on the “Install” link and a box will prompt you to install it.

It still might not work for facebook. Need to work more 🙂 In fact, in facebook, the JS is messed up. So, I can not fix the mess with my little JS wizardry 😛

Now it works with Facebook and almost all sites. If you find a site it doesn’t work on, please report.

This is my first grease monkey script. I’m amazed to see the power of Grease Monkey. I hope to work more on this platform. I first tried to develop a firefox add on but that didn’t work. But I’m happy nonetheless. A lot of people use Firefox and I believe other browsers also support grease monkey. I’m going to look them up and make another post soon 🙂

I have tried Grease Monkey on Chrome. It doesn’t work. So, you have to stay with Firefox to use this script.

UPDATE: Userscript link added and prepared for one click installation 🙂

Created Another WordPress Theme

I have finally chosen web application engineering as my core subject of specialization. I have always appreciated the beauty and usability of web applications. You can easily paint your dreams on a web page, rather than on a desktop software. As I am still learning about desktop website design from the sites offered from Devio.digital, hence I have been concentrating only on developing mobile web sites. Its been almost three years now I have been doing mobile website design. I loved playing with WML and later XHTML along with bits of HTML. Later, when I realized that I have a good command over PHP, I looked at the web industry. I introduced myself to serious web development through my free lance career. The very first free lance job I got, involved setting a javascript countdown timer. I had to design the page and install the counter with a newsletter subscription form. I was in a mess with HTML and CSS. I was a newbie that time. (In fact, even today I don’t know much designing). Luckily the project was very simple and I didn’t have to code much. But still I got paid $30 🙂 I was inspired and started looking for more and more free lance jobs. Given my lackings in web design skills, I tried to find only projects which required programming alone.You can click this link and learn more. But I had little luck. I always had to play with bits of designing on almost all the projects. Gradually, I started learning HTML and CSS over time. When I joined Leevio, Hasin Vai introduced me to massive designing trends. I was amazed to see the beauty of web designs. Check it out at https://www.akeaweb.com/accessibility-consulting/.

I was using WordPress for my personal website for a long time. I was always interested in the WP API. But somehow I couldn’t make up my mind to do something with the API. Hasin vai inspired me a lot to work on WordPress. Finally, on a good day, I managed to build my first WP plugin — “gaf-text-link”. The plugin was featured by GAF and is available from the affiliates page of GAF (Now, freelancer.com). GAF paid me $100 appreciating my work as a marketing of their service. I was damn motivated to work on WordPress again — because of the money. Whenever I looked at the job listing at my favorite free lance sites, WP related projects were available in a large numbers and many of them involved good price 🙂 My desire to work with WP grew. If you’re interested then click here to buy knownhost wordpress hosting.

I later created another plugin to integrate admob ads into WP. Hasin Vai one day gave me links to a bunch of nice of books on WP. They were great and I really learnt a lot. I coded up my first WP theme which was being used on this site until yesterday night.

From yesterday, I started working to improve my design skills. I started with WP theme design so that I can gather knowledge on two topics from a single work. I have got decent command over CSS based styling now, but I am still falling short in layout designing. My design last night was not up to mark, at least it was not what I wanted. Hasin vai suggested me to use a CSS framework for layout. I had two primary options — fluid.gs for fluid layout and 960.gs for fixed width layout. I chose 960.gs since I wanted my layout to be fixed width. It was cool working with it. It saved me a lot of time and let me do what I really wanted to do! 😀 I am not willing to use raw CSS for layout again 😉

Not only CSS and HTML, I have also worked with GIMP for bit of image editing. I am very new to GIMP. Had to struggle a bit with the interface. I hope I will be able to cope up really soon.

I finished the theme just a few hours ago. I made it widget-ready this time. It’s not bad for me! I will keep digging with designs and see if I can come with something better 🙂

My First WordPress Theme: maSnun.com gets a new look!

It’s been a really long time I have been with WordPress 🙂 I installed wordpress first on a separate sub-domain and liked the power and flexibility of WP. Later I moved the installation directly to http://masnun.com . During this period, I have switched from one theme to another. What I have looked for is simplicity and lots of customization. Obviously none of the themes could satisfy me. I have used some really great themes and appreciated their beauty in this post but all these were overkill for me. I am a simple guy and want everything to be as simple and plain as myself.

I have always wanted to do something with WordPress API by adding Google Analytics to WordPress but couldn’t really concentrate out of laziness. After my first WP plugin became a hit one, I decided to dig deeper into the WP API and then Hasin Vai asked me to study on WP Theme Development. I was looking for this. He sent me the book “WordPress 2.8 Theme Design” by Tessa Blakeley Silver. The book was good theoretically but like always, I didn’t like the idea of reading all those texts. I just skimmed through. But it gave me basics and the confidence to do something with WP Theme Development.

Today afternoon, I started building my first WordPress theme and here it is 🙂 I have built it, maSnun.com gets a new look of it’s own! 🙂 This is of course a hacked version of the famous “default” theme — Kubrick 🙂

The theme I have written has no images – plain HTML and CSS. I have willingly removed the sidebar and ability to add widgets. Instead, I have some plans to put in some static contents to fill up that space. This is just a rough version. I am not very good at CSS and styling. I am basically a developer. So my design was simply rubbish! But the positive side is I have learnt the curves of WP theme development, at least the php portion.

The efforts contributed a lot to my HTML and CSS knowledge as well. It was really a cool experience working it out!

I just love WordPress! 😀

Download: http://masnun.googlecode.com/files/masnun.com-2009-the-wp-theme.zip

Twitter Bot Earns Me Money :)

Well, this came up as a pleasant surprise to me when I logged into my GetAFreeLancer.com account to deactivate the email notification. I have earned $34.2 in August 2009 from affiliate activity. I was puzzled first and then checked out the whole thing. One of the people whom I referred to GAF, created two projects there and I got the commission.

I am quite active on scriptlance and was getting bored with GAF for their very frequent email notification. Finally, I decided to turn off the notifications and deactivate my account. But now that GAF is earning me money from referrals, I am quite happy with them.

The referral links are being spread over the microblogsphere by my twitter bot that collects direct links to available projects on GAF and tweets them. I set up the bot out of experimental purpose but now it looks like it’s gonna be a good money maker as well.

Being inspired by this little surprise , I made some upgrades to the bot. The bot now adds hash sign (#) before important key words to make it search friendly. I also activated a identi.ca and a friendfeed clone of the same bot.

I am thinking of selling this entire bot script at $30. Anyone interested? Bargaining allowed for sure ;-).