sheetal's blog

How to enable Multilingual functionality in drupal

  • First you need to enable the locale and Content Translation core modules of the drupal.
  • Download the i18n module from drupal and enable it.

How to install asterisk server on ubuntu using apt-get

You can install asterisk server on ubuntu using apt-get. Follow the below steps:

sudo apt-get update

sudo apt-get upgrade

sudo apt-get install asterisk


Just three commands and asterisk is installed on your system.



A simple Pagination function in PHP

Following function can be used for pagination blocks. You need to call this function, and print the return string. The return string format is << <> >> i.e. first page link, previous page link, page numbers link, next page link, last page link. You need to add javascript function called paginate(page_no) which takes page no as the argument & in turns do AJAX call for fetching the next records. Argument list for pagination function:

Truncating the text

In many places the description or text needs to be truncated. Following function can be used to truncate the text in such a way that the words are not half chopped up. Argument List:

Find the Age?

In php, you can use the following script to find the age. $age = floor((time() - strtotime($dob))/31556926); where $dob is date in any format.

Syndicate content