Useful CakePHP Libraries for Image Manipulation, Cropping, Resize and Thumbnail

CakePHP is a framework that is widely used by developers, including me. I was cakephp user since 2008, and makes CakePHP as the main foundation of web applications. By using the framework, web applications can be finished quickly and safely.

One of the problems using CakePHP is when dealing with the image. CakePHP able to  image processing such as image resizing, image cropping, image manipulation and others. I often do is upload the image. It seems very simple, just upload a file, but with CakePHP you can select any image file that can be uploaded.

Every work on projects related to the image, I keep the library, components, plugins associated with the image, and this time I wanted to share it all. Might be useful for you.

[code tipe=”336″]

Image Tool Component

image tool component

ImageTool is php class to perform various tasks with images. Every function accepts GD resource as input and can output it as well (just leave ‘output’ option empty).

This component has these function :

  • autorotate – autorotate JPG images (by exif data)
  • averageColor – get image’s average color
  • dominatingColor – get image’s dominating color
  • flip – flip image
  • grayscale – desaturate image
  • meshify – add mesh (grid of dots) over image
  • pixelate – pixelate image
  • resize – resize image
  • rotate – rotate image (only degrees divisible by 90)
  • unsharpMask – sharpen image
  • watermark – add watermark

Download

QImage Component

qimage component for cakephp

Quick Image Component (Qimage) is a component for CakePHP to facilitate image manipulation and upload. Tested on CakePHP 2.x

  1. copy -> Copy uploaded images.
  2. resize -> Resize an image.
  3. watermark -> Add watermark in an image.
  4. crop -> Crop an image.
  5. getErrors -> Get all errors that occurred in Qimage.
  6. _verifyMime -> Verify the MIME type of a file based on file extension.
  7. _getCreateFunction -> Get image creation function based on image mime type.
  8. _getFinishFunction -> Get image finish function based on image mime type.

[code tipe=”link”]

Download

CakeImageCropResize Plugin for CakePHP

cakephp image crop plugin

A small CakePHP plugin for resizing and cropping of images. Includes a Helper and Component.

[code tipe=”336″]

The Helper and/or Component gives you the ability to leave your original images in tact and resize/crop them for View only. Download

Image Soup Cakephp Component

image soup cakephp component

CakePHP component for image upload/checking, resizing and thumbnail generation (regular and square/cropped thumbnails). This component using GD library.

Download

Image Thumbnail Helpers for Cakephp

thumbnail image helper for cakephp

Helper to generate thumbnail images dynamically by saving them to the cache. Alternative to phpthumb.

Download

CakePHP Image Uploader

cakephp image uploader

Is a component for uploading images to the server. This component also comes with a thumbnail creation function, so you can easily create a thumbnail version

[code tipe=”link”]

Download

CakePHP 3.0 Image Upload Behavior

CakePHP 3.0 Image upload behavior

If you are using CakePHP 3.0, you can use this component to upload image.

Download

TinyMCE Image Upload for CakePHP

tinymce image upload for cakephp

Integration of Elfinder file manager(2.0-rc1) with tinymce(4.0.10) for Cakephp 2.x. Allows to upload images(and other files) in tinymce. Can be a free alternative for Tinymce MoxieManager image upload plugin

Download

MySQL Image Storage

mysql image storage

Is a plugin for cakephp, so that your application has a function of inserting images into mySQL database. Download

Youtube Image Helpers

youtube image helpers

A youtube thumbnail generator class for CakePHP

Download

CKEditor Image Upload for CakePHP

Ckeditor With Image Upload In Cakephp

Ckeditor With Image Upload In Cakephp

[code tipe=”336″]

Download

 

 

Useful Codeigniter Module for Developers 2015

CodeIgniter Pagination Library

CodeIgniter is popular PHP framework and widely used by web developers, the benefits of this framework because it is easy to use, simple and has a good performance, even one of the framework with a small memory resource.

With CodeIgniter, developers can develop web applications, ranging from blogs to enterprise application systems used by large companies.

Codeigniter easy to develop because possess a feature called the module. Module is an additional program that can improve application performance, as wordpress plugin and jquery plugins.

Because it is very useful, I tried to gather useful CodeIgniter module to be easy to find. Please bookmark this URL of the blog post.

CodeIgniter-cURL

