An alternate to paginator counter showing page in cakephp

An ordinary yet useful piece of hack to the way the cakephp pagination’s pages “showing page” parameter is displayed. As default, we are used to use $paginator->counter() method which gives us a counter string for the paged result set like “Showing page 1 of 3”. But in my latest project task i needed to show results set something like “Showing 1 to 20 of total 46”. Continue reading

To find mysql recodrs between specific date range based on start date and end date fields

While working on a report generation system i had to perform a query to check whether records exist in ‘reports’ table between a date range received from two form fields “start_date” and “end_date”. To make it more specific i will try to explain it with the help of an example. Continue reading

Joomla Direct Access to This Location Is Not Allowed Error

After installing Joomla! 1.5, i encountered the following warning message saying “Direct Access to this location is not allowed” when changing the template to which i just downloaded from I compared the template files with default templates bundled with 1.5 package and found that configuration files params.ini was missing in my downloaded one. Continue reading