Skip to content

dhalla/Dummyimage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dummyimage-Class
=================

This little script allows you to use the LoremPixum-API (http://lorempixum.com/) from the Backend and create Objects for your Dummyimages like this:

$image = new Dummyimage(array(
    'category'      => 'nightlife', 
    'grayscale'     => true,
    'dummytext'     => 'Schnieb schnaaab di schnuub',
    'width'         => 150,
    'height'        => 400
));

You can use this in your template like this:

<?php echo $image->imageTag(); ?>

-----------------

In addition to this quite simple usage you can define different "Presets" or Imagesets.
F.e. if you different formats or types of images you can use in your Content, you can define a preset for each type:

; Image in Content, Width: 1-column
[content_1col]
width       = 100
height      = 300
grayscale   = false
category    = "nightlife"
;dummytext   = "Courtesty of xyz"

; Image in Content, Width: 1-column
[content_2col]
width       = 250
height      = 100
grayscale   = true
category    = "transport"
dummytext   = "Courtesty of xyz"

You can use those presets in your backend like this:

$content_1col   = new Preset('content_1col');  
$content_2col   = new Preset('content_2col');  

And in your templates:

<?php echo $content_1col->imageTag(); ?>
<?php echo $content_2col->imageTag(); ?>

For more information see the index.php, which is full with examples.

About

Generate Image-Tags for www.Lorempixum.com-Generator with PHP and use Imagesets in your Development.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages