Template talk:Class/icon

Active discussions


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 {{icon}}. Happymelon 16:43, 2 July 2009 (UTC)

Edit ReqEdit

{{editrequest}} 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? — 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)
  Done Happymelon 19:12, 5 April 2009 (UTC)

{{editrequest}} 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)

  Done Happymelon 22:02, 5 April 2009 (UTC)

Unknown-Class articleEdit

Can the "Unknown-Class article" icon (i.e. {{classicon|no}}) 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 imagesEdit


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. — 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? Happymelon 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. — Martin (MSGJ · talk) 17:40, 11 October 2009 (UTC)
Changing the images for these icons has created an inconsistencies with the {{icon}} template. Note:
Start:   vs.  
Redirect:   vs.  
I've found at least one article where both conflicting templates are used on the same page, see: Wikipedia: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:IconEdit

The discussion is at Template_talk:Icon#Merge_Template:Classicon_into_this_template.3F. Gary King (talk) 18:50, 6 October 2009 (UTC)

Icon alignmentEdit

The alignment of the icons relative to the text in {{class}} seems to improve if |text-top is added to the file syntax here. Can we implement this change? PC78 (talk) 15:55, 11 October 2009 (UTC)

  Done — Martin (MSGJ · talk) 17:41, 11 October 2009 (UTC)


Can someone please remove |text-top again. It was an improvement in FF, but it looks awful in IE. Sorry chaps. PC78 (talk) 12:44, 12 October 2009 (UTC)
  Reverted Happymelon 14:40, 12 October 2009 (UTC)

Book-class iconEdit

{{edit protected}} 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 {ταλκκοντριβς – 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 {ταλκκοντριβς – 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)
  Done, no reason not to. It can always be removed if the class is not taken up. — Martin (MSGJ · talk) 08:19, 17 November 2009 (UTC)
Thanks a bunch. Headbomb {ταλκκοντριβς – WP Physics} 08:40, 17 November 2009 (UTC)

Visually impairedEdit

{{editprotect}} What alt text do these generate? As per Flagcruft#Remember_accessibility_for_the_visually_impaired. 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 |link=|alt= is appropriate.   Done Happymelon 18:24, 21 March 2010 (UTC)
Thanks Gnevin (talk) 18:45, 21 March 2010 (UTC)

Portal ImageEdit

{{editprotected}} Can the portal image be update from

 |portal   = Portal.svg|Portal page


 |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)

  Done — Martin (MSGJ · talk) 13:56, 11 August 2010 (UTC)


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•roetc 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•roetc 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 iconEdit

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

|current = title="Current-Class Article" >[[File:Ambox currentevent.svg | Current-Class article |16px]]

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 2013Edit

Needing an admin to update this template or remove the cascading protection so I can edit it to use this change 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)

  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. — 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 classEdit

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. — 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 2016Edit

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 |class=sia but alias this to "List-Class" at present, but could separate out SIAs in future.) Please add:

 |sia      = title="SIA-Class Article"    >[[File:Symbol list class.svg        | SIA-Class article     |16px]]

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)

@Peter coxhead: I don't understand the purpose of that > sign -   Not done: please make your requested changes to the template's sandbox first; see WP:TESTCASES. --Redrose64 (talk) 10:11, 16 January 2016 (UTC)
@Redrose64: the > 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)
  Done -- WOSlinker (talk) 10:41, 16 January 2016 (UTC)
(edit conflict) Comparing sandbox with live, I see that you want a lot of other changes. --Redrose64 (talk) 10:42, 16 January 2016 (UTC)
@Redrose64: 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 re-synced the sandbox since then. --Redrose64 (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 here. I'll re-sync the sandbox now. Peter coxhead (talk) 15:30, 16 January 2016 (UTC)

Edit requestEdit

Please update with the code at Template:Class/icon/sandbox. Changes made are:

  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.

Testcases at Template:Class/icon/testcases. PC78 (talk) 02:24, 11 June 2016 (UTC)

  Done - Anyone feel free to revert if this caused any unexpected changes. — xaosflux Talk 15:50, 11 June 2016 (UTC)

Proposed class iconsEdit

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:

Current New With colour
NA       NA 
Category       Category 
Portal       Portal 
Project       Project 
Draft       Draft 
File       File 
User no icon     User 
Current       Current 
Future       Future 
Redirect       Redirect 
Merge no icon     Merge 
Needed no icon     Needed 
Deferred no icon     Deferred 
SL       SL 
SIA       SIA 

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 PC78 was proposing to change the icons, not the backgrounds. --Redrose64 (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 2018Edit

{{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 {{Class}} passes the class to this template using the |class= parameter, but this template only passes |1= through to {{icon}}.
Please change the line

}}</span>| {{icon|{{{1|}}}}} }}<noinclude>


}}</span>| {{icon|{{{class|{{{1|}}}}}}}} }}<noinclude>

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 [talk] 06:26, 3 June 2018 (UTC)

  Done -- WOSlinker (talk) 07:05, 3 June 2018 (UTC)

Bplus mergerEdit

Replace Template:Class/icon with Template:Class/icon/sandbox. This merges Bplus/B+ to B, per Wikipedia:Categories for discussion/Log/2018 June 30#Bplus-Class articles. Has been tested, at Template:Class/icon/testcases.  — SMcCandlish ¢ 😼  12:35, 19 July 2018 (UTC)

  Done --Redrose64 🌹 (talk) 18:22, 19 July 2018 (UTC)

Protected edit request on 5 September 2018Edit

Please change the the line

}}</span>| {{icon|{{{class|{{{1|}}}}}}}} }}<noinclude>


}}</span>| <span style="{{{style|}}}">{{icon|{{{class|{{{1|}}}}}}}}</span> }}<noinclude>

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 {{class|image=no}} 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 [talk] 03:47, 5 September 2018 (UTC)

  Done — Martin (MSGJ · talk) 06:48, 6 September 2018 (UTC)


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 2020Edit

Please apply Special:Diff/858302040/961112612 to use {{Ambox globe current blue}} per discussion at Portal talk:Current events/News Browser § Rotate the image. —⁠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. — Martin (MSGJ · talk) 18:56, 7 June 2020 (UTC)
  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. --Redrose64 🌹 (talk) 09:25, 8 June 2020 (UTC)
Return to "Class/icon" page.