Template talk:Class/icon

B+
What is the purpose of the newly added B+ icon? Which project uses this? From the commons page for the image, it seems to be unused?YobMod 13:23, 19 March 2009 (UTC)
 * WP:WPM use B+-Class and there is an appropriate icon for it. Is there any reason why you think it shouldn't be included? PC78 (talk) 10:34, 1 April 2009 (UTC)
 * Because only very few obscure page actually use it (and i think it is only used once in otoal ouside user pagace). Classsicon templates should only be used for widely used icons, imo. Or why not simply put all icons in.YobMod 14:25, 2 July 2009 (UTC)
 * The template is for class icons, of which there is only a finite amount. It's not doing any harm, and it may be useful to some. PC78 (talk) 14:54, 2 July 2009 (UTC)
 * I agree that, if it is a legitimate quality assessment and has an icon specifically for that assessment, it should be included either here or in . Happy‑melon 16:43, 2 July 2009 (UTC)

Edit Req
I've done a sandbox version that shows the tooltips correctly when hovering the mouse cursor over the images. Could it be copied over? Thanks. -- WOSlinker (talk) 16:14, 5 April 2009 (UTC)
 * Is there no way to do it without the !'s? &mdash; Martin (MSGJ · talk) 17:34, 5 April 2009 (UTC)
 * It could be done with two #switch statements. -- WOSlinker (talk) 18:25, 5 April 2009 (UTC)
 * ✅ Happy‑melon 19:12, 5 April 2009 (UTC)

I've added a "PR" option to mimic PR-icon in the sandbox. Could the template be updated. Thanks. -- WOSlinker (talk) 21:55, 5 April 2009 (UTC)
 * ✅ <b style="color:forestgreen;">Happy</b>‑<b style="color:darkorange;">melon</b> 22:02, 5 April 2009 (UTC)

Unknown-Class article
Can the "Unknown-Class article" icon (i.e. ) be removed from this template? While No-Class does exist, it is used only in assessment tables and isn't a true class type per se, plus it is actually synonymous with -importance (in the same way that Unassessed-Class is used in assessment tables rather than -Class). PC78 (talk) 21:14, 7 May 2009 (UTC)

Alternate images
Could the redirect and start class icons be replaced by File:Symbol redirect vote2.svg and File:Symbol start class.svg respectively? OrangeDog (talk • edits) 06:10, 27 September 2009 (UTC)
 * I have no objection. &mdash; Martin (MSGJ · talk) 07:03, 27 September 2009 (UTC)
 * I did the redirect one, that's unquestionably an improvement. I'm not sure about the start-class one; I'm not sure which I prefer... Thoughts?  Happy ‑ melon  10:07, 27 September 2009 (UTC)
 * IIRC, I switched to the proposed image here before, but was reverted. Personally I prefer it because it's more consistant with the others, but it's hard to see when placed on top of the colour for Start-Class. PC78 (talk) 12:28, 27 September 2009 (UTC)
 * I've changed it over. If there are any problems with it being hard to see then I can revert. &mdash; Martin (MSGJ · talk) 17:40, 11 October 2009 (UTC)
 * Changing the images for these icons has created an inconsistencies with the template. Note: Start:  vs.  Redirect:  vs.  I've found at least one article where both conflicting templates are used on the same page, see: Vital_articles/Level/2. In both cases, I actually perfect the old icons, perhaps the icon selection could be put to a vote somewhere, and the most popular icons be used across both templates. Although this change was over a year ago, I think it should be reverted until that happens. --Aeonx (talk) 06:12, 14 November 2010 (UTC)
 * I've updated the icon template to match now. -- WOSlinker (talk) 08:54, 14 November 2010 (UTC)

Propose merging this template into Template:Icon
The discussion is at Template_talk:Icon. Gary King ( talk ) 18:50, 6 October 2009 (UTC)

Icon alignment
The alignment of the icons relative to the text in class seems to improve if  is added to the file syntax here. Can we implement this change? PC78 (talk) 15:55, 11 October 2009 (UTC)
 * ✅ &mdash; Martin (MSGJ · talk) 17:41, 11 October 2009 (UTC)


 * Can someone please remove  again. It was an improvement in FF, but it looks awful in IE. Sorry chaps. PC78 (talk) 12:44, 12 October 2009 (UTC)
 * Happy ‑ melon 14:40, 12 October 2009 (UTC)

