User talk:Montanabw/Pony prize
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)
- Find your favorite! And how to do the syntax? ;-D Montanabw(talk) 17:49, 12 March 2013 (UTC)
- hi Iam to 2603:6010:AA00:C24A:5451:BF62:81C1:B395 (talk) 10:04, 18 May 2024 (UTC)
- 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...
-
Adorable
-
Is that you Taylor Lautner?
-
Very sympathetic
-
A charming carousel horse
-
And my all-time favourite, but you knew it already
-
Also, if someone is so epicly awesome one pony won't cut it at all, I'll be glad to write you an "epic=true" extension in the template so that you can give not one, but two fine ponies at the same go.
-
Or four ponies! (And an extremely fascinating bicycle.)
-
Or even seven ponies! (Although without a bicycle.)
-
Or eleven, for astoundingly amazing awesomeness.
--Pitke (talk) 16:53, 27 April 2013 (UTC)
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)
- 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)
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)
- You'll use {{Montanabw/Pony prize|toy=true}} or {{Montanabw/Pony prize|epic=true}}. --Pitke (talk) 15:34, 2 May 2013 (UTC)
- 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)
- 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)
So show us in action here
editOK, 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)