about 1 year ago - No comments
Tweet
Integrating Recurly Subscription Billing with CakePHP is very simple.
Download Recurly PHP Client from the GitHub project site or download as a zip file.
Step 1:Unzip files to /app/Vendors folder
Step 2: On top of the controller, add import Vendor code. Example :
App::import(‘Vendor’, ‘Recurly’, array(‘file’ => ‘recurly-client’. DS . ‘lib’. DS . ‘recurly.php’));
Step 3: Get API Key More >
about 2 years ago - No comments
Tweet
Hi Friends,
I am back again. Now there are 10000 cases where we need to get the results from a table with specific set of fields. Like we need to get
$this->find("all", array("fields" => "User.firstname, User.lastname, User.avatar","order" => "User.last_login DESC", "limit" => $cnt));
Now if the parent table be User and it have so many associations then this More >
about 2 years ago - 8 comments
Tweet
Hi Friends,
Here is another link i found for google map. Google Map Helper . You can copy this code for good map for your views.
For Cake 1.3 +
copy and paste this file in /app/views/helper/google_map.php
< ?php
/*
* CakeMap — a google maps integrated application built on CakePHP framework.
* Based on initial versione from Garrett J. More >
about 2 years ago - 17 comments
Tweet
Hi,
I am very impressed with SWFUpload and will make use of this in future developments. Its kool flash player can handle all things needed for a developer to handle things in client side. There are so many benefits of using this for fileuploads because everything needed for handling file uploads can be done with More >
about 2 years ago - 1 comment
Tweet
Hi,
Was just wondering about uploading larger files in cakePHP. hen i try to upload multiple larger images i was getting Maximum time limit error. I have checked various ways of tricks to prevent such as setting php_ini and all.. but cannot over ride server default settings. Last i got success
with this
create a .htaccess More >
about 3 years ago - No comments
Tweet
Hi Guys,
I got some code from somewhere for SEO titles. I have made it to cakePHP helper because i have to use it somewhere to create SEO titles for the URL. I have posted this because this may be helpful for you.
// app/views/helpers/link.php
class LinkHelper extends AppHelper {
function seoTitle($string) {
More >
about 3 years ago - No comments
Tweet
I have used some functions from http://www.the-art-of-web.com/php/truncate/ for creating a helper in cakePHP for truncating strings. This will help to fix the closing tags from a HTML string so that we can make strings without breaking design.
I have several places where to use this functions to truncate strings.
Here is a small helper for cakePHP More >
about 3 years ago - 1 comment
Tweet
While we bake the controllers in cakePHP we will set admin functions to control the tables from admin side. This admin methods are very helpful to get all the functions copied as admin_<method> in each controller and we can bake the views for admin methods.
But while we use the admin functions, We usually have to More >
about 3 years ago - 1 comment
Tweet
If you want to get full path URL of the page in view you can use this cakephp function in Views
<input name="post-share-link" type="text" value="<?php echo $html-/>url(’/’ . $this->params[’url’][’url’], true);?>" />
Where
< ?php echo $html->url(’/’ . $this->params[’url’][’url’], true);?>
Will print the current path to the page. This can be used to give the share links in page
Thanks
about 3 years ago - 4 comments
Tweet
Hi,
SEO Plays a vital role in web development. So here is a small helper for creating SEO text links for your cakePHP application
// views/helpers/link.php
class LinkHelper extends AppHelper {
function seoTitle($string) {
$string = preg_replace("`\[.*\]`U","",$string);
$string = preg_replace(’`&(amp;)?#?[a-z0-9]+;`i’,'-’,$string);
$string = htmlentities($string, ENT_COMPAT, ‘utf-8′);
$string = preg_replace( "`&([a-z])(acute|uml|circ|grave|ring|cedil|slash|tilde|caron|lig|quot|rsquo);`i","\\1", $string );
$string = preg_replace( array("`[^a-z0-9]`i","`[-]+`") , More >