=================================================================================

@author  Diego Roldn <d.roldan.drupal>
@file    global_provider.inc
@date	 07.15.09
@module  Embedded Media Field
@version 5.x-1.3
@see	 Official project page http://drupal.org/project/emfield

=================================================================================

About
-----

This file gives administrators an additional provider which allows users to
submit an embedded image from any image hosted on the internet. Currently the
official module 'Embedded Media Field' comes with 4 predefined 3rd party
providers by default; from which users can embed images, including flickr, 
imageshack, photobucket and picasa.

Ideally, if the 'Global Provider' is used, any other 3rd image provider should not
be used - since the 'Global Provider' does not restrict any 3rd image provider or
any image hosted on the internet.


Instructions & Configuration
----------------------------

To use this additional feature with the module Embedded Media Field, simply
	1. save this file in the 'providers' directory found at 
		'emfield/contrib/image_ncck/'. 
	2. Once the file has been saved and the module has been enabled, go to the 
		settings for the module at
		'Administer/Content Management/Embedded Media Field' and click on the 
		"Embedded Image Field" link; which will collpse a set of additional 
		settings. 
	3. Click on the "Providers" link, 
	4. Click on the "Global Provider" link,
	5. Tick the "Global Provider" checkbox
	6. Click on the "Save Configuration" button.


Customizations
--------------

Since the Global Provider has no specific 3rd image provider, the link on line #4
will have no default target page. Instead, this link can serve as a link to
any page, such a FAQ page, or an about page where users can see that the field
has no restriction of where the image comes from, but that it must be a valid
image.

<snippet line"4">

define('IMAGE_NCCK_GLOBAL_MAIN_URL', 'Link to a general page, preferably not to 
	a 3rd party image provider.');
	
</snippet>


Image Validation
----------------

The validation of images is done by using built-in PHP function 'getimagesize';
which retrieves detailed information about an image, including its mime-type.
The mime-type allows to determine whether the image has correct HTTP Content-type 
header. for more information visit http://us3.php.net/getimagesize

e.g. If a user has a PHP file with a malicious script, and that user simply
changes the file extension from .php to .jpg - when the image goes through the
validation it will throw an error, since it does not recognize the file as a .jpg
mime-type.
	
==================================== eof ========================================