A PHP CodeIgniter library which makes it easy to do simple or complex cURL requests

It supports all the normal HTTP requests usually used on a website.

Download

CodeIgniter Pagination Library

CodeIgniter Pagination Library

A CodeIgniter library implementing a fully-customizable pagination system that lets you split long-winded content across multiple pages

The CodeIgniter Pagination Library was built to work with entries stored inside a database, allowing the developer to control the flow of information dumped on each page.The library, besides just splitting long content across multiple pages, also comes with a visual GUI for navigating them, a simple pager component that can be deployed with ease.This pager is a page number navigation system, with adjacent controls for jumping to the next, previous, first and last entry.The CodeIgniter Pagination Library pager can easily be localized to any language and developers are in full control over the number of entries to show on each page listing.

Download

flexi auth

flexi auth

A CodeIgniter library for managing a site’s userbase, the tool you need if you plan to let users register and login on your site

flexi auth can be used for running a community-powered CodeIgniter installation, supporting a special section in your site where users can make new accounts and where they can login into them.Along with the frontend part there’s also a backend where admins can manage the user accounts along with their permissions, granting them access to various site features, even admin privileges.fexi auth comes packet with lots of features, making ideal for a wide range of use cases.

Download

ci-syntax-highlight

A CodeIgniter plugin for adding source code syntax highlighting capabilities to a CI application, with support for various programming languages and highlighting themes

Using the Luminous PHP library adapted to the CodeIgniter plugin system, ci-syntax-highlight allows editors to include code blocks, declare their programming language, and have the source code automatically highlighted when embedded on the frontend.This lets developers properly show source code with their content, with an improved degree of readability and attuned to the site’s general UI style.Since ci-syntax-highlight is a packaged version of Luminous, all its original features are also supported with the CodeIgniter plugin, and small tweaks can be made here and there.Usage instructions are provided with the package’s README file.

Download

CI-Merchant

 

A CodeIgniter plugin that implements a driver-based payment processing toolkit for using with any CodeIgniter-powered app or website

CI-Merchant is nothing more than a gateway-agnostic payment system on which various billing providers can be integrated.It comes with support for various known gateways out of the box, but with the provided documentation, additional custom services can be added with ease.Installation via the CodeIgniter Sparks auto-installer is supported.

Download

Codeigniter twitter tweets

Codeigniter twitter tweets

CodeIgniter plugin for embedding Twitter data

The plugin makes use of Twitter’s API for embedding tweets in remote locations.It’s perfect for showcasing a person’s social activity, while keeping a hold on what’s OK to display and what’s not.

Download

visualCaptcha for CodeIgniter

visualCaptcha for CodeIgniter

A tiny CodeIgniter plugin for adding visual and audio CAPTCHA fields to your online forms, complete with mobile and Retina support

This plugin was ported from the visualCaptcha PHP library.The CodeIgniter version tries to follow as closely as possible the original guidelines, supporting most of the features and the original design patterns that have been so successful in protecting forms from a wide variety of spam bots.Besides the original features referring to the mobile, visual, audio and drag&drop support, the CodeIgniter plugin also adds specific support for using the CAPTCHA with specific CodeIgniter projects.This includes support for translatable text and easy embedding with CI Views and Controllers.visualCaptcha is also available for: PHPNode.jsRuby (official) Ruby (unofficial) WordPress

Download

Highchart library for Codeigniter

 

A CodeIgniter plugin for rendering graphs using the Highcharts JS library

The library allows CodeIgniter admins to render their charts via the famous Highcharts JavaScript charting library.Supports all chart types supported by the Highcharts library (bar, pie, line, spline, area, areaspline, column and scatter).

Download

MailChimp-for-CodeIgniter

A simple CodeIgniter plugin for the MailChimp API

MailChimp is a online service which can be used to manage, send and track customer newsletters and email marketing campaigns.Written in PHP, the library allows CodeIgniters developers to remotely interact with the MailChimp service.Supports modifying campaigns, auto-responders, templates, lists, etc..

Download

Codeigniter OAuth 2.0

CodeIgniter library for working with the newer version of the OAuth protocol

Supports version 2.x of the protocol.OAuth 2.x is split into 2 profiles, clients and providers. This library wraps the provider part for CodeIgniter.

