Wikipedia:Village pump (technical)/Archive 12

Meta-Wiki
What's the technical page on "wikimedia" meta-wiki, i've been looking but there doesn't seem to be a page. SKYNET X7000 (talk) 15:40, 21 December 2007 (UTC)
 * There are only two discussion boards, Metapub and m:Meta:Babel. You can read the descriptions for each. Not being 100% sure of what your question is, I'd say that Metapub would be the better location. EVula // talk // &#9775;  // 15:49, 21 December 2007 (UTC)


 * Thanks, i just wanted to know just in case if i need to ask technical questions on "wikimedia" meta-wiki. SKYNET X7000 (talk) 15:51, 21 December 2007 (UTC)

Special:Newpages
So on Special:Newpages you have the option to "hide bots" means you hide the edits made by bots. But if you click and enable this option,a nd then try to view a page length other than the 50 most recent new pages, it resets the option to show all bot new pages. Then if you click to enable the "Hide bots" option, it resets to the 50 most recent new pages. One work around I've discovered is to apppend this text to the end of the URL, once you click the page length you want to view "&hidebots=1". Basically your turning this link:http://en.wikipedia.org/w/index.php?title=Special:Newpages&namespace=0&hideliu=&hidepatrolled=&limit=500&offset=0 into this link:http://en.wikipedia.org/w/index.php?title=Special:Newpages&namespace=0&hideliu=&hidepatrolled=&limit=500&offset=0&hidebots=1 What I'm wondering is if this isn't a page error that should be fixed in the way URLs are genreated from the links? Mbisanz (talk) 23:20, 21 December 2007 (UTC)


 * Definitely a bug. Changing the number of pages to view shouldn't affect the bot hide option, if already selected. Similarly, changing to the bot hide option shouldn't reset the number of pages shown to 50 (the default). -- John Broughton (♫♫) 23:34, 21 December 2007 (UTC)


 * I reported this as 12283 a few days ago and it is fixed in svn. &mdash; Carl (CBM · talk) 23:54, 21 December 2007 (UTC)


 * I think your report addressed this saem thing with Patrolled edits, but as of now, the patrolled edits show/hide feature is working correctly, but the bots show/hide isn't. Could they have fixed one and not the other. ? Mbisanz (talk) 00:04, 22 December 2007 (UTC)


 * If you follow the links and can read PHP, the diff of the change is available online . It looks like they took care of all the parameters, which is what I expected when I filed the bug report (the devs are pretty good at fixing things correctly). The most likely scenario is that the code is not live yet; it only gets pushed onto the actual site servers every few days. &mdash; Carl (CBM · talk) 00:16, 22 December 2007 (UTC)

