User talk:Montanabw/Pony prize

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

How about adding an optional |toy=true clause for the chance that a recipient is allergic or doesn't trust their imaginary ability to afford an imaginary pony ;) There are some rtaher charming rocking horses, hobby horses, horse figurines, and toy horse models over at Commons... --Pitke (talk) 11:10, 12 March 2013 (UTC)[reply]

Find your favorite! And how to do the syntax?  ;-D Montanabw(talk) 17:49, 12 March 2013 (UTC)[reply]
hi Iam to 2603:6010:AA00:C24A:5451:BF62:81C1:B395 (talk) 10:04, 18 May 2024 (UTC)[reply]
Oh it's a simple lil' if-clause, can't remember the exact form right now but it's in the general form of [[File:{{#if:{{{toy|}}|Toynamefile.jpg|Ponynamefile.jpg}}|imagewidthpx]], i.e. "if parameter toy is unempty, then use Toynamefile.jpg, otherwise use Ponynamefile.jpg". As for file suggestions...

--Pitke (talk) 16:53, 27 April 2013 (UTC)[reply]

OK, if you can show me the syntax (maybe on this page) , here are my winners; they look best in small sizes!

Allergies: File:El caballo.JPG

Awesome: File:Not quite clones - geograph.org.uk - 1127155.jpg (it would be better if they were stampeding, but you can't have everything)

LOL! Montanabw(talk) 21:47, 29 April 2013 (UTC)[reply]

Ha! I remembered the syntax correctly! Thus, replace [[File:Chestnut pony with flaxen.jpg|150px]] with: [[File:{{#if:{{{toy|}}}|El caballo.JPG|{{#if:{{{epic|}}}|Not quite clones - geograph.org.uk - 1127155.jpg|Chestnut pony with flaxen.jpg}}}}|150px]]
--Pitke (talk) 17:08, 30 April 2013 (UTC)[reply]

OK, but then where/what do I do to make the others pop up? Can you steal my existing pony prize and paste it here with the syntax? I'm truly quite hopeless with this stuff! Montanabw(talk) 21:21, 30 April 2013 (UTC)[reply]

You'll use {{Montanabw/Pony prize|toy=true}} or {{Montanabw/Pony prize|epic=true}}. --Pitke (talk) 15:34, 2 May 2013 (UTC)[reply]
Ah! There's the rub: I don't yet know how to make it into a template and appear with parameters! {{Montanabw/Pony prize}} I may have to ask for help on that... Montanabw(talk) 22:31, 2 May 2013 (UTC)[reply]
It appears the template syntax isn't able to handle subsections, so you'll have to choose: either separate subpages for each template, or a more complex template code (namely, with a switch function). --Pitke (talk) 08:51, 3 May 2013 (UTC)[reply]

So show us in action here[edit]

OK, so with the changes you made, show me what an EPIC pony prize would look like here, I'm still fuzzy about how to make it work? Montanabw(talk) 04:34, 4 May 2013 (UTC)[reply]