Add portrait rotation code, current images, and the template used for Glamdrol.
BIN
website/frontpage/portrait-rotation/0-template.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
17
website/frontpage/portrait-rotation/README
Normal file
|
@ -0,0 +1,17 @@
|
|||
New files for the wesnoth.org frontpage portrait rotation
|
||||
should be made based on the template file in this directory.
|
||||
I personally recommend using the JPEG format with some
|
||||
appropriate parameters (and a good exporter program) so that
|
||||
the images are neither too large in file size, nor look
|
||||
ugly/blurry/with compression artifacts.
|
||||
|
||||
All image files should use the *.jpg extension; otherwise
|
||||
you'll need to change selector.php.
|
||||
|
||||
The selector.php code may be used in place of an actual
|
||||
image file in CSS, HTML, whatever; the client just tries to
|
||||
fetch it and the server runs the PHP, delivering one of the
|
||||
*.jpg files in the directory.
|
||||
|
||||
-- Ignacio
|
||||
|
BIN
website/frontpage/portrait-rotation/assassin.jpg
Normal file
After Width: | Height: | Size: 9.4 KiB |
BIN
website/frontpage/portrait-rotation/dark_adept_female.jpg
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
website/frontpage/portrait-rotation/dwarvish_sentinel.jpg
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
website/frontpage/portrait-rotation/dwarvish_thunderer.jpg
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
website/frontpage/portrait-rotation/elvish_ranger.jpg
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
website/frontpage/portrait-rotation/elvish_sorceress.jpg
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
website/frontpage/portrait-rotation/iron_mauler.jpg
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
website/frontpage/portrait-rotation/mage_female.jpg
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
website/frontpage/portrait-rotation/master_bowman.jpg
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
website/frontpage/portrait-rotation/royal_guard.jpg
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
website/frontpage/portrait-rotation/saurian_skirmisher.jpg
Normal file
After Width: | Height: | Size: 16 KiB |
22
website/frontpage/portrait-rotation/selector.php
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
/*
|
||||
* Random image selector by Ignacio R. Morelle <shadowm2006@gmail.com>
|
||||
* This file is in public domain.
|
||||
*/
|
||||
|
||||
$d_entries = glob(dirname(__FILE__)."/*.jpg");
|
||||
$index = rand(0,sizeof($d_entries)-1);
|
||||
$d_entry = $d_entries[$index];
|
||||
|
||||
if(file_exists($d_entry)) {
|
||||
header('Content-type: image/jpeg');
|
||||
header('Pragma: no-cache');
|
||||
|
||||
ob_clean();
|
||||
flush();
|
||||
readfile($d_entry);
|
||||
}
|
||||
|
||||
exit;
|
||||
|
||||
?>
|
BIN
website/frontpage/portrait-rotation/sergeant.jpg
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
website/frontpage/portrait-rotation/thief.jpg
Normal file
After Width: | Height: | Size: 12 KiB |