Test for protection status
Is there a way for a page to query it's own protection status? A magic word or parser function would be most helpful. Andrwsc (talk) 17:14, 19 December 2007 (UTC)
 * All magic words are listed here. Currently no type of parser function or magic word can detect protection status, due to caching I believe. The only way to do it would be through JavaScript; I'm not sure what, if anything, has been written in JavaScript to detect protection status. --MZMcBride (talk) 20:06, 19 December 2007 (UTC)
 * There is a built-in JavaScript variable for protection status, an array called . However, JavaScript hacks tend to be, well, hacky (, for example).  Grace notes T § 20:16, 19 December 2007 (UTC)
 * Ok, thanks. Yes, I knew that there is no current magic word or parser function for this — I was suggesting that it might be a useful addition.  I will play around with the JavaScript and see if I can make something work.  Basically, the problem I'm trying to solve is that I manage a set of about a thousand templates (Category:Flag template system), some of which need protection for high-use and some of which do not.  I use one template (Template:Country showdata) to self-document this large set, and it would be very convenient for that one template to render the appropriate protection notice automatically.  — Andrwsc (talk · contribs) 16:56, 20 December 2007 (UTC)
 * I could generate a list of protected templates in the category so they can be tagged, if you wish. Integration of protection notices into the site interface is sadly lacking in MediaWiki: ideally, we shouldn't be using template like pp-semi-vandalism, but rather have a notice built into the page's HTML. Grace notes T § 17:23, 20 December 2007 (UTC)
 * It would be quite difficult to get Mediawiki to properly categorize protected pages; the templates do that as well as displaying messages. &mdash; Carl (CBM · talk) 17:30, 20 December 2007 (UTC)
 * (edit conflict, reply to Gracenotes) Well, about a week ago, User:East718 protected all the templates in Category:Country data templates, so I simply added pp-template to Template:Country showdata to tag all of them in a single swoop.  Therefore, your lst isn't necessary, but thanks for the offer.  However, I'm not so sure that they all needed to be protected.  Yes, some flag icons have ultra-high usage (tens of thousands of transclusions), but some others have only a small handful of transclusions, so a "one size fits all" approach is probably not appropriate.  Before I started unprotecting the low-usage ones, I wanted to see if there was a better way to tag the ones still left protected, rather than manually tagging them, hence my question here.  Fully agree with you that this should be automatic for any page!!  — Andrwsc (talk · contribs) 17:38, 20 December 2007 (UTC)
 * (&larr;) What you are looking for can be achieved with what we've got. Make one protected template, Maz, with cascading protection. Silently transclude the templates that you want protected. Make it so that returns nonblank for the pages that it transcludes (via a long switch statement). Then you can use a parser function in Country showdata to test whether to display the protection banner. Or just add the protection template by hand to the pages that are protected; it only needs to be added once. &mdash; Carl (CBM · talk) 17:53, 20 December 2007 (UTC)
 * I like this! Thanks, Carl, I'll work on that.  — Andrwsc (talk · contribs) 17:55, 20 December 2007 (UTC)
 * Cascade protection sounds like a great idea for this; long #switch statement does not, given tens of thousands of transclusions of some icons, as Andrwsc said. Simply protecting all of them isn't a bad idea, imho. Grace notes T § 01:49, 21 December 2007 (UTC)
 * I assume this will be in the noinclude section of the flag template; does a change to template A in the noinclude section of template B cause pages that transclude B to be rerendered? &mdash; Carl (CBM · talk) 02:11, 21 December 2007 (UTC)
 * When a template is changed, only pages that actually transclude the template onto a page are re-rendered. With the example Template:whatever, if Template:whatever/doc is changed, only Template:whatever will re-render, assuming /doc is in a &lt;noinclude> tag. All pages that transclude Template:whatever will not be re-render until Template:whatever is changed. --MZMcBride (talk) 02:38, 21 December 2007 (UTC)
 * My concern is that the #switch statement would be executed any time the tens of thousands of pages are edited/purged, but I'm not familiar enough with MediaWiki parsing to know whether this is the case. Grace notes T § 02:41, 21 December 2007 (UTC)
 * The  statement would be called from Template:Country showdata, which is only transcluded for flag template documentation.  For example, Template:Country data United States is transcluded tens of thousands of times, but only if you look at that template page directly would you see the output of Template:Country showdata.  Therefore, I don't think a big-ass switch statement is a bad thing.  — Andrwsc (talk · contribs) 22:39, 21 December 2007 (UTC)
 * The question is if purging a page also purges the pages transcluded on it... pokes MediaWiki developers Grace notes T § 16:06, 22 December 2007 (UTC)
 * No; otherwise every time a page using unreferenced was edited, every page that transcluded it would be recompiled, which is not the case. The layout being discussed here is:
 * Template A: has template M in a noinclude section
 * Template B: has template M in a noinclude section
 * Template M: transcludes A and B
 * If template A is edited, this will not cause B to be recompiled. If M is edited, A and B will be recompiled, but not pages that transclude A or B, because M is in the noinclude section. This is already a common setup when M is a shared documentation page. &mdash; Carl (CBM · talk) 16:18, 22 December 2007 (UTC)
 * Thanks. I haven't dealt with templates too much recently, and basically forgot that transclusion has nothing to do with the state of the transcluded page – merely its wikitext. I had almost convinced myself that the templatesnotice system (which I designed!) was a hog of server resources. Given that, the switch statement should be fine. If the majority of country data templates are unprotected, I suppose it should check against a switched list of protected ones, and vice versa. Sorry if I'm being too fretful about performance: it could be because I'm optimizing some Java code at the moment :P  Grace notes T § 16:32, 22 December 2007 (UTC)

