Harrisonm

How to clear Facebook Share’s Cache

Facebook share is good, simple, lets us share almost everything on web in seconds. But Facebook caches already shared urls/pages for better performance. This causes issues at time when we update the title, picture being shared or the description of the page because Facebook still shows the older version of...Read more …

Get actual URL in Cakephp without replacing plus (+)

In Cake PHP If URL has plus(+) sign, and get url with $this->params. then + will be raplced with space. SO for getting actual URL just change your .htaccess Go to app/webroot/.htaccess replace RewriteRule ^(.*)$ index.php?url=$1 [QSA,L] to RewriteRule ^(.*)$ index.php?url=$1 [QSA,L,B]Read more …

Extract is your friend

Use of extract function, For example, generally how we use varibles. $name = $_REQUEST[‘name’]; $surname = $_REQUEST[‘surname’]; $message = $_REQUEST[‘message’]; So, instead of defining as above , we can use extract($_REQUEST); Will automatically make $name = $_REQUEST[‘name’]; So, you can say “hello “.$name.” “.$surname.” without doing all the declarations.Read more …
Herry

Cakephp Pagination Issue

When Set Pagination in Cakephp we can use costume url for the pagination path. By default path is : page url   $this->renderElement( ‘cake_pagination’, array( ‘model’ => $model, ‘paging’ => array_merge( $this->params[‘paging’][$model], array( ‘url’ => array(‘controller’ => ‘Pages’, ‘action’ => ‘all_messages_data’), )), ));Read more …