Dominion Strategy Forum

Please login or register.

Login with username, password and session length
Pages: 1 2 [All]

Author Topic: Templates and documentations  (Read 12134 times)

0 Members and 1 Guest are viewing this topic.

TwiNight

  • Spy
  • ****
  • Offline Offline
  • Posts: 85
  • Respect: +45
    • View Profile
Templates and documentations
« on: November 08, 2012, 12:57:54 am »
+5

IMO, Templates is the best part of MediaWikis. It allow one to rapidly create content and standardize format. (And I am obsessed with standardization)
Over the several years I was active in Wikipedia, I spend considerable time studying and creating templates.
I am no expert, but I am willing to put my knowledge into the wiki.

Here are a list of templates I created or substantially modified and added features to. Use these templates to your convenience as you see fit.

Kingdom
Kingdom/potion
Kingdom/looter
Card2cost
Card2set
Cost
Icon
Navbox
Infobox
Infobox Card
Infobox 2CardCombo
Infobox Set
Infobox Website
Reflist

btw, My User page has information about some current projects. Look for Occupied sandboxes (because content in Available ones is most likely finished and/or published) and the testcases sandbox
« Last Edit: November 29, 2012, 04:23:48 pm by TwiNight »
Logged

Qvist

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2400
  • Shuffle iT Username: Qvist
  • Respect: +4085
    • View Profile
Re: Templates and documentations
« Reply #1 on: November 08, 2012, 02:08:31 am »
0

IMO, Templates is the best part of MediaWikis. It allow one to rapidly create content and standardize format. (And I am obsessed with standardization)
Over the several years I was active in Wikipedia, I spend considerable time studying and creating templates.
I am no expert, but I am willing to put my knowledge into the wiki.

Here are a list of templates I created or substantially modified and added features to. Use these templates to your convenience as you see fit.

Kingdom
Kingdom/potion
Card2cost
Cost
Navbox
Very cool. I appreciate.

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: Templates and documentations
« Reply #2 on: November 08, 2012, 02:34:05 am »
0

Cost

So how do we keep it with the {{Coin}} and {{P}} template then? I see that you used them in your template, but do we want to keep them on the pages, or replace everything with {{Cost}}?
Logged

TwiNight

  • Spy
  • ****
  • Offline Offline
  • Posts: 85
  • Respect: +45
    • View Profile
Re: Templates and documentations
« Reply #3 on: November 08, 2012, 02:40:27 am »
0

Cost

So how do we keep it with the {{Coin}} and {{P}} template then? I see that you used them in your template, but do we want to keep them on the pages, or replace everything with {{Cost}}?

Those are fine. The {{Cost}} is mainly for building other templates
But if the bot can do the job, why not?
Logged

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: Templates and documentations
« Reply #4 on: November 08, 2012, 03:09:18 am »
0

Cost

So how do we keep it with the {{Coin}} and {{P}} template then? I see that you used them in your template, but do we want to keep them on the pages, or replace everything with {{Cost}}?

Those are fine. The {{Cost}} is mainly for building other templates
But if the bot can do the job, why not?
It can.  It's mainly good for the bot itself, if you later want to change something, and half of the templates are {{coin|}} and the other half {{cost|}}, and then there are some Coin and Cost also, you really get mad.
Also, your template is nicer for the bot, as the text is just {{Cost|$text}} and does not need all these Potions and stars and Qs and whatever, so once everything is in this form, it can be captured with just one simple regex.

Probably we can also really rename then {{coin|}} and {{P}} to mark that they are for internal use only.

Edit: But if I see it right, the template can not handle the ? and x yet?
« Last Edit: November 08, 2012, 03:13:59 am by DStu »
Logged

TwiNight

  • Spy
  • ****
  • Offline Offline
  • Posts: 85
  • Respect: +45
    • View Profile
Re: Templates and documentations
« Reply #5 on: November 08, 2012, 03:53:12 am »
0

Edit: But if I see it right, the template can not handle the ? and x yet?

Nice catch! Now it can. Added some special cases for them
I hate special cases, but they would be gone anyway after Qvist get the StringParsers up
Logged

TwiNight

  • Spy
  • ****
  • Offline Offline
  • Posts: 85
  • Respect: +45
    • View Profile
Re: Templates and documentations
« Reply #6 on: November 08, 2012, 04:23:37 am »
0

btw, should change {{P}} in the Main namespace to {{Cost|P}} too
Logged

TwiNight

  • Spy
  • ****
  • Offline Offline
  • Posts: 85
  • Respect: +45
    • View Profile
