Technical Solution
| 3
min read
I was faced with a requirement to convert number to words/string in Indian naming system with lakhs and crores. I had to generate the amount in words for printing it out on a bill. The total amount, provided to the customer, needed to be converted to string. For example, if 1345673 was to be converted to Thirteen lakh Forty Five Thousand Six Hundred and Seventy Three, these functions will have to be followed.
Drupal Technical
| 2
min read
We had recently faced an issue in one of our client's website running on Drupal 5. The site had crashed and we were unable to continue development. We began analyzing the problem by checking the free space on the site and came to the conclusion that the now deprecated PHP Ereg function was causing the site to crash. If you are facing the same issue in one of your Drupal sites, read on to know how we successfully fixed the bug.
Drupal Technical
| 2
min read
My requirement was to detect the mobile devices from the drupal backend and redirect the user to the assigned URL. For this we needed to identify whether the user was accessing the site from a mobile device. For this we had to check the user agent string and compare that with the most common mobile devices. Then depending upon the condition we redirect the user to the corresponding URL.
Technical Solution
| 3
min read
I had a requirement where I had to execute shell command from PHP. The requirement was that I had to find details of a domain using commands like whois and then store this information into files in a folder. The only input parameter for the process was the name of the domain which was passed on from the Drupal site. The PHP function (shell_exec) was designed to do things like this.
Technical Solution
| 2
min read
We need to develop websites for a variety of mobile devices along with regular desktop versions. To do this effectively we need to detect the mobile devices when they access the website which can be done through Javascript. Read on to know how to detect mobile devices using Javascript
Technical Solution
| 2
min read
Have you ever encountered a situation where you have to find a specific pattern in a string and had to replace it with a new pattern in PHP. You will often encounter such situations during web development or any type of programming. Read on to know how to find a specific pattern in a string and replace it with a new pattern using PHP.
Technical Solution
| 2
min read
You might have come across a situation where you need to set the title of the content as the filename for an uploaded image or where you might need to replace the spaces and special characters from the filename of an uploaded file. In such conditions you can use preg_replace. I will show you some example code where the output string will be nice and clean and can be used for setting file names.
Technical Solution
| 1
min read
It is required of every Drupal developer to keep ahead of common browser compatibility issues. IE is probably the most notorious browser in any drupal developer’s dictionary.
IE is a very peculiar browser in terms of standards compliance. Font issues are very common on IE than elsewhere. Here is a small piece of CSS, that seems to work fine everywhere else other than IE: