Jump to content

Wikipedia:Village pump (technical): Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Interwiki sorting order - important
Line 586: Line 586:
addOnloadHook(function() {
addOnloadHook(function() {
var wlh = document.getElementById('t-whatlinkshere');
var wlh = document.getElementById('t-whatlinkshere');
if(wlh) addPortletLink('p-tb',wgServer + wgScript + '?title=Special:Whatlinkshere/' + wgPageName + '&hidetrans=1&hidelinks=1', 'What redirects here','t-wrh','Show redirects to this page','',wlh);
if(wlh) addPortletLink('p-tb',wgServer + wgScript + '?title=Special:Whatlinkshere/' + wgPageName + '&hidetrans=1&hidelinks=1&limit=500', 'What redirects here','t-wrh','Show redirects to this page','',wlh);
});
});
</source>
</source>
::Adds a new link above the existing whatlinkshere, called "''what redirects here''". --[[User:Splarka|Splarka]] ([[User_talk:Splarka|rant]]) 07:27, 20 August 2008 (UTC)
::Adds a new link above the existing whatlinkshere, called "''what redirects here''". --[[User:Splarka|Splarka]] ([[User_talk:Splarka|rant]]) 07:27, 20 August 2008 (UTC)
:::Thanks - works like a charm! Just one more small request, though: could you change the default number of results per page from 50 to 500? [[User:It Is Me Here|It Is Me Here]] ([[User talk:It Is Me Here|talk]]) 10:48, 20 August 2008 (UTC)
:::Thanks - works like a charm! Just one more small request, though: could you change the default number of results per page from 50 to 500? [[User:It Is Me Here|It Is Me Here]] ([[User talk:It Is Me Here|talk]]) 10:48, 20 August 2008 (UTC)
::::[{{fullurl:{{FULLPAGENAME}}|oldid=233094213&diff=next}} Done]. --[[User:Splarka|Splarka]] ([[User_talk:Splarka|rant]]) 13:38, 20 August 2008 (UTC)


== "go" button in watchlist ==
== "go" button in watchlist ==

Revision as of 13:38, 20 August 2008

 Policy Technical Proposals Idea lab WMF Miscellaneous 
The technical section of the village pump is used to discuss technical issues about Wikipedia. Bugs and feature requests should be made at the BugZilla because there is no guarantee developers will read this page. Problems with user scripts should not be reported here, but rather to their developers (unless the bug needs immediate attention).

Newcomers to the technical village pump are encouraged to read these guidelines prior to posting here. Questions about MediaWiki in general should be posted at the MediaWiki support desk.

Would there be any objections if I were to create this particular MediaWiki: page? Examples of its use can be seen on Meta and Wikisource (see bottom of here and here) —Anonymous DissidentTalk 08:56, 10 August 2008 (UTC)[reply]

I want it I want it I want it!! Happymelon 20:43, 10 August 2008 (UTC)[reply]
YES! Interestingly enough I was just thinking about this too after my recent editing on WB. - Icewedge (talk) 07:25, 11 August 2008 (UTC)[reply]
Nicely done. :) Is there a particular reason MediaWiki:Sp-contributions-footer and MediaWiki:Sp-contributions-footer-anon use different images and css attributes? In particular, Image:Wikipedia-logo.svg (38px) and Image:Information.svg (40px)... and the tables themselves seem to render with slightly different widths, on my browser. I favor consistency, but have no particular preference regarding which style we keep. – Luna Santin (talk) 10:07, 11 August 2008 (UTC)[reply]
Luna Santin: You are right. I'll update both to use our standard MediaWiki message box styles, thus they will look like the MediaWiki:Sharedupload. With 100% width, standard light grey background and so on.
I have coded up examples in my user space at User:Davidgothberg/Test30. I don't know which image to choose. I am leaning towards the Wikipedia logo (it looks good), or the icon tools image (since it says more about what content the boxes have).
Note! In my examples I also suggest a slight change in the MediaWiki:Sharedupload box. (The "This is a file from the Wikimedia Commons" box.)
--David Göthberg (talk) 22:49, 11 August 2008 (UTC)[reply]
Interesting. I definitely appreciate the consistency. As far as images, I believe I would personally favor Image:Information.svg or Image:Icon tools.png (though I believe you mentioned you liked Image:Imbox notice.png previously, which is also fine with me) -- they hint nicely as to the box's contents, as you said. – Luna Santin (talk) 09:09, 12 August 2008 (UTC)[reply]
Based on the two of us it seems the Image:Icon tools.png is the choice. But I think we need some more users to look at this. So please, can more people take a look at User:Davidgothberg/Test30 and comment here?
--David Göthberg (talk) 06:25, 13 August 2008 (UTC)[reply]
I also prefer this icon; it matches the purpose of the links much better. I'd certainly prefer not to see the Wikipedia logo. Waltham, The Duke of 12:20, 15 August 2008 (UTC)[reply]

Is there any way I can add the template to the bottom of my user page? Thanks! SharkD (talk) 22:12, 18 August 2008 (UTC)[reply]

SharkD: I see that you answered yourself by making the template {{sp-contributions-footer}}.
Everyone: I think I have found a much better image to use for these boxes: Image:User-info.svg
Perhaps we should use a more colourful version of that image, but you get the idea. But these boxes are interface messages so perhaps it is good that the image looks a bit neutral. See my example boxes at User:Davidgothberg/Test30 to see how it looks in the boxes.
--David Göthberg (talk) 08:21, 19 August 2008 (UTC)[reply]

Proposal: Move the main page to Portal:Wikipedia

I would like to propose that we move the Main Page to Portal:Wikipedia. Currently, the main page is in the article namespace, which causes lots and lots of little problems. Moving it to the Portal namespace instead would offer a number of benefits, including:

  • The top-left tab would read "portal" instead of "article".
  • People who want to make copies of Wikipedia, such as people who provide computers to schools in Africa that can't get Internet access, would have an easier time separating actual articles from project content which they don't want to copy. Because the content of the main page changes dynamically from day to day, it would take quite a bit of work to make the main page work and keep working on an offline copy of Wikipedia. Thus, since the main page won't actually work by default, it's probably best to exclude it from copies of Wikipedia article content by default.
  • The "cite this page" link in the sidebar would be hidden from screen readers and text-only browsers, and the sitewide CSS would no longer have to contain a special declaration to hide it.
  • The article count shown at Special:Statistics would be accurate instead of being 1 higher than the actual number of articles on Wikipedia. {{NUMBEROFARTICLES}} would also be accurate instead of being off by one.
  • Statistics about Wikipedia articles would be more accurate and not slightly skewed by statistics about the main page that are likely to get mixed in.
  • It would be generally easier to write bots and other automated scripts because developers would not have to worry about having to write special code for the main page, ever.

Here's how the proposal would actually be carried out:

  1. The main page would be moved to Portal:Wikipedia. Portal:Wikipedia would be temporarily transcluded back into Main Page, so that the two pages work identically while we move the links to the main page to Portal:Wikipedia.
  2. After the links have been transitioned and everyone is comfortable with Portal:Wikipedia (perhaps a month or two after step 1), Main Page would be changed to a simple redirect to Portal:Wikipedia.

Please remember that the main page appears as simply "Wikipedia, the free encyclopedia", so the only thing that will change for readers is the URL, and in any case they will be able to continue using http://en.wikipedia.org/wiki/Main_Page instead of http://en.wikipedia.org/wiki/Portal:Wikipedia as long as they like. In the long run (think years), users will access Main Page less and less until it is used so infrequently that we can delete it altogether.

Interestingly, the German Wikipedia has already done something similar. They moved their main page to the Wikipedia namespace (de:Wikipedia:Hauptseite), and it is working fine for them.

I know that this has been discussed before, but I feel that it is important to restart the discussion so that people won't have to sift through the previous discussion, which turned into a convoluted mess. —Remember the dot (talk) 01:23, 14 August 2008 (UTC)[reply]

Ugh. Most of these reasons are completely ridiculous. I wish this issue would just die. --- RockMFR 01:40, 14 August 2008 (UTC)[reply]
Some of them may seem ridiculous, but only if you ignore the real issue and focus on the tinier secondary effects. The Main page is not an article, it does not belong in the article space. End of story. --NickPenguin(contribs) 02:07, 14 August 2008 (UTC)[reply]
  • Suggestion - I've been a web master since 1995 and ever since I first saw the Wikipedia main page in 2004 I have thought the name is wrong. There is a long standing tradition on the world wide web what the main page of a web site should be. Most of the major organisations on the Internet including the web and Internet standardisation organisations follow that tradition. The main page of the English Wikipedia should of course be http://en.wikipedia.org/ , nothing else. And for database technical purposes such as what name magic words return inside templates and so on the name can be for instance Portal:Wikipedia or whatever people prefer. Thus making the talk page be Portal talk:Wikipedia. --David Göthberg (talk) 07:33, 14 August 2008 (UTC)[reply]
    • I'd like that too, but I don't think the wiki software is designed to do that. And like you said, moving the page to a different namespace doesn't prevent us from shortening the URL in the future if that becomes possible. —Remember the dot (talk) 01:40, 15 August 2008 (UTC)[reply]
  • Comment You are conflating two proposals here. The first proposal is to move main page to the Portal namespace, and the second—to name it Portal:Wikipedia. The second should be discussed only if the first is supported. Ruslik (talk) 12:54, 14 August 2008 (UTC)[reply]
    • In the last discussion, several alternatives were proposed and the one that was most supported by far was Portal:Wikipedia. I'm trying to consolidate the proposal down to focus on this idea, but if you have a better one that hasn't been discussed before then by all means propose it. —Remember the dot (talk) 01:40, 15 August 2008 (UTC)[reply]
  • Support There are a large number of advantages with this proposal and no real disadvantages. The Main Page is not an article, therefore it should not be in article space! It belongs in portal space. As mentioned, the only thing that would change to most users is the url, and the old url would still work! As far as I know, every single problem with this suggestion has already been addressed. -- Imperator3733 (talk) 02:29, 16 August 2008 (UTC)[reply]
  • Oppose I oppose the move and the proposed name. Main Page is not in article namespace, and indeeds predates namespaces. Rather, the software mistakenly acts like it is an article. We should correct the software rather than a perfectly adequate page name. Nor is the name "wrong" just because other websites choose differently. Superm401 - Talk 07:00, 16 August 2008 (UTC)[reply]
