Template talk:Spell Card Info

From Touhou Wiki
Jump to navigation Jump to search


Templete for IN spellcard list by Aona. For PCB and EoSD spellcards, replacing ZUN's comment to "Attitude" will do, I guess. Yes, obviously this is based on (or rather copied and modified) Leviathean's character profile templete, so amount of work I did is quite minor... heh.

As you see, it's not viable at now. Stages and Difficulty squares are pushed to far right, and no matter how I put width and such it didn't want to move from there. I had some stare at Infobox template which has similer structure to this, but I couldn't figure out what's making that one right, and this one wrong... If you have some idea, please help me.

What you needed to fix the width was a colspan attribute. Without colspan, {{{name}}} and {{{comment}}} occupy exactly one column in the table, which is why there was nothing above or under the Stage and Difficulty columns.
A part of the bottom border was missing because the Image column's rowspan attribute said that the table cell should be 9 rows tall, but there were only 3 rows in the table.
--Deciare 14:40, 16 Jun 2005 (PDT)

Ah, thank you.
I think I've understood this a bit... now I'll see how many % should I put for each column in second line to make it more better.

Just a thought, but isn't the browser's auto-detection of column widths good enough? With the exception of shrinking the ZUN's Comment header column a bit, I think auto-layout does an acceptable job.
--Deciare 15:25, 16 Jun 2005 (PDT)

Well, I know I should stop using IE... but on IE it didn't look good with stage and difficulty being pushed to somewhat right.
If my attempts with width is making it looks messed on other browser then I'll remove width setting, but if it's not... I'd like it to be looks better for both me (and other IE-users) and everyone, than everyone outside IE.

Meh, second thought. I've forgot that % setting will make it specific to one display resolution... I'll remove it then.

With CSS, you can use the em unit to set width in terms of numbers of letters. Something like style="width: 8em;". That's pretty resolution dependent, I think... Or rather, you'd normally be able to do that, but it doesn't seem to have any effect in tables.
--Deciare 15:56, 16 Jun 2005 (PDT)

Speaking of IE, I really should update my test Windows 2000 installation to something newer than IE 5.0, but I'm not terribly trusting of updates from that company. IE 5 and IE 6 render pages more or less the same way, right?
--Deciare 15:56, 16 Jun 2005 (PDT)

Are we not going to include the original Japanese? Hmm... that would make things easier for us.
--Leviathean 19:23, 16 Jun 2005 (PDT)
Uh, while making this I thought there's no demand in original name anymore as it has number and screenie... literally all info one need to identify a spell card.
However, if it's still necessary, I'll add columon for that to... hmm, maybe we can make it 4 rows rather than adding that to left side of English name, so each boxes would look like vertically smaller than current version.

Okay, so I tried playing around with the multi-row tables, wanting to force all the rows with information to be as squished as possible at the top of the table, instead of spread out equadistantly depending on the height of the image used. It was already not looking too good with a picture only 235 px high, and if you started using taller pictures to experiment like I did, it was terrible. Well, I messed around with wiki tables for two hours and didn't come up with anything good, so instead for now I'm removing all the extra rows and columns and just using one cell to store all the data.
I'm still using all the same fields as before, so if you want to try experimenting with the multi-row format again, you can revert back into past revisions easily and experiment yourself. Also, this format can be extended to other games, except for IaMP, which needs slightly less information.
--Leviathean 04:59, 17 Jun 2005 (PDT)

The row height problem is unique to IE. Using either height="1" or style="height: 1%;" for each table row (after the valign="top") looks perfect on every other browser I try (Firefox and other Gecko derivatives, Konqueror, and Opera). Screenshot:
I think it's a little extreme to make this one template inconsistent with every other template just to accommodate a single, non-compliant browser. Equidistant rows aren't that much of a bother.
--Deciare 01:37, 18 Jun 2005 (PDT)

Shoot, really? Get it together, IE! Also, thanks for educating me, Deciare.
--Leviathean 08:25, 18 Jun 2005 (PDT)

Regarding the series of template edits prompted by SWR & Rukiax[edit]

Ahh thanks Cat.er Pron for that edit, i did not know the template was used else where, i do apologize, but i did not know you could do if commands in wiki...learn something new everyday :D Rukiax 19:43, 2 June 2009 (UTC)

