User talk:MHSstaff: Difference between revisions

From The Urban Dead Wiki
Jump to navigationJump to search
Line 3: Line 3:
Let's see, you can easily make a template that can do things from changing the side text, picture, colour scheme contents, pretty much anything really. I'm assuming by the side text you mean that if a new Papa came along, you would want to make one edit to the template page which would then update on any page that template was included on. Would you like me to make a template for you to use? --{{User:A Helpful Little Gnome/Sig}} 21:42, 26 October 2009 (UTC)
Let's see, you can easily make a template that can do things from changing the side text, picture, colour scheme contents, pretty much anything really. I'm assuming by the side text you mean that if a new Papa came along, you would want to make one edit to the template page which would then update on any page that template was included on. Would you like me to make a template for you to use? --{{User:A Helpful Little Gnome/Sig}} 21:42, 26 October 2009 (UTC)
:Yes, that would be wonderful, especially for me to see as an example. What confuses me is that I would not want the archived pages to change if we change the Papa etc for example. Can templates take variables? -[[User:MHSstaff|MHSstaff]] 19:43, 27 October 2009 (UTC)
:Yes, that would be wonderful, especially for me to see as an example. What confuses me is that I would not want the archived pages to change if we change the Papa etc for example. Can templates take variables? -[[User:MHSstaff|MHSstaff]] 19:43, 27 October 2009 (UTC)
::Yeah, that's the main idea behind a template. Adding a variable is simply putting a <nowiki>{{{variable}}} or {{{1}}}</nowiki>  in the template space, so when someone calls the template, say {{tl|groupbox}} they need only enter what they want. For example, the code of {{tl|MaltonLocated}} looks like this,
<nowiki>{| style="border:solid #565 2px; width:250px; text-align:center"
|rowspan=2|[[Image:earth.jpg]]
|style="background:#565; color:white; font-size:86%; width:100%"|'''Where is Malton?'''
|-
|style="font-size:xx-small"|</nowiki><font color="red">{{{Name}}}</font> thinks that <nowiki>[[Malton]]</nowiki> is <font color="red">{{{Place}}}</font><nowiki>.
|}</nowiki>
When someone calls the template by placing <nowiki>{{MaltonLocated|Name=|Place=}}</nowiki> on their page, the parts where you put <nowiki>{{{Name}}} and {{{Place}}}</nowiki> (on the template page) come up as your variables, which you can then put whatever you like in the Name= and Place= spots. So with wanting to make the Papa a variable, on the template page you could add <nowiki>{{{Papa}}}</nowiki> where the Papa spot is on the sidebar.  Then call the template and add the appropriate Papa. I'll make the template in a wee bit, any who.--{{User:A Helpful Little Gnome/Sig}} 00:33, 28 October 2009 (UTC)

Revision as of 00:33, 28 October 2009

Templates

Let's see, you can easily make a template that can do things from changing the side text, picture, colour scheme contents, pretty much anything really. I'm assuming by the side text you mean that if a new Papa came along, you would want to make one edit to the template page which would then update on any page that template was included on. Would you like me to make a template for you to use? --  AHLGTG THE END IS NIGH! 21:42, 26 October 2009 (UTC)

Yes, that would be wonderful, especially for me to see as an example. What confuses me is that I would not want the archived pages to change if we change the Papa etc for example. Can templates take variables? -MHSstaff 19:43, 27 October 2009 (UTC)
Yeah, that's the main idea behind a template. Adding a variable is simply putting a {{{variable}}} or {{{1}}} in the template space, so when someone calls the template, say {{groupbox}} they need only enter what they want. For example, the code of {{MaltonLocated}} looks like this,
{| style="border:solid #565 2px; width:250px; text-align:center"
|rowspan=2|[[Image:earth.jpg]]
|style="background:#565; color:white; font-size:86%; width:100%"|'''Where is Malton?'''
|-
|style="font-size:xx-small"|{{{Name}}} thinks that [[Malton]] is {{{Place}}}.
|}

When someone calls the template by placing {{MaltonLocated|Name=|Place=}} on their page, the parts where you put {{{Name}}} and {{{Place}}} (on the template page) come up as your variables, which you can then put whatever you like in the Name= and Place= spots. So with wanting to make the Papa a variable, on the template page you could add {{{Papa}}} where the Papa spot is on the sidebar. Then call the template and add the appropriate Papa. I'll make the template in a wee bit, any who.--  AHLGTG THE END IS NIGH! 00:33, 28 October 2009 (UTC)