Template talk:Image label begin
Border
editCan a border and caption parameters be added to the Image? -- Ganeshk (talk) 19:01, 1 November 2006 (UTC)
- I am guessing it can but especially only applied to the outer div that should not affect the inner one. For example, line-height css style can cause a slight offset when pronounced by floating right. Caption is to be placed between the inner and outer one as well at the bottom. These should be optional because some people may want just the plain labelled image without any extras. -- Zondor 02:41, 2 November 2006 (UTC)
- I just added this. You'll want to use the {{Image caption}} template. Also, the border should be set to something like border=#000000 1px solid. — X S G 03:03, 26 January 2009 (UTC)
- This is a rather poor solution and the result doesn't follow standard image caption style and layout. Surely there should be a way of including a image caption by adding a parameter to the template? — Blue-Haired Lawyer 11:20, 5 April 2009 (UTC)
- Make the capability to add a border and a caption for a image. Русские идут! (talk) 10:46, 5 June 2011 (UTC)
Justify
editAutomatically setting text align to justify, an option available in preferences, makes this template look awful. See for example European Union member state, with the option enabled. Having a margin should solve this. --User:Krator (t c) 22:41, 18 June 2007 (UTC)
Documentation/implementation problems
editThis is an interesting way of labeling images. Kudos to whoever came up with the idea! However in the documentation I see that the scaling feature is not implemented correctly, and the documentation is inconsistent in describing how the x/y values are being used. As it is documented, it only works for square images. Let me illustrate...
Per the documentation, this example code should result in the word "CENTER" appearing in the center of the image:
{{Image label begin|image=Kansas Locator Map.PNG|width={{{width|426}}}|float={{{float|none}}}}} {{Image label|x=0.5|y=0.5|scale={{{width|426}}}|text=CENTER}} {{Image label end}}
But because it isn't a square image, it produces this instead:
This occurs because the template applies the same scaling factor to both x and y values. Since the width and height is not the same, this is not the correct way to do it. To work using a single scaling factor, the scaling factor must be a multiple of the original width and not just the new width. This also means that the x and y values should be the actual coordinates. In the above example, it should be coded like this (the image is 426x224):
{{Image label begin|image=Kansas Locator Map.PNG|width={{{width|426}}}|float={{{float|none}}}}} {{Image label|x=213|y=112|scale={{{width|426}}}/426|text=CENTER}} {{Image label end}}
Yielding:
Which works even when the width is increased to 600px:
—Mike 08:40, 1 January 2008 (UTC)
- Your proposed solution merely provides a way to use actual pixel coordinates instead of percentages. The trick with the original percentage-based solution is that the Y values are relative to the width of the image, as you note -- so Y=1.0 is not the bottom of the image but rather the same distance from the top as the image is wide. Not ideal, but no harder than your method. Powers T 20:03, 15 July 2011 (UTC)
centering
editCan the ability to center the labeled image be included? It would be much appreciated --Lvivske (talk) 20:34, 10 June 2009 (UTC)
- I'll make a try. Rursus dixit. (mbork3!) 16:17, 2 May 2011 (UTC)
- No, I changed my mind: I won't try it. The previous posting explains why: it doesn't work with image labels or is too complicated. Another day, in a test template, perhaps. Rursus dixit. (mbork3!) 16:20, 2 May 2011 (UTC)
- @Rursus: Take it easy, you can just input
|margin=0 auto
to get this effect. --Great Brightstar (talk) 15:20, 12 February 2019 (UTC)
- @Rursus: Take it easy, you can just input
navbar
editI added {{navbar}} [1] and K._Richards_II (talk · contribs) reverted me[2] because my hack was very badddd.
The reason I added the navbar here is that the Oceania map included it.[3]
I think we should add a param (like 'navbar_template_name') which, when populated, adds a navbar. John Vandenberg (chat) 02:43, 15 April 2011 (UTC)
Breakage on Mobile
editHello! Pages using this template 'break' on Mobile Web - they activate horizontal scroll, and don't scroll like all other thumbnails. This can be fixed by replacing 'width' in the template with 'max-width' and by adding a 'overflow-x: auto' to it. Problem ofcourse, is that IE6 does not support max-width, so using max-width will break this template on IE6. There are apparently some IE6 specific hacks available to make that work, but since I don't have access to IE6, can't test it. Hopefully someone else can fix this at some point. YuviPanda (talk) 21:44, 24 December 2013 (UTC)
Don't link to file page by default
editAny objections to change the default of the link
parameter to empty (don't link the map image anywhere)? There are multiple advantages over the status quo (linking to the local file description page):
- they would end up with an image of an empty map (no labels), when they probably just wanted to enlarge the map - confusing and not helpful
- easy to miss a label when clicking on it and end up on the image page instead of the article, which is even more confusing
- an empty link signals that this is a decorative image, which is not entirely correct, but still gives the right idea to all the tools relying on it, which would otherwise try to process this image and fail badly due to all the CSS trickery involved.
--Tgr (WMF) (talk) 21:50, 14 May 2014 (UTC)
- OK I was already implemented in the sandbox page, but that need an administrator to responce. --Great Brightstar (talk) 17:11, 28 November 2018 (UTC)
Wikilink underlining
editIs there a reason the template has been set up so that wikilinks in the annotations don't get underlined? --JFH (talk) 16:57, 18 August 2014 (UTC)
Change some CSS properties
editThis edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
I think the following CSS properties should be changed from main template:
- max-width - should be compeletely removed, which was already provided by "noresize" class.
- overflow-x - should be removed too, or available only via a parameter (see the sandbox page).
Since these properties becomes duplicate, they're necessary to consider. --Great Brightstar (talk) 17:47, 28 November 2018 (UTC)
- Not done: please make your requested changes to the template's sandbox first; see WP:TESTCASES. Izno (talk) 22:41, 29 November 2018 (UTC)
Second parameter for border
editThis edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
I introduced |border2=
to add a border, this is works by means of extended image syntax, without any CSS styles, anyone who want to use this border would be allowed to access via this parameter. See the test cases. --Great Brightstar (talk) 14:54, 12 February 2019 (UTC)
- Done -- /Alex/21 15:00, 12 February 2019 (UTC)
Request for a feature to change the width
editThis edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
The width of image area will be 2 pixels wider if |border2=yes
is added, which could cause a bit overflow behavior in the template. To avoid this problem, the |width=
parameter should automatically add 2 pixels. The source codes is available at sandbox page. --Great Brightstar (talk) 16:38, 15 February 2019 (UTC)
- @Great Brightstar: Done. — SMcCandlish ☏ ¢ 😼 20:52, 17 February 2019 (UTC)
Semi-protected edit request on 6 July 2023
editThis edit request to Template:Image label begin/doc has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
The 10th largest city in population is now Austin Texas and it should replace San Jose California pinned as the 10th largest city on the US map. 2603:8081:2700:5B2A:CFF:7D66:931B:D133 (talk) 04:18, 6 July 2023 (UTC)
- Not done: Procedural decline. The template can only be edited by template editors. Please resubmit as a template-protected edit request. Heart (talk) 04:29, 6 July 2023 (UTC)
Semi-protected edit request on 29 August 2023
editThis edit request to Template:Image label begin/doc has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
2A01:5EC0:7808:B6E0:38C6:868B:3747:23CE (talk) 06:52, 29 August 2023 (UTC)
- Not done: it's not clear what changes you want to be made. Please mention the specific changes in a "change X to Y" format and provide a reliable source if appropriate. We cannot insert images hosted elsewhere ("hotlinking"), mostly for copyright reasons. Please see Wikipedia:Images for more info. Victor Schmidt (talk) 12:52, 29 August 2023 (UTC)
Text flow on mobile
editSee Tornquist Sea#Geologic evolution. Unlike with a regular image, text is allowed to flow around these templates in portrait orientation on mobile, which results in an unreasonably narrow text column. Ideally it should also be centred, but that would look wrong on desktop, so that style should only apply on narrow screens. Hairy Dude (talk) 12:07, 26 November 2023 (UTC)