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.



Search text in files in linux

Use the following command to search any text in the files using the command line in linux.

grep -i -n -r 'pagination' /home/sheetal/xyz

Above command will search pagination text in all files in xyz directory and its subdirectory.




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:

Syndicate content