Brickipedia

READ MORE

Brickipedia
Advertisement
Forums: Index
Administration
Colourbox

Hi. In the template Colourbox, instead of when clicking on it and linking to the colour palette, can it link to the colour's page?

I would've done this myself, but I'm not good enough at the codes.

- nxt 17:10, April 25, 2011 (UTC)

Could be done, try asking User:Samdo994. Don't look back in anger - cjc 18:37, April 25, 2011 (UTC)
Done. I created two pages: User:Samdo994/Colour Box and User:Samdo994/Colour Box2. Both variants have the function, that they link to the correct article via the LC number. So entering LC=28 results in both cases with a link to Dark Green.
BUT: If you enter a colour name without using the LC number and command (eg {{User:Samdo994/Colour Box|Green}}) in the first Colour Box page, it links to Green (which is the bright green), but displays the colour which is known in HTML when entering "green": Dark Green. When entering "Green" in the second Colour Box page, it does not link to green and display the dark green, it just links to the Colour Palette.
Another flaw I have found in the first Colour Box page: When entering nothing in the first parameter (eg {{User:Samdo994/Colour Box|}}) or entering nothing next to the LC command (eg {{User:Samdo994/Colour Box|LC=}}), the first Colour Box page displays an error message, whereas the second Colour Box page displays the normal box without colour and with a link to the Colour Palette page.
Try out the different results with
{{User:Samdo994/Colour Box|LC=28}}
{{User:Samdo994/Colour Box2|LC=28}}

{{User:Samdo994/Colour Box|Green}}
{{User:Samdo994/Colour Box2|Green}}

{{User:Samdo994/Colour Box|}}
{{User:Samdo994/Colour Box2|}}

{{User:Samdo994/Colour Box|LC=}}
{{User:Samdo994/Colour Box2|LC=}}
and look at the links.
So I highly recommend using User:Samdo994/Colour Box2.  Samdo994 talk contribs  10:25, April 26, 2011 (UTC)
Shall we implement this? - nxt 11:48, May 15, 2011 (UTC)
Geez Samdo, you're like a coding extrordenare! :D -Nerfblasterpro: Always supplying the boomsauce...Maverick 14:09, May 15, 2011 (UTC)
  • Implemented. If there are any known problems, please put them down here. NightblazeSaber 00:38, May 16, 2011 (UTC)
Advertisement