Convert image file format in CodeIgniter

Posted in Articles on June 12th, 2011 by admin – Be the first to comment

Manipulating images and thumbnails is easy with CodeIgniter and its Image Helper function which works with GD and ImageMagick.

comprayventadefotos

You can find the documentation here but if you want to go one step ahead here are a few resources that helps you even more handling images and creating thumbnails with CodeIgniter.

Convert Image File Format

Image Thumbnail Creation With Caching

Learning how to use Ion Auth for CodeIgniter 2.0

Posted in Articles on June 12th, 2011 by admin – Be the first to comment

We have discussed many times about authentication libraries and login modules for CodeIgniter. Ion Auth is one of the most popular libraries for user authentication in CodeIgniter.

Official Ion Auth Documentation

Ben Edmunds, the creator of Ion Auth and many other great applications built on CodeIgniter like PyroCMS, shows here the official Ion Auth documentation.

Scalable login system for CodeIgniter

This article helps you integrating the library into your applications by extending Controller library and adding some useful properties to your parent controller class so you can determine if the user has access to your resources and also get your current logged user information at any time. The article will explain you:

  • How to setup Ion Auth in your CodeIgniter project
  • Make custom controllers for admin and user pages
  • Implement your extended controllers

Tips downloading CodeIgniter 2.0

Posted in Articles on June 12th, 2011 by admin – Be the first to comment

codeigniterreactor

As you may know, there are two different branches of CodeIgniter 2.0 – The official EllisLab and the community driven branch of CodeIgniter, named Codeigniter Core, secondly the community driven branch named CodeIgniter Reactor.

Download CodeIgniter 2.0 Core

It is available on Mercurial (Hg) Server but you can easily get the files from CodeIgniter Download page.

Download CodeIgniter 2.0 Reactor

Community-driven branch of CodeIgniter 2.0.x Reactor is available on Bitbucket and a mirror on Github here:
https://github.com/philsturgeon/codeigniter-reactor
(~ 2.2Mb)

What version of CodeIgniter is recommended to download?

Seems there are plenty of reasons why you may consider CodeIgniter Reactor to be used in your projects. There are many discussions about what version to use for production environment as well. It is up to you what version to use, some may prefer Core, and others may prefer Reactor. The good thing of Reactor is that it is more active than the Core version and many libraries are being coded for Reactor in mind. And seems Reactor is pretty stable considering it is actively developed and with more updates than the Core version that is mainly aimed to be used for EllisLab products like Expression Engine.

For example you can download the tag of CodeIgniter Reactor 2.0.2 from Bitbucket here:
CodeIgniter Tag version 2.0.2
https://bitbucket.org/ellislab/codeigniter-reactor/src/521076012037

What’s new in CodeIgniter 2.0 and cool features. Danny Herran posted this article explaining what’s new in 2.0

Chris Monnat also posted a first look to Reactor that deserves a read.
First look to Reactor.

You can find differences between CodeIgniter Core and Reactor, as explained by EllisLab here.

Upgrading from 1.7.x to 2.0

If you are planning to migrate from old codebase 1.7.x to 2.0 maybe it is a good time to do this now. Here you can find more information upgrading to CI 2.0: http://philsturgeon.co.uk/news/2010/05/upgrading-to-codeigniter-2.0

Or you can refer to the official CodeIgniter site about how to migrate from 1.7.2 to 2.0: http://codeigniter.com/user_guide/installation/upgrade_200.html

Basically the upgrade steps include:

    • Update your CI Files
    • Convert plugins to Helpers
    • Update stored encrypted data
    • Update class extensions to use CI_ prefix.
    • Update parent constructors to use parent::__construct()
    • Update user guide with new version

Libraries for CodeIgniter 2.0

At the moment, all new libraries are being coded for 2.0 but you can also find that most popular libraries used for previous versions of CodeIgniter are also supporting new version 2.0. Here are some interesting posts that you can take a look:

    IonAuth and Reactor CodeIgniter 2.0

http://my-code-igniter-adventure.blogspot.com/2011/01/ion-auth-on-codeigniter-20-reactor.html

Modular Extension for CI 2.0

http://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/overview

Captcha in CodeIgniter

Posted in Articles on June 7th, 2011 by admin – Be the first to comment

There are many Captcha libraries for CodeIgniter that you can use. However, if you are looking for simple Captcha libraries for CI that don’t rely on Database or complicated functions, you may take a look at this thread and demo.

However, this captcha was created in 2009, and prepared for CI < 2.x, so if you are looking a Captcha for CodeIgniter 2.0, then you can see the following options, instead:

Another captcha library for CodeIgniter is here. But this captcha library relies on database.

There is a ReCaptcha API implementation for CodeIgniter 2.0 that you can find here.

If you are looking for other alternatives, you can take a look at PHP Captcha. It is an open source implementation free Captcha script that you can integrate in any PHP application, including CodeIgniter framework. Here is the list of features in this script.

  • Show an image in just 3 lines of code
  • Validate submitted entries in less than 6 lines of code
  • Customizable code length
  • Customizable character sets, Unicode support
  • TTF font support
  • Use custom GD fonts when TTF is not available
  • Easily add background images
  • Multi colored, distorted, and transparent text options
  • Customizable Flash button to stream MP3 audio of CAPTCHA code
  • Ability to use a word list

How to get current URL in CodeIgniter

Posted in Snippets Ideas on June 6th, 2011 by admin – Be the first to comment

If you want to get the current URL in CodeIgniter then you can use uri_string from URI Class.

$this->uri->uri_string()