What i find myself?
Uncategorized
How to integrate Recurly Subscription Billing with CakePHP
Feb 22nd
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 and Private Key from Recurly site.
Step 4: Use code in any method will work
// Required for the API Recurly_Client::$apiKey = 'Your api key'; // Optional for Recurly.js: Recurly_js::$privateKey = 'your private key'; ////////////// $account = new Recurly_Account(); $account->account_code = 'account_code'; $account->email = 'verena@example.com'; $account->first_name = 'Verena'; $account->last_name = 'Example'; $account->billing_info = new Recurly_BillingInfo(); $account->billing_info->first_name = $account->first_name; $account->billing_info->last_name = $account->last_name; $account->billing_info->number = '4111-1111-1111-1111'; $account->billing_info->verification_value = '123'; $account->billing_info->month = 11; $account->billing_info->year = 2015; $account->billing_info->ip_address = $_SERVER['REMOTE_ADDR']; $account->create();
for more details of Recurly PHP Client API functions visit this link PHP Client Library
Thanks.
Amjith
Remove index.php from CodeIgnitor URL
Nov 11th
Hi,
While we use codeignitor in local server, sometime the .htaccess provided by codeignitor guide wont help. Now I found a good htaccess file which worked on my xampp successfully. Here is the htaccess file.
Options +FollowSymlinks
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt|js|css)
RewriteCond %{REQUEST_URI} (index\.php|webroot/|images/|css/|js/|robots\.txt|favicon\.ico)
RewriteRule ^(images|css|files|js)/(.*)$ webroot/$1/$2 [L]
RewriteRule ^(favicon\.ico)$ webroot/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
Please comment if it really helped you.
Link reference : http://codeigniter.com/forums/viewthread/201644/
Thanks
Place holder plugin with jQuery
Jun 12th
Hi Friends,
Its very helpful for a web developer to make a default text in a textbox/text area while development,. And in modern browsers its started supporting tag named “placeholder”.
Hover, Its important how we implement and if its using a jQuery, We will be running an easiest method.
Recently, i have found a kool plugin with jQuery for placeholder.
http://code.google.com/p/jquery-watermark/

Please check this and use
Thanks
13 links for cakephp beginners
Jul 23rd
Hey,
Here i found an important link for cakePHP beginners to add 13 things to your cakePHP app.
Dont forget to visit 13 things for cakePHP
Hope you enjoyed?
Thanks.
amjith
TinyMCE File upload with cakephp solution
Apr 29th
I love tinyMCE other than FCKEditor because tinyMCEis fully build in DOM model and simple and easy to integrate to anywhere. This was only the reason why i choose tinyMCE for my HTML editor solutions.
But FCKEditor changed its name to CKEditor with amazing turnaround with new release. I wonder the changes they have made which i am still confused what to be used for my projects. But being i am experienced in tinyMCE and have done several content management using this for now i dont like to have a change to CKEditor.
But for now, TinyMCE have good Image upload management called MCImageManager but Its a paid plugin
And i would like to let you know that there is another opensource third party plugin for integration with tinyMCE for image management. Thats iBrowser.
How to integrate tinyMCE with iBrowser in cakePHP
This is very easy,
1. Download tinyMCE and copy to the app\webroot\js folder
2. Download iBrowser plugin and copy to app\webroot\js\tinymce\plugins
3. On the TinyMCE init function, under plugin tag, add “ibrowser” also. see bottom code
tinyMCE.init({ // General options mode : "specific_textareas", editor_selector : "mceEditor", theme : "advanced", skin : "o2k7", content_css : "< ?php echo $html->url('/', true);?>css/themes.css", plugins : "ibrowser" });
Then run the page you will see a button more in button list of tinyMCE as iBrowser. There are few more settings to work… read below
4. Open file \app\webroot\js\tinymce\plugins\ibrowser\config\config.inc.php
5. Edit the following line 96-101
(Create a folder in webroot and give permission 777 for uploading)
$cfg['ilibs'] = array ( // image library path with slashes; absolute to root directory - please make sure that the directories have write permissions array ( 'value' => '/projectname/app/webroot/uploads/', 'text' => 'Uploaded pictures', // this name will be as title in iBrowser ) );
For the value you need to give real path to the uploads. If you finds difficult for finding the path then there is an easy way
use
var_dump($cfg);
on the bottom of the config file and run ibrowser from tinyMCE. This will dumb the data along with the path. Just copy and paste the path to the calue. Dont forget to comment this atlast
Thanks

