Template talk:Class/icon

From Wikipedia, the free encyclopedia
Jump to: navigation, search


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 Req[edit]

{{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 article[edit]

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 images[edit]


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: Start-Class article vs. Start-Class article
Redirect: Redirect page vs. Redirect
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:Icon[edit]

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

Icon alignment[edit]

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)
arrow Reverted Happymelon 14:40, 12 October 2009 (UTC)

Book-class icon[edit]

{{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 impaired[edit]

{{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 Image[edit]

{{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 icon[edit]

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: Current-Class article

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[edit]

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 class[edit]

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 2016[edit]

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 - Red information icon with gradient background.svg 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 request[edit]

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 icons[edit]

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 Non-article page Non-article page NA 
Category Category page Category page Category page Category 
Portal Portal page Portal page Portal 
Project Project page Project page Project 
Draft Draft page Draft page Draft 
File Media file page Media file page File 
User no icon User page User page User 
Current Current-Class article Current-Class article Current-Class article Current 
Future Future-Class article Future-Class article Future-Class article Future 
Redirect Redirect page Redirect page Redirect page Redirect 
Merge no icon Merged page Merged page Merge 
Needed no icon Needed page Needed page Needed 
Deferred no icon Deferred page Deferred page Deferred 
SL Start-Class list SL-Class article SL-Class article SL 
SIA SIA-Class article SIA-Class article SIA-Class article 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)