Download

codeigniter-simple-uploadify

This is a CodeIgniter plugin for managing file uploads with Uploadify

Uploadify is a jQuery plugin that allows an easy way to integrate single or multiple file uploads on a website.This plugin allows CodeIgniter-developed apps to handle all file uploads via Uploadify, instead of the classic upload controller.A demo is included with the download package.

Download

Sitemaps for CodeIgniter

 

CodeIgniter plugin for creating XML sitemaps

This plugin will help CodeIgniter admins create a XML sitemap which they can promote on various search engines for increasing a site’s visibility on the Internet.This plugin will help CodeIgniter admins create a XML sitemap which they can promote on various search engines for increasing a site’s visibility on the Internet.

Download

Javascript-Loader-Helper

 

A lightweight and easy to use CodeIgniter library for automatically loading all JavaScript files found inside a designated folder

To use Javascript-Loader-Helper, just point the library at a folder and it will automatically load all JS files found inside.The folder path is customizable. and the library works best only in CodeIgniter apps where the same JS files are used everywhere on the site.

Download

Facebook Connect CodeIgniter Library

 

A library for the CodeIgniter PHP framework to integrate Facebook Connect in / on a web page

Essentially being a wrapper around the Facebook PHP API, it includes everything needed to get Facebook Connect working within CodeIgniter libraries.This library also allows to add XFBML to view files, call the Graph API via secure SSL (with CURL), and build richly connected applications with the Open Graph.

Download

CodeIgniter Amazon SES

 

A CodeIgniter plugin for interacting with the Amazon Web Services SES API

Amazon Web Services SES (Simple Email Service) is a highly scalable and cost-effective bulk and transactional email-sending service.This library allows apps developed on top of the CodeIgniter PHP framework to query and interact with Amazon SES from within PHP code.

Download

CodeIgniter Cache Helper

 

A library for adding extra tools to the CodeIgniter built-in cache system

The library’s purpose is to add some new tools for managing the cache files more easily.This allows a developer to manipulated outputted cache files via PHP.

Download

Bit.ly CodeIgniter Library

 

A PHP library for the CodeIgniter gallery to connect and use the Twitter API

This library provides an interface to Bit.ly’s API.Can be used by developers to send long links to Bit.ly’s service and retrieve a shortened version.The opposite operation is also possible.

Download

Alternative PHP Framework for Developers in 2015

Oro Platform

Most developers use cakephp, codeigniter and zend framework to create web applications. These framework is very solid and proven ability. But, it turns out there are many PHP frameworks that can be used as an alternative to large framework above. Perhaps, you will get a new experience with some frameworks that might sound familiar to you.
All this under the framework using PHP, I have not used a non-PHP framework. and kebanyakn based MVC.

TYPO3 Flow

 

An application framework for PHP, created to power up the famous TYPO3 CMS, but also perfectly safe to use for other projects as well

Download

Adventure PHP Framework

 

A web development framework that helps coders design and create object oriented and reusable PHP Web applications

Download

Stubbles

 

A lightweight and well-documented PHP 5 framework for developing modern Web-based applications following well-known industry standards

Download

SilverStripe Framework

 

A modern, object-oriented PHP framework based on the classic MVC (model-view-controller) architecture, ideal for developing complex PHP-based applications

Download

Nette Framework

 

An object-oriented PHP framework for creating Web applications, packaged with plugins, extensions and lots of developer-friendly utilities

Download

Mako Framework

 

A lightweight PHP 5 MVC framework

Download

Lumen

 

A PHP micro-framework that came out of the development work put into Laravel, ideal for smaller projects where speed is more important

Download

Jelix

 

A PHP 5 framework for developing any kind of web applications

Download

Silex

 

A PHP micro-framework based on Symfony2 components, the perfect tool for developing small-scale projects without the overhead of a larger framework

Download

Oro Platform

Oro Platform

A fully-featured PHP development platform (framework) for creating customizable Web-based applications in PHP 5.x and Symfony 2.x

Download

PHPixie

 

An open source PHP MVC micro-framework that can help developers out when deploying new projects, providing a solid base for their code

Download

MicroMVC

 

A PHP micro-framework specialized in offering optimal performance while still remaining as small as possible, coded following the MVC design paradigm

Download

Lithium

 

