MediaWiki talk:Newarticletext

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Detect IP[edit]

{{#ifeq:{{#expr:{{PAGENAME}}}} |{{PAGENAME}}||{{#ifeq:{{#expr:{{PAGENAME}}}}|{{#expr:{{PAGENAME}}+deliberatesyntaxerror}}||..}}}}

means:

Do if {{#expr:{{PAGENAME}}}} is neither giving an error message nor something equal (according to #ifeq) to {{PAGENAME}} itself. See also m:Template:detect IP (backlinks edit), and MediaWiki talk:Newarticletext/Archive 2#need direct access to the IP info toolbox below.

Talk page of a file hosted at Commons[edit]

If you click the Talk tab at File:Example en.svg then you get File talk:Example en.svg instead of commons:File talk:Example en.svg. I suggest adding the below code to guide the user to the Commons talk page.

{{#ifeq:{{NAMESPACENUMBER}}|7
|{{#ifexist:File:{{PAGENAME}}|
|{{#ifexist:Media:{{PAGENAME}}
|{{Did you mean box|commons:File talk:{{PAGENAME}}}}
This is the Wikipedia talk page of a file hosted at [[:commons:|Wikimedia Commons]]. A talk page should rarely be created here where Commons users will not see it. Consider instead the [[:commons:File talk:{{PAGENAME}}|Commons talk page]] of the file.
}}}}}}

On File talk:Example en.svg it will produce:

This is the Wikipedia talk page of a file hosted at Wikimedia Commons. A talk page should rarely be created here where Commons users will not see it. Consider instead the Commons talk page of the file.


The code uses that #ifexist can use File versus Media to see that no local file page exists but Commons has a file. This is documented at mw:Help:Extension:ParserFunctions##ifexist. It cannot be tested whether the Commons talk page exists. PrimeHunter (talk) 02:39, 22 August 2021 (UTC)[reply]

I'm all for centralizing discussion; the fact that we even allow File talk to be hosted here at all for non-local files is a little boggling (but makes sense given the history). For your notice, I'd suggest placing all the text inside the box (just keep only the currently bolded stuff bolded). {{u|Sdkb}}talk 02:45, 22 August 2021 (UTC)[reply]
Hey, thanks a lot! Would suggest a change to the wording:
"This is the English Wikipedia talk page of a file hosted on Wikimedia Commons. Please keep discussion on the Wikimedia Commons talk page unless discussion is specific to the English Wikipedia." Egroeg5 (talk) 03:02, 22 August 2021 (UTC)[reply]
I also considered inside the box but {{Did you mean box}} doesn't allow additional text. We could just add it as an option so let's include that in the suggestion. PrimeHunter (talk) 03:06, 22 August 2021 (UTC)[reply]
What if we were to create a new box? Please see: Template:File Talk Page on Commons. Egroeg5 (talk) 03:26, 22 August 2021 (UTC)[reply]
A new box sounds good to me. Or a new parameter would also be fine. {{u|Sdkb}}talk 03:49, 22 August 2021 (UTC)[reply]

Would this code work?

{{#ifeq:{{NAMESPACENUMBER}}|7
|{{#ifexist:File:{{PAGENAME}}|
|{{#ifexist:Media:{{PAGENAME}}
|{{File Talk Page on Commons|commons:File talk:{{PAGENAME}}}}
}}}}}}

Egroeg5 (talk) 03:41, 22 August 2021 (UTC)[reply]

If it looks good to you, I'd go ahead and request implementation with {{Protected edit request}}. {{u|Sdkb}}talk 17:25, 25 August 2021 (UTC)[reply]
Just as a heads-up, I moved the "Did you mean" notices on this message and on Template:No article text to a new template, to ensure the notices are kept consistent between the messages; if the above edit request is made, therefore, the edit should happen on the new template, not on this page. ディノ千?!☎ Dinoguy1000 00:25, 13 September 2021 (UTC)[reply]

Teahouse question related to this notice[edit]

 You are invited to join the discussion at Wikipedia:Teahouse § Is it okay to create a sandbox page without first creating a user page?. {{u|Sdkb}}talk 21:22, 22 October 2021 (UTC)[reply]

Uncreated template search[edit]

When creating a template ([https://en.wikipedia.org/w/index.php?title=Template:Foobar123456&action=edit&redlink=1 example), the notice currently says To avoid redundancy, please browse the existing templates before creating this page. The wikilink goes to WP:Template messages, which I highly doubt is actively maintained, and there's no button to just do a search (like there is for articles). Could we remedy this? {{u|Sdkb}}talk 22:44, 20 November 2021 (UTC)[reply]

As I don't see this being particularly controversial and this page isn't likely heavily watched, I'll go ahead and create an edit request below. {{u|Sdkb}}talk 22:57, 20 November 2021 (UTC)[reply]

Protected edit request on 20 November 2021[edit]

Could we adopt these changes, which fix or improve searching for categories, portals, and templates? Thanks, {{u|Sdkb}}talk 22:58, 20 November 2021 (UTC)[reply]

 Done — Martin (MSGJ · talk) 12:37, 24 November 2021 (UTC)[reply]
@Sdkb: when you search for a template the template namespace is not included by default, so I don't think this search would work well. Can you adapt the link so the template namespace is included? — Martin (MSGJ · talk) 12:39, 24 November 2021 (UTC)[reply]
@MSGJ, my understanding is that there's two different ways to specify a namespace in a search. The first is to use the namespace tags, which show up in the URL as e.g. &ns10=1, and the second is to just use the prefix, e.g. to search for "Template:Foobar" rather than "Foobar". I used the latter method, since that's what was already used in this template for the project namespace, and it seems to be working, even though it doesn't show up in the "Search in:" tags. I don't know off the top of my head how to switch to using those tags with Special:Search, so while that might be a better way to code it, I'll leave that for someone else knowledgeable/inclined. Cheers, {{u|Sdkb}}talk 20:59, 24 November 2021 (UTC)[reply]

Protected edit request on 9 September 2023[edit]

The edit notice when someone is adding a local description for a file hosted on Wikimedia Commons should look like this:

It currently looks like this for reference (if you can't find it):

"Image" is outdated since files can be non-image media such as Ogg and MIDI. Instances of "image" should be replaced with "file". Eyesnore 18:51, 9 September 2023 (UTC)[reply]

 Not done @Eyesnore: please make the exact changes you are proposing to the sandbox here: MediaWiki talk:Newarticletext/sandbox, then reactivate the edit request when done. — xaosflux Talk 19:05, 9 September 2023 (UTC)[reply]
@Xaosflux: I performed the edit in the sandbox (diff) which you can copy to the interface message. Eyesnore 19:08, 9 September 2023 (UTC)[reply]
 Done * Pppery * it has begun... 01:30, 10 September 2023 (UTC)[reply]