#log: x
I'm tooling around with a way to change template:USCensusPop so that it shows average increase per year rather than per decade, since that is a rather meaningless statistic. In order to do so, it's necessary to use a log function. I found a reference to which, when x is given to be 1000 for instance, it should evaluate to 3. I noticed this way doesn't work. So what's missing? What am I not doing right? D. F. Schmidt (talk) 08:13, 22 December 2007 (UTC)


 * That apparent parserfunction is probably part of an extension not installed on Wikipedia. The usable mathmatical functions are limited to #expr, AFAIK. --Splarka (rant) 08:55, 22 December 2007 (UTC)

Cannot see wikipedia pictures
Take from Cannot see wikipedia pictures:


 * I have discovered that page contributions are very well monitored. So I realized that someone would review this matter. While using Ubuntu Linux 7.10 and the Firefox browser, I cannot display any pictures in Wikipedia. I have reviewed my preferences and find no where to set allow pictures.


 * Does anyone have an idea why this is happening?


 * Thanks in advance and...


 * Kindest Regards,


 * Paul Flint

User:Flintiii posted this as an article, which I have since deleted. I personally know nothing about this technical issues, so any response should be directed at Flintiii. Thanks.-Andrew c [talk] 13:44, 22 December 2007 (UTC)
 * When this happens (especially with Firefox), it's often because the user's accidentally blocked the Wikipedia upload server; it's easy to do with ad-blocking software by mistake. --ais523 15:53, 22 December 2007 (UTC)


 * This often happens to websites that put a big fund raising banner at the top of each page, as I am afraid we do. A user understandably blocks the advert at the top of the page and then all content from that server is blocked. That is why clever spammers put their banners on a different server. 1 != 2  16:20, 22 December 2007 (UTC)

Wp: and Wt: pages
After the WP: and WT: stuff last week, pages starting with Wp: and Wt: (see Special:Prefixindex/Wp and Special:Prefixindex/Wt) became unaccessible. I assume that these were forgotten in the backend move. Can someone involved in the previous move fix this up? (i.e. move them to the Wikipedia: and Wikipedia_talk: namespaces with --DUP suffixes where necessary) --- RockMFR 21:33, 20 December 2007 (UTC)


 * What do you mean by "inaccessible". I just looked at this redirect and at WPCS International Incorporated; seems to work fine. -- John Broughton (♫♫) 22:18, 20 December 2007 (UTC)
 * Articles beginning with "Wp:" or "Wt:". The colon can't be included in the prefixindex link for some reason (probably because it is now an alias for a namespace). --- RockMFR 01:59, 21 December 2007 (UTC)


 * Articles beginning with "Wp:" or "Wt:". Sorry, I misread that, mostly (I suspect) because I really can't think of a topic that would begin with those three characters. Do you have a some specific examples? -- John Broughton (♫♫) 15:20, 21 December 2007 (UTC)


 * There are several hundred of these; I made a list at User:CBM/BadPrefix. Tim Starling handled some other inaccessible pages a few days ago. I'll point this out on bugzilla, and let the devs figure out how to resolve it. It's at 12371. &mdash; Carl (CBM · talk) 16:12, 21 December 2007 (UTC)


 * Wp:0RR (for example) is now called 0RR, which is accessible. Are you saying that these were both existing with different content?--Patrick (talk) 16:49, 21 December 2007 (UTC)


 * I'm saying that there is a page (pageid 12226886) on enwiki in namespace 0 titled "Wp:0RR", which is inaccessible. I made the list by running a query on toolserver for pages in namespace 0 whose names start with 'Wp:' or 'Wt:'. &mdash; Carl (CBM · talk) 17:06, 21 December 2007 (UTC)


 * It is also strange that Special:Prefixindex/Wp gives redirects with names starting with "Wp:". It looks like there is no problem of inaccessible content but of excess names in page listings.--Patrick (talk) 17:20, 21 December 2007 (UTC)


 * (&larr;) A developer ran a script to move the articles that were inaccessible to new names. When there were conflicts (the destination page already existed), the page gets moved to a new location with a name that indicates the conflict. I have made a list of these 'broken' moves at User:CBM/Broken. If anyone wants to help clean these up, please feel free. &mdash; Carl (CBM · talk) 18:12, 21 December 2007 (UTC)


 * I took care of them; almost all of them were duplicates, but a few required adding hatnotes to existing pages. &mdash; Carl (CBM · talk) 19:40, 21 December 2007 (UTC)