Re: Templates and documentations
« Reply #7 on: November 09, 2012, 02:46:08 am »
0

Made a generic Infobox meta-template, and testing out a new Infobox Card template

At the meantime, time to standardize the format of card categories to plural + first word capitalize ("Action cards")?

regexp replace: \[\[Category:(.*)[cC]ard\]\]  to  [[Category:$1cards]]
« Last Edit: November 29, 2012, 04:27:12 pm by TwiNight »
Logged

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: Templates and documentations
« Reply #8 on: November 09, 2012, 03:02:52 am »
0

regexp replace:
Code: [Select]
\[\[Category\:([^\]]*)[cC]ards{,1}\]\]  to  [[Category:\1cards]]

FTFM
« Last Edit: November 09, 2012, 03:04:11 am by DStu »
Logged

thirtyseven

  • Duke
  • *****
  • Offline Offline
  • Posts: 362
  • Respect: +475
    • View Profile
Re: Templates and documentations
« Reply #9 on: November 09, 2012, 10:34:40 am »
+2

Template request: This, to use in the Double-Tactician article and the Combo articles.
Logged
I'm only a mid-level player, so I may be wrong...

TwiNight

  • Spy
  • ****
  • Offline Offline
  • Posts: 85
  • Respect: +45
    • View Profile
Re: Templates and documentations
« Reply #10 on: November 09, 2012, 11:41:30 am »
+3

Infobox Combo is on my to-do already

Meanwhile, if StuBot would like to start working on the replace so I can publish the Infobox Card......
Logged

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: Templates and documentations
« Reply #11 on: November 09, 2012, 11:52:12 am »
+1

Infobox Combo is on my to-do already

Meanwhile, if StuBot would like to start working on the replace so I can publish the Infobox Card......
The Stu has to go home first, and I don't know if I have much time tonight to run new scripts. Any Priorities? the Category one?
Logged

TwiNight

  • Spy
  • ****
  • Offline Offline
  • Posts: 85
  • Respect: +45
    • View Profile
Re: Templates and documentations
« Reply #12 on: November 09, 2012, 12:14:12 pm »
0

Infobox Combo is on my to-do already

Meanwhile, if StuBot would like to start working on the replace so I can publish the Infobox Card......
The Stu has to go home first, and I don't know if I have much time tonight to run new scripts. Any Priorities? the Category one?
The Category one. My Infobox Card complies with that category naming convention and I want to make sure it works before actually using it
Logged

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: Templates and documentations
« Reply #13 on: November 09, 2012, 12:57:31 pm »
0

The categories are actually not on the page, but in http://wiki.dominionstrategy.com/index.php/Template:Cardbox
Logged

TwiNight

  • Spy
  • ****
  • Offline Offline
  • Posts: 85
  • Respect: +45
    • View Profile
Re: Templates and documentations
« Reply #14 on: November 09, 2012, 01:36:55 pm »
+1

The categories are actually not on the page, but in http://wiki.dominionstrategy.com/index.php/Template:Cardbox
But then those on the category pages themselves (like "Category: Card" on "Category: Action card") still have to be fixed

EDIT: nvm, I can manually fix that given the volume is small enough
EDIT2: Fixed. Some admin can start deleting the now non-existent categories listed here (execpt "Combo")
« Last Edit: November 09, 2012, 03:41:18 pm by TwiNight »
Logged

jonts26

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2746
  • Shuffle iT Username: jonts
  • Respect: +3668
    • View Profile
Re: Templates and documentations
« Reply #15 on: November 10, 2012, 03:00:24 am »
+3

TwiNight, I just wanted to say you are doing an awesome job with all the new templates. Things are looking really good. Keep it up.
Logged

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: Templates and documentations
« Reply #16 on: November 10, 2012, 08:42:50 am »
+1

I'm botting Cardbox->Infobox Card.
Hope I captured everything.
Logged

TwiNight

  • Spy
  • ****
  • Offline Offline
  • Posts: 85
  • Respect: +45
    • View Profile
Re: Templates and documentations
« Reply #17 on: November 10, 2012, 03:58:26 pm »
0