A PHP framework for developing solid web applications

Download

Horus Framework

 

An OOP PHP micro-framework, a lightweight toolkit to help developers lay down the foundation of their PHP-based websites and applications

Download

Warp Framework

Warp Framework

A powerful, fully-customizable, and well tested PHP framework developed by the fantastic YOOtheme team, perfect for building your own, customized Joomla and/or WordPress themes

Download

PSX Framework

 

An open source, object-oriented framework for developing dynamic websites in PHP, separating the application’s code from its design

Download

Aura Framework

 

A full-stack PHP framework composed of smaller packages

Download

Walrus

 

A very lightweight PHP MVC framework that contains only the basic utilities for you to quickly prototype and launch a Web application with

Download

LeiPHP

 

Lightweight framework for simplistic PHP apps

Download

FuelPHP

 

A fast, lightweight PHP 5.3 framework

Download

Fat-Free Framework

 

A complex PHP micro-framework for helping programmers create powerful Web applications, all at under 100 KB worth of PHP code

Download

Bullet

 

A PHP micro-framework ideal for developing smaller Web applications, using an unique development pattern and architecture structure

Download

Phalcon PHP

 

A PHP framework for developing web applications

Download

Ultimate Tutorial Using Medoo PHP Framework

medoo tutorial

Medoo is a PHP framework that interesting to me. Why? because this framework is very small, only a few kilobytes, and only 1 piece of file. I call Medoo is a real micro PHP framework. Medoo has primary responsibility only interact with the database, no helpers and controllers, so right if Medoo referred to as non-MVC framework.

With Medoo we can interact with databases, especially MySQL very easily and quickly, because in the framework Medoo there are many functions for it. Suppose the function select, insert, update and delete. Isn’t the basic operation of the database is CRUD? so, this framework already qualified. Instead you use PHP from scratch, it is better to use this framework.

[code tipe=”336″]

Medoo made ​​by Angel Lai, someone who likes things simple and easy.

This post about tutorial use Medoo, from starting to advance. We learn together

1. Setting up Your Medoo Framework

Please download a copy of Medoo, you can download it via this link (minify version, recomended for production) or this link (when development app). Store it on you local drive and you ready to follow this tutorial.

Setting up your MySQL database

Open medoo.php file, edit some code below, make sure you know your database configuration.

protected $database_type = 'mysql';
protected $server = 'localhost';
protected $username = 'your_username';
protected $password = 'your_password';

Please fill according to your database. I think you’ll have no trouble doing it. Ok, save and you’re done,  medoo connect with the database perfectly.

[code tipe=”300″]

2. Select Query

We could easily do the select query to a database via medoo framework. Sample code is as below

$database = new medoo();
 
$datas = $database->select("account", [
	"user_name",
	"email"
], [
	"user_id[>]" => 100
]);

Select all column in account table

$datas = $database->select("account", "*");

or select a column in account table

$datas = $database->select("account", "user_name");

and then print data from database in your browser

[code tipe=”728″]

foreach($datas as $data)
{
	echo "user_name:" . $data["user_name"] . " - email:" . $data["email"] . "<br/>";
}

Easy to do following this tutorial? yes, because medoo very easy to learn and use. Ok, now for the next tutorial that is, insert data into the database.

3. Insert Record to Database

$database = new medoo();
 
$last_user_id = $database->insert("account", [
	"user_name" => "foo",
	"email" => "[email protected]",
	"age" => 25
]);

Of course, we can insert multiple record in one action

$last_user_id = $database->insert("account", [
[
	"user_name" => "foo",
	"email" => "[email protected]",
	"age" => 25,
	"city" => "New York"
],
[
	"user_name" => "bar",
	"email" => "[email protected]",
	"age" => 14,
	"city" => "Hong Kong"
]);

So, we do not need a looping command.

4. Update Command

$database->update("account", [
 "name"=>"John Doe",
 "phone"=>"0984758"
  ],
  [
"user_id"=>10
]);

easy and simple lines of code, you can also play with it.

[code tipe=”link”]

5. Delete Command

$database = new medoo();
 
$database->delete("account", [
	"AND" => [
		"type" => "business"
		"age[<]" => 18
	]
]);

That’s a brief tutorial using Medoo framework. I will update this tutorial when finished with my affairs.