Template talk:Urltowiki
Links that don't work
edit{{u2w|https://www.mediawiki.org/wiki/Extension:Scribunto/Parser_interface_design#Parent_frame_access}}
→ mw:Extension:Scribunto/Parser interface design#Parent frame access{{u2w|Talk:List_of_sovereign_states#Bangsamoro_Republik}}
→ Talk:List of sovereign states#Bangsamoro Republik- Now fixed. — Mr. Stradivarius ♪ talk ♪ 04:16, 23 September 2013 (UTC)
Remove redundant piped text
editCurrently {{subst:urltowiki|https://en.wikipedia.org/wiki/Example|Example}}
results in [[Example|Example]]
, which is redundant and confusing. It seems like it would be easy for the module to check if the display and page title are the same, and if so, only include the page title. I think it would entail switching line 188 from
if display then
to
if display and display ~= wikitext then
(I would add it myself, but I'm not confident in my Lua skills.) Thanks, /~huesatlum/ 15:09, 27 July 2015 (UTC)
- @HueSatLum: Very good point! I've fixed it. — Mr. Stradivarius ♪ talk ♪ 08:29, 28 July 2015 (UTC)
error=no?
edit@Ahecht: When would error=no ever be useful or desirable? Jackmcbarn (talk) 17:54, 28 August 2015 (UTC)
- I was just thinking the same thing. Ahecht, what is your use-case here? I'm guessing that there's probably an easier way of doing whatever you're trying to do. — Mr. Stradivarius ♪ talk ♪ 20:22, 28 August 2015 (UTC)
- @Jackmcbarn: The template already gracefully handles other input options, either a valid URL or a non-URL string, so this lets it gracefully handle a missing input if desired. This is similar to the
|ignore_errors=1
parameter in module:String. One example where it came in handy is in {{Request redirect/post}}, where I want a blank input to result in a blank output. I could add a statement such as{{safesubst<noinclude/>:#if{{{input|}}}|{{safesubst<noinclude/>:u2w|{{{input}}}}}|}}
, but it seemed cleaner this way. I suppose, for consistences sake, I should've usedignore_errors=1
instead oferror=no
(I can change it if you like) --Ahecht (TALK
PAGE) 04:19, 29 August 2015 (UTC)- If you're accessing Module:UrlToWiki from a Lua module, then you can just use
pcall
rather than having to change the module itself.#iferror
will work from templates as well, although the page will be categorised into Category:Pages with script errors. To avoid the categorisation when calling it from wikitext, we could add another function to the module that is routed throughpcall
. That would at least avoid the need for if/then blocks to check for errors. — Mr. Stradivarius ♪ talk ♪ 07:24, 29 August 2015 (UTC)- Since the template is being substituted rather than transcluded in that use case, the page won't end up in Category:Pages with script errors no matter what, so no extra logic for that will be needed. Jackmcbarn (talk) 16:01, 29 August 2015 (UTC)
- If you're accessing Module:UrlToWiki from a Lua module, then you can just use
Requested move 30 October 2019
edit- The following is a closed discussion of a requested move. Please do not modify it. Subsequent comments should be made in a new section on the talk page. Editors desiring to contest the closing decision should consider a move review after discussing it on the closer's talk page. No further edits should be made to this discussion.
The result of the move request was: Moved (closed by non-admin page mover) Wug·a·po·des 05:04, 8 November 2019 (UTC)
– Match name with template. * Pppery * it has begun... 21:57, 30 October 2019 (UTC)
- Comment: If we are already moving the module, then both should follow WP:TPN and move to "Url to wiki". --Gonnym (talk) 07:26, 31 October 2019 (UTC)
- Fine with me. * Pppery * it has begun... 11:32, 31 October 2019 (UTC)
- The above discussion is preserved as an archive of a requested move. Please do not modify it. Subsequent comments should be made in a new section on this talk page or in a move review. No further edits should be made to this section.
For whatever reason, diffs are displayed in the mobile interface not using the regular diff but via this special page. Can this template support it, for the benefit of mobile users? Hairy Dude (talk) 20:51, 29 December 2022 (UTC)