Skip to content

Commit

Permalink
update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
m0she committed Feb 5, 2013
1 parent 87b3bb2 commit 5144cdd
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .htaccess
@@ -1,3 +1,3 @@
<Files ~ "\.(md|json|dist)$"> <Files ~ "\.(json|dist)$">
deny from all deny from all
</Files> </Files>
8 changes: 5 additions & 3 deletions README.md
Expand Up @@ -3,7 +3,7 @@ Cloudinary


Cloudinary is a cloud service that offers a solution to a web application's entire image management pipeline. Cloudinary is a cloud service that offers a solution to a web application's entire image management pipeline.


Easily upload images to the cloud. Automatically perform smart image resizing, cropping and conversion without installing any complex software. Integrate Facebook or Twitter profile image extraction in a snap, in any dimension and style to match your websites graphics requirements. Images are seamlessly delivered through a fast CDN, and much much more. Easily upload images to the cloud. Automatically perform smart image resizing, cropping and conversion without installing any complex software. Integrate Facebook or Twitter profile image extraction in a snap, in any dimension and style to match your website's graphics requirements. Images are seamlessly delivered through a fast CDN, and much much more.


Cloudinary offers comprehensive APIs and administration capabilities and is easy to integrate with any web application, existing or new. Cloudinary offers comprehensive APIs and administration capabilities and is easy to integrate with any web application, existing or new.


Expand Down Expand Up @@ -55,6 +55,8 @@ Generating a 120x90 thumbnail based on automatic face detection of the Facebook


For more details, see our documentation for embedding [Facebook](http://cloudinary.com/documentation/facebook_profile_pictures) and [Twitter](http://cloudinary.com/documentation/twitter_profile_pictures) profile pictures. For more details, see our documentation for embedding [Facebook](http://cloudinary.com/documentation/facebook_profile_pictures) and [Twitter](http://cloudinary.com/documentation/twitter_profile_pictures) profile pictures.


### Samples
You can find our simple and ready-to-use samples projects, along with documentations in the [samples folder](https://github.com/cloudinary/cloudinary_php/tree/master/samples). Please consult with the [README file](https://github.com/cloudinary/cloudinary_php/blob/master/samples/README.md), for usage and explanations.


## Usage ## Usage


Expand Down Expand Up @@ -109,7 +111,7 @@ You can also specify your own public ID:


http://res.cloudinary.com/demo/image/upload/sample_remote.jpg http://res.cloudinary.com/demo/image/upload/sample_remote.jpg
### cl_image_tag ### cl\_image\_tag


Returns an html image tag pointing to Cloudinary. Returns an html image tag pointing to Cloudinary.


Expand All @@ -119,7 +121,7 @@ Usage:


# <img src='http://res.cloudinary.com/cloud_name/image/upload/c_fill,h_100,w_100/sample.png' height='100' width='100'/> # <img src='http://res.cloudinary.com/cloud_name/image/upload/c_fill,h_100,w_100/sample.png' height='100' width='100'/>


### cl_form_tag ### cl\_form\_tag


The following function returns an html form that can be used to upload the file directly to Cloudinary. The result is a redirect to the supplied callback_url. The following function returns an html form that can be used to upload the file directly to Cloudinary. The result is a redirect to the supplied callback_url.


Expand Down
24 changes: 12 additions & 12 deletions samples/PhotoAlbum/upload.php
Expand Up @@ -18,20 +18,20 @@
</head> </head>
<body> <body>
<div id="logo"> <div id="logo">
<!-- This will render the fetched image using cloudinary --> <!-- This will render the fetched image using cloudinary -->
<?php echo fetch_image_tag("http://cloudinary.com/images/logo.png") ?> <?php echo fetch_image_tag("http://cloudinary.com/images/logo.png") ?>
</div> </div>
<div id="posterframe" style="position: absolute; right: 0; top: 5px;"> <div id="posterframe" style="position: absolute; right: 0; top: 5px;">
<!-- This will render the fetched facebook image using cloudinary with all the <!-- This will render the fetched facebook image using cloudinary with all the
requested transformations --> requested transformations -->
<?php echo facebook_profile_image_tag("officialchucknorrispage", array( <?php echo facebook_profile_image_tag("officialchucknorrispage", array(
"format" => "png", "format" => "png",
"transformation" => array( "transformation" => array(
array("height" => 95, "width" => 95, "crop" => "thumb", "gravity" => "face", array("height" => 95, "width" => 95, "crop" => "thumb", "gravity" => "face",
"effect" => "sepia", "radius" => 20 "effect" => "sepia", "radius" => 20
), array("angle" => 10) ), array("angle" => 10)
))); )));
?> ?>
</div> </div>


<!-- This is the backend upload - based on the fileupload javascript for the frontend and also <!-- This is the backend upload - based on the fileupload javascript for the frontend and also
Expand Down
20 changes: 20 additions & 0 deletions samples/README.md
@@ -0,0 +1,20 @@
Cloudinary PHP samples
======================

Included in this folder are two sample projects intended to demonstrate the flow of the Cloudinary (PHP) usage.


## Installation
The cloudinary\_php package is ready to be served as-is in your Apache server. (Other servers are also supported, but the access restrictions set in .htaccess will probably not work).


## Basic sample
This sample is a synchronous script that shows the upload process from local file, remote URL, with different transformations and options.

You can access it through http://<yourserver>/<path-to-cloudinary_php>/samples/basic/basic.php

## Photo Album
A simple web application that allows you to uploads photos, maintain a database with references to them, list them with their metadata, and display them using various transformations

You can access it through http://<yourserver>/<path-to-cloudinary_php>/samples/PhotoAlbum/list.php

0 comments on commit 5144cdd

Please sign in to comment.