missing history
On a related note, I've noticed some missing history on WP:HOTTIE. While it surly doesn't matter in that particular situation, it makes me wonder what might have gone missing in the history of other shortcuts, including deletion logs. -- Ned Scott 22:44, 20 December 2007 (UTC)
 * This also removed said redirect from my watchlist. -- Ned Scott 06:37, 25 December 2007 (UTC)
 * Not to complain or nitpick. Just thought it was odd. There isn't likely going to be any problems as the result of this. -- Ned Scott 06:40, 25 December 2007 (UTC)

URL redirection
I noticed another issue with the way WP and WT is handled. While using a page anchor with a shortcut works with our internal links, it breaks for external links. For example, WP:NOT vs http://en.wikipedia.org/wiki/WP:NOT#DICT. -- Ned Scott 06:34, 25 December 2007 (UTC)
 * Err.. both links work fine for me. /wiki/WP: automatically becomes /wiki/Wikipedia: and the rest takes care of itself. --MZMcBride (talk) 06:36, 25 December 2007 (UTC)


 * Ah, it seems this is only a problem on Safari. Never mind :) -- Ned Scott 06:39, 25 December 2007 (UTC)

converting
I have a laptop computer battery.I'ts a 14.5 volt but it does not tell the cells of the battery. can anyone tell me how many cells are in a 14.5 volt laptop battery. thanks


 * There is a computer section of the reference desk where you're much more likely to get a quick answer. You might also want to explain why you want to know this; sometimes that helps get a better answer. -- John Broughton  (♫♫) 20:35, 24 December 2007 (UTC)

Syntax problem
[Moved here from Help Desk.] Why doesn't the closing  (''') in front of the work on Template:Inappropriate person (source)? I'd expect the second line to be non-bold. -- Ddxc (talk) 21:53, 25 December 2007 (UTC)
 * This is not an explanation, but if you remove the newlines before and after the switch, it works. --teb728 t c 22:46, 25 December 2007 (UTC)
 * Because ''' does not behave the same way as  or . In particular, the wikisyntax depends upon formatting and the position of newlines. Try, for example:

'''This text is bold. This text is not.

) rather than waiting until it finds a closing three apostrophes. In such cases, it's best to just be explicit and tell the parser exactly what you want it to do. In this case, the problem is best fixed by using  and  in the place of " ''' ". HTH. AmiDaniel (talk) 01:42, 26 December 2007 (UTC)
 * If you attempt the same thing with , all text will be bold until a closing  is reached. In the template you linked to, the syntax is simply to complex for the wikiparser to really make much sense of. It's unable to identify the final " ''' " as a closing for the opening bold sequence because there are parser functions, template inclusions, etc., in between, and so simply terminates the bolding sequence when it reaches a newline (again, different from


 * Thanks a lot for your explanations! I fixed it by replacing the  with  and ''' . -- Ddxc (talk) 04:44, 26 December 2007 (UTC)

Help with parser functions
Could someone please check out Infobox Martial artist? The test case that's being used right now does not pass any kickboxing-related parameters. The behavior I desire is that if parameters are passed, it will add up, , , and , and place them in the total line (already implemented). However, if neither of these four parameters are passed, the entire kickboxing section should not appear. If you can fix it for just this one section, I can implement in the other three myself. Thanks in advance! '''east . 718 ' at 05:00, 10/24/2007''
 * OK, never mind. I figured out that I can just use #switch like I did at MMArecordbox. east . 718  at 05:31, 10/24/2007

Ready for archival. east. 718 at 02:37, December 27, 2007 02:37, 27 December 2007 (UTC)

SVG
How can I change the default size of an SVG in a gallery?
 * Ready for archival. <small style="background:#fff;border:#daa520 1px solid;color:#000;padding:0px 3px 1px 4px;white-space:nowrap">east<big style="color:#090">. 718 at 02:38, December 27, 2007 02:38, 27 December 2007 (UTC)

