Wikinews:Water cooler/technical

From Wikinews, the free news source you can write!

Jump to:navigation, search

Refresh

Archive, post


[edit] MakeLead generic image list

Wikinews:Make lead now tries to determine what image it should use for an article, if the article has no images, by what categories/infoboxes its in. It takes any category directly specified (aka [[category:Foo]] is recognized, but a category thats on the page as a result of a template being included is not). It considers any template without parameters to be an infobox. infoboxes currently take precendence over categories. The current map from infoboxes to category is very sparse, and is as follows:

Bawolff.leadGen.imgMap = {
 "UK" : "Flag of the United Kingdon.svg",
 "United Kingdom": "Flag of the United Kingdom.svg",
 "United States": "Flag of the United States.svg",
 "Canada": "Flag of Canada.svg",
 "Mexico": "Flag of Mexico.svg",
 "Computing": "Computer-aj aj ashton 01.svg",
 "Google": "Google logo png.png",
 "Obituary": "Wikinews tag obituary.png",
 "Science and technology infobox": "Science-symbol-2.svg",
 "Science and technology": "Science-symbol-2.svg" }

So for example, the first entry on this list, namely:

"UK" : "Flag of the United Kingdon.svg",

will associate image:Flag of the United Kingdom.svg with any article (provided it doesn't have any other images) if the source of the article contains one of: {{UK}}, {{uK}}, [[category:UK]], [[Category:uK]] [[category:UK|foo]] etc (obviously there is no category UK, but for many of these entries, the category and infbox name are the same, so i thought it'd be better to just have one list).

I would really appreciate help with making this list more complete. Bawolff 20:10, 28 November 2009 (UTC)

Sure, where's the list? I think WN:ML is infrequently enough used that the list can be a separate page. --Brian McNeil / talk 20:36, 28 November 2009 (UTC)
The list is currently in User:Bawolff/sanbox/leadGenerator.js (near the top). Bawolff 20:41, 28 November 2009 (UTC)
Just as a note, to anyone who edits this: Make sure that every line (except of the last line) ends in a comma, and that the template name starts with a capital letter. Bawolff 20:46, 28 November 2009 (UTC)
Also, anyone who wants something added and doesn't feel comfortable editing the script directly, should feel free to list it here, and I'll add copy it to the script. Bawolff 13:48, 30 November 2009 (UTC)

[edit] Wikipedia template: Wikinews

Please see my question, here [1]. Cirt (talk) 16:10, 2 December 2009 (UTC)

Looks like Bawolff answered your query. Tempodivalse [talk] 20:02, 2 December 2009 (UTC)
Yes check.svg Done. Cirt (talk) 20:10, 2 December 2009 (UTC)
Navigation
Wikinews
Regions
Toolbox