While working in a CakePHP application in my local computer I usually use Gmail SMTP in CakePHP to send emails from my application which are of course test emails. Previously it worked just fine with the basic settings (as specified…
PDF thumbnail generation in WordPress – You may not need a plugin!
I was working on a WordPress website in which I needed to create thumbnails from PDF file uploads. As I work with WordPress less frequently these day I was not aware of an amazing update and fact about PDF thumbnail…
How to add nofollow link attribute for SEO purpose
Sometimes you don’t want a page to be indexed by search engine robots. The reason could be as simple as you dont want people to find a page as it is not important. For example, I have a website portfolio…
How to use Router::url() to generate an URL in CakePHP 3
In CakePHP 2.x we used Router::url([]) to generate URL in any file. It works almost same with two major differennces though. The first one is that we have to call Router class manually wherever we want to use this function.
Foundation 6 Block Grid Media list is here
I was looking for this for a while and then finally found it here after having some trouble with search. Posting it here hoping for a someone to land up here before they could find the actual page in organic…
Using Cake Bake Console with both CakePHP 2.x and 3.x
I got started with my new CakePHP 3.x project today. As usual I wanted to create a few scaffold using cake bake command. As I already had a CakePHP 2.x setup in my machine. I still needed it and its cake bake…
Optimize Images to save Space and Make Website Loading Faster!!
This is an email I wrote to one of my clients to ask him to optimize images before uploading. This client was hosting his website on my hostgator reseller account. Hello Xyz, Today I received an Excessive Resources Usage warning…
How to Get Start & End dates of a Week by given Date
The following function gets start and end date of a week for a given date supplied in valid date string format. In the following function $week is the number of week in the year. For example the current week is…
How to add or remove a git submodule?
While a git sub module could be added with a single line command such as: git submodule add https://github.com/UrlToRepository.git foldernameofrepository it can be cumbersome to remove a submodule. There are various steps involved such as given in the next paragraph.…
How to set Cakephp paginator url for custom Route
I was making a url route like this: [php]Router::connect(‘/ca/assets’, array(‘plugin’ => ‘file_manager’, ‘controller’ => ‘file_manager’, ‘action’ => ‘assets’, ‘ca’));[/php] It worked alright with normal urls as- /ca/assets. However when i used paginator in view as [php]echo $this->Paginator->numbers();[/php] it generates url…