Some edit concerns:

if exist {{{commentjp}}} + {{{commenten}}}
   display Comment JP + {{{commentjp}}} and Comment EN + {{{commenten}}}
   display Comment + {{{comment}}}

I'm headache of editing this thing. KyoriAsh 11:33, 3 June 2009 (UTC)

Template now interfering with SWR spell cards, can someone explain whats going on with the code.... as i just updated a charcaters card and it went pear shaped. Rukiax 00:47, 4 June 2009 (UTC)

Hate to waste much of the work you guys have put into this template, but wouldn't it be simpler, easier, and better to just make a new template for the SWR spell cards, and revert this template back to Moogy's last version (with perhaps some minor improvements from Cat.er Pron., but I haven't (even nearly) finished looking into what exactly all those tweaks actually do yet)? So, think I'm gonna do that, then edit one of the SWR pages to make use of the new template, and then (assuming all goes well) give you guys (Cat.er Pron., KyoriAsh, and Rukiax, in particular) some time to accept or argue against the changes before updating all the other SWR spell card pages to use the new template. --Winane 03:59, 4 June 2009 (UTC)

Just as a warning to anyone else working on this (or any other templates, for that matter):
It appears that when you update a template, whichever pages made use of that template remain cached for a while (dunno for how long, if left alone), and continue to be displayed with the old version of the template unless the page is edited. But when tweaking templates and testing your modifications, you can use the Preview button on one of those pages to see how it would look once updated with the new template, without filling up the page's revision history with a bunch of null edits. --Winane 05:15, 4 June 2009 (UTC)

Section edit[edit]

The "Section edit" does not work on the spell card pages. The reason (probably) is because there isn't a header within the page editor (a ===), so it can not jump to such part. And as the header is generated via the template, the "[Edit]" (normally) does not show up.

Anyway, want I want to say is that it probably should be deleted as it has no function. ☢ Quwanti 00:50, 1 March 2012 (UTC)

I agree it should be either deleted or the template be modified to enable the section editing. --Higan 17:29, 6 April 2012 (UTC)

Fighting Spellcards[edit]

I see that KyoriAsh hid that description section in ftg-spell, but I think it should remain there and be filled with some comments about the card and its changes in Hisoutensoku (since these changes are not mentioned anywhere). Don't you think so? --Higan 17:19, 6 April 2012 (UTC)

Well, I think the japanese description with translation is enough, just like how the spell card info in IN Spell cards, so not necessary to note the differences - KyoriAsh 07:39, 7 April 2012 (UTC)

Hopeless Masquerade 3-person Spellcards[edit]

Hopeless Masquerade has Spell Cards that are used by three people at once. Is it possible to add an owner3 entry to the template so it can display properly? (I don't really know how to do it myself.)--Universalperson (talk) 19:04, 28 May 2013 (UTC)

I noticed too. Working on it. - Kiefmaster99 (talk) 19:32, 28 May 2013 (UTC)
Thanks!--Universalperson (talk) 20:15, 28 May 2013 (UTC)
Should work now. - Kiefmaster99 (talk) 20:23, 28 May 2013 (UTC)

Regarding Hopeless Masquerade. Again.[edit]

Would it be reasonable to have text fields that detail the variations between each particular skill when used in a particular direction? I've been experimenting with it but I don't know how to do wiki magic. PeejsterM (talk) 23:09, 3 June 2013 (UTC)

For that matter, I think it would be much better to start making character specific guides (started with Ichirin), which includes the skill variations too. ☢ Quwanti 23:38, 3 June 2013 (UTC)
Yes, that would be nice, but I would think that, for the sake of having everything skill-related in one place, that we just stick it in the template, rather than have people forced onto another page for it. PeejsterM (talk) 00:37, 4 June 2013 (UTC)

Bitching about recent overhaul[edit]

Although I think the overhaul was probably for the better, particularly for non-english interwikis, honestly I'm a bit peeved that it's been two months and nobody has bothered to actually fix the pages that the changes utterly broke, or even seemed to have called attention to this needing to be done. Of course, this is me complaining about doing the work that I didn't *really* have to do, but after two months? Really? Nobody? Drake Irving (talk) 09:22, 8 March 2018 (UTC)

Suggested changes[edit]


  • Remove the italics in sttitle and sttitletrans
  • Actually implement sttitletrans
  • Remove comment as there are none in this game (This should be optional to begin with??)
  • Fix the background color for name and transname


  • Add "padding: 8px;" to style for all th and td except the one for the images

Drake Irving (talk) 09:30, 8 March 2018 (UTC)

Okay I just did all this and fixed some other stuff like the rowspan logic. Please merge Template:Spell Card Info/sandbox back into the template. Drake Irving (talk) 10:11, 8 March 2018 (UTC)

  • sttitleen fixed to sttitletrans
  • cannot remove comment as this is the same treatment to other games such as EoSD, PCB, etc.
  • background color fixed
  • padding added.
  • cannot remove rowspan as it brokes template.
- KyoriAsh (talk) 00:25, 9 March 2018 (UTC)
Hi, did you check the changes I made in Template:Spell Card Info/sandbox and the results shown in Template:Spell Card Info/testcases? The rowspan should not break the template at all; in fact it fixes it. Setting rowspan=0 automatically fills up the remaining rows in the table. This is much better than the logic to set it manually based on type.
Additionally, I set comment to be an optional parameter, it isn't like I just removed it. This way spell cards without comments can simply have the section removed instead of having it be empty. If comments are added they'll appear as normal. ISC does not have spell card comments and no user comments are being added, and this also discourages user-made comments going into the future. In fact there is a strong argument to be made for deleting the existing the user comments on spell cards in previous games, but that's another matter. Anyways I once again recommend merging my changes into the template. Drake Irving (talk) 05:17, 9 March 2018 (UTC)
For rowspan, it indeed broke in Google Chrome and Internet Explorer. For comment, I need some voting in this talk page before I can proceed it - KyoriAsh (talk) 06:37, 9 March 2018 (UTC)
Further research about rowspan="0" usage and found out that:
Note: Only Firefox and Opera 12 (and earlier versions) support rowspan="0", which has a special meaning (look below in the "Attribute Values" table).
So I'm assuming you're working on FireFox which the rowspan="0" doesn't work what it was intended to be. For more information, visit W3 Schools
Some screenshot: Chrome user 1, Chrome user 2, FireFox user - KyoriAsh (talk) 06:50, 9 March 2018 (UTC)
Another further research studies. Rowspan=0 and Colspan=0 was not intended to be worked in HTML 5.1 - KyoriAsh (talk) 07:34, 9 March 2018 (UTC)
Interesting, as I took this from MDN, which while is of course Mozilla, is generally good about reflecting standards and browser support (much better than w3schools, in any case). Indeed, MDN's browser compatibility table shows it as "fully supported" in all major browsers, which is a bit misleading in this particular case. It is actually listed in both the HTML Living Standard in (this algorithm, #10) and the same in the HTML5 W3C recommendation; instead, it seems to be because browsers haven't implemented the standard that it won't be included in the future spec, not the other way around. Well, that's a bit unfortunate. Drake Irving (talk) 12:44, 9 March 2018 (UTC)

While the rowspan trick didn't work, I remade the template using CSS Grid, which can set up the expected infobox behavior, uses a modern web technology that's actually supported well, can be decently modified going into the future, and makes editing it a lot cleaner. As can be seen on Template:Spell Card Info/testcases now I've made the results essentially identical.

If there are any further changes to be suggested now would be the time. Drake Irving (talk) 20:57, 13 March 2018 (UTC)

Support of CSS Grid: Chrome >57.0, Edge >16.0, FireFox >52.0, Safari> 10, Opera >44.
Anyone can verify that the template was working as it was indeed? - KyoriAsh (talk) 04:03, 14 March 2018 (UTC)
Current status: IE11 broke, Safari 10 Broke (Sample), Edge 14 (my Work notebook) Broke. Haven't test my home Win 10 Edge 16 and Opera yet. - KyoriAsh (talk) 04:25, 14 March 2018 (UTC)
CanIUse reports IE11 not working, but it will also never work in the future. Portable Opera 51 worked. This page documents that Edge used the IE11 implementation until Edge 16. Safari should work as of 10.1. Drake Irving (talk) 08:53, 14 March 2018 (UTC)