I'm botting Cardbox->Infobox Card.
Hope I captured everything.
Oh you did that for me!
I was trying to make a new Cardbox so that {{subst:Cardbox}} will give the Infobox so you can just replace Cardbox to subst:Cardbox, but fell asleep and you already finished it when I woke up. (And you fixed all those text2 and large {{Cost}} and large {{VP}} !!!!

Nonetheless, it would be better to include the |kingdom = Yes param despite it will default so.
And Ruins pages also defaulted to |kingdom = Yes ......, among other minor things. I can fix those manually

e: And Prizes and Madman and Mercenary
« Last Edit: November 10, 2012, 04:10:05 pm by TwiNight »
Logged

TwiNight

  • Spy
  • ****
  • Offline Offline
  • Posts: 85
  • Respect: +45
    • View Profile
Re: Templates and documentations
« Reply #18 on: November 10, 2012, 06:13:35 pm »
0

News:
Infobox 2CardCombo done. But honestly not much can be put into the Infobox
Logged

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: Templates and documentations
« Reply #19 on: November 10, 2012, 07:56:21 pm »
0

I'm botting Cardbox->Infobox Card.
Hope I captured everything.
Oh you did that for me!
I was trying to make a new Cardbox so that {{subst:Cardbox}} will give the Infobox so you can just replace Cardbox to subst:Cardbox, but fell asleep and you already finished it when I woke up. (And you fixed all those text2 and large {{Cost}} and large {{VP}} !!!!

Nonetheless, it would be better to include the |kingdom = Yes param despite it will default so.
And Ruins pages also defaulted to |kingdom = Yes ......, among other minor things. I can fix those manually

e: And Prizes and Madman and Mercenary
Yeah, I didn't really notice this |kingdom option on the cards I looked at to decide what the template should look like, so it's basically nowhere.
Logged

TwiNight

  • Spy
  • ****
  • Offline Offline
  • Posts: 85
  • Respect: +45
    • View Profile
Re: Templates and documentations
« Reply #20 on: November 10, 2012, 11:42:29 pm »
0

I'm botting Cardbox->Infobox Card.
Hope I captured everything.
Oh you did that for me!
I was trying to make a new Cardbox so that {{subst:Cardbox}} will give the Infobox so you can just replace Cardbox to subst:Cardbox, but fell asleep and you already finished it when I woke up. (And you fixed all those text2 and large {{Cost}} and large {{VP}} !!!!

Nonetheless, it would be better to include the |kingdom = Yes param despite it will default so.
And Ruins pages also defaulted to |kingdom = Yes ......, among other minor things. I can fix those manually

e: And Prizes and Madman and Mercenary
Yeah, I didn't really notice this |kingdom option on the cards I looked at to decide what the template should look like, so it's basically nowhere.
On deeper thought tough, I don't think that kingdom param matters that much.
Meanwhile, you can remove the |set param from the infoboxes now that I have the Card2set template
Logged

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: Templates and documentations
« Reply #21 on: November 11, 2012, 05:19:34 am »
0

Meanwhile, you can remove the |set param from the infoboxes now that I have the Card2set template
Done.
Logged

TwiNight

  • Spy
  • ****
  • Offline Offline
  • Posts: 85
  • Respect: +45
    • View Profile
Re: Templates and documentations
« Reply #22 on: November 12, 2012, 04:28:13 am »
0

Some news:
Infobox Website done, though not much use.
Infobox Card now has an "a.k.a." param. (Not something the bot can implement)
Uploaded set icons and implemented those in Infobox Card and Kingdom Templates. (See Template:Icon)
Logged

TwiNight

  • Spy
  • ****
  • Offline Offline
  • Posts: 85
  • Respect: +45
    • View Profile
Re: Templates and documentations
« Reply #23 on: November 13, 2012, 05:32:23 am »
+4

TwiNight, I just wanted to say you are doing an awesome job with all the new templates. Things are looking really good. Keep it up.

Just noticed,
A post praising someone for his good job getting more up votes than the praised.
Logged

ftl

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2056
  • Shuffle iT Username: ftl
  • Respect: +1345
    • View Profile
Re: Templates and documentations
« Reply #24 on: November 13, 2012, 10:11:46 pm »
0

BTW, the [[Kingdom card]] link which is on each cardbox redirects to the [[Kingdom]] page which has been deleted.

That's sort of weird. What used to be there before it was deleted? Did it get moved somewhere? Should that not be a link any longer?

[edit] nevermind, found where it's supposed to go I think
[edit] nevermind, just redirected it to gameplay
« Last Edit: November 13, 2012, 10:18:11 pm by ftl »
Logged

jonts26

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2746
  • Shuffle iT Username: jonts
  • Respect: +3668
    • View Profile
Re: Templates and documentations
« Reply #25 on: November 13, 2012, 10:23:18 pm »
0

Yeah the kingdom page was like one and a half sentences. I probably should have just redirected it instead of deleting it outright but that's why I'm counting on you guys to clean up my messes.
Logged

michaeljb

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1422
  • Shuffle iT Username: michaeljb
  • Respect: +2113
    • View Profile
Re: Templates and documentations
« Reply #26 on: November 14, 2012, 01:47:36 pm »
0

I just added a new template, NewCard. It just gets $card-new.jpg instead of $card.jpg so that the new art for the Base Cards can be used when hovering over.

I just copied the Card template and changed the file it gets, so there might be a better/cleverer way to handle this, but it seemed good enough. Just use {{NewCard|Province}}.

:e I have applied the NewCard template to the list on the Base Cards page, and the Base Cards section in the Navbox Cards.
« Last Edit: November 14, 2012, 02:00:56 pm by michaeljb »
Logged
🚂 Give 18xx games a chance 🚂

greatexpectations

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1097
  • Respect: +1067
    • View Profile
Re: Templates and documentations
« Reply #27 on: November 26, 2012, 11:31:54 pm »
0

question for some of you template folks: can you hook us up with the template needed to format a references section? i'm looking for something like {{Reflist|2}} so i can create neat two column reference sections. it's a non-issue for most pages, but i am slowly working on improving the goko and isotropic pages and any attempts at objectivity there will require citing sources.
Logged
momomoto: ...I looked at the tableau and went "Mountebank? That's for jerks."
rrenaud: Jerks win.

thirtyseven

  • Duke
  • *****
  • Offline Offline
  • Posts: 362
  • Respect: +475
    • View Profile
Re: Templates and documentations
« Reply #28 on: November 26, 2012, 11:46:09 pm »
0

question for some of you template folks: can you hook us up with the template needed to format a references section? i'm looking for something like {{Reflist|2}} so i can create neat two column reference sections. it's a non-issue for most pages, but i am slowly working on improving the goko and isotropic pages and any attempts at objectivity there will require citing sources.

I added <small></small> tags to those two pages, which will at least provide a temporary fix if you think we still need a two-column reference template... what do you think?
Logged
I'm only a mid-level player, so I may be wrong...

greatexpectations

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1097
  • Respect: +1067
    • View Profile
Re: Templates and documentations
« Reply #29 on: November 27, 2012, 12:00:07 am »
0

I added <small></small> tags to those two pages, which will at least provide a temporary fix if you think we still need a two-column reference template... what do you think?

yeah that should do until we can get a template. assuming doing that sort of thing isn't all that hard of course. i really have no idea, i just write stuff.
Logged
momomoto: ...I looked at the tableau and went "Mountebank? That's for jerks."
rrenaud: Jerks win.

TwiNight

  • Spy
  • ****
  • Offline Offline
  • Posts: 85
  • Respect: +45
    • View Profile
Re: Templates and documentations
« Reply #30 on: November 28, 2012, 07:04:12 pm »
0

I added <small></small> tags to those two pages, which will at least provide a temporary fix if you think we still need a two-column reference template... what do you think?

yeah that should do until we can get a template. assuming doing that sort of thing isn't all that hard of course. i really have no idea, i just write stuff.

I don't think that possible, considering it is one unbreakable block of <reference/>......
Logged

greatexpectations

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1097
  • Respect: +1067
    • View Profile
Re: Templates and documentations
« Reply #31 on: November 28, 2012, 07:37:41 pm »
0

I don't think that possible, considering it is one unbreakable block of <reference/>......

i'm referring to something like this. it breaks the references down into two columns. looking at the source for that reference section shows:
==References==
{{Reflist|2}}
Logged
momomoto: ...I looked at the tableau and went "Mountebank? That's for jerks."
rrenaud: Jerks win.

TwiNight

  • Spy
  • ****
  • Offline Offline
  • Posts: 85
  • Respect: +45
    • View Profile
Re: Templates and documentations
« Reply #32 on: November 29, 2012, 04:06:30 pm »
+1

I don't think that possible, considering it is one unbreakable block of <reference/>......

i'm referring to something like this. it breaks the references down into two columns. looking at the source for that reference section shows:
==References==
{{Reflist|2}}

I thought wp is using ground work that we don't have but it turns out it only uses CSS3
Still, it won't work for IE at the time

e: Done and edited Iso and Goko pages
« Last Edit: November 29, 2012, 04:23:27 pm by TwiNight »
Logged

greatexpectations

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1097
  • Respect: +1067
    • View Profile
Re: Templates and documentations
« Reply #33 on: November 29, 2012, 08:58:43 pm »
0

just saw the change! much appreciated.
Logged
momomoto: ...I looked at the tableau and went "Mountebank? That's for jerks."
rrenaud: Jerks win.
Pages: 1 2 [All]
 

Page created in 0.237 seconds with 20 queries.