Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Template talk:URL

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Template:URL ispermanentlyprotected from editing because it is aheavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported byconsensus, editors may use {{edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template'sdocumentation to add usage notes orcategories.

Any contributor may edit the template'ssandbox. Functionality of the template can be checked usingtest cases.


This template was considered fordeletion on2016 October 8. The result of thediscussion was "no consensus to merge".

This template does not require a rating on Wikipedia'scontent assessment scale.
It is of interest to the followingWikiProjects:
Microformats
URL is part of, or of interest to,WikiProject Microformats, which encourages the deployment ofmicroformats in Wikipedia, and documents them in the article space. If you would like to participate, visit theproject page.MicroformatsWikipedia:WikiProject MicroformatsTemplate:WikiProject MicroformatsMicroformats
Archiving icon
Archives
Archive 1Archive 2


This page has archives. Sections older than28 days may be automatically archived byLowercase sigmabot III when more than 3 sections are present.

Long URL in infobox

[edit]

I was expecting template:URL would wrap the long URL inEMBiology, 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)[reply]

@Fgnievinski:EMBiology doesn't use{{URL}}. If you are talking about previewing a version which does use{{URL}} then what is your browser? In my Firefox, it already wraps now without{{URL}}. In Edge it doesn't wrap now but it wraps in a preview with{{URL}}.PrimeHunter (talk)02:25, 5 August 2022 (UTC)[reply]
@PrimeHunter: thanks for your assistance.EMBiology usestemplate:infobox bibliographic database which usestemplate:website which redirects totemplate:url which callsmodule:URL. Shouldn't the latter insertHTML wbr to assist browsers in breaking a long URL? BTW, I'm using Chrome.fgnievinski (talk)17:56, 5 August 2022 (UTC)[reply]
@Fgnievinski:template:infobox bibliographic database does not usetemplate:website. Why do you think that it does? If you saw code like{{{website}}} with three curly brackets then it means the template has a parameter|website=. A template call has two curly brackets like{{website}}. The documentation atTemplate:Infobox bibliographic database#Usage says| website = <!-- use {{URL|example.com}} --> and| titles = <!-- use {{URL|example.com}} -->. That means an article using the infobox can place a url in{{URL|...}}.EMBiology doesn't do that.PrimeHunter (talk)18:15, 5 August 2022 (UTC)[reply]
@PrimeHunter: I just noticed this was changed a few years ago (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 nowtemplate:infobox bibliographic database has a mixture of usage patterns. thanks for your help.fgnievinski (talk)19:16, 5 August 2022 (UTC)[reply]
@Fgnievinski:{{URL}} requires a raw url.{{URL| {{URL|http://example.org}} }} or{{URL|[http://example.org website]}} fails.{{URL}} is from before MediaWiki gotmodules. The template language has very limited string processing.{{URL}} is now implemented byModule: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{{URL}} for improved formatting.PrimeHunter (talk)19:45, 5 August 2022 (UTC)[reply]
@PrimeHunter: thank you, I've inserted{{url}} inEMBiology 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)[reply]
@Fgnievinski: Bot tasks need approval. You could post toWikipedia:Bot requests. Website parameters still work without{{URL}} so there might be some opposition. You could also make searches likehastemplate:"Infobox bibliographic database" insource:"titles = http" and work on it yourself, maybe withAutoWikiBrowser if you know it, but it's probably too much work for more common infoboxes.PrimeHunter (talk)21:28, 5 August 2022 (UTC)[reply]
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)[reply]
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)[reply]

Edit request to remove legacy code

[edit]
Thisedit request toModule:URL has been answered. Set the|answered= or|ans= parameter tono to reactivate your request.

Hello, the following code may be removed:

-- Handle URLs from Wikidata of the format http&#58;//url=mw.ustring.gsub(url,'^[Hh][Tt][Tt][Pp]([Ss]?)&#58;//','http%1://')

Refs past discussions:

According tophab:T56312, this bug (from the early ages of wikidata) has been fixed since then.

Od1n (talk)08:59, 11 September 2022 (UTC)[reply]

 Edited.P.I. Ellsworth , ed. put'r there 18:58, 11 September 2022 (UTC)[reply]

Is there any reason to trim "www" from the displayed URL?

[edit]

Template:URL is designed to display the "www" as part of the link displayed and is clear that "Parameter 2 ({{URL|url name|optional display text}}) is deprecated"; I certainly don't see any reason to manually remove the "www" using parameter 2. Is there any reason to make edits such asthis one, one example of many, whose only purpose is to trim the "www"? There wasthis discussion from 2020 that leaned against removal of the "www". Does this still stand and if so should there be a clearer admonition in Template:URL discouraging the practice?Alansohn (talk)17:21, 12 August 2024 (UTC)[reply]

I would describethat 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|2= is deprecated, a better edit would have been to remove "www" from|1= while removing|2=, after checking that the resulting URL worked, of course. –Jonesey95 (talk)21:18, 12 August 2024 (UTC)[reply]
Retrieved from "https://en.wikipedia.org/w/index.php?title=Template_talk:URL&oldid=1277466644"
Category:

[8]ページ先頭

©2009-2025 Movatter.jp