Multiple galleries on one page

Dead Simple Gallery works out very well if you need more than one gallery instance on the page. It could be either the same gallery, one with different thumb sizes, or different images, etc.

You can specify config parameters separately for each gallery. They will not interfere or affect each other. The only global parameter that affects all galleries defined below it, is $dsg_xhtml variable. But even it can applied separately to each gallery, it's just not being reset to the default state for each next gallery after the first one it applies to.

A simple multiple gallery usage could look like this:

<?php include 'dsg.php'; ?>
...
<?php include 'dsg.php'; ?>

Wish the first gallery had a non default thumbnail dimensions, and the second one to use a different gallery folder? Simply write:

<?php
  // set custom thumb dimensions
  $dsg_thumb_width = 190;
  $dsg_thumb_height = 120;
?>
<?php include 'dsg.php'; ?>
...
<?php
  // this (second) gallery will revert to default thumb dimensions,
  // unless you specify them here

  // set custom gallery directory
  $dsg_gallery_dir = 'sunset_photos';
?>
<?php include 'dsg.php'; ?>

Want to show a separate detailed info for each gallery? Just write:

<?php include 'dsg.php'; ?>
<p><small><?php dsginfo(); ?></small></p>
...
<?php include 'dsg.php'; ?>
<p><small><?php dsginfo(); ?></small></p>

If you set $dsg_xhtml variable for a gallery, it will also affect all the ones below it:

<?php
  // generate XHTML compliant (self closing) image tags
  $dsg_xhtml = TRUE;
?>
<?php include 'dsg.php'; ?>
...
<?php
  // this (second) gallery will also use XHTML tags,
  // unless you specifically set $dsg_xhtml variable to FALSE here
?>
<?php include 'dsg.php'; ?>