Wiki Questions

  • #1
    As I've been working on the wiki I've come up with a slowly growing list of questions. I figured I'd throw them out and see if anyone has an answer.

    1. Is there a way to create local variables?
    2. Is it better to repeat large blocks (for instance the class id switch statement) multiple times on a page or to create a template that acts like a function and can be used multiple times in the same page?
    3. Does the wiki or DiabloFans have any stock images for arrows? Such as fancy up, down, left or right arrows.

    Thanks for any responses.
  • #2
    1. The closest thing you're going to come to that is when you define a parameter in the template, which in effect becomes a local variable for the scope of that template.

    2. Always the latter. And even better would be to generalize the template so it can be used by other pages, if you think it provides a common functionality.

    3. Not sure, but what is the context?
    Come and help our Diablowiki grow! Here's how you can contribute
  • #3
    1. You can also do it with the help of Extension:Variables, which is installed in the wiki. It allows you to create a variable on a page that can be used on other places on the same page. I don't know how transclusions would affect these variables, but you could mess around with it in your sandbox and see how it works.

    3. No. What were you planning on doing? What we're using right now are the arrows that can be see in DiabloWiki.com - Template:Infobox Item Template:Infobox Item.
    DiabloWiki.com - PlugY PlugY for Diablo II allows you to reset skills and stats, transfer items between characters in singleplayer, obtain all ladder runewords and do all Uberquests while offline. It is the only way to do all of the above. Please use it.

    Supporting big shoulderpads and flashy armor since 2004.
  • #4
    Thanks for the quick responses, much appreciated. I think I'm going to turn the spell id switch (from D3 Skills) into it's own template so that the functionality is preserved but it can be used in other templates or multiple times in D3 Skills.

    Quote from PhrozenDragon

    3. No. What were you planning on doing? What we're using right now are the arrows that can be see in DiabloWiki.com - Template:Infobox Item Template:Infobox Item.


    I posted my current plans in http://www.diablofans.com/topic/30136-d3-skillsskill-descriptions/ so figured it would be better to just link you to that than have the same topic in multiple threads. I'd like the arrows for the prev/next functionality I'm working on at the moment.

    Oops: I forgot to post this after the preview so it's a little out of date now. Posting it anyway.

    Edit: Got another question. It just hit me that class_name_en might be shorthand for class name enumeration as opposed to the class name english that I thought it was. Anyone know which way it is?

    Quote from PhrozenDragon

    1. You can also do it with the help of Extension:Variables, which is installed in the wiki. It allows you to create a variable on a page that can be used on other places on the same page. I don't know how transclusions would affect these variables, but you could mess around with it in your sandbox and see how it works.

    Just tried out the variable extension and it rocks.
  • #5
    Quote from Talkerst

    Edit: Got another question. It just hit me that class_name_en might be shorthand for class name enumeration as opposed to the class name english that I thought it was. Anyone know which way it is?

    It's for english. Blizzard regularly uses it to distinguish between language versions in all their games, and since item_name is the only field that would be different between language versions, it makes sense.
    DiabloWiki.com - PlugY PlugY for Diablo II allows you to reset skills and stats, transfer items between characters in singleplayer, obtain all ladder runewords and do all Uberquests while offline. It is the only way to do all of the above. Please use it.

    Supporting big shoulderpads and flashy armor since 2004.
  • #6
    I have another question, with a possible follow up depending on the answer.

    *When a template is interpreted (transclusion occurs?) is that done at the server or the client level? I.E. I have a page that is built using a template and that template pulls from two other templates. Does the client download all 4 files and then put them together or does the server build the page and then just send the final result to the client?

    Thanks
  • #7
    The server builds the file and the client simply sees the result. This is why changes to highly used templates should be limited because the server has to parse out every change (including reversions) to every instance of the template on the wiki.

    You know Talkerst, you'd be more likely to get answers to questions about the wiki if you ask them on the wiki....
  • #8
    Quote from Wynthyst

    You know Talkerst, you'd be more likely to get answers to questions about the wiki if you ask them on the wiki....

    Thanks for the info. How do I ask a general question on the wiki? I know how to ask an individual or talk about a page, but I haven't seen a general area. Or do I just add it to my talk page and others will find it somehow?
  • #9
    Or you can put it on one of our talk pages, or on the Community Portal talk page (there's a link in the Nav bar to the CP).
  • To post a comment, please or register a new account.
Posts Quoted:
Reply
Clear All Quotes