New Development Release: Qdig 20060410

This is another refinement release, but this one has much more substantial changes compared to the other two that affect gallery behavior in general and the default gallery settings in particular.


This is the latest beta release of Qdig.

Like the two releases before it, this release is geared toward a 1.3.0 release. Unlike those, this one includes some rather deep changes amounting to "two steps forward, one step back". The end result is considerably different -- hopefully improved -- gallery behavior and default gallery appearance.

The "one step back" is that some more refinement along the lines of what was done in the two previous releases is now in order. The rather large number of available settings means certain combinations may lead to unexpected results. (Testing for that is one of the most arduous tasks involved in developing the script.)

New default gallery size

Qdig is now much smarter about gallery width in general. There are new $default_nav_width and $width_margin_pct settings that set a default width for navigation rows and thumbnail-link rows. The point of this is to simplify changing the width of galleries. Before, any of three width settings could cause the gallery to be wider because "the widest row wins". Now you can change one width and have that setting affect all three width-related settings.

If the width of the displayed image is wider than the navigation rows, Qdig pays attention to that and sets the gallery table width accordingly. This keeps (most) images from pressing against the edge of the table, and that looks better if the gallery table's background color is different than the rest of the page's background color.

Likewise, there is a default height value now. It's not actually the gallery table's height, but it's related to it. This new width / height scheme has several benefits:

  • The size of the gallery table "flexes" much less now. That is, the width and height don't change as much so it's easier to predict what the size of the gallery will be from page to page.
  • The subdirectories-only pages have a nicer appearance, with the gallery links in the midst of some white space rather than all bunched at the top.
  • Small images no longer cause the gallery to shrink down nearly as much, if at all. The small image appears in the midst of white space (or, more accurately, default- background-color space :-) ) and placement of the navigation components of the pages remains more consistent from page to page.

Improved Names View

Names view, which was almost scrapped some time ago because it "wasn't working out", has been dramatically approved. The new height value is applied along with some CSS magic so a page with a large number of images no longer breaks the page layout like it did in Qdig 1.2.

Names view also benefited from the new height code in another way. Before, the navigation rows "stuck" to the top and / or bottom of the displayed image, which looked goofy on small-image pages. Now the navigation rows stay stable (well, the top one does and the bottom one possibly does) and the small images floats in the middle of display area. Both the appearance and usability improved as a result.

Now when you hit a Full Size link in Names view the sidebar is suppressed to make more room for the temporary viewing of the full-sized image.

Better arrangement of rows of links

Pages with multiple rows of numerals- and thumbnail-links will arrange themselves better now.

Numerals view is improved because the last row of numeral links will no longer be wider than all of the other rows, which happened because of the old anti-orphan algorithm. If the last row "would have been wider", the first row is reduced in size and the last row becomes a next-to-last row that's also reduced in size by the same amount. The number of links that were chopped off of those two rows, plus the one(s) that would have made the last row wider become the new last row.

Multi-row thumbnail pages, including thumbs-only pages, received similar treatment. The old algorithm caused the first row to virtually always be shorter than the others and the the last row to sometimes be longer. Now if there would have been an image past the the "soft wrap" width, the first and last rows become similar-sized, each slightly wider than 50%. If one is slightly wider than the other, it's the first row rather than the last. At least it's supposed to work that way. :-)

Some tuning of these, especially the multi-row thumbs pages, may still need to be done.

New default settings

The size of "Small" images is increased by 32 pixels and Small is the new default size out-of-the box. This change, along with some other changes, were made for a few reasons, not the least of which is that they should help make Qdig galleries easier to slip into other web pages.

If you don't convert thumbnails, the default text-links view used to be "none". Now, since the names view has been improved, the default is "names" instead. If the new names view turns out to be sufficiently cross-browser compatible, it will stay that way for Qdig 1.3.

Because of the more compact default gallery size, the prefs link label was changed from "Preferences" to a plus sign so it will be less likely to wrap to the next line.

This release is likely to be less predictable than the previous couple of releases, but hopefully the new changes improve Qdig significantly and any glitches can be ironed out right away.

As always, feedback about all this welcomed Just use the appropriate forum (probably General Discussion).


  • Added $default_nav_width setting that sets default widths for navigation rows and thumbnail/text-link rows.
  • Added $width_margin_pct setting that makes sure the gallery has a bit of margin around images.
  • Added a new gallerySize() function that dynamically chooses a good width for the gallery table and builds a width= attribute for the <table> tag.
  • Turned the directory navigation table into a division (<div>).
  • Reduced the default gallery size.
  • Reworked the algorithms for thumbnail and numeral links so the last row now avoids being longer than the others.
  • The max. width to be considered "small" is now 544px instead of 512px.
  • Changed the default resampled image size from Medium to Small.
  • Refactored the gallerySize() function. It's now more robust and returns an array with the attribute it had before, plus a height value.
  • Tweaked the Preferences link so it looks like the other links in the Directory Navigation row.

See CHANGELOG.txt for a complete list of changes.

<< Qdig Web Site RSS Feed Added | News | New Development Release: Qdig 200600413 >>