lorempixel Placeholder Images for every case

  1. Requirements
  2. Usage

LoremPixel - Placeholder Images for every case. Just put a custom url in your html and you receive a proper placeholder picture

See demo at: http://lorempixel.com/

Requirements

Yii 1.1.x

Installation
  • Extract the release file under protected/extensions

Usage

// Simple call
<?php $this->widget('ext.lorempixel.LoremPixel', array(
	// Width of the image to generate (optional)
	'width'			=> 596, // default to 640

	// Height of the image to generate (optional)
	'height'		=> 261, // default to 480
)); ?>




// OR  with every parameters
<?php $this->widget('ext.lorempixel.LoremPixel', array(
	// Width of the image to generate (optional)
	'width'			=> 596, // default to 640

	// Height of the image to generate (optional)
	'height'		=> 261, // default to 480

	// The html alt attribute value of the image (optional)
	'alt'			=> 'My lorempixel random picture', // default to 'demo lorempixel'

	// Generate the image in gray (optional)
	'gray'			=> TRUE, // default to FALSE

	// Category name of the image to generate (optional)
	'category'		=> 'sports', // abstract, animal, city, food, nightlife, fashion, people, nature, sports, technics, transport
	// id of the image to show (1/10) (optional)
	'number'		=> 1, // must be used with a category name

	// Text to display on the image (optional)
	'text'			=> 'lorempixel', // must be used with a category name
	
	// Html options of the image (optional)
	'htmlOptions'	=> array('style'=>'border: 5px solid #000;')

	// Html class name to use (default to CHtml)
	'className'		=> 'CHtml'
)); ?>
3 0
7 followers
385 downloads
Yii Version: 1.1
License: MIT
Category: User Interface
Developed by: yiimann
Created on: Feb 8, 2012
Last updated: 6 years ago

Downloads

show all

Related Extensions