FANDOM


This Forum has been archived

Visit Discussions
Forums: Index > Wiki Discussion > Random character image generator
Note: This topic has been unedited for 3790 days. It is considered archived - the discussion is over. Do not continue it unless it really needs a response.
NPC-Cailan

King Cailan Theirin of Ferelden. (See new image)

Hi all. Just thought I'd highlight a new template I've created: Template:RandomCharacterImage. This can be seen to the right of this paragraph and picks a random image from a list of pics of characters in the Codex, using the code provided on Forum:Front Page changes by JoePlay@fandom. (Use the "See new image" link in the caption area to see it in action.) The template is in use on Codex: Characters, and I pulled it together because no one image seemed right for that page. However, it could be used on any page where a random character image is desirable. Oh, and the images are mainly the mugshots from the character pages, so if anyone can edit the template to replace any of them with better/more exciting pics of the same characters then that would be great! Zoev 16:41, January 11, 2010 (UTC)


This is ubber cool, I like it alot. I am a big fan of shuffle on my ipod, so naturally this inspires. I can't stop refreshing this page!! :D Hollowness 05:04, January 12, 2010 (UTC)


Thanks, Hollowness! So that folks can see what images the template's currently picking from, I've now added them all to Category:Codex: Characters. I'm also having a bit of a technical problem I hope someone can help me with. The template is meant to take a single optional parameter specifying the desired image width, but it ain't working: even when a width is supplied it seems to be stuck at the default value of 270px. I've obviously got the syntax wrong, but I just can't see where. --Zoev 15:43, January 12, 2010 (UTC)


Do you think it has anything to do with the parameters you set in the template itself?

{{{1|270px}}}

sample from your template:


[[File:Zathrian close up.JPG|thumb|{{{1|270px}}}|[[Zathrian]], ancient [[Keeper]] of a clan of [[Dalish|Dalish Elves]] who roam the [[Brecilian Forest]]. ([{{fullurl:{{FULLPAGENAME}}|action=purge}} See new image])]

Maybe if that is removed or changed it work correctly? Hollowness 17:37, January 12, 2010 (UTC)


That's where the problem is alright - what it's meant to do is take the first parameter supplied, but if that's empty or doesn't exist, use a value of 270px instead. Eg, {{RandomCharacterImage|100px}} is meant to make the image 100px wide, but it doesn't. As long as they're that wide in the first place, the images will still be 270px (if I change the default from 270px, then that does affect the image size). The problem I have is that the syntax looks the same, to me, as that on other templates I've done that work fine. I'm obviously missing something stupid. --Zoev 23:07, January 12, 2010 (UTC)


Just cause this happens to me a bit: did you make sure you did a hard save and not just preview when changing these parameters? Its like a loop error. Hollowness 23:28, January 12, 2010 (UTC)


Okay, folks, the template is working as well as it's going to for now. Astonishingly, it wasn't me that was doing something wrong, but an actual wiki bug (Tierrie tracked it down), so until that's fixed the template will have to be one width fits all. I'm only planning on using it on Codex: Characters, where the width doesn't really matter, so if anyone wants me to change the width from its current value of 200px, then please do drop me a line. --Zoev 00:22, January 14, 2010 (UTC)


Right on, :D this is a kick ass template, I am glad it got that issue worked out. Hollowness 02:49, January 14, 2010 (UTC)

Community content is available under CC-BY-SA unless otherwise noted.