Template:PhotoSwitcher

From NovaRoma
(Difference between revisions)
Jump to: navigation, search
m
m (better documentation)
Line 67: Line 67:
 
==Simple photo rotator==
 
==Simple photo rotator==
  
The day of the year is now {{#time: z}} and the index is now {{#expr: {{#time: z}} mod 15 }}
 
  
The time is {{#time: H:i:s}}  
+
===Usage===
 +
 
 +
Put '''<nowiki>{{PhotoSwitcher}}</nowiki>''' in any page. Best results will be on a page with two columns or within a <nowiki><div></nowiki> element about 50% of page width wide.
 +
 
 +
===Development===
 +
 
 +
[Note: Try seconds (s) as the key instead of day of the year (z). This makes the image nearly random at each load and limits the number of images to 60, but the Mediawiki cache slows down the rotation.]
 +
 
 +
The number in the "mod" statement should be equal to the number of photos in the list.
 +
 
 +
The list is numbered from zero, not from one, so the last photo number will be one less than the mod number.
 +
 
 +
If the mod number is changed, also change the mod number in the documentation, so the index number is displayed here correctly.
 +
 
 +
The day of the year is now {{#time: z}} and the index is now {{#expr: {{#time: z}} mod 15 }}
  
Note: Try seconds (s) as the key instead of day of the year (z). This makes the image nearly random at each load and limits the number of images to 60, but the Mediawiki cache slows down the rotation.
+
The server time is {{#time: H:i:s}}. The index will increment at midnight, server time.  
  
 
===Choosing Photos===
 
===Choosing Photos===
 
   
 
   
* all images should be in approximately 6x4 format (as produced by a standard 35mm camera), oriented '''horizontally'''. They will be resized to 350 pixels wide automatically.  If the image is taller than it is wide, then resizing to 350px horizontally will still leave it much too large vertically - thus, we have to use horizontal images only.  
+
* All images should be in '''landscape''' (horizontal) orientation. They will be resized to 350 pixels wide automatically.  If the image is taller than it is wide, then resizing to 350px horizontally will still leave it much too large vertically.  
* Please choose '''top quality pictures''' - nothing blurred, dark, murky, out of focus, or with a tree seeming to grow from someone's head - showing historical artifacts, historic sites, groups of Nova Roma citizens, citizens at Roman sites...
+
* Use only '''top quality pictures''' - nothing blurred, dark, murky, out of focus, or with a tree seeming to grow from someone's head.
 +
* '''Good subjects''' include historical artifacts, historic sites, groups of Nova Roma citizens, citizens at Roman sites, Nova Roma events.
  
 
===Add photo to gallery===
 
===Add photo to gallery===
  
Please add this tag: <nowiki>[[Category:Main page]]</nowiki> to the photo description. This will place the photos in [[:Category:Main page]].
+
'''Add this tag: <nowiki>[[Category:Main page]]</nowiki>''' to the photo description. This will place the photos in [[:Category:Main page]].
  
  
 
[[Category: Templates]]</noinclude>
 
[[Category: Templates]]</noinclude>

Revision as of 10:14, 7 May 2010

CIMG8969 223733.jpg

Good security at XX Floralia Aquinci


Contents

Simple photo rotator

Usage

Put {{PhotoSwitcher}} in any page. Best results will be on a page with two columns or within a <div> element about 50% of page width wide.

Development

[Note: Try seconds (s) as the key instead of day of the year (z). This makes the image nearly random at each load and limits the number of images to 60, but the Mediawiki cache slows down the rotation.]

The number in the "mod" statement should be equal to the number of photos in the list.

The list is numbered from zero, not from one, so the last photo number will be one less than the mod number.

If the mod number is changed, also change the mod number in the documentation, so the index number is displayed here correctly.

The day of the year is now 88 and the index is now 13

The server time is 10:59:02. The index will increment at midnight, server time.

Choosing Photos

  • All images should be in landscape (horizontal) orientation. They will be resized to 350 pixels wide automatically. If the image is taller than it is wide, then resizing to 350px horizontally will still leave it much too large vertically.
  • Use only top quality pictures - nothing blurred, dark, murky, out of focus, or with a tree seeming to grow from someone's head.
  • Good subjects include historical artifacts, historic sites, groups of Nova Roma citizens, citizens at Roman sites, Nova Roma events.

Add photo to gallery

Add this tag: [[Category:Main page]] to the photo description. This will place the photos in Category:Main page.

Personal tools