Book-class icon
Could someone add (right before the line starting with |#default ...) |book = Symbol book class2.svg        | Wikipedia Book to bring this inline with Icon Thanks. Headbomb {{{sup|ταλκ}}<sub style="margin-left:-4.0ex;">κοντριβς – WP Physics} 02:22, 17 November 2009 (UTC)
 * I'm not convinced that there is consensus for this, based on Template talk:Icon. — RockMFR 02:41, 17 November 2009 (UTC)


 * Sigh, what's so controversial about this? Classes have icon, there's the book class, thus there's the book class icon. Those who don't want to use it won't, those who want to use it will. The code is tested, works, and doesn't break anything that already exists. Let's not get bogged down in WP:CREEP. Headbomb {{{sup|ταλκ}}<sub style="margin-left:-4.0ex;">κοντριβς – WP Physics} 02:48, 17 November 2009 (UTC)


 * I agree, and I'd do it, but the template is so widespread (2.6 mill) I'm going to leave it to someone who's more familiar with the consequences. - Trevor MacInnis contribs 03:35, 17 November 2009 (UTC)
 * ✅, no reason not to. It can always be removed if the class is not taken up. &mdash; Martin (MSGJ · talk) 08:19, 17 November 2009 (UTC)
 * Thanks a bunch. Headbomb {{{sup|ταλκ}}<sub style="margin-left:-4.0ex;">κοντριβς – WP Physics} 08:40, 17 November 2009 (UTC)

Visually impaired
What alt text do these generate? As per Flagcruft. They should have a relevant alt text or have |link=|alt= ? Gnevin (talk) 17:28, 21 March 2010 (UTC)
 * These icons are purely decorative, so  is appropriate. ✅  Happy ‑ melon  18:24, 21 March 2010 (UTC)
 * Thanks Gnevin (talk) 18:45, 21 March 2010 (UTC)

Portal Image
Can the portal image be update from |portal  = Portal.svg|Portal page to |portal  = Portal-puzzle.svg           | Portal page so that it's using the same image as the Portal template. Thanks -- WOSlinker (talk) 12:34, 11 August 2010 (UTC)
 * ✅ &mdash; Martin (MSGJ · talk) 13:56, 11 August 2010 (UTC)

Tooltips
Going by the request from 2009, the icons should have tooltip text explaining what they mean, but if that was ever working (I couldn't find an old version where it did) it doesn't now, at least not for me. This was recently raised at WP:AFC where they're used without any context and it's quite hard to figure out what they mean. Can the tooltips be restored? joe&bull;roet•c 18:20, 2 February 2012 (UTC)

Have to say I feel a bit out of my depth on such a high vis template, but since nobody has responded and the change is relatively trivial I've gone ahead and sandboxed it at User:Joey Roe/Template:Class/icon.

All I've done is copied the switch statement that decides which filename to use to a title="" attribute on the span around the icon. The tooltip text is consistent with what each icon is called at /doc. Implementing it is just a case of replacing the current template source completely with the one from my user space. If someone with more experience with templates wanted to look it over first though I'd welcome it. joe&bull;roet&bull;c 18:44, 21 February 2012 (UTC)
 * I always forgot how long high-use templates take to have the edit actually go through. Done. Killiondude (talk) 07:18, 22 February 2012 (UTC)

Current class icon
Can the following line be added to give the ability to get a current class icon?

That would yield:

Does anyone have objections to that? Inks.LWC (talk) 09:11, 14 December 2012 (UTC)


 * Fine by me, in fact I'd suggest using it for Future-Class as well as per the old future event amboxes. PC78 (talk) 23:08, 7 June 2016 (UTC)

Cascade-protected edit request on 29 December 2013
Needing an admin to update this template or remove the cascading protection so I can edit it to use to the sandbox which has been throughly tested on the testcases page so that this template is capable of being properly SUBST: into long list pages to reduce template inclusion size greatly. Thank you.

Technical 13 (talk) 20:35, 29 December 2013 (UTC)
 * Red information icon with gradient background.svg Not done for now: Judging from the discussion at Template talk:Icon, we haven't quite reached a consensus about what to do with these templates yet. Let's see how that and the village pump discussion turn out before we alter either of the templates. — <span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius  ♪ talk ♪ 14:26, 30 December 2013 (UTC)


 * Support omit spaces/#iferror as 2x smaller post-expand size: The recent /sandbox edits, to omit spaces in span-tag and image-links have cut icon post-expand size by 53%, where "GA" drops from 367 to 172 bytes ("Draft" from 334 to 167). Further 30% reduction could be made by shorter file-names and shorter caption text, with "Draft page" as just "Draft" to reduce by another 20 bytes (12%). Started essay to explain, "wp:Post-expand include size". -Wikid77 15:06, 30 December 2013 (UTC)

Icon for non-existent class
I'd like to change this template so no icon is produced for an undefined class, as I think this would be the expected behaviour rather than have a question mark icon. &mdash; Martin (MSGJ · talk) 09:39, 13 January 2016 (UTC)


 * I agree. I've had a play in the sandbox, I can get it so no icon is displayed if the parameter is left blank or unspecified, but not if an unfamiliar value is used (i.e. "Foo"). Can't really see how to do this. PC78 (talk) 23:45, 5 June 2016 (UTC)
 * Looks like the default is defined at Module:Icon/data. I don't know enough about modules to go poking about with the code though. PC78 (talk) 23:11, 6 June 2016 (UTC)

Protected edit request on 16 January 2016
Some wikiprojects are using "SIA" as an assessment class for "set index articles" with its own category (e.g. Category:SIA-Class Spiders articles). (Other wikiprojects, like WP:PLANTS, use sia but alias this to "List-Class" at present, but could separate out SIAs in future.) Please add: |sia     = title="SIA-Class Article"    > It seems sensible to use the same icon as for a list article, since an SIA is a list and is treated as List-Class by some projects. Peter coxhead (talk) 09:41, 16 January 2016 (UTC)

Peter coxhead (talk) 09:41, 16 January 2016 (UTC)
 * I don't understand the purpose of that  sign - Red information icon with gradient background.svg Not done: please make your requested changes to the template's sandbox first; see WP:TESTCASES. -- Red rose64 (talk) 10:11, 16 January 2016 (UTC)
 * the &gt; is precisely as per the other lines in the template. I've added this line to the sandbox; see the last line of the table at Template:Class/icon/testcases. Peter coxhead (talk) 10:27, 16 January 2016 (UTC)
 * ✅ -- WOSlinker (talk) 10:41, 16 January 2016 (UTC)
 * Comparing [//en.wikipedia.org/w/index.php?title=Special%3AComparePages&page1=Template%3AClass%2Ficon&page2=Template%3AClass%2Ficon%2Fsandbox sandbox with live], I see that you want a lot of other changes. -- Red rose64 (talk) 10:42, 16 January 2016 (UTC)
 * no, not me; today I just added the line for SIA to what was already in the sandbox. My earlier edit to the sandbox re an icon for SL class has been done in the live version; I think that it's the earlier edits to the sandbox by User:Technical 13 that introduced more changes between the live and sandbox versions. The two should be synchronized if those edits aren't to go live. Peter coxhead (talk) 11:04, 16 January 2016 (UTC)
 * T13's changes were over two years ago, and you've apparently since then. -- Red rose64 (talk) 12:13, 16 January 2016 (UTC)
 * Ah, I should have looked more carefully; apologies. I'd forgotten that I had re-sync'ed the sandbox. The error I made today was in not sync'ing the sandbox before I added the new line I wanted. The live version had been changed [//en.wikipedia.org/w/index.php?title=Template%3AClass%2Ficon&type=revision&diff=623989325&oldid=587950917 here]. I'll re-sync the sandbox now. Peter coxhead (talk) 15:30, 16 January 2016 (UTC)

Edit request
Please update with the code at Template:Class/icon/sandbox. Changes made are: Testcases at Template:Class/icon/testcases. PC78 (talk) 02:24, 11 June 2016 (UTC)
 * 1) Icon added for Current (and Future) Class per suggestion made by User:Inks.LWC above.
 * 2) User-Class and Deferred-Class added to the template code; this will stop the default icon popping up where it's not wanted, i.e. in project banners (like at User talk:MBisanz/edit velocity, for example).
 * 3) Some of the code tidied up a bit.
 * ✅ - Anyone feel free to revert if this caused any unexpected changes. — xaosflux  Talk 15:50, 11 June 2016 (UTC)

Proposed class icons
I'd like to suggest adding or changing a number of class icons. As I recall from the early days of this template, some of the icons used were only ever meant as placeholders for want of something better (e.g. Project-Class), while some classes don't have an icon at all. Most of the existing class icons belong to the Norro style 1 set, so it makes sense to stick with that theme wherever possible, and ideally they should be coloured to fit in with the class/colour scheme. The changes I propose are:

Any thoughts on these suggestions? PC78 (talk) 03:36, 2 July 2016 (UTC)
 * The contrast between the text and the background is rather poor on some of the "with colour" versions, and may cause access problems. The backgrounds should be lighter, I think. Peter coxhead (talk) 06:17, 2 July 2016 (UTC)
 * I thought that was proposing to change the icons, not the backgrounds. -- Red rose64 (talk) 09:41, 2 July 2016 (UTC)
 * No point in a half change. Peter coxhead (talk) 10:16, 2 July 2016 (UTC)
 * Nope, this proposal is strictly about the icons. If you think any of the colours defined by class/colour pose a genuine access problem then you should probably start a new discussion there. PC78 (talk) 13:08, 2 July 2016 (UTC)
 * Ok. In general, I think the icons are an improvement. The category and portal icons work least well in my view. The tree in the category icon looks too much like a fork, and I simply can't see what is inside the portal icon at my normal display size – I think the original of this icon is better (there's no need for all to be inside a circle). Peter coxhead (talk) 16:23, 2 July 2016 (UTC)

