Parse html template in codeigniter using Template Parser Class Sometimes we need to parse html data, like sending an email with html template. In codeigniter a library exist to handle this process. Let’s see how to parse html template in codeigniter. In codeigniter their is Template Parser Class, which handle… Read more »
How to integrate paypal using ci-merchant in codeigniter It’s easy to integrate paypal using ci-merchant in codeigniter. you can integrate Payflow Pro PayPal Express Checkout PayPal Website Payments Pro and more payment gateway and methods using ci merchant easily. Just a quick step you need to follow and done. There… Read more »
Secure codeigniter application using csrf token and using with ajax call
In codeigniter 2 Cross Site Request Forgery (CSRF or XSRF) protection is inbuilt feature. We need to just change the config variable in config file to use csrf protection. once you have enabled csrf protection your all forms has been secured. Now your codeigniter application forms POST requests has been secured using csrf token.
How to create custom config and fetch config items :-
We need to create own custom config file in codeigniter to enhance or add some more config items. In codeigniter we have already a config file in(application/config/config.php) we can add more items directly in it or can create our own custom config file. Altering existing config file is not a good idea so we need to create a new config file. In codeigniter all config settings are in $config array. if you look into inbuilt config file you will found all config stored in $config array. below we will see an example of custom config file in codeigniter.
How to upload files,images in codeigniter with image preview
We have an inbuilt class for upload files in codeigniter. using upload class we can easily upload files or images in codeigniter. for upload we need to set some configuration and need to load upload library.
How to use captcha in codeigniter using session
What is captcha :- A program that use for human verification or program which protect websites against bots, spam etc.
Generally Captcha contain a image for human challenge on forms for human read and enter captcha image text. In codeigniter we can easily add captcha to website using captcha helper class. it’s provided by codeigniter default. We are using session and a callback function to validate a captcha field/words. Below i am sharing an example how we can add captcha in codeigniter website.
Creating and using custom libraries, extend native libraries in codeigniter
Codeigniter libraries means classes which located in libraries directory. so for create our own custom library in codeigniter we need to build classes and store class file in libraries directory full path of libraries directory will be “application/libraries”. It’s easy to create new/ custom library , replace native or extend native library in codeigniter.
Below in this tutorial we will discuss :-
1. Create new/custom libraries
2. Using new/custom libraries
3. Extend native libraries
Integrate ckeditor in codeigniter :-
CKEditor is a text editor used by mostly sites and also under public license. it’s easy to use with php but need more effort to use ckeditor in codeigniter. i am trying to make it simple and sharing what i have done to integrate ckeditor or ckfinder in codeigniter site.
I am using both ckeditor and ckfinder in codeigniter to use images also. we need to include libraries and make controller and need some code to view for done.
Add active class to menu in codeigniter :-
In codeigniter it’s easy to add active class to current menu or highlight current page in menu item. so we can check which page we have.
i am using helper to active current menu or add active class to menu in codeigniter.
We need to follow some steps to highlight current page in menu or get current page to add active class in codeigniter.
let’s see how to add active class to menu in codeigniter.
Credit card validation in codeigniter :-
I found a good code for credit card validation in php. and working with codeigniter so i need to use this code in codeigniter so i make a credit card validation helper in codeigniter and easily use this.
This is good and easy integration credit card validation code i found. you can also use this by making a library in codeigniter but i am sharing what i have to use this in codeigniter.
Using helper :-
Facebook login for codeigniter using graph api :-
Remove hassle of long register and login process and allow users to one click login for your site using facebook login. there are so many library available for add facebook login in codeigniter site. i am also sharing facebook login for codeigniter using graph api. there is no need to include any class or bundles cause we are not using php sdk we are contacting to facebook using graph api. so it’s so easy to add facebook login to codeigniter site. let’s see how to use facebook login in codeigniter.
Create custom 404 page codeigniter :-
It’s easy to handle 404 error in codeigniter or we can create a custom 404 page in codeigniter. we just need our own controller and a view for this. some of url that doesn’t found our website, some broken links, typing incorrect URL goes to 404 – page not found error. so if we need to show our own custom page for this we can easily handle this in codeigniter. Let’s see how to create custom 404 page in codeigniter :-