Authentic Photoblog Flavour

Photo Mosaic v1.2

Download (1.1 KB)

Developer Description

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.


  • Open mosaic.php in your favorite editor and change the totalTiles variable to the number of tiles you want to output.
  • Put mosiac.php in your addons folder.
  • Add <MOSAIC> to a template. I made a new template that only displays the mosaic.
  • Add the following css styles 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:

You can see it in action on my site: http://blog.kevincrafts.com/index.php?x=mosaic

Older Versions

Write A Review

  1. Perfect 5
    Unknown 11 Years Ago Report as Spam

    I have not understood the post of Laprodo (why did you need to hack the php?). I have configured a new page mosaic_template and the addon works fine

  2. Good 4
    Unknown 11 Years Ago Report as Spam

    Very nice!

    But i've to hack the php.

    At first I've change $thumbpath = ltrim($cfgrow['thumbnailpath'], "./"); to $thumbpath = "./thumbnails/"; /* ltrim($cfgrow['thumbnailpath'], "./"); */ because $cfgrow['thumbnailpath'] is empty in my case

    An than I've spaces in my image names, so I've to change $mosaic .= "<a href="index.php?showimage=$pieces[0]"> &nbsp; </a>"; to $mosaic .= "<a href="index.php?showimage=$pieces[0]"> &nbsp; </a>"; to ensure loading.

    Perhaps some stuff for next version.

    Thanks a lot for your work!