Shuffle: order=random

Note: The shuffle=1 parameter that existed in the old Thumblist is deprecated. Please use order=random with ThumbList².

This page demonstrates the possibility of a random thumbnail displayed, or a random selection of thumbnails, by the parameter order=random.

One random thumbnail

This is only possible with thumblist count=1:

(:thumblist count=1 px=64 order=random:)
NMMP_dolphin_with_locator.jpeg: 532x640, 132k (2009-02-13 12:30)

Whole list randomized

(:thumblist count=4 px=64 order=random:)
Crew_of_a_Sherman-tank_south_of_Vaucelles.jpg: 457x640, 101k (2009-02-13 12:30) DSCF0003.jpg: 438x640, 22k (2009-02-13 12:30) Sunset-Marne.jpg: 800x600, 105k (2024-04-20 15:06) Breslau_Ring_Ostseite_1890-1900.jpg: 800x603, 158k (2009-02-13 12:30)

Reload the page to see how it changes. If you use supercache=1 (don't), the files will obviously be shuffled only once and stored/displayed in that order.

(Re-)Ordering a random sample

(:thumblist count=4 px=64 order=random order2=name:)
Aerogelbrick.jpg: 606x640, 62k (2009-02-13 12:30) Breslau_Ring_Ostseite_1890-1900.jpg: 800x603, 158k (2009-02-13 12:30) Fractal_Broccoli.jpg: 800x600, 73k (2009-02-13 12:30) Mcron.jpg: 1033x775, 162k (2016-05-16 12:27)

Using order=random will shuffle the list. Using count=4 will take 4 pictures from the random list. Using order2=name will order the 4 random pictures by name. See also Order.

Notes

  • "random order"==no "image trails" in the template (<<|>>). Because the files are shuffled on every page load and there is no way to cache the trail list (it would change on the next page view).
  • On this page where the order is random, I am using $EnableIMSCaching = 0; to prevent the page caching by the browsers.

See also