As was pointed out in the previous discussion on this proposal, the developers gave a resounding "no" to writing some sort of hack to make the page name display properly. How is it easier to modify the Wiki software rather than move the page to it's proper location? --NickPenguin(contribs) 14:39, 16 August 2008 (UTC)[reply]
I asked for no hack. Superm401 - Talk 20:06, 18 August 2008 (UTC)[reply]
Why do you say that Main Page is not in article space? Pages in article space do not have prefixes, and neither does the Main Page. Also, take a look at this page. Main Page is in article space. The devs are not going to change the software to accomodate this, especially since everything can be fixed by moving the page. -- Imperator3733 (talk) 19:27, 16 August 2008 (UTC)[reply]
You are pretending that the prefix system has always been here, which is not true. Superm401 - Talk 20:06, 18 August 2008 (UTC)[reply]
But that doesn't change the fact that from the software's perspective, Main Page is in the article namespace. -- Imperator3733 (talk) 20:28, 18 August 2008 (UTC)[reply]

Template suggestion: This user lives in Country X

There ought to be a template so one can say on their User: page

"This user lives in Thailand"

like on User:Sean.hoyland. One should only need to say

{{I'm from|th}}

Or maybe say "This user lives in". Jidanni (talk) 02:44, 14 August 2008 (UTC)[reply]

See Category:Nation of residence user templates. Graham87 09:22, 14 August 2008 (UTC)[reply]

OK, thanks. I note there could be a 'one size fits all' template, but there apparently isn't. Jidanni (talk) 18:55, 15 August 2008 (UTC)[reply]

This is a good idea, however I can think of a few issues with it. It seems to me that this template would require a lot of if (or case) statements in order to match up the inputed country code with the correct output text and image, plus there would need to be error handling in case of an incorrect code. This would create a very complicated template that only a few people would be able to understand and be able to modify. If a new country was created, even an extremely minor error in adding the appropriate code could really mess up the template. Although a unified template would be much easier to use, the complicated code that's required would be a problem. I would suggest concentrating instead on standardizing both the design of the country templates and the name of the template. -- Imperator3733 (talk) 02:47, 16 August 2008 (UTC)[reply]
This could eaisly and simply be created by using switch statements instead of if statements. Switch statements also have error handling. Support. —Atyndall [citation needed] 09:15, 16 August 2008 (UTC)[reply]
Switch statements (or large numbers of conditionals) are very expensive. Use a template that redirects to a large directory of sub-pages instead of using parser directives. The {{getalias}} template (or some other template based off of Country data) should suit your needs. SharkD (talk) 09:22, 16 August 2008 (UTC)[reply]

Monobook Sidebar Menus

Does the left border on Monobook’s sidebar menus bother anyone else? It has bothered me forever.

The line down the side of the window should be clean, but instead it has lumps caused by the border on those side items. While, I’ve fixed it in my own stylesheet – I really think this is a nice simple change that should be pushed to the global style.

All it takes is this:

div.portlet .pBody {
    border-left: none;
}

Thoughts? — Mobius (talk) 06:46, 14 August 2008 (UTC)[reply]

I don't see any "bumps" - is this a browser-specific issue? – ukexpat (talk) 13:11, 14 August 2008 (UTC)[reply]
I tried this (monobook/FF 3.0) and didn't notice any change. –xeno (talk) 13:27, 14 August 2008 (UTC)[reply]
What browser do you use? I don't see any "bumps" either... EVula // talk // // 13:52, 14 August 2008 (UTC)[reply]
Nor do I, but adding that code to the global sheet will fix a problem for some people so, if it doesn't affect anyone else, I propose we add it...... Dendodge .. TalkContribs 17:44, 14 August 2008 (UTC)[reply]
How do you get the idea that "it doesn't affect anyone else"? It would remove the left border from the portlet bodies at the left, giving them borders on only three sides. —Simetrical (talk • contribs) 14:14, 15 August 2008 (UTC)[reply]
I should have posted a picture in the first place: [1]. This is from Firefox on the Mac, where it’s particularly noticible. Do you notice that the effective border along the left is thicker nearby the portlet boxes? Granted, as a graphic designer I’m more sensitive to this than *most* people, and even then it’s a minor annoyance—just sayin’.
Mobius (talk) 07:14, 16 August 2008 (UTC)[reply]
I hadn't noticed this before... Thanks to Mobius, I shall be forced to endure it for who knows how long. Well, now we know who'll get the first taste of my new sword's sharpness. :-)
Simetrical, isn't the entire page bordered only on three sides? And, unless I am mistaken, the Wikimedia–MediaWiki footer only has two lines. Now that I think of it, a very long word or code-box can cause us to see the lack of a border on the right, but I have yet to see any empty space on the far left of the page. Unless other browsers display such space, there is no problem I can think of. Waltham, The Duke of 19:23, 18 August 2008 (UTC)[reply]
The content area has no right border, and the footer has no left or right border. However, the portlets on the left side (navigation, search, etc.) have all four borders, and the left border is clearly visible on Firefox 3 on Ubuntu (Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008072820 Firefox/3.0.1). While I doubt I would notice if it were missing, and don't particularly care if it's removed, it's not true that this wouldn't affect other users. —Simetrical (talk • contribs) 15:28, 19 August 2008 (UTC)[reply]
Ah, okay, now that I know what you're talking about, I see what you're saying (Safari 3 on a Mac). I'm a graphic designer too, but it doesn't bother me; the optimal solution would be to kill the left border and move the boxes left one pixel (or, alternatively, leave the border and give it enough left padding to match the space between the boxes and the main site). EVula // talk // // 19:35, 18 August 2008 (UTC)[reply]

Blockquote issue

Best TFA ever

A left aligned image, such as this one, seems to bust the <blockquote> tags. See this:

This is a blockquote, and to appear correctly ought to be indented from the sentence above.

But as you can see, it's not. Is this a known bug of some sort, or is there a simple workaround? --JayHenry (talk) 05:46, 15 August 2008 (UTC)[reply]

It is not a bug, it is how HTML works. Just don't float images to the left if you need to indent with <blockquote> or <dl>/<dd>/<dt>. Perhaps this will illustrate the problem. The floating object pushes the text over, but not the text parent object, which itself is still perfectly indented. --Splarka (rant) 08:21, 15 August 2008 (UTC)[reply]
I can see how for many applications that would be the desired effect. Is there no way around it though? Some way to indicate to HTML that you want the level indented from any floating object. Seems strange that it'd be simply impossible to use a blockquote and a left-aligned image. --JayHenry (talk) 13:17, 15 August 2008 (UTC)[reply]
It's just how margins and floats work in CSS. Floats compress only line boxes, not blocks, and the margin is part of the block, not the line box. It looks even uglier with borders:
This is a div with a border and background that overlaps with floated images.
If you use an inline-level element like a span, it sort of works, but only for the first line:

This is a span with a left and right margin. The margin doesn't overlap the images, but it applies only to the start and end of the text, before the text is divided into lines. Therefore the left margin only applies on the first line and the right margin only on the last, which is still undesired.

I don't know of any good way around this, other than the obvious (don't use blockquotes near left floats). —Simetrical (talk • contribs) 14:25, 15 August 2008 (UTC)[reply]
You could trick the blockquote into starting a new block formatting context, which is supposed to force it to not overlap the float.
This is a div with a border and background that might not overlap with floated images.
Of course, that depends on browsers getting that right. FF3 does, but I would not be surprised if IE doesn't. There also may be other side effects of forcing the new context, e.g. in the above text that would normally overflow outside the div (if any) will be hidden instead. Anomie 16:36, 15 August 2008 (UTC)[reply]
Floating content takes it out of the flow of the document. You need to clear the float. Using the example(s) above:
This is a div with a border and background that doesn't overlap with the floated image.
All you need to do is use {{-}}, which was created specifically for situations like this. EVula // talk // // 19:20, 15 August 2008 (UTC)[reply]
EVula, I can't figure out how to make this work. How can I use {{-}} to place a blockquote to the right of a left-aligned image? Everything I try creates a giant white space, and places the blockquote below the image, not beside it. --JayHenry (t) 06:19, 16 August 2008 (UTC)[reply]
Best TFA ever

Oh, I think I got it! A left aligned image, such as this one, seems to bust the <blockquote> tags.

But if you place <div style="overflow:hidden"> just before the blockquote, and a </div> after the blockquote, it appears to work correctly.

So my question becomes... does this cause formatting problems in anyone's browsers? Are there potential issues that come from using the overflow:hidden tag? --JayHenry (talk) 15:27, 16 August 2008 (UTC)[reply]

I've had bad experiences with overflow:hidden before on older browsers like IE/Mac. It also, of course, affects what happens if there's actual overflow, in a way you don't necessarily want. Compare:

This is a blockquote with a really long word and no overflow: hidden. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

This is a blockquote with a really long word and no overflow: hidden. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Note that you don't need the div, anyway. The style attribute can just be put on the blockquote element. —Simetrical (talk • contribs) 19:10, 18 August 2008 (UTC)[reply]
WOW! did some one of u think about winning the best talk page contribution of the year troophy before ?
Just kidding. i liked seeing the way of discussion, and how simple, and rich in the same time it is, than the point of discussion it self. keep on the good work wikipedians :) One last pharaoh (talk) 22:34, 18 August 2008 (UTC)[reply]

