User talk:Scartol/Scartol, on template use and design

From WikiProjectMed
Jump to navigation Jump to search

Comments

In the "Images" section, could you explain what the code means? That is one of the things that I always get hung up on. I am constantly copying things I don't understand. So, explain why we need the table width, the border, what "tr" is, etc. (I've read the "Basics" section now.) Awadewit | talk 08:17, 8 October 2007 (UTC)[reply]

Done. Hope that helps. I didn't want to get into too much HTML explanation; this is why I included the Wikibook link. – Scartol · Talk 13:18, 8 October 2007 (UTC)[reply]

Comments part the second

  • sort of like X in the algebra problems you did in high school - This phrase relies on two unfounded assumptions:
  • 1) You did algebra in high school.
  • 2) You have already reached high school.

Perhaps another joke or a slight rewording? Awadewit | talk 18:05, 14 October 2007 (UTC)[reply]

Yeah, I agree. Done. – Scartol · Talk 23:03, 17 October 2007 (UTC)[reply]
  • I would list more examples of when it is a good idea and when it is not a good idea to use substitution.
Y'know, I'm actually having trouble coming up with examples. If anyone else has ideas, feel free to add them. – Scartol · Talk 23:03, 17 October 2007 (UTC)[reply]
Thank you so much, Awad. I appreciate your kind feedback. – Scartol · Talk 23:03, 17 October 2007 (UTC)<[reply]

Irrelevant parserfunctions

I have to say that the "#if" example is probably the worse example I've ever seen: that's nothing but a needlessly fancy way to say ''{{{1|Futurama}}}''... This key (because your example won't work unless the variables are actually written {{{1|}}}!) technique for defaults is missing entirely from the tutorial! Circeus 04:56, 24 October 2007 (UTC)[reply]

Could you suggest a better way to demonstrate this function? I admit to being new to #if, so I'd appreciate any guidance or links you can offer. Thanks! – Scartol · Talk 17:48, 24 October 2007 (UTC)[reply]
I need to learn how to write templates so that "they nest" whatever that means. A new type of Wikiproject banner (Template:WikiProjects?) allows seperate banners to combine into one. I saw some done that way, but can't find any examples now that I need to.  :-) There sure are a lot of #ifs in that template! Maybe you can figure out what it does. The Transhumanist 02:09, 29 October 2007 (UTC)[reply]
Actually, I think this is what Circeus was getting at above – all the #ifs in the {{WikiProjects}} template do the following:
→ If the user has defined WikiProject #1, then list it. Otherwise list nothing.
→ (repeat x 50)

This is what #if is usually used for. Maybe, TH, you're thinking of {{WikiProjectBanners}}? It allows multiple templates to be combined into one collapsible talk page template. It does pretty much the same thing as {{WikiProjects}}, albeit with slightly more fancy code.

If you want me to include something about this into the tutorial, let me know (but it may be a couple of weeks before I can do it). – Scartol · Talk 02:24, 30 October 2007 (UTC)[reply]

Please read what Circeus said, literally, to understand why the example is too complicated. It hinges on understanding what {{{1|Futurama}}} does: show parameter 1, or, if it's empty, show Futurama. Now, you should see what {{{1|}}} does: show parameter 1 if it's not empty.
{{WikiProjects}} is a better example of #if, in that it doesn't simply display each parameter, say {{{1}}}, it displays {{User {{{1}}}}}. You can't achieve this without a ParserFunction, whereas above you can.
Nesting simply means, roughly, having one thing within another thing of the same type. So a template transcluding a template might be an example. –Pomte 06:06, 6 January 2008 (UTC)[reply]