Cake PHP .ctp files syntax highlighting in Netbeans

Netbeans by default does not detect or highlight Cake PHP ctp files. .ctp files are cakephp files which is similar to .php files but with the file extension of .ctp. To enable syntax highlighting for Cake PHP files you can go to Tools > Options > Miscellaneous > Files Then click on new button next [...]

Read this article…

How to delete and moderate comments in Facebook comments box plugin?

This tutorial is about how to moderate and delete process works for Facebook Comments box. First of all make sure that you have installed, configured and published JavaScriptSDK plugin and Facebook Social Comments plugin. In JavaScriptSDK plugin setting you must enter Facebook User IDs of the users who you want to allow to be able [...]

Read this article…

MySQL add days to a date in database table

To increase dates in database table run following query and change INTERVAL value to desired value.

Read this article…

How to delete test orders in Magento

Following queries will single Magento orders. where prifix_ is your database table prefix if you use one. 100000001 is the order number that you would like to delete

Read this article…

Time conversions

Use following function to convert time into different units e.g. days, months, years, weeks etc It take the value in seconds.

Read this article…

Shorten a string…

This simple function returns a shorten string back.

Read this article…

How to calculate distance between two locations

A very useful function that can be used to calculate distance between two points using latitude and longitude values. $unit parameter can be passed to get return in miles, kilometers, or nautical miles. How to use: Another function:

Read this article…

Saving default component settings in Joomla 1.6 and 1.7 component installation

When developing a component for Joomla 1.6 / 1.7 I came accross the issue that it does not save defaut values in database. So users had to open component configuration and save to have the settings take effect. Looking into components folder in #__component_name show ‘{}’ meaning no parameters at all. Solueiton was to use postflight [...]

Read this article…

How to install a new language in Joomla 1.5 websites

Joomla content management system comes offers various language packs and translations. You can download language packs from following URL: http://joomlacode.org/gf/project/jtranslation/frs/   Once you have the language files that you want to install on your computer go ahead and login into Joomla backend at [your_website]/administrator and go to Extensions > Install/Uninstall.   After installation you can [...]

Read this article…

Login into a Joomla website using PHP and CURL

Following PHP script uses CURL to login into a Joomla 1.5 website to access private pages.

Read this article…