User talk:Ender R. Musk/Template:SSBU Classic Mode: Difference between revisions
From SmashWiki, the Super Smash Bros. wiki
Jump to navigationJump to search
Aidanzapunk (talk | contribs) m (Aidanzapunk moved page User talk:SamtheBKBoss/Template:SSBU Classic Mode to User talk:Ender R. Musk/Template:SSBU Classic Mode: Automatically moved page while renaming the user "SamtheBKBoss" to "Ender R. Musk") |
|||
(3 intermediate revisions by 3 users not shown) | |||
Line 9: | Line 9: | ||
:#Sometimes, a "notes" cell will be left blank, but others will have content; if I don't have that #if function there, then in that scenario it simply displays the name of the parameter, which is not what we want. | :#Sometimes, a "notes" cell will be left blank, but others will have content; if I don't have that #if function there, then in that scenario it simply displays the name of the parameter, which is not what we want. | ||
:You are free to help without suggesting stuff on this page first! Sincerely, [[User:SamtheBKBoss|Samuel]] the [[User talk:SamtheBKBoss|<span style="color: #0123A8">'''Banjo-'''</span>]][[Special:Contributions/SamtheBKBoss|<span style="color: #FF1901">'''Kazooie'''</span>]] Boss. [[File:SamtheBKBossSIGN.png|16px]] 16:28, July 8, 2021 (EDT) | :You are free to help without suggesting stuff on this page first! Sincerely, [[User:SamtheBKBoss|Samuel]] the [[User talk:SamtheBKBoss|<span style="color: #0123A8">'''Banjo-'''</span>]][[Special:Contributions/SamtheBKBoss|<span style="color: #FF1901">'''Kazooie'''</span>]] Boss. [[File:SamtheBKBossSIGN.png|16px]] 16:28, July 8, 2021 (EDT) | ||
::For #3 you want to put the final double pipes in the #if (<code><nowiki>{{!}}{{!}}</nowiki></code> in this case), otherwise you have a column of empty cells if there are no notes. You can also replace <code><nowiki>{{#ifeq:{{{#var:notes|}}}|y|5|4}}</nowiki></code> with <code><nowiki>{{#if:{{{#var:notes|}}}|5|4}}</nowiki></code> because "notes" will always either be "y" or nothing, making a check for the only possible option pointless. <small>—Preceding unsigned comment added by [[User:CanvasK|CanvasK]] ([[User talk:CanvasK|talk]] • [[Special:Contributions/CanvasK|contribs]]) 16:42, July 8, 2021</small> | |||
:::Once again, can't thank you enough! Sincerely, [[User:SamtheBKBoss|Samuel]] the [[User talk:SamtheBKBoss|<span style="color: #0123A8">'''Banjo-'''</span>]][[Special:Contributions/SamtheBKBoss|<span style="color: #FF1901">'''Kazooie'''</span>]] Boss. [[File:SamtheBKBossSIGN.png|16px]] 17:22, July 8, 2021 (EDT) <small>P.S. Please remember to sign your talk page posts with <nowiki>~~~~</nowiki>! (joking)</small> |
Latest revision as of 14:46, May 18, 2022
Minor code changes[edit]
{{!}}
is only needed inside of functions like #if. They can be replaced with normal pipes.- A lot of #ifeq can be simplified. Example:
{{#ifeq:{{{notes|}}}|true|!!Notes}}
can be reduced to{{#if:{{{notes|}}}|!!Notes}}
. This way as long as "notes" is any value it will work; not much need to be strict about the input in my opinion. {{#if:{{{round1notes|}}}|{{{round1notes}}}}}
can be reduced to just{{{round1notes|}}}
; unless you intended it to be{{#if:{{{notes|}}}|{{{round1notes}}}}}
to hide all notes if "notes" isn't set. I assume you want the latter because currently without any notes then you have an empty column.- Additionally, it should be possible to use mw:Extension:Variables for notes. For instance, doing
{{#vardefine:notes|{{#if:{{{round1notes|}}}{{{round2notes|}}}etc...|y}}}}
then "notes" can be removed altogether and{{#if:{{{notes|}}}...
can be replaced with{{#if:{{#var:notes|}}...
- Additionally, it should be possible to use mw:Extension:Variables for notes. For instance, doing
I have an edit put together with the above suggestions if you want them. --CanvasK (talk) 15:53, July 8, 2021 (EDT)
- Thanks!
- Went with the variable method, thanks!
- Sometimes, a "notes" cell will be left blank, but others will have content; if I don't have that #if function there, then in that scenario it simply displays the name of the parameter, which is not what we want.
- You are free to help without suggesting stuff on this page first! Sincerely, Samuel the Banjo-Kazooie Boss.
16:28, July 8, 2021 (EDT)
- For #3 you want to put the final double pipes in the #if (
{{!}}{{!}}
in this case), otherwise you have a column of empty cells if there are no notes. You can also replace{{#ifeq:{{{#var:notes|}}}|y|5|4}}
with{{#if:{{{#var:notes|}}}|5|4}}
because "notes" will always either be "y" or nothing, making a check for the only possible option pointless. —Preceding unsigned comment added by CanvasK (talk • contribs) 16:42, July 8, 2021
- For #3 you want to put the final double pipes in the #if (