View Single Post
  #1  
Old 11-25-2007, 05:30 AM
kevincrafts's Avatar
kevincrafts Offline
pixelpost guru
 
Join Date: Jul 2007
Location: Colorado
Posts: 434
Arrow Addon: Photo Mosaic

This addon will make a random mosaic out of your available photos. You can control how many tiles are created and the width of the tiles. Image thumbnails are used for the tiles and are cropped by the size you specify.

Installation:
  1. Open mosaic.php in your favorite editor and change the totalTiles variable to the number of tiles you want to output.
  2. Put mosiac.php in your addons folder.
  3. Add <MOSAIC> to a template. I made a new template that only displays the mosaic.
  4. Add the following css style to your css file or template:

    a.mosaic {
    border:none;
    display:block;
    float:left;
    width:40px;
    height:40px;
    background-position:center;
    text-decoration:none;
    }
    #mosaic {
    width:720px;
    }
    Change the width and height to your liking. You will need to do some calculations with the tile width and height, #mosaic width, and the tile count to get this to display properly. By default it makes a rectangle that is 720 by 480. For example, 720/40 = 18 columns * by 12 rows = 216 (the default tile count).

How it works:

See it on my site at http://blog.kevincrafts.com/index.php?x=mosaic

Download
__________________
Kevin | Light & Dark Photoblog


Last edited by kevincrafts; 11-25-2007 at 10:51 AM. Reason: css update
Reply With Quote