Protected edit request on 3 June 2018
WikiProject Portals uses FPo-Class for Featured Portals, but the class icon in the banner is showing instead of  (example: Portal talk:Africa). This is because passes the class to this template using the class parameter, but this template only passes 1 through to. Please change the line }} | }} to }} |  }} as per this edit to the sandbox. This will make this template work for FPo-Class with either the 1 or class parameters being used – see the bottom two rows of testcases. - Evad37 &#91;talk] 06:26, 3 June 2018 (UTC)
 * ✅ -- WOSlinker (talk) 07:05, 3 June 2018 (UTC)

Bplus merger
Replace Template:Class/icon with Template:Class/icon/sandbox. This merges Bplus/B+ to B, per Categories for discussion/Log/2018 June 30. Has been tested, at Template:Class/icon/testcases. — SMcCandlish ☏ ¢ 😼  12:35, 19 July 2018 (UTC)
 * Yes check.svg Done -- Red rose64 &#x1f339; (talk) 18:22, 19 July 2018 (UTC)

Protected edit request on 5 September 2018
Please change the the line }} | }} to }} | <span style=""> }} as per the sandbox. This ensures the output is always wrapped in a span with the styles from the style parameter, which in turn allows to work as advertised. See the top table at Template:Class/testcases, in particular the image=no columns for the rows "blargh" and ""FPo". - Evad37 &#91;talk] 03:47, 5 September 2018 (UTC)
 * Yes check.svg Done &mdash; Martin (MSGJ · talk) 06:48, 6 September 2018 (UTC)

Template:Icon
What's the point of Template:Class/icon while there is Template:Icon? Eurohunter (talk) 22:53, 22 December 2018 (UTC)