JS syntax highlighting RegExp error

In JavaScript, if a regexp has a literal quotation mark, ("), the text is highlighted as if the " was a string boundary:

var s="\"abcd\"abcd\""
//creates string: "abcd"abcd" (the "s ar literal)
//remove all "s with the regxp: /"/g
s.replace(/\"/g,"")
//This code is supposed to be green, but is blue, as the literal quotation mark in the regxp is treated as a string boundary
var colorRectifier = "\""
//To correct the syntax highlighting, you have to add a dummy string containing a literal "

— Preceding unsigned comment added by Manishearth (talkcontribs) 14:33, 15 August 2008 (UTC)[reply]

But the code still works properly, no? Actually if this is affecting the appearance of an article about javascript it should be fixed, and syntax coloration should probably be disabled in the affected articles until then, as the wrong colors would be more confusing than none at all.

If this is not affecting a particular article I wouldn't worry. You can escape the quotation mark as \u0022 in your monobook or whatever if the colors bother you, e.g. s.replace(/\u0022/g,"") (\u0027 for apostrophe/single-quote) but this could confuse the average reader if used in an article, unless the subject is obfuscated code, or something. — CharlotteWebb 15:00, 15 August 2008 (UTC)[reply]

this is a very common syntax coloring error; I see it in most apps I use that use syntax coloring. it has no effect on javascript execution itself. where did you see this? --Ludwigs2 18:39, 15 August 2008 (UTC)[reply]
I just tested the example in Notepad++ and SciTE. Both programs color the text properly. SharkD (talk) 19:24, 15 August 2008 (UTC)[reply]

I wouldn't call this a RegExp error. It occurs anywhere double-quotes are escaped, not just regular expressions. SharkD (talk) 19:18, 15 August 2008 (UTC)[reply]

Nevermind. I see in the example that it works properly in regular strings, so it is in fact a RegExp issue. SharkD (talk) 19:24, 15 August 2008 (UTC)[reply]

Yes, it is a known syntax highliting (mw:Extension:SyntaxHighlight GeSHi) issue, it only affects the appearance, and the easiest way to make it pretty again is to add another apostrophe/quote at the end of that row: //"AlexSm 21:06, 15 August 2008 (UTC)[reply]

If cosmetics are important you can use a regex constructed from a string rather than a literal one and the colors will be correct.

//remove all "s with the regxp: /"/g
r = new RegExp("\"", "g");
s.replace(r, "");

CharlotteWebb 22:31, 17 August 2008 (UTC)[reply]

I don't know... I think priority should be given to fixing bugs rather than users working around them. SharkD (talk) 22:35, 17 August 2008 (UTC)[reply]
In practice, priority will be given to function issues rather than appearance issues. In practice, most people don't care what their monobook looks like, or even understand half of it, as long as it works. I'm more concerned about readers. If there are articles about javascript, maybe on wikipedia, maybe on wiki-books or some other project, this would be the best solution from now until the syntax-highlight extension is fixed. — CharlotteWebb 22:45, 17 August 2008 (UTC)[reply]

This is an issue with GeSHi. I suggest you report the problem to them. —Simetrical (talk • contribs) 19:14, 18 August 2008 (UTC)[reply]

Page existence confirmation

I'm not sure where to ask questions about bots and scripts. If this is the wrong place, please direct me to the right one. I'm trying to write a (cgi) script that checks the existence of wikipedia pages in more than one language wikipedia. en.wikipedia.org, sv.wikipedia.org etc. I construct the urls with no problem: en.wikipedia.org/wiki/name etc, but when inspecting the returned content I have problems finding any simple criteria that tells if this actually is the wanted page, or just the page telling that the page doesn't exist. Every national wikipedia has different layout and phrasing, even in the title. But there are supposed to be global bots out there, so this problem must have been solved. Anyone? Akebrett (talk) 20:35, 15 August 2008 (UTC)[reply]

Use mw:API, e.g. action=query&prop=info&titles=No such page and then check for "missing" flag. —AlexSm 20:58, 15 August 2008 (UTC)[reply]
Thank you! Akebrett (talk) 23:08, 16 August 2008 (UTC)[reply]

This page has been viewed ? times last month

As there is a first full month analysis of the wiki's page hits (counted by the squid server), see also THEwikiStics (full dump available), I wanted to ask if there is an interest to have page view counts included in the page footer again? "This page has been viewed ? times last month" or similar could be added to the wiki footer again by using a bot that puts figures into subpages of a template or so (includable/linkable with /{{PAGENAME}}; the only question is, whether this is allowed in MediaWiki:Lastmodifiedat by the devs)? --Melancholie (talk) 21:56, 15 August 2008 (UTC)[reply]

User:Pageview bot was blocked for doing exactly that, because it was determined to be too wasteful of resources. Anomie 01:23, 16 August 2008 (UTC)[reply]
OK, thanks! I thought so, was just a question. --- Greetings, Melancholie (talk) 01:59, 16 August 2008 (UTC)[reply]
Not sure why you'd want a bot to do this. Certainly something that works at a lower level would be better? SharkD (talk) 09:30, 16 August 2008 (UTC)[reply]
This service might be of interest: Wikipedia article traffic statistics
You can enter the name of any Wikipedia page there and get the stats for it. You can even check how many visits you have to your user page.
--David Göthberg (talk) 09:51, 16 August 2008 (UTC)[reply]
@SharkD: Lower level? @Davidgothberg: Yes, I know. But that tool stopped working; I am considering to continue that tool (as the original author seems to be not available); just thought about integrating stats into pages (like it once had been). --- Best regards, Melancholie (talk) 13:03, 16 August 2008 (UTC)[reply]
I mean, usually this sort of information is tracked on the server. Since this information is also supposed to be displayed on the server, there's no real need to use a middle-man program that takes the information off the server and puts it back on. The server software itself could put the tracking data into a template, or save it as a system variable (e.g., like {{PAGENAME}}). SharkD (talk) 22:24, 16 August 2008 (UTC)[reply]

(unindent) If the site has an API, it could be added with JavaScript (perhaps in a Gadget?). I know Henrik's stats (stats.grok.se) have an API.... --MZMcBride (talk) 22:49, 16 August 2008 (UTC)[reply]

Or, God forbid, we could write it into core instead of a silly JS hack. — Werdna • talk 06:10, 18 August 2008 (UTC)[reply]

ACK, but how? --- Greetings, Melancholie (talk) 06:38, 18 August 2008 (UTC)[reply]

If you look at Image:Mediawiki-database-schema.png there's a page_counter in the page table the counter been disabled here due to performance reasons. — Dispenser 03:50, 19 August 2008 (UTC)[reply]

It's not exactly disabled for performance reasons. It's disabled because it's completely inaccurate. The overwhelming majority of page views are cached by Squid and never reach MediaWiki, and those would be ignored in the count. Any page view count needs to be kept by Squid, not MediaWiki. We have such a count now. It just needs to be integrated in some fashion with the MediaWiki interface. —Simetrical (talk • contribs) 15:30, 19 August 2008 (UTC)[reply]

This is kind of difficult to explain, but here it goes. Normally, when an article contains a link to the name of that article, the link will show up as bolded (for example, when I type [[Wikipedia:Village pump (technical)]], it will show up as Wikipedia:Village pump (technical)). However, when that link has a number sign (#) in it, it will not show up as bolded (i.e. Wikipedia:Village pump (technical)#Self-bolding link with number sign). I can understand why this doesn't "bold itself", as there are several Skip to table of contents links on talk pages with number sign links. However, links with number signs are also used in navigational templates (like in Template:Green Day, where the "Working Class Hero" link leads you to Working Class Hero#Green Day cover.) However, on the "Working Class Hero" article, the link to "Working Class Hero on the Green Day template will not "bold itself" because there is a number sign in the link. I think that there should be a way to get a link like that to "bold itself", because on navigational templates the bolded link is an easy way to tell where the article you're on is (as compared to the other articles; for example, on the Green Day template you can easily tell where "Working Class Hero" is chronologically compared to other singles). Is there a way to do such a thing? Xnux the Echidna 02:35, 16 August 2008 (UTC)[reply]

It would be logical only when and if you were currently viewing the section being linked to. It would also be unworkable. I think the current method is fine. SharkD (talk) 05:56, 16 August 2008 (UTC)[reply]
You could workaround it using m:parserfunctions, example
{{ifeq:{{PAGENAME}}|Working Class Hero|'''Working Class Hero'''|[[Working Class Hero#Green Day cover]]}}
Dispenser 13:08, 19 August 2008 (UTC)[reply]

Proposal: changes to "wikibits.js"

As per the discussion in #Reverse-sortable table?, I've made modifications to the table sorting code in "wikibits.js" in order to allow table columns to be sorted in reverse by default. I found that the code to make this work already existed in the source code; it was simply never activated.

Here are are the changes I propose. You can see it in action, here, if you copy the code to your "monobook.js". The way I configured the script is to sort a column in reverse order by default if the first cell in the column (typically a table header) has a class name of "sortreverse". If the header cell does not have this class name, the column is sorted as per the usual, ascending order.

I also fixed a minor bug (or deficiency), changed/expanded the ALT text for the little icons (the character being displayed was not supported in my version of IE) and added comments to some routines that were missing them. I also found a potential issue with the code I would like to draw your attention to: In the "ts_resortTable" function a regular expression is used to trim leading and trailing spaces before processing the cell contents. However, the regular expression searches for and replaces the space character with an hexidecimal ASCII code of A0 (equal to 160 in decimal), but this does not correspond to the more commonly-typed space character with a hexidecimal code of 20 (equal to 32 in decimal) that is typed using the spacebar. I wasn't sure if this was intentional or not, but I'd appreciate it if people were to take a look and make a judgement on the issue. SharkD (talk) 04:02, 16 August 2008 (UTC)[reply]

If you've been following along but haven't responded, there were a few issues I missed regarding the icon tooltips. I've resolved those, so please update your monobook. SharkD (talk) 05:28, 16 August 2008 (UTC)[reply]
I think you're misunderstanding something about the regex. The line is itm = itm.replace(/^[\s\xa0]+/, "").replace(/[\s\xa0]+$/, ""); — that replaces sequences of whitespace (including normal space, \x20) or nonbreaking space (\xa0) at the beginning or end of the string with nothing (that is, it deletes them). The \s includes normal spaces, tabs, carriage returns, and line feeds (and possibly a few other weird things, like form feeds and vertical tabs). So it should be fine. —KCinDC (talk) 05:39, 16 August 2008 (UTC)[reply]
Ah, you're right. I missed the \s. My bad. SharkD (talk) 05:58, 16 August 2008 (UTC)[reply]

I also made a proposal earlier to make it so that every third click on the sorting icon would return the table to its original order. I haven't worked on this, though. It requires more substantial changes. SharkD (talk) 06:06, 16 August 2008 (UTC)[reply]

Is there any support for this proposal? SharkD (talk) 22:20, 16 August 2008 (UTC)[reply]

It would be nice if you posted a diff of all the changes, or (even better) highlighted all the changes with some comments. By the way, I also had several proposals about this code, see User:Alex Smotrov/mw/sortable; I was supposed to remind Simetrical to look at it but then I somehow forgot. —AlexSm 04:13, 17 August 2008 (UTC)[reply]
Here is a diff of the two versions of the table sorting code. Here is a diff of the entire file, including other changes/optimizations not having anything to do with table sorting. SharkD (talk) 05:23, 17 August 2008 (UTC)[reply]
OK, I made a case-by-case argument for each change on your user page. SharkD (talk) 00:36, 18 August 2008 (UTC)[reply]

Any suggested changes should be posted to Bugzilla as patches in unified format, with one bug per issue. Feel free to assign the bugs to me. —Simetrical (talk • contribs) 19:20, 18 August 2008 (UTC)[reply]

What is the best way to submit patches if there are several bugs/issues to report? Should the patches be cumulative? Will whomever reviews the patch be confused if a patch requires a previous patch in order to work? Or, should each patch be built off the current, unpatched state and the sorting/merging of the patches left up to whoever implements the patch(es)? SharkD (talk) 21:44, 18 August 2008 (UTC)[reply]
I replied on my talk page, where you asked substantially the same question. Basically, if they change different parts of the same file, then submit them separately and they should apply fine. If one patch requires a previous patch, you can either submit them as a patch set on the same bug, or just merge them into one patch. —Simetrical (talk • contribs) 15:31, 19 August 2008 (UTC)[reply]

MediaWiki not parsing HTML tags in MediaWiki messages

I think this should be reported to MediaWiki Bugzilla or so, but I don't know how that works so here goes:

I and Oxymoron83 have discovered that MediaWiki does not properly parse some of the MediaWiki messages like MediaWiki:Anontalkpagetext and MediaWiki:Sp-contributions-footer-anon. It is likely this affects other such MediaWiki messages but we have not tested that yet. If such messages contain HTML wikimarkup <br> tags, then they are not properly parsed and converted to XHTML <br /> tags. That is, the HTML pages are rendered with <br> tags.

Provided that no one has changed the code in MediaWiki:Sp-contributions-footer-anon: Take a look at any anon IP user's contribution page, for instance Special:Contributions/65.103.35.149. See the MediaWiki:Sp-contributions-footer-anon box at the bottom of the page. (The box with the text "This is the contributions page for an anonymous user".) Then view the source code of the rendered HTML page, see that between the box's text and all the WHOIS links in the box there is a <br> tag. That tag should have been converted to a XHTML <br /> tag before rendering the page.

I have checked both an empty anon IP page, an empty anon page in edit mode, and one with messages on. The MediaWiki:Anontalkpagetext is shown in all those cases. And in all those cases the <br> tags were unparsed (not converted to XHTML <br /> tags). Also, if we use a HTML table in that message and miss to insert a </td> tag then it doesn't get parsed and fixed like it is in articles and other pages.

Wikimarkup tags such as '''bold''' seems to be parsed and converted as usual.

Note: I have now edited MediaWiki:Anontalkpagetext to use XHTML tags so it renders right, since otherwise Twinkle did get problems to leave messages on anon talk pages. But I have left the "bugs" in MediaWiki:Sp-contributions-footer-anon for demonstration, since that should not cause any problems anywhere. (All modern web browsers can handle such old school HTML tags.)

Here is the discussion that led to our discovery of this bug: Wikipedia talk:Twinkle#TW doesn't leave messages on talk pages.

--David Göthberg (talk) 09:28, 16 August 2008 (UTC)[reply]

I'm pretty sure this is intentional. HTMLTidy is not run on everything. The assumption is that admins should be able to produce clean code :) --- RockMFR 22:30, 16 August 2008 (UTC)[reply]
I can confirm that there was a problem. I've fixed the code in MediaWiki:Sp-contributions-footer-anon now too, because the failure to adhere to XHTML was another problem waiting to happen. —Remember the dot (talk) 22:44, 16 August 2008 (UTC)[reply]
RockMFR: As a Wikipedia editor and admin I assumed I should use (HTML) wikimarkup both in articles and in MediaWiki messages. And that MediaWiki then converts that to whatever is the current standard for web page rendering. (Today (2008) that happens to be "XHTML 1.0 Transitional".) Ah well.
--David Göthberg (talk) 07:38, 17 August 2008 (UTC)[reply]
Depending on the message and where it is used, it may be either plaintext, wikitext, or raw HTML. --brion (talk) 20:47, 18 August 2008 (UTC)[reply]
Are there important reasons why that's the case, or is it just the usual mottley collection of pages growing organically over five years? I mean, I can see how some messages would be plaintext and some encoded, but what's the reasoning behind some being wikitext, some HTML, and some XHTML? Would it be possible to put some identifying mark on each message to say what syntax was accepted (presumably that message would, perversely, be contained in a MediaWiki: page :D)? Happymelon 21:06, 18 August 2008 (UTC)[reply]
(X)HTML messages have been deprecated for some time now, but they're much cheaper to use than wikitext messages, computationally, since they don't need to be parsed. A list right now is hard to compile because the format of the message is decided by the caller, not in any central location. Theoretically (and this does sometimes happen) a message can be used as wikitext in one place in the code, fully escaped text in another, escaped except for entities in another, etc. Of course this is a bug and it's fixed when anyone notices it, but it illustrates the current problem that we don't know what format a message is used in without grepping the code. —Simetrical (talk • contribs) 15:33, 19 August 2008 (UTC)[reply]

Interactive music notation image

This webpage has an interesting scheme for presenting the reader with information on music notation (see "Interactive Notes"). It shows a staff and the individual notes play a sound when clicked. How hard would it be to implement something like this in Wikipedia? SharkD (talk) 10:33, 16 August 2008 (UTC)[reply]

Can't register at mw:

I am trying to create a new account over at mw:, but it doesn't let me do it as it says that the username I try to use for that account ("It Is Me Here") has already been taken by the Unified Login system (which is perfectly true). However, going from w:en: straight to mw: doesn't work either (i.e. it doesn't automatically register me) and so I am rather confused as to how I can create an account over at mw: and retain my user name. NB I tried to use the same email address there as I use here, but to no avail. Any help would be greatly appreciated. It Is Me Here (talk) 12:12, 16 August 2008 (UTC)[reply]

Have you tried just logging in to mw using your unified login username and password? Algebraist 12:14, 16 August 2008 (UTC)[reply]
Great, it worked, thanks! It Is Me Here (talk) 12:45, 16 August 2008 (UTC)[reply]

Sorting tables

1. I want the following table to be sortable, but it seems to be a different table rather than the common class="wikitable"; Help:Sorting does not mention how to sort these kind of tables. Can someone please make the first column- "Liquid" and the last column - "surface tension sortable". Do not make the second table sortable.

Surface_tension#Data_table

2. The second table on List of disk partitioning software seems to have a problem. The last column "HFS" does not sort on clicking the arrows. On clicking, the view just jumps to the top part of the page. (I use Firefox 2.14). Have a look.

--Siddhant (talk) 12:44, 16 August 2008 (UTC)[reply]

Regarding your second question, the problem was that the cfdisk row only had 7 cells instead of 8. Normally the table sorting script pulls the text contents of each cell, calls the toLowerCase method of the resulting string, and sorts by that. But since that final cell was missing, the "pull text contents" was getting an undefined value instead of a string and the undefined value lacks a toLowerCase method. Anomie 14:38, 16 August 2008 (UTC)[reply]

Thanks Anomie. --Siddhant (talk) 07:52, 20 August 2008 (UTC)[reply]

Regarding the first question: you can make the table sortable by adding the "sortable" class name. However, there's only a single cell in the header row. You need to add a header for each column in order for sorting to work properly. If you want don't want to eliminate the purple header that exists now, then put this cell inside another table that wraps around the inner, data table. By having nested tables, you can have one table (e.g., the "outside" one) that isn't sortable and another (e.g., the "inside" one) that is. SharkD (talk) 22:12, 16 August 2008 (UTC)[reply]

Can you do that? I'm not good at wikicode. --Siddhant (talk) 07:52, 20 August 2008 (UTC)[reply]

"This image is at Commons" template changed

Just now, when browsing image pages it seems that what was previously a large template with "This image is located at Commons" has turned into a small amount of inline text. I preferred the large template. Have I accidentally done something wrong to my preferences or has someone recently changed that template? It Is Me Here (talk) 13:14, 16 August 2008 (UTC)[reply]

I'm not seeing any change, and MediaWiki:Sharedupload hasn't been modified for ages. What are you seeing at (say) Image:Starved girl.jpg? Algebraist 13:30, 16 August 2008 (UTC)[reply]
Well, I used to see something similar to what I see now in FF3 when not logged in (http://www.picoodle.com/view.php?img=/3/8/16/f_Commons2m_7da118a.jpg&srv=img26) but now in IE7 (when logged in, anyway) it has turned into what you can see at http://www.picoodle.com/view.php?img=/3/8/16/f_Commons1m_21cc60b.jpg&srv=img29 - it would appear, then, that I've edited a preference somewhere, but I would need help figuring out which one it was. It Is Me Here (talk) 14:14, 16 August 2008 (UTC)[reply]
Its using the default message, you probably changed the language. Mr.Z-man 14:44, 16 August 2008 (UTC)[reply]
I did, actually - I changed from en to en-gb - is there any way to keep the other template but also keep British spelling? It Is Me Here (talk) 15:52, 16 August 2008 (UTC)[reply]
From Special:AllMessages, it looks like you're seeing the default values of sharedupload and shareduploadwiki-desc. It should be possible to edit the en-gb versions, but I don't know how. Algebraist 17:48, 16 August 2008 (UTC)[reply]
Found it. You need to edit MediaWiki:Sharedupload/en-gb and MediaWiki:Shareduploadwiki-desc/en-gb. In fact, en-gb doesn't seem to be very supported; none of the messages have been changed from defaults. Algebraist 17:52, 16 August 2008 (UTC)[reply]
Yep, that's them. Done. There's also a MediaWiki:Shareduploadwiki message. Lupo 18:07, 16 August 2008 (UTC)[reply]
Great, thanks everyone! It Is Me Here (talk) 19:04, 16 August 2008 (UTC)[reply]

Stats.grok

Any chance someone could update this tool? I think it would be very easy to do - it looks like it only needs the addition of a couple of lines - except that I don't know how to upload a page onto the web.

The tool counts page hits for any wiki page, but its creator, User:Henrik, has not edited since early July and it cannot currently show edits later than June. Lots of users would like to know how many page hits their articles are getting! Gatoclass (talk) 15:33, 16 August 2008 (UTC)[reply]

Check Henrick's activity at the commons and de.wikipedia--he's a helpful guy. // FrankB 16:25, 16 August 2008 (UTC)[reply]
@Gatoclass: See also this discussion. --- Best regards, Melancholie (talk) 18:51, 16 August 2008 (UTC)[reply]

Updates needed

Can someone familiar with the system software updates made back in January update and correct the old behaviors documented (pre-bug-fix, as it were) in

  1. Template_talk:Category_redirect#FAQ
  2. Wikipedia:Redirect#Category_redirects

On going practices on the commons suggest these are now very inaccurate. Hard category redirects are being used all the time now. // FrankB 16:25, 16 August 2008 (UTC)[reply]

This needs much more discussion. I know you prefer to use hard redirects for category redirects. But that doesn't work well for a number of reasons, even though MediaWiki has been partly updated to handle hard redirects for category pages. Among other things MediaWiki doesn't make the pages in the redirected category show up in the category the redirect points too. This means that pages in the redirected category gets "invisible" in the category system, since if you go to their category you don't see them since you get automatically redirected to the other category. Unless you manually go back by clicking the "Redirected from" message at the top of the new category. So we use soft redirects instead by placing the {{category redirect}} template on the redirected category page. That template also helps a bot find the redirected categories so it can automatically move the pages to the new categories.
I suggest you bring this up for discuss at Template talk:Category redirect and try to change the current consensus. (Instead of trying to force your will on the rest of us by leaving rude messages on our talk pages like you did with me some day ago.)
--David Göthberg (talk) 07:27, 17 August 2008 (UTC)[reply]

How do I switch my default embedded .ogg player in Firefox?

It keeps reverting to Quicktime, but I find that VLC media player works much better. How can I get rid of the Quicktime plugin (not get rid of it per se, because I need it for iTunes to work; I just want to disable it during Firefox sessions) and use VLC for all .ogg files?--The Fat Man Who Never Came Back (talk) 17:19, 16 August 2008 (UTC)[reply]

You could use the "Edit Cookies" extension for Firefox to extend the lifetime of the preferences cookie indefinitely. Or you could file a feature request. -- Tim Starling (talk) 17:28, 16 August 2008 (UTC)[reply]
I think you're a couple steps ahead of me. I don't know how to get VLC player to pop up in the first place, when I click on the play icon for .ogg files on Wikipedia. Where is this option controlled (the option that decides to use Quicktime)?--The Fat Man Who Never Came Back (talk) 17:33, 16 August 2008 (UTC)[reply]
(click the play button for any sound file, and a "more..." link should appear. click that for the options). I used to have a VLC option under a Quicktime option. However, both those options have disappeared for me, in the last few weeks, to be replaced by the solitary "mplayerplug-in" option. Most odd; I don't recall messing about with plugins or preferences recently... -- Quiddity 20:28, 16 August 2008 (UTC)[reply]
The fact that it's changed isn't particularly concerning, I did a whole lot of work on it. But if you're saying it's incorrect now, and you don't have this Mozilla plugin, then I'd very much like to see the contents of your about:config (type it into the location bar). The plugin in question is one of the many that pretends to be QuickTime, but fails when you actually treat it as QuickTime. That's why you would have previously had a non-working QuickTime option. -- Tim Starling (talk) 04:43, 17 August 2008 (UTC)[reply]
I couldn't install the mplayer plugin (with the msg ""mplayerplug-in" will not be installed because it does not provide secure updates". Will not be?? Who's computator is this anyway???) I looked but couldn't find a workaround? Is there one or a different source? Mozdev doesn't seem to have it. Thanks. Saintrain (talk) 15:14, 17 August 2008 (UTC)[reply]
Tim: Sorry if I confused things with my tangential comment. I do have mplayerplug-in working correctly. VLC is not mentioned in my about:plugins (or about:config) but I swear it was an option for oggs a few weeks ago! (No matter, my ubuntu is overdue for a version-upgrade anyway.)
Saintrain: Just in case you aren't aware, I should point out that mplayerplug-in is for unix/linux only (whereas vlc is cross-platform (and mplayer itself is also cross-platform)). Hope that helps. -- Quiddity 17:07, 17 August 2008 (UTC)[reply]
Thanks. The kettle was whistling and ... you know. Saintrain (talk) 18:38, 17 August 2008 (UTC)[reply]

Clock gadget eats CPU

Hi! Just turned off my clock gadget and CPU usage went from 10-12% to 0%. FF3.0.1 on WinXP. I can use all the cycles I can get! Saintrain (talk) 19:12, 16 August 2008 (UTC)[reply]

To those that don't know the clock gadget: It can be turned on at: "My preferences - Gadgets - User interface gadgets - [ ] A clock in the personal toolbar that shows the current time in UTC and also provides a link to purge the current page"
Saintrain: Yes, the clock gadget uses way too much CPU. I tried it some time ago and when I had several Wikipedia tabs open my computer became too slow to use. (Yes, I have a very old computer, and no I won't buy a new one just to run the clock gadget.)
Back then I asked the creator of the clock gadget if I could change the code in the gadget so it only shows whole minutes and only updates once per minute instead of once per second. (Who needs more precision than 1 minute to check what UTC time it is?) That would make the clock gadget use 60 times less CPU. But he refused to let me do that change.
So I had to resort to copy its code to my own monobook.js. While I was at it I made it so it only updates once every second minute to save even more CPU, since that is good enough for me. And then I improved it so it shows two clocks: One showing current UTC time, and one static that shows the time the page was loaded. Feel free to copy the code from my monobook.js page to your own monobook.js. (Note: There are several code snippets on my monobook.js page, be sure to copy the right part.)
I hope more users realise that ticking the UTC clock every second is silly, especially since it means that many users can not use the UTC clock gadget. So, what do the rest of you think?
  • Should we update the clock gadget to only use whole minutes (and tick once per minute)?
  • Should we add the second static clock that shows the time the page was loaded? (And if we do then I suggest we make both the clocks have normal text size like I did so it doesn't take up too much space.)
--David Göthberg (talk) 07:02, 17 August 2008 (UTC)[reply]
Heh, I use it myself, but I've never noticed a thing—of course, I'm running custom-compiled Firefox on a Pentium D, so that's not too surprising. Is this a noticeable issue for many people using the gadget? If it is, I'd say changing it to once-per-minute would be sensible, since gadgets should be aimed towards the general user (and you can always use a customized .js instead). --Slowking Man (talk) 12:44, 17 August 2008 (UTC)[reply]
Fine, but the old version with 1 second precision should also be retained as an alternative in the "Gadgets" section. I have just tested this on my computer and it eats away only about 5% of CPU power, definitely not noticeable, and I can't say I have the best computer available. Admiral Norton (talk) 13:10, 17 August 2008 (UTC)[reply]
Admiral Norton: Why do you need 1 second precision on the UTC clock? It's mostly used to compare times with the watchlist, peoples signatures and similar, and those only show time in minutes anyway.
5% of the CPU? How many tabs did you open? You know, some of us edit Wikipedia with 10-15 tabs open at a time. (When I program templates I need to have a lot of reference pages open.) And some browsers have a slower javascript engine than others.
--David Göthberg (talk) 13:37, 17 August 2008 (UTC)[reply]
I have 4 tabs open (not counting Meta wikipedia, which also uses the clock). As for the 1 second precision, I just like having something not stationary in the browser. Too bad the Windows clock doesn't have that precision. Admiral Norton (talk) 13:49, 17 August 2008 (UTC)[reply]
I just wrote an optimized version of the clock script at User:Ilmari Karonen/liveclock.js. It defaults to showing hours and minutes only, but it can be made to show seconds by adding a line to your monobook.js. Even with seconds enabled, I'm hoping it might be a bit less resource-intensive than the original. I can't test this myself very well, though, since my CPU usage meter hardly moves even when I make it update 200 times a second. I'm hoping someone else (like David) could test it and see how it compares. —Ilmari Karonen (talk) 16:54, 17 August 2008 (UTC)[reply]
Support, I don't need precision to the second. SharkD (talk) 22:21, 17 August 2008 (UTC)[reply]
Of course, the fundamental problem with the live clock and tabbed browsing is that the script keeps running even when the tab it's in is invisible. Unfortunately, I'm not aware of any easy way for the script to detect that it's running in an inactive tab and stop itself; the closest thing I'm aware of are the window focus/blur events, but they don't quite mean the same thing. (And even then, there doesn't seem to be any way for the script to tell at startup whether the window already has focus or not.) —Ilmari Karonen (talk) 17:00, 17 August 2008 (UTC)[reply]
This would also make a useful change. However, the script would also need to keep track of local time, which I don't think it currently does, instead of simply incrementing some amount at every interval. SharkD (talk) 05:36, 18 August 2008 (UTC)[reply]
Actually, it does keep track of time (in JavaScript, "new Date ()" creates a Date object representing the current time), so that part is already covered. —Ilmari Karonen (talk) 22:32, 18 August 2008 (UTC)[reply]
A third alternative which I would also support is to not use any JavaScript at all and only display the time when the page was loaded (e.g., a static display). SharkD (talk) 04:53, 19 August 2008 (UTC)[reply]

Colgroup

Are there any plans of implementing support for the colgroup element in wiki markup? Currently, it's only supported if the table is constructed explicitely from HTML elements. SharkD (talk) 00:40, 17 August 2008 (UTC)[reply]

See mediazilla:986. If I understand correctly, if colgroup was supported by all browsers, developers would premit it in the wiki markup a long time ago. —AlexSm 03:58, 17 August 2008 (UTC)[reply]
OK, thanks. It's too bad :( SharkD (talk) 05:15, 17 August 2008 (UTC)[reply]
I did previously suggest a pseudo-html tag (visible only in the wiki-text) which would change the style attributes of each cell as needed, but Simetrical says it would be too difficult (see Wikipedia:Village pump (technical)/Archive 42#Tables: How to define alignment for an entire column?). If I knew PHP I'd seriously give it a shot . — CharlotteWebb 11:26, 17 August 2008 (UTC)[reply]
I found a page detailing browser support for the colgroup and col elements. SharkD (talk) 22:30, 17 August 2008 (UTC)[reply]

Source tag

Could someone direct me to where the <source> tag is described? It's not described in Help:HTML in wikitext or Help:Wikitext examples. SharkD (talk) 05:47, 17 August 2008 (UTC)[reply]

The extension that provides that tag is SyntaxHighlight GeSHi. - Icewedge (talk) 07:46, 17 August 2008 (UTC)[reply]
Thanks very much. SharkD (talk) 09:55, 17 August 2008 (UTC)[reply]

Edit history of two editors

Is there an easy way to do a merged or side-by-side comparison of the edit history of two accounts? Thanks, --Clubjuggle T/C 21:49, 17 August 2008 (UTC)[reply]

tools:~pietrodn/intersectContribs.php? -- John Broughton (♫♫) 23:23, 17 August 2008 (UTC)[reply]
That just gives a list of pages both have edited. Any way to get the edits and times in there? Thanks, --Clubjuggle T/C 05:23, 18 August 2008 (UTC)[reply]
If the edit histories were served in table format instead of as a list you could simply copy the tables into a spreadsheet and compare them there. This also goes for a lot of the other "Special" pages. SharkD (talk) 05:34, 18 August 2008 (UTC)[reply]

Template dab help please

The template Template:User Bugle generates a link to bugle, which is a dab page. The intended target is Bugle (instrument). I do not know how to fix it. Thanks, DuncanHill (talk) 21:52, 17 August 2008 (UTC)[reply]

I fixed it by adding an extra parameter to {{User instrument-gen}} so the correct link could be specified. Anomie 22:06, 17 August 2008 (UTC)[reply]
Excellent, thank you. DuncanHill (talk) 22:11, 17 August 2008 (UTC)[reply]

Malfunctioning blocks

The software sometimes doesn't recognise rangeblocks. For example, 208.109.0.0/16 was blocked in March 2007 as an open proxy range, yet an IP in that range – 208.109.19.19 (talk · contribs) – managed to edit after the block. 64.34.0.0/16 was also blocked in March 2007 as an open proxy range, yet 64.34.173.112 (talk · contribs) managed to edit after the block. So to make sure there were no other malfunctioning rangeblocks of open proxies, I went through User:Spellcast/proxies and reblocked every range that was currently blocked. If the block form didn't allow me to reblock, that means the rangeblock is working. However, if the software allowed me to reblock, that means the old rangeblock wasn't working. After going through most of the list, I found the software wasn't recognising another five rangeblocks.[2], [3], [4], [5], [6]. Does anyone know why the software sometimes doesn't register old rangeblocks? Spellcast (talk) 05:16, 18 August 2008 (UTC)[reply]

Wow. The software has been real glitchy lately. SharkD (talk) 05:33, 18 August 2008 (UTC)[reply]
Can you confirm that the ranges were in fact blocked at the time? It's possible they got unblocked and not properly logged; or alternately that there was something borked w/ the block entry in the database. Unfortunately if there was a problem with the block itself it'll be gone due to the unblock/reblock... if you notice another one, give us a shout so we can investigate it before you try reblocking it; there might be some forensics we can do first! :D --brion (talk) 18:47, 18 August 2008 (UTC)[reply]
Ok here's another one (I tried reblocking every range in that subpage except for ThePlanet.com IPs, 74.222.0.0/19, and 85.234.128.0/19). 85.234.157.148 (talk · contribs) edited this year despite the March 2007 block of 85.234.128.0/19. 85.234.128.0/19 is currently unblocked as I type despite what the block log says. Spellcast (talk) 00:32, 19 August 2008 (UTC)[reply]
There is no block present for that range, indicating that it was either unblocked or has expired. An unblock should have left a log entry, unless there was a bug present, and an expiry shouldn't have happened, unless there was a bug present. Either would have presumably happened at least 5 months ago, so an older bug might or might not still exist. --brion (talk) 13:51, 19 August 2008 (UTC)[reply]

How many times do you have to refresh?

How many times on average do you have to refresh a page for it to load, or click the "Save" button to save your edits? For me it just seems to be getting worse and worse! SharkD (talk) 08:00, 18 August 2008 (UTC)[reply]

On average, once. It's a fair few weeks since I've had any problems. Are you sure it's not your internet connection? TalkIslander 08:24, 18 August 2008 (UTC)[reply]
I have found Wikipedia to be kind of balky this weekend, not responding for several minutes at a time, where normally it's been extremely responsive.--Father Goose (talk) 09:48, 18 August 2008 (UTC)[reply]
How do I determine whether it's my internet connection? This seems to happen only on Wikipedia. It seems that every third or fourth time I have to refresh or resubmit a page or edit. To be honest, though, I'm not as sensitive to this sort of thing on other sites, given that I don't submit any content to those sites. SharkD (talk) 21:38, 18 August 2008 (UTC)[reply]
Usually once, but in the last week or two the "database locked" keeps popping up at least two times every day and I had never ever seen that notice before. Admiral Norton (talk) 13:25, 18 August 2008 (UTC)[reply]

Did some one damage my account?

"Sorry! We could not process your edit due to a loss of session data. Please try again. If it still does not work, try logging out and logging back in." that is the messege i get whenever i try to contribute. Ironically, i get the same messege when i tried to edit, while i was logged out! (One last pharaoh (talk) 20:16, 17 August 2008 (UTC))[reply]

You might be better off asking this at Wikipedia:Village pump (technical), where techinical issues of Wikipedia are discussed. Hopefully those there can give you a better answer about it. -- Natalya 21:07, 17 August 2008 (UTC)[reply]
Thanx, Nataly. One last pharaoh (talk) 14:03, 18 August 2008 (UTC)[reply]
That happens when your browser is unable to process session cookies or you are using a bad proxy. What browser/proxy are you using? - Icewedge (talk) 21:40, 17 August 2008 (UTC)[reply]
Well, i donot know about that stuff :D incase it would be helpful, i was using windows XP and i had the same problem, now i am using windows vista and i still have it. i even got a new hard disk, and tripled the RAMs so the computer is in like-new condition. One last pharaoh (talk) 14:03, 18 August 2008 (UTC)[reply]
That happens to me, if I edit, go away from the pc, come back later and save. Perhaps copy and paste your changes in a refreshed version? weburiedoursecretsinthegarden 14:10, 18 August 2008 (UTC)[reply]
As a last hope, i write what i want in an MC word file, or write it here then copy-past it there so that i have the contribution saved on my hard disk and i can try again if it did not work the first time. the kicker here is that i would not work the second time or the third time or whatsoever so i just gave up. i even thought to be just a reader and stop editing, but some times u cannot help editing wikipedia :) One last pharaoh (talk) 14:18, 18 August 2008 (UTC)[reply]


I, One_last_pharaoh have copied that from wikipedia help desk taking Natalya's advice. hope to get helped soon. Thanx in advance. One last pharaoh (talk) 17:54, 18 August 2008 (UTC)[reply]

The cookie might have gotten damaged somehow (maybe in transit). Try deleting your browser's cookies and then logging in again. Titoxd(?!? - cool stuff) 18:54, 18 August 2008 (UTC)[reply]
Note: I have re-done the copy paste from the help desk section, when you so such content moves please do them by copying the source not the output. - Icewedge (talk) 20:12, 18 August 2008 (UTC)[reply]
I experience this any time I hit "edit" and don't submit the changes until hours later. My way of combating it is to copy the entire contents of the edit window to the clipboard (or to a text file, if I'm paranoid about it being lost), hit the back button until I'm back to viewing the page (not editing it), hit "edit" again to start a new session, copy in my changes, and save it.--Father Goose (talk) 21:21, 18 August 2008 (UTC)[reply]
Same here. I haven't received this error any time else. SharkD (talk) 22:08, 18 August 2008 (UTC)[reply]
First i want to thank every one who tried to help. I do not know why, but now i do not have the problem, or at least that's what i think. i have just made a revert, and it worked normally !
I do not understand what happened, but happy that it did happen any way :D One last pharaoh (talk) 22:12, 18 August 2008 (UTC)[reply]
I don't understand what all this fuss is about. I also see the message when there's a great delay between clicking on "edit" and on "save", but I simply hit "save" again and my changes are saved properly (that is, unless there is an edit conflict). Why go back and refresh?
PS: I'm clearly not referring to One last pharaoh's plight of seeing the message constantly, though I still don't know if "trying again" (as the message itself recommends) ends up losing the changes in this case. Or, at least, used to. Waltham, The Duke of 11:24, 19 August 2008 (UTC)[reply]
Different browsers behave differently. I seem to remember a recent discussion about IE6 and IE7 being unable to restore an edit via the "back" button, while FireFox works as expected (the back button brings one back to the edit box with the edit in it). -- John Broughton (♫♫) 13:56, 19 August 2008 (UTC)[reply]

Trivia and pop culture as randomized infoboxes

Trivia and popular culture references creep into thousands of articles on Wikipedia. These sections are (contrary to style guidelines) often bulletted lists of fictional references and Internet memes. While it's not terribly useful to have these sections in such a form, neither is it valuable on a low-edit article to turn these into well-cited prose only to have several editors come along over the following months and add in successive sentence fragments describing even more of the same.

Instead, I'd like to suggest a model of encouraging the default behavior while also improving the article. This might require an extension to MediaWiki to implement, but what I'd think would work best is a template of the form:

{{trivia list | name=Avocados in popular culture | display=3 | content=
* The video game [[Giant Pit]] (1995) featured an avocado warrior princess with a mayo gun.
* ...
* ...
* ...
* ...
}}

The displayed text would be an infobox containing the "name" as heading and 3 out of the 5 listed items, selected at random (probably at rendering time by JavaScript, though a static version could be provided within a noscript tag). In this way trivia or popular culture sections could be reduced to side-bars in the spirit of "Did you know" or the like, and would not take up large amounts of article space even with hundreds of items.

One of the goals is certainly to reduce the imposition that these sections make on an article, but similarly, this gives editors the ability to communicate less weighty elements of the topic at hand which they might find most compelling. -Miskaton (talk) 19:33, 18 August 2008 (UTC)[reply]

Any chance you could do an example on say a sub-userpage or something so I can see what it looks like, thanks. Your idea looks promising so far. Deamon138 (talk) 23:52, 18 August 2008 (UTC)[reply]
It seems like that would just make it more likely for errors in the list to remain uncorrected (since they'd only be displayed some of the time). And it would encourage people to keep reloading the page to see the random items change. Plus, people who are interested in the trivia wouldn't see it all. —KCinDC (talk) 00:02, 19 August 2008 (UTC)[reply]
You may want to look at this page before you try this. Thingg 01:32, 19 August 2008 (UTC)[reply]
As a founder of WikiProject Popular Culture, I am sensitive to the problems associated with these sections. The real solution is to address them editorially, not technically. As yet we don't have a solid or consistent editorial approach to them, though in the past week I've been drafting a replacement for Wikipedia:"In popular culture" articles with much more specific guidance. Keep an eye on the page if you're interested.--Father Goose (talk) 01:50, 19 August 2008 (UTC)[reply]
No comment on whether or not its a good idea, but you should be able to make a template using {{rand}} and WP:NAVFRAME that would allow for random display of one item with the ability to show all of them, without needing an extension or additional javascript. Mr.Z-man 15:51, 19 August 2008 (UTC)[reply]
Agreed. This can all be accomplished using template markup. SharkD (talk) 03:09, 20 August 2008 (UTC)[reply]

While working on a new tool I became aware the MediaWiki does not apparently index all external links. For example North Pole links to GeoHack, however searching for the URL yields no results. Other articles such as Arctic Ocean do appear in the results. Is this a bug, job queuing issue, or intentional? — Dispenser 03:12, 19 August 2008 (UTC)[reply]

That was odd, the extlinks for North Pole was completely empty, but after a null edit it is populated (well, attempted null edit, for some reason it showed a whitespace). See the extlinks list now. --Splarka (rant) 07:56, 19 August 2008 (UTC)[reply]

Signing posts

Why isn't it automated? —Preceding unsigned comment added by Lumarine (talkcontribs) 03:29, 19 August 2008 (UTC)[reply]

Because occasionally edits to talkpages don't need signing, and you need to sign on some non-talkpages too. But most of the time SineBot will sign it if you forget. Calvin 1998 (t-c) 03:33, 19 August 2008 (UTC)[reply]

It's as if when I send an email I have to put 4 tildas at the end otherwise the recipient can't see my e-mail address. —Preceding unsigned comment added by Lumarine (talkcontribs) 03:36, 19 August 2008 (UTC)[reply]

Hmm... but would you like it if the Mediawiki signed the edit it which, say, you reverted vandalism to a talkpage? There's just no way to figure out whether your edit is a message or some other edit. In any case, you can check the history to see who added a message. Calvin 1998 (t-c) 03:40, 19 August 2008 (UTC)[reply]

LiquidThreads. — Werdna • talk 04:05, 19 August 2008 (UTC)[reply]

Or try the right link. :-) Graham87 12:40, 19 August 2008 (UTC)[reply]

Images not resizing again?

I'm experiencing what I believe is a repeat of a the problem that we experienced the other day, where images wouldn't resize properly. Anyone else seeing this? Ed Fitzgerald (unfutz) (talk / cont) 03:44, 19 August 2008 (UTC)[reply]

Just tried to upload a new image, and it won't even show up on the image page. Ed Fitzgerald (unfutz) (talk / cont) 03:57, 19 August 2008 (UTC)[reply]
I should clarify. I can see the image at full resolution, but the image on the image page is resized, and it won't show up. Ed Fitzgerald (unfutz) (talk / cont) 04:07, 19 August 2008 (UTC)[reply]
Looks fine to me. Have you tried purging the page cache and bypassing your browser cache? —Ilmari Karonen (talk) 10:05, 19 August 2008 (UTC)[reply]
See paracetamol and Eflornithine, the images are displaying at full resolution, not as a thumbnail. Tim Vickers (talk) 20:52, 19 August 2008 (UTC)[reply]

Customising your toolbox?

I would like the What links here link in my toolbox to hide transclusions and links by default (and so leave just redirects, somewhat like this) - is this possible (by editing User:It Is Me Here/monobook.js, say)? Thanks in advance. It Is Me Here (talk) 15:56, 19 August 2008 (UTC)[reply]

Add the above to your monobook.js in the default function. - Icewedge (talk) 17:49, 19 August 2008 (UTC)[reply]
Ugh, there was so much wrong with that script (like it would break the whatlinkshere, showing only redirects to the VP/T), I had to delete it, sorry. Try this instead:
addOnloadHook(function() {
  var wlh = document.getElementById('t-whatlinkshere');
  if(wlh) addPortletLink('p-tb',wgServer + wgScript + '?title=Special:Whatlinkshere/' + wgPageName + '&hidetrans=1&hidelinks=1&limit=500', 'What redirects here','t-wrh','Show redirects to this page','',wlh);
});
Adds a new link above the existing whatlinkshere, called "what redirects here". --Splarka (rant) 07:27, 20 August 2008 (UTC)[reply]
Thanks - works like a charm! Just one more small request, though: could you change the default number of results per page from 50 to 500? It Is Me Here (talk) 10:48, 20 August 2008 (UTC)[reply]
Done. --Splarka (rant) 13:38, 20 August 2008 (UTC)[reply]

"go" button in watchlist

Am I imagining it, or has the "go" button in the watchlist page been moved? It used to be next to the namespace box, now it is under that box. Garion96 (talk) 21:02, 19 August 2008 (UTC)[reply]

Changes to the CITE/ref/etc. system

Where would I turn to keep on top of suggestions and proposals to update the system for {whatever the currently trendy word for citations is}? I notice a huge number of modifications to the template system, but I consider these to be utterly missing the point and making the system even more of a disaster. Someone, somewhere, must be shouting "stop", but if there's an ongoing discussion about it, I can't find it. Maury (talk) 21:12, 19 August 2008 (UTC)[reply]

It depends what kind of changes you mean. Changes in how we use the system should go to WP:VPR, changes in how the <ref></ref> tags actually function should go either to bugzilla: or here if you're not sure, though if its a major change you might want to go to WP:VPR as well. Mr.Z-man 22:32, 19 August 2008 (UTC)[reply]
Looks like a good time to promote Wikipedia:WikiProject Council/Proposals#Citation Task Force. Among other things, it would be a central point for discussion instead of the fragmented discussions we now have. --—— Gadget850 (Ed) talk - 22:48, 19 August 2008 (UTC)[reply]

dynamic page list

Is there progress being made on bringing dynamic page list to wikipedia. It works so well on wikinews! Kind Regards. SriMesh | talk 00:23, 20 August 2008 (UTC)[reply]

PHP diff

Hi I contribute mostly to the French wikipedia, but felt I may receive more complete answers by asking here. Is the code to generate nice colored diff à la Wikipedia free code, and is it available somewhere e.g. as a php function? I've tried looking it up on the internet, but all I could find are some unperfect functions that would preform diffs line by line instead of work by word. Of course I could hack the function inserting return lines between every word, but it is actually slightly tricky to do, and no need to do what other people have already done. Lerichard (talk) 00:34, 20 August 2008 (UTC)[reply]

Would User:Cacycle/wikEdDiff work for your purposes?--Father Goose (talk) 00:56, 20 August 2008 (UTC)[reply]
The default MediaWiki diff engine is this, though Wikimedia uses a C++ based diff engine for performance reasons. You may need some code from the various CSS files (look in the page source) for the colors. Mr.Z-man 01:04, 20 August 2008 (UTC)[reply]

Vertical alignment questions

I've been comparing the "sortable" tables in Firefox and IE and noticed that there is a difference in the vertical alignment of the clickable icon in each browser. (See here.) In Firefox the icon is aligned to the middle of the font's lowercase letters; in IE it's aligned to the middle of the text's container. I was wondering, why is this the case, and how do I get it to behave in IE as it does in Firefox? I've also been experimenting with how divs are rendered with varying font sizes and heights as well as presence or absence of content. I haven't reached any firm conclusions yet. SharkD (talk) 03:13, 20 August 2008 (UTC)[reply]

Here is a better comparison. SharkD (talk) 04:05, 20 August 2008 (UTC)[reply]

Harvard Citations

Could someone have a look at Productivity paradox. I am trying to improve citations. The link for Berglas does not work. The genrated HTML is gt cite style="font-style:normal" id="CITEREFBerglas2008" lt instead of the required <a...>. I have played with several things. Tuntable (talk) 04:48, 20 August 2008 (UTC)[reply]

Works for me. — Werdna • talk 06:34, 20 August 2008 (UTC)[reply]

I messed up some lists...

Hiya! Can anyone help me out? I tried to shorten the lists on the article of A Campingflight to Lowlands Paradise, a Dutch musical festival. I tried to compile them, so the article wouldn't be so long, but now I messed up the schematics of the lists. If someone would be so kind to give me a hand, thanks. --Soetermans | is listening | what he'd do now? 05:14, 20 August 2008 (UTC)[reply]

Too many subheadings in some genres, especially science.

I have a good education and can deal with the rather vast number of art , architecture and advertising subheadings. But I have been stymied with many science searchs because I need to know the information I am trying to find before I can find it.

I suggest some manner offering an overview. Perhaps similar to the way history is presented: overview, then an orderly motion through the subjects parts it. Stating the meaning of mathematical expressions in English would be a help also. I feel sure this will strike persons who got there phds in theoretical physics as a bit stupid. But there are those of use without much of a professional level mathematics background and it would be so nice to understand the thinking going on.

Thanks for your time, Henry Atherton —Preceding unsigned comment added by 71.221.112.179 (talk) 05:52, 20 August 2008 (UTC)[reply]

Template subst without showing all the code

Hi. Anyone knows how to use "subst:" in a template with "switch" but without showing all the code? For example:

Template:XYZ with the following content:

Example
{{#switch {{{1}}}
| 1=Text 1
| 2=Text 2
| Text 3
}}

If I use "subst:" in this template: {{subst:XYZ|2}} I get this:

Example
{{#switch 2
| 1=Text 1
| 2=Text 2
| Text 3
}}

But I want to show only this (using "subst"):

Example Text 2

Is this possible? Thanks in advance. Mosca (talk) 11:09, 20 August 2008 (UTC)[reply]

Yes. You can use;
Example Text
{{<includeonly>subst:</includeonly>#switch 2
|1=1
|2=2
|3}}
The includeonly tags prevent the substitution from being applied on the template page itself, but then cause the switch parser function to be substituted when the template is substituted. --CBD 11:20, 20 August 2008 (UTC)[reply]
(ec) If you only ever plan to substitute the template, you can put <includeonly>subst:</includeonly> into the switch statement:
Example
{{<includeonly>subst:</includeonly>#switch {{{1}}}
| 1=Text 1
| 2=Text 2
| Text 3
}}
Note, however, that this will cause corrupt output when the template is transcluded (this is the basis of the substitution check hack). If you want the template to work when transcluded as well as substituted, you'll have to use a parameter:
Example
{{{{{subst|}}}#switch {{{1}}}
| 1=Text 1
| 2=Text 2
| Text 3
}}
Here, calling {{subst:XYZ|2|subst=subst}} will give you the clean output you want. I expect this is documented somewhere, but I'm not sure where to look. Happymelon 11:25, 20 August 2008 (UTC)[reply]

Interwiki sorting order

What exacly rules do you use by sorting interwiki? I suggested new sorting order for Polish Wikipedia: 1, 2, 3, but I don't know the reason of oryginal sorting order. Or mayby you would like to use new sorting order.

I asked on Help talk:Interlanguage links, but there was no answer. BartekChom (talk) 12:43, 16 August 2008 (UTC)[reply]

m:Interwiki sorting order is a bit out-of-date, but still usable. MaxSem(Han shot first!) 12:54, 16 August 2008 (UTC)[reply]
Could this be used instead? BartekChom (talk) 14:35, 16 August 2008 (UTC)[reply]
If nobody protests, I'll change it. Or whera should I ask about it? BartekChom (talk) 11:32, 20 August 2008 (UTC)[reply]