Month: February 2011
-
Joomla: $this->baseurl is not working in custom template module
Joomla provides some basic themes which are already installed in the templates folder. When any developer develop the CMS in the joomla , he use his own template with new design. On the index page $this->baseurl works well but when he want to own module then he create a folder in custom template folder. But…
-
Javascript: How to check is valid number or not
Numeric validation require in mostly cases when we want that user enter only numeric value in any text field. For example ‘Age’ field. Obviously, age can not be in string format. Above, I have mentioned javascript function to check that entered value is numeric or not. Please enter only numeric value : Tweet This Post
-
PHP: Regular expression to make linkable url in string
Are you looking for a regular expression to make clickable url in the string? Yes!, you will get your solutions here: echo preg_replace(“/http\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(\/\S*)?/”, “$0”, $string); If you want to open url in new tab then : echo preg_replace(“/http\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(\/\S*)?/”, “$0”, $string); Tweet This Post
-
MySQL: Remove duplicate entry from the databse keeping one record
Sometimes we written a code to enter some dynamic entry in the table but did not want to enter duplicate records for same id ( not primary field). and we found that we have entered many records in the table and not it is not possible to delete record manually. For this we can run…
-
WordPress: Add or remove ‘www’ from your url
In most cases we see that when we try to open any site then it add ‘www’ in the url or remove from the url. This can be manage by Htaccess in general sites on the server. Wordpres provides a good facility to manage this url setting. 1. Go Settings > General 2. Set WordPress…