Protected edit request on 6 June 2020
Please apply Special:Diff/858302040/961112612 to use Ambox globe current blue per discussion at. —⁠andrybak (talk) 17:49, 6 June 2020 (UTC)
 * I'm not sure this is a good idea. For one the icon is so small that the orientation is probably not noticeable. Secondly there is a possible performance consideration here of using a dynamic image on a highly transcluded template. &mdash; Martin (MSGJ · talk) 18:56, 7 June 2020 (UTC)
 * Red information icon with gradient background.svg Not done: I agree with Martin. The present icons may be seen at Template:Grading scheme/doc/table and you need to zoom in considerably to make out that the vague green shapes are intended to be a globe. -- Red rose64 &#x1f339; (talk) 09:25, 8 June 2020 (UTC)

Draft Icon
The draft icon used on this template is: File:Symbol neutral vote.svg, this icon is also used for Non-Article Pages. I thought that the more commonly used draft icon was: File:Symbol draft class.svg, which is used on sites such as xTools, is there any reason for the draft icon to be different here? Thanks, Terasail &#91;✉&#93; 02:05, 22 December 2020 (UTC)

Edit Request - Update Icons.
Some icons shown in this template show old varients of the class icons. Can the following icons be updated in this template.

Terasail &#91;✉&#93; 14:49, 24 December 2020 (UTC)
 * SL-Class Article: File:Symbol sl class.svg
 *  Non-Article Page: File:Symbol na class.svg
 * Draft Page: File:Symbol draft class.svg
 * Category: File:Symbol category class.svg
 *  Media File Page: File:Symbol file class.svg
 * Portal Page: File:Symbol portal class.svg
 * Project Page: File:Symbol project class.svg
 * Red information icon with gradient background.svg Not done for now: please establish a consensus for this alteration before using the template. Or rather, link to one, since I am not sure where these changes are/were discussed. Jo-Jo Eumerus (talk) 11:04, 31 December 2020 (UTC)
 * I've added the images below, so that it's easier to see the differences. Those requested changes look fine to me and also make it look more consistent. -- WOSlinker (talk) 11:47, 31 December 2020 (UTC)
 * SL-Class Article: Symbol start class.svg -> Symbol sl class.svg
 * Non-Article Page: Symbol neutral vote.svg -> Symbol na class.svg
 * Draft Page: Symbol neutral vote.svg -> Symbol draft class.svg
 * Category: Folder Hexagonal Icon.svg -> Symbol category class.svg
 * Media File Page: Video-x-generic.svg -> Symbol file class.svg
 * Portal Page: Portal-puzzle.svg -> Symbol portal class.svg
 * Project Page: Symbol information vote.svg -> Symbol project class.svg
 * Reopened: While a consensus is often expected, this is only required for controversial changes. I do not personally see anything controversial about this change due to the fact there is precedence with xTools using these icons, for example with this page. With the above agreement and this opinion I am reopening the request. Thanks Terasail &#91;✉&#93; 14:55, 31 December 2020 (UTC)
 * ❌ this template is on almost 9 million pages, needs a wider discussion - also from a tech/admin level: all of the new icons should get processed like the old ones (uploaded, protected, keep local's) by anyone actually implementing this. Terasail, I suggest at the least you link in to this discussion from WP:VPPR to ensure it is widely advertised - if after a while noone wants to comment, go ahead and reactivate the ER. —  xaosflux  Talk 17:21, 31 December 2020 (UTC)

Village pump proposals - Icon update
Notification of a proposal at WP:VPPR for this template for the above changes. The Discussion. Terasail &#91;✉&#93; 20:35, 2 January 2021 (UTC)

Edit Request - Update Icons - 2
I requested the change above, and then made a proposal for the same change at WP:VPR where the proposal got some support. The changes were all supported except the SL-Class icon which had a couple of opposed to the change. The discussion is archived at Village pump (proposals)/Archive 175. I think that the change will also require local file versions and protected with the large number of times some of these icons are used.

The Change:
 * Non-Article Page: Symbol neutral vote.svg -> Symbol na class.svg (File:Symbol na class.svg)
 * Draft Page: Symbol neutral vote.svg -> Symbol draft class.svg (File:Symbol draft class.svg)
 * Category: Folder Hexagonal Icon.svg -> Symbol category class.svg (File:Symbol category class.svg)
 * Media File Page: Video-x-generic.svg -> Symbol file class.svg (File:Symbol file class.svg)
 * Portal Page: Portal-puzzle.svg -> Symbol portal class.svg (File:Symbol portal class.svg)
 * Project Page: Symbol information vote.svg -> Symbol project class.svg (File:Symbol project class.svg)

Terasail &#91;✉&#93; 16:09, 26 January 2021 (UTC)
 * I've done the local uploads and protections, please make your exact requested changes in Template:Class/icon/sandbox and reactivate the edit request after this is done and the test cases have been validated. — xaosflux  Talk 15:41, 7 February 2021 (UTC)
 * I have updated the sandbox with the 6 new images. Terasail &#91;✉&#93; 16:45, 7 February 2021 (UTC)
 * ✅ thank you, I've updated the main template - with ~9million uses this may take time to replicate.  Please update the template documentation as needed.  Any admin is welcome to revert without consultation if this has unintended breaking impacts. —  xaosflux  Talk 20:09, 7 February 2021 (UTC)

License issues
Note that some of the images you've used here are licensed with CC BY licenses, which require the link to the image page to satisfy the "BY" attribution requirement, but you've included link which suppresses that link. The affected files I see are File:Symbol draft class.svg, File:Symbol file class.svg, File:Symbol portal class.svg, and File:Symbol na class.svg. Of common image licenses we accept here, IIRC only public domain and CC0 images can suppress the link. Anomie⚔ 14:41, 21 July 2021 (UTC)
 * thanks for the note, obv linking to that is a horrible idea, so reverting this will be the next step - barring actual freely licensed images being available instead. I've activated the edit request to make sure this gets attention, it will take at least a little time to resolved. do you have better files to use? —  xaosflux  Talk 14:47, 21 July 2021 (UTC)
 * No, I just got the files from previous discussions and requested the change to unify the design of the icons. I never looked at the licences (Which I realise was a mistake) and just assumed that they were PD. Apologies for this one. Terasail [✉️] 15:04, 21 July 2021 (UTC)
 * I missed it too - before I revert to the old ones, do you want to check if there are better replacements? — xaosflux  Talk 16:47, 21 July 2021 (UTC)
 * I've updated the link attributes. Many of the other icons need attribution as well, so not sure it's worth reverting those changed ones. Ideally, all the icons would not need linking, but that needs someone to provide a full set under a CC-0 license. -- WOSlinker (talk) 16:53, 21 July 2021 (UTC)
 * that seeems a bit reckless at least, with this template having almost 10 million uses and an outstanding objection to that approach above! — xaosflux  Talk 17:58, 21 July 2021 (UTC)
 * Having a quick scan through the related commons categories, most of the appropriate quality images have CC BY licences and are not PD, the icons are not inline with the current ones and a lot of related images are emojis. It is probably better to just revert now and if anyone creates / finds appropriate images they could be added at that time. Terasail [✉️] 16:56, 21 July 2021 (UTC)


 * Reopened ER, as this still certainly needs attention. — xaosflux  Talk 18:00, 21 July 2021 (UTC)
 * As the immediate issue was fixed by WOSlinker and there is no specific request here, I am disabling this request for now. &mdash; Martin (MSGJ · talk) 10:45, 4 October 2021 (UTC)

Protected edit request on 14 January 2022
Please add alt to the end of each file invocation in this template. According to a 2010 discussion on this talk page, this was done at one point, but subsequent changes appear to have left some images without an empty alt attribute.

Per Manual of Style/Accessibility/Alternative text for images, An image that is purely decorative (provides no information and serves only an aesthetic purpose) requires no alternative text. The lack of an empty alt for these icons is putting thousands (or millions?) of pages into a new MediaWiki tracking page at Special:LintErrors/inline-media-caption. Thanks. – Jonesey95 (talk) 17:12, 14 January 2022 (UTC)


 * Do the changes in the sandbox look ok? -- WOSlinker (talk) 17:56, 14 January 2022 (UTC)
 * Yes. – Jonesey95 (talk) 19:59, 14 January 2022 (UTC)
 * ✅ -- 20:24, 14 January 2022 (UTC) — Preceding unsigned comment added by WOSlinker (talk • contribs)