Marvel Database
(→‎Subheaders following lists: Clarify, fix formatting)
Tag: sourceedit
Tag: sourceedit
Line 137: Line 137:
   
 
A similar fix would work on other templates showing the same formatting errors, I'll keep an eye out for them and report the bug in their Talk pages as well. Thanks. -- [[User:FeRDNYC|FeRDNYC]] ([[User talk:FeRDNYC|talk]]) 11:27, July 3, 2015 (UTC)
 
A similar fix would work on other templates showing the same formatting errors, I'll keep an eye out for them and report the bug in their Talk pages as well. Thanks. -- [[User:FeRDNYC|FeRDNYC]] ([[User talk:FeRDNYC|talk]]) 11:27, July 3, 2015 (UTC)
  +
  +
:I've [{{fullurl:Marvel_Database%3ACharacter_Template&diff=3039679&oldid=3030674}} committed] your fix. Seems to work great and was cleverly simple as many times fixes are after you figure it out. I wouldn't have thought that it would matter in what line the brackets were, but it seems like one more reason to prefer real programming languages over wiki markup. Although I admit to be really novice at coding so I like to give you extra thanks for good explanation what was the problem. Thank you for your service and let's hope it continues, we really could use it. --[[User:Mrkermit|Mrkermit]] ([[User talk:Mrkermit|talk]]) 22:29, July 4, 2015 (UTC)

Revision as of 22:29, 4 July 2015

Moved the older (resolved) issues to the archive pages which can be found here: Archive 1 (2006~2008), Archive 2


Please file any bugs with the template being broken on this thread until it is closed.

Discuss possible upgrades to the template in appropriate section(s) below:

Upgrades

Races

I think that AlienRace (which don't work properly anyway) should be changed to Race and it should also auto-categorize races. Now Race auto-categorization works partly from Citizenship and from Origin and is little confusing. --Mrkermit (talk) 23:55, June 7, 2014 (UTC)

I agree, but I was able to link the origin to categories, not to do something like that, we need a better coder, I go ask for the other admins.Undoniel (talk) 07:44, June 8, 2014 (UTC)

Well, we specifically didn't use 'Race' because we didn't want people using it for Caucasian, Hispanic, etc. — Nathan (Peteparker) (Earth-1218) (talkcontribsemail) 19:58, June 10, 2014 (UTC)

Species would be the best. I don't know if such things as cyborgs (origin and unusual features), war-skrull (currently manual but I was thinking of adding it to the origin thing before), or even "mutant" could fit in a "type" field. I'm personnaly against, but some might disagree. Undoniel (talk) 20:30, June 10, 2014 (UTC)
I second that. After I cleaned up the mess in the citizenship module, I can point to two problems that were caused by the lack of a functional species parameter. Animals were shoehorned into animal citizenships just to auto-categorise them for their species, and while some aliens can be categorised based on citizenship, many are known by alien race names that don't double as citizenships (eg. race: mephitisoid, citizenship: most commonly the Shi'ar Empire). -- WarBlade (talk) 21:53, June 10, 2014 (UTC)
I was thinking something like:

| Species = SPECIES OR RACE (eg Human, Mutant or Skrull, see Category:Races)
| CharacterType = TYPE (eg Robot, Mutate or Super-Soldier, see Category:Characters by Species, Race or Type)

Both of those fields should auto-categorize only to existing Categories and make link to those categories. That way it would be easier to notice possible misspellings. Using two fields would give some flexibility and it's more intuitive to put Robot to TYPE field rather than to SPECIES. Origin field could also be kept for some brief explanations without auto-categorizing. --Mrkermit (talk) 17:08, June 11, 2014 (UTC)
Your suggestion of character "type" is actually just a renaming of "origin". Origin already covers things like mutants and robots. -- WarBlade (talk) 04:01, June 12, 2014 (UTC)
You're right that Origin field have been used like that but it auto-categorizes only to whitelisted categories and don't create link. I think that using Species/Type would give infoboxes more standardized look.
I just think that it's counterintuitive to write Robot, Undead, or Cosmic Being as Origin of powers. And if you embed those Categories into written explanation, auto-categorizing to all existing categories would create wrong categories and whitelisted auto-categorization needs much work to maintain. -Mrkermit (talk) 14:34, June 12, 2014 (UTC)

