WordPress Plugin :Custom image resize script by TimThumb PHP Script

April 1st, 2010 by ytechcity

Previous post regarding to WordPress Plugin: Thumbnails images to your blog via Get the Image, which is useful for magazine style themes, and allow you thumbnails images for your blog. Today, i will share with you a greatful php script (TimThumb PHP Script) written by Tim McDaniels as a way to achieve the core functionality of phpthumb while using half the code. Ben then added PNG and GIF support, plus improved speed and caching.

timthumb
How do I use it?
Simply copy the source code into a new document called ‘timthumb.php’, place it in a folder on your site (ex: /scripts/) and call the image like this:

<IMG alt="" src="/scripts/timthumb.php?src=/images/image_name.jpg&h=150&w=150&zc=1" >

Some important things to note:
•TimThumb requires the GD library, which is available on any host sever with PHP 4.3+ installed.
•Once installed and in-use, TimThumb will automatically create a /cache/ subfolder with proper write-permissions. If your host server doesn’t allow this by default, be sure to manually change the /cache/ folder permissions to 777.
•In addition, make sure the folder which contains TimThumb is set to 777.
•As in the example, use absolute paths for your script and images

TimThumb allows the following parameters:
•w: width
•h: height
•zc: zoom crop (0 or 1)
•q: quality (default is 75 and max is 100)

Official Website:
http://www.darrenhoyt.com/2008/04/02/timthumb-php-script-released/

Download:
http://timthumb.googlecode.com/svn/trunk/timthumb.php

WordPress Plugin: Thumbnails images to your blog via Get the Image

April 1st, 2010 by ytechcity

Thumbnails_images

Get the Image is a plugin that grabs images for you. It was designed to make the process of things such as adding thumbnails, feature images, and/or other images to your blog much easier, but it’s so much more than that. It is an image-based representation of your WordPress posts.

This is a highly intuitive script that can grab an image by custom field input, WP’s post image feature, post attachment, or extracting it from the post’s content.

Installation
1.Upload get-the-image to the /wp-content/plugins/ directory.
2.Activate the plugin through the ‘Plugins’ menu in WordPress.
3.Add the appropriate code to your template files as outlined in the readme.html file.

Official Webite:
http://www.justintadlock.com

Download:
http://wordpress.org/extend/plugins/get-the-image

Internet : How to check if GD Library is installed on your hosting

April 1st, 2010 by ytechcity

Firstly, What is GD Library, and why we need to installed it on our hosting, what so important of this GD Library? I will give you an anwser one by one!

What is the GD library?
According to GD lib official website: http://www.libgd.org,
GD is an open source code library for the dynamic creation of images by programmers. GD creates PNG, JPEG and GIF images, among other formats. GD is commonly used to generate charts, graphics, thumbnails, and most anything else, on the fly. While not restricted to use on the web, the most common applications of GD involve web site development.

GD is written in C and various binding are available. See a non exaustive list here .

GD Library usage
GD is often used in various web applications. Integrated in the latest PHP version- PHP5, GD not only expands the potentialities of PHP as far as the creation of HTML output is concerned, but also enables the users to create and manipulate images in different formats, including GIF, PNG, JPG, WBMP and XPM. Moreover, thanks to the GD library, PHP can output image streams directly to a browser.

How to check if GD library is enable
We will try some steps here to identify GD support is enabled or not. Mostly PHP 4 and higher versions comes with GD support. Some time it may not be enabled. To know this we can use phpinfo function and check GD support is available or not.

<?php
phpinfo();
?>

gd_library
Here is an image of what phpinfo function displays in a GD enabled system.