Template talk:URL
{{Permanently protected}}
{{oldtfdfull|date=2016 October 8|result=no consensus to merge|disc=Template:Official_URL }}
{{User:MiszaBot/config
|archiveheader = {{talkarchivenav}}
|maxarchivesize = 75K
|counter = 2
|minthreadsleft = 3
|minthreadstoarchive = 1
|algo = old(28d)
|archive = Template talk:URL/Archive %(counter)d
}}
{{WikiProject banner shell|
{{WikiProject Microformats}}
}}
{{archives|search=yes}}
Long URL in infobox
I was expecting template:URL would wrap the long URL in EMBiology, does anyone know why it doesn't? currently the infobox occupies a large fraction of the page width. ~thanks. fgnievinski (talk) 02:05, 5 August 2022 (UTC)
:{{ping|fgnievinski}} EMBiology doesn't use {{tl|URL}}. If you are talking about previewing a version which does use {{tl|URL}} then what is your browser? In my Firefox, it already wraps now without {{tl|URL}}. In Edge it doesn't wrap now but it wraps in a preview with {{tl|URL}}. PrimeHunter (talk) 02:25, 5 August 2022 (UTC)
::{{ping|PrimeHunter}} thanks for your assistance. EMBiology uses template:infobox bibliographic database which uses template:website which redirects to template:url which calls module:URL. Shouldn't the latter insert HTML wbr to assist browsers in breaking a long URL? BTW, I'm using Chrome. fgnievinski (talk) 17:56, 5 August 2022 (UTC)
:::{{ping|fgnievinski}} template:infobox bibliographic database does not use template:website. Why do you think that it does? If you saw code like
with three curly brackets then it means the template has a parameter |website=
. A template call has two curly brackets like
. The documentation at Template:Infobox bibliographic database#Usage says
and
. That means an article using the infobox can place a url in
. EMBiology doesn't do that. PrimeHunter (talk) 18:15, 5 August 2022 (UTC)
::::{{ping|PrimeHunter}} I just noticed this was changed a few years ago ([https://en.wikipedia.org/w/index.php?title=Template%3AInfobox_bibliographic_database%2Fdoc&type=revision&diff=984195298&oldid=979106647 link]). Do you know what's the best practice in other templates? are users expected to wrap bare URLs in the the URL template or do templates do the wrapping automatically as a courtesy to users? and is template URL safe to abuse when it's input to itself? I ask because now template:infobox bibliographic database has a mixture of usage patterns. thanks for your help. fgnievinski (talk) 19:16, 5 August 2022 (UTC)
:::::{{ping|fgnievinski}} {{tl|URL}} requires a raw url.
or
fails. {{tl|URL}} is from before MediaWiki got modules. The template language has very limited string processing. {{tl|URL}} is now implemented by Module:URL and it would be possible to test the parameter and do nothing if it's not a raw url. Infoboxes with displayed website parameters generally require the caller to add {{tl|URL}} for improved formatting. PrimeHunter (talk) 19:45, 5 August 2022 (UTC)
::::::{{ping|PrimeHunter}} thank you, I've inserted {{tl|url}} in EMBiology which remedied the large infobox width. any suggestions of bots which could wrap bare URLs in infoboxes? fgnievinski (talk) 20:50, 5 August 2022 (UTC)
:::::::{{ping|fgnievinski}} Bot tasks need approval. You could post to Wikipedia:Bot requests. Website parameters still work without {{tl|URL}} so there might be some opposition. You could also make searches like {{search link|1=hastemplate:"Infobox bibliographic database" insource:"titles = http"}} and work on it yourself, maybe with AutoWikiBrowser if you know it, but it's probably too much work for more common infoboxes. PrimeHunter (talk) 21:28, 5 August 2022 (UTC)
:::::::: Bot requested, thanks for your assistance so far: Wikipedia:Bot_requests#Use_template:url_in_calls_to_infobox_bibliographic_database. fgnievinski (talk) 14:20, 8 August 2022 (UTC)
:::::::::Template:Infobox bibliographic database is only used in 139 articles and many of them don't have the issue. This is so little by bot standards that I expect a request to be rejected when it's only for that infobox, but maybe somebody will just do it with AutoWikiBrowser. PrimeHunter (talk) 15:21, 8 August 2022 (UTC)
Edit request to remove legacy code
{{edit template-protected|Module:URL|answered=yes}}
Hello, the following code may be removed:
-- Handle URLs from Wikidata of the format http://
url = mw.ustring.gsub(url, '^[Hh][Tt][Tt][Pp]([Ss]?)://', 'http%1://')
Refs past discussions:
- Template talk:URL/Archive 1#Import URL from Wikidata
- d:Wikidata:Project chat/Archive/2013/09#URL datatype is here
According to phab:T56312, this bug (from the early ages of wikidata) has been fixed since then.
Od1n (talk) 08:59, 11 September 2022 (UTC)
:{{done|Edited}}. P.I. Ellsworth , ed. put'r there 18:58, 11 September 2022 (UTC)
Is there any reason to trim "www" from the displayed URL?
Template:URL is designed to display the "www" as part of the link displayed and is clear that "Parameter 2 (
:I would describe [https://en.wikipedia.org/w/index.php?title=Wildwood,_New_Jersey&diff=prev&oldid=1239773656 that edit] as mildly negative, not helpful. It made the displayed URL longer, wrapping it in my display. The previous, shorter URL did not wrap. Since {{para|2}} is deprecated, a better edit would have been to remove "www" from {{para|1}} while removing {{para|2}}, after checking that the resulting URL worked, of course. – Jonesey95 (talk) 21:18, 12 August 2024 (UTC)