Auto signing
How do I embed " ~</nowikI>" into a Userspace template? I want to insert it into Discussion moved to and/or Discussion moved from. That way, when a user moves a discussion, the template will include the sig. —Markles 23:30, 25 December 2007 (UTC)
 * Try or similar. AmiDaniel (talk) 00:54, 26 December 2007 (UTC)


 * No, it doesn't work. It just copies the literal text, " ~ ."  If I put all four tildes between the "include only"s, then it just autoinserts my signature at the time I edited the template, NOT the user's signature when the template is first transcluded.  Any other ideas?—Markles 20:52, 26 December 2007 (UTC)
 * I don't think that you can have it at the first transclude, only if it is substituted. -- Cobi(t 20:54, 26 December 2007 (UTC)
 * Drat. Substituting defeats the beauty of the consistent template.  Any other ideas?—Markles 20:56, 26 December 2007 (UTC)
 * You can make the signature a parameter; the user has to put the tildes as value. However, this has little advantage over ordinary signing, only that one can choose the position of the signature in the result.--Patrick (talk) 21:05, 26 December 2007 (UTC)
 * Yeah, as far as I know you can only add a signature automatically when it's substituted. I would suggest double-templating using, but  requires an extension that isn't enabled on wikimedia servers (hence, the redlink). -- slakr  \ talk / 21:12, 26 December 2007 (UTC)
 * How do you do it with your Sinebot?—Markles 21:28, 26 December 2007 (UTC)

What is the best way to grammar check Wikipedia articles?
 Th e Tr ans hu man ist   11:08, 27 December 2007 (UTC)


 * By manual inspection. –Pomte 12:52, 27 December 2007 (UTC)


 * I read a few years ago an article - it may have been by Bruce Tognazzini - claiming that nobody has ever used the grammar checkers in commercial word processing software, at least in English, because it is of so little use. Manual inspection is indeed the way.  Tempshill (talk) 19:59, 27 December 2007 (UTC)

Missing move button
The article Occupation of the Channel Islands has no move button. I've never seen an article without this button before. Does anyone know why the button isn't there? Lurker (said · done) 14:12, 27 December 2007 (UTC)
 * Its currently protected so only sysops can move the article. I see the move tab and this is probably why. There may have been a recent upgrade to MediaWiki that hides the move button if the user doesn't have the access to move.↔<span style="font:bold 11px Verdana,sans-serif;">NMajdan &bull;<span style="font:9px Verdana,sans-serif; color:#000;">talk 14:19, 27 December 2007 (UTC)
 * I've unprotected it since the move protection was about a year and a half ago and any disputes would be forgotten about by now. Tra (Talk) 17:23, 27 December 2007 (UTC)

What is this crap? "Cite error"?
I'm getting "Cite error: Invalid &lt;ref&gt; tag; name cannot be a simple integer, use a descriptive title" on many, many articles. Who or what implemented this change?--h i s  s p a c e   r e s e a r c h 22:13, 27 December 2007 (UTC)  —Preceding unsigned comment added by HisSpaceResearch (talk • contribs) 22:12, 27 December 2007 (UTC)
 * Looks like all refs that have a number in their names are broken. This needs to be fixed ASAP, as I imagine thousands of people are currently breaking refs trying to fix this. Kaldari (talk) 22:16, 27 December 2007 (UTC)

it does indeed collapse and fit into the box, but it creates above it a space (see e.g. Talk:Ulster Protestant Action). Using Firefox's web devloper toolbar, this appears to be a  element.
 * It seems references which have numbers in them are generating an error. eg test3.

Like the other wikiproject assessment templates, it uses some advanced syntax, and although I have tried various tweaks I can't see exactly what is causing the problem. Can any template experts have a go? --BrownHairedGirl (talk) • (contribs) 12:28, 29 December 2007 (UTC)
 * Fixed . The combination of HTML table and wikitable syntax there seems to have been causing the problem. Anomie⚔ 14:56, 29 December 2007 (UTC)
 * Brilliant. Thanks, Anomie. --BrownHairedGirl (talk) • (contribs) 16:57, 29 December 2007 (UTC)