Skip to content
Browse files

update documentation

  • Loading branch information...
1 parent 87b3bb2 commit 5144cdd2e1dc9c0eb3a8efd05deb4ce925211503 @m0she m0she committed Jan 7, 2013
Showing with 38 additions and 16 deletions.
  1. +1 −1 .htaccess
  2. +5 −3 README.md
  3. +12 −12 samples/PhotoAlbum/upload.php
  4. +20 −0 samples/README.md
View
2 .htaccess
@@ -1,3 +1,3 @@
-<Files ~ "\.(md|json|dist)$">
+<Files ~ "\.(json|dist)$">
deny from all
</Files>
View
8 README.md
@@ -3,7 +3,7 @@ Cloudinary
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.
@@ -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.
+### 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
@@ -109,7 +111,7 @@ You can also specify your own public ID:
http://res.cloudinary.com/demo/image/upload/sample_remote.jpg
-### cl_image_tag
+### cl\_image\_tag
Returns an html image tag pointing to Cloudinary.
@@ -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'/>
-### 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.
View
24 samples/PhotoAlbum/upload.php
@@ -18,20 +18,20 @@
</head>
<body>
<div id="logo">
- <!-- This will render the fetched image using cloudinary -->
- <?php echo fetch_image_tag("http://cloudinary.com/images/logo.png") ?>
+ <!-- This will render the fetched image using cloudinary -->
+ <?php echo fetch_image_tag("http://cloudinary.com/images/logo.png") ?>
</div>
<div id="posterframe" style="position: absolute; right: 0; top: 5px;">
- <!-- This will render the fetched facebook image using cloudinary with all the
- requested transformations -->
- <?php echo facebook_profile_image_tag("officialchucknorrispage", array(
- "format" => "png",
- "transformation" => array(
- array("height" => 95, "width" => 95, "crop" => "thumb", "gravity" => "face",
- "effect" => "sepia", "radius" => 20
- ), array("angle" => 10)
- )));
- ?>
+ <!-- This will render the fetched facebook image using cloudinary with all the
+ requested transformations -->
+ <?php echo facebook_profile_image_tag("officialchucknorrispage", array(
+ "format" => "png",
+ "transformation" => array(
+ array("height" => 95, "width" => 95, "crop" => "thumb", "gravity" => "face",
+ "effect" => "sepia", "radius" => 20
+ ), array("angle" => 10)
+ )));
+ ?>
</div>
<!-- This is the backend upload - based on the fileupload javascript for the frontend and also
View
20 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.
Something went wrong with that request. Please try again.