I'm opening up this discussion to the other administrators so we can decide as a community what we'd like to do with this.

Please continue the discussion here.

Thanks!

Nathan (Peteparker) (Earth-1218) (talkcontribsemail) 22:08, June 16, 2014 (UTC)

/Documentation

In Usage info there's no mention of No Dual Identity. It would help if we could provide a links to what categories are used, like Category:Characters by Identity Status and Category:Characters by Occupation. --Mrkermit (talk) 00:38, June 8, 2014 (UTC)

And PlaceOfCreation and PlaceOfDestruction could be helpful for people updating AI characters. -- WarBlade (talk) 21:53, June 10, 2014 (UTC)
Actually documentation is so badly outdated that before we get it corrected there should be a warning at the page. --Mrkermit (talk) 15:26, April 19, 2015 (UTC)


Bugs

Relatives

Hi, I noticed that the "relatives" parameter has text in it that shows in the final infobox when displayed in a character page. This appears to be an unintentional error caused by recent changes to the template, as seen in the edit history. Can somebody with the appropriate editing rights please help fix this. Thanks. --Bluerock (talk) 00:54, June 7, 2014 (UTC)

I don't see an example of what you're talking about. Could you please add an example page to fix?
Nathan (Peteparker) (Earth-1218) (talkcontribsemail) 20:01, June 10, 2014 (UTC)

Creator categories

It doesn't seem to add creator categories anymore...--HED - HalfElfDragon 03:58, June 12, 2014 (UTC)

Added to the bugs, and being corrected. Thanks!
Nathan (Peteparker) (Earth-1218) (talkcontribsemail) 22:06, June 16, 2014 (UTC)

Nationalities categorizing

Copied from Thread:731532.

for example, new template categorizes all Americans to category Category:American which is redirect page because old template used Category:Americans. I thought about editing Module:CharacterInfoboxCitizenship but because inconsistencies I would have to check every one and didn't have time to do that. It would be easier to just check from the old template to correct those although there's some cleaning to do also. At least first nationality Abysmians is deleted and unused. --Mrkermit (talk) 22:20, July 9, 2014 (UTC)

Fixed. Mrkermit (talk) 07:52, June 6, 2015 (UTC)

CSS fix to remove "Edit" from TOC

Hi, I have a fix for this issue, but I need an admin to make the edits and install the CSS. The changes to Project:Character Template and Project:Header remove the "Edit" text, so that it doesn't appear in Table of Contents links. The changes to Wikia.css and Monobook.css insert the "Edit" text when viewed in either of those skins. Wikiamobile skin will continue to show no section edit link.

Rigel Kent (talk) 20:34, June 30, 2015 (UTC)

Sorry for the late answer but I wanted first to review your fix a little and it took some time because I'm not so familiar with these things. I even had to google what is CSS but now I've tried your fix and it really works. So big thanks for it, we are in a dire need of coders. Unless someone beats me to it, I'm planning to implement your changes at the weekend but could you answer few questions first:
  1. You've added little left-padding to the Edit-link. I guess it's purely cosmetic and I actually like default style more. Especially when link works also in the padded area. I still leave it for you to decide because it's your fix and good in both ways. So should we use it or not?
  2. Is data URI a transparent pixel and is it needed for some reason? Seems to work without it.
  3. Is there a reason to change wikia.css and monobook.css separately? I got it working by just editing common.css and importing it to wikia.css.
And one more time thanks for the fix, those TOCHeaders have been a sore in the eye as long as I've been on the site. --Mrkermit (talk) 23:43, July 2, 2015 (UTC)
I blanked my userspace wikia.css completely and Edit -link seems to work with only common.css. --Mrkermit (talk) 00:10, July 3, 2015 (UTC)

Subheaders following lists

Some users may have noticed that formatting on subheaders in the Powers and Abilities and Paraphernalia sections can be corrupted in some cases, specifically when the previous subsection uses a wikilist for its contents.

See e.g. Benjamin Tucker (Earth-616)#Abilities where the Abilities subheader is improperly indented following the bulleted list in the Powers section.

When the template inserts manual <h3> headers for subsections like Abilities or Strength level, the #if statement that conditionally includes them starts on the same line as the closing braces from the previous subsection's #if block. This causes the header element it outputs to get sucked into the wikilist from the previous subsection, so that it's improperly formatted as part of the list. (The <h3> actually comes before the </li></ul> in the output HTML.) The solution is simply to adjust where the line breaks in the template code are placed.

User:FeRDNYC/Character Template is a copy (with changes, like removal of category links) of this template's code, where I've fixed those sections. I used it to generate User:FeRDNYC/Benjamin Tucker (Earth-616), which as you can see displays the proper formatting. (I had to subst the output of my template and edit the resulting markup so that I could remove the auto-categorization, which is why there are other differences. Ignore those.)

The relevant changes to this template would be as follows:

  }}{{#if: {{{Powers|}}}{{{Abilities|}}}{{{Strength|}}}{{{Weaknesses|}}} | {{{{SITENAME}}:Header|Header={{{PowersAbilitiesHeader|Powers and Abilities}}}}}
{{#if: {{{Powers|}}}|<h3>Powers</h3>
{{{Powers}}} 
}}{{#if: {{{Abilities|}}}|<h3>Abilities</h3>
{{{Abilities}}} 
}}{{#if: {{{Strength|}}}|<h3>Strength level</h3>
{{{Strength}}} 
}}{{#if: {{{Weaknesses|}}} |<h3>Weaknesses</h3>
{{{Weaknesses}}} }}

}}{{#if:{{{ParaphernaliaHeader|}}}{{{Equipment|}}}{{{Transportation|}}}{{{Weapons|}}}|{{{{SITENAME}}:Header|Header={{{ParaphernaliaHeader|Paraphernalia}}}}}
{{#if: {{{Equipment|}}} |<h3>Equipment</h3>
{{{Equipment}}} 
}}{{#if: {{{Transportation|}}} |<h3>Transportation</h3>
{{{Transportation}}} 
}}{{#if: {{{Weapons|}}} |<h3>Weapons</h3>
{{{Weapons}}} }}

should be changed to:

  }}{{#if: {{{Powers|}}}{{{Abilities|}}}{{{Strength|}}}{{{Weaknesses|}}} | {{{{SITENAME}}:Header|Header={{{PowersAbilitiesHeader|Powers and Abilities}}}}}
{{#if: {{{Powers|}}} |<h3>Powers</h3>
{{{Powers}}} }}
{{#if: {{{Abilities|}}} |<h3>Abilities</h3>
{{{Abilities}}} }}
{{#if: {{{Strength|}}} |<h3>Strength level</h3>
{{{Strength}}} }}
{{#if: {{{Weaknesses|}}} |<h3>Weaknesses</h3>
{{{Weaknesses}}} }}

}}{{#if:{{{ParaphernaliaHeader|}}}{{{Equipment|}}}{{{Transportation|}}}{{{Weapons|}}}|{{{{SITENAME}}:Header|Header={{{ParaphernaliaHeader|Paraphernalia}}}}}
{{#if: {{{Equipment|}}} |<h3>Equipment</h3>
{{{Equipment}}} }}
{{#if: {{{Transportation|}}} |<h3>Transportation</h3>
{{{Transportation}}} }}
{{#if: {{{Weapons|}}} |<h3>Weapons</h3>
{{{Weapons}}} }}

A similar fix would work on other templates showing the same formatting errors, I'll keep an eye out for them and report the bug in their Talk pages as well. Thanks. -- FeRDNYC (talk) 11:27, July 3, 2015 (UTC)

I've committed your fix. Seems to work great and was cleverly simple as many times fixes are after you figure it out. I wouldn't have thought that it would matter in what line the brackets were, but it seems like one more reason to prefer real programming languages over wiki markup. Although I admit to be really novice at coding so I like to give you extra thanks for good explanation what was the problem. Thank you for your service and let's hope it continues, we really could use it. --Mrkermit (talk) 22:29, July 4, 2015 (UTC)