wargroundscanberra:character_sheet
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
wargroundscanberra:character_sheet [2024/07/15 19:16] – curufea | wargroundscanberra:character_sheet [2024/07/19 15:56] (current) – curufea | ||
---|---|---|---|
Line 2: | Line 2: | ||
^ Go back to [[start|Wargrounds Canberra]] | ^ Go back to [[start|Wargrounds Canberra]] | ||
- | Working Location: [[https:// | + | * Working Form: [[form|Fill in Character Sheet]] |
- | Testing | + | * Working Location: [[https:// |
+ | * Test Form: [[form test|Fill in Character Sheet]] | ||
+ | * Test Location: [[https:// | ||
< | < | ||
<?php | <?php | ||
// Character Sheet creator for Wargrounds Canberra | // Character Sheet creator for Wargrounds Canberra | ||
- | // To be added- some images (to be sourced) as defaults - background, factions, | + | // To be added- some images (to be sourced) as defaults - space fillers and icons |
- | // To be added- a player photo (part of the form input) | + | // To be added- a player photo (part of the form input) |
- | // Version 0.3 16/7/24 - curufea@yahoo.com | + | // Version 0.4 19/7/24 - curufea@yahoo.com |
// Currently hosted at www.curufea.com | // Currently hosted at www.curufea.com | ||
Line 30: | Line 32: | ||
// array of default field names | // array of default field names | ||
$names = array( | $names = array( | ||
- | " | + | " |
- | " | + | // the field names used in the form |
- | " | + | $getnames = array( |
- | " | + | " |
- | "Hair Colour:", | + | |
- | "Eye Colour:", | + | // 400px x 400px jpeg images stored on the image path (in the Dokuwiki media area) |
- | "Skin Colour:", | + | |
- | "Class & Tier:", | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
$factions_images = array( | $factions_images = array( | ||
- | " | + | " |
- | " | + | // used to cross reference the form data to the image name (the Bureaucracy plugin for the Dokuwiki doesn' |
- | " | + | |
- | " | + | |
- | " | + | |
$factions_titles = array( | $factions_titles = array( | ||
- | "The Clans", | + | "The Clans", |
- | "The Empire", | + | |
- | " | + | |
- | "The Horde", | + | |
- | "The Wardens" | + | |
- | // test data - note will need some error checking in future, probably warnings where field data is too long to fit | + | // test data - note will need some error checking in future |
$player_data = array ( | $player_data = array ( | ||
" | " | ||
Line 63: | Line 51: | ||
// count number of field names | // count number of field names | ||
$numnames = count($names)-1; | $numnames = count($names)-1; | ||
+ | |||
+ | // check if any variables have been sent to this image - if they have, overwrite the default player data | ||
+ | for ($count=0; | ||
+ | | ||
+ | // Convert the text of the selection for faction to a number | ||
+ | if ($count==9) $player_data[$count]= array_search($_GET[$getnames[$count]], | ||
+ | }; | ||
// Create image | // Create image | ||
Line 126: | Line 121: | ||
===== To do ===== | ===== To do ===== | ||
- | * A [[form]] with default text for field names prefilled (but not as complex as the one in this link) | ||
* Images for the various bits | * Images for the various bits | ||
* Possibly API use for wherever photos get stored (or just upload them) - may need to edit photos to fit | * Possibly API use for wherever photos get stored (or just upload them) - may need to edit photos to fit |
wargroundscanberra/character_sheet.1721096211.txt.gz · Last modified: 2024/07/15 19:16 by curufea