User talk:Boblers: Difference between revisions

From Bulbapedia, the community-driven Pokémon encyclopedia.
Jump to navigationJump to search
m (→‎Help with automated text coloring template updates: Yeah, correct as intended, but it also brings up another follow-up question.)
Line 131: Line 131:
:::::Yeah, it does look just as requested! Of course, logically now I'd wonder if that same trick would work with the Seminar point from before by adding that to the Episodestaffheader as well. So I tried that out just now, but it seems like I did something wrong yet again.
:::::Yeah, it does look just as requested! Of course, logically now I'd wonder if that same trick would work with the Seminar point from before by adding that to the Episodestaffheader as well. So I tried that out just now, but it seems like I did something wrong yet again.
:::::--[[User:DomiDsLP|DomiDsLP]] ([[User talk:DomiDsLP|talk]]) 18:48, 27 September 2023 (UTC)
:::::--[[User:DomiDsLP|DomiDsLP]] ([[User talk:DomiDsLP|talk]]) 18:48, 27 September 2023 (UTC)
::::::I took a look, and I think I've fixed it now. You definitely have the right idea, though! Here's some tips on what I think went wrong with the code, if you're interested:
::::::* The text you want to color must be within the div, i.e. something like <nowiki><div {{#switch:...}}> mytext </div></nowiki>, however you had the div separate and didn't have the text inside it, so it couldn't be colored. Since the template has the text inside "span" and "small" tags already, I decided to put the switch on those instead - so something like: <nowiki><span {{#switch:...}}> mytext </span></nowiki> and <nowiki><small {{#switch:...}}> mytext </small></nowiki>
::::::* The footer took the color scheme as the second unlabeled field, so that field is accessed by <nowiki>{{{2|}}}</nowiki>. However, the header actually takes color scheme as a field named "colorscheme", which is accessed by <nowiki>{{{colorscheme|}}}</nowiki>. You had the switch taking 2 instead of colorscheme, so it wasn't able to read the right value.
::::::--[[User:Boblers|Boblers]] ([[User talk:Boblers|talk]]) 23:45, 27 September 2023 (UTC)

Navigation menu