Jump to content

Module talk:InfoboxImage: Difference between revisions

From Fifth Empire Wiki
Line 71: Line 71:
|[[File:Abbey Rd Studios.jpg|250px|title]]
|[[File:Abbey Rd Studios.jpg|250px|title]]
|}
|}
The parameter ''center'' doesn't work. Why? --[[User:Tlustulimu|Tlustulimu]] ([[User talk:Tlustulimu|talk]]) 11:59, 22 June 2013 (UTC)

Revision as of 11:59, 22 June 2013

Error handling

I've listed some common infobox errors at User:John of Reading/Image errors. Anyone interested in this LUA module might like to take a look. -- John of Reading (talk) 10:02, 26 March 2013 (UTC)

I've done some work on this. Have done the following:
Any other suggestions would be welcome. There is also the task to roll it out to more infoboxes since I only did it to most of those that were using the {{Hide if placeholder image}} template. -- WOSlinker (talk) 21:55, 26 March 2013 (UTC)
This looks good! I've updated the descriptions at User:John of Reading/Image errors. -- John of Reading (talk) 22:15, 26 March 2013 (UTC)

Suggestion: maximum size

I have a suggestion: some infoboxes (e.g., Infobox mountain) have a maximum size parameter for their image. Can someone add this feature to this module? I could try to figure out Lua syntax, but it may be faster for someone who knows what they are doing. —hike395 (talk) 12:05, 29 March 2013 (UTC)

Yes, will have a look. Was already thinking about adding it. -- WOSlinker (talk) 13:12, 29 March 2013 (UTC)
done. -- WOSlinker (talk) 13:42, 29 March 2013 (UTC)

Improve description

The description say "Inputs: image - Can either be a bare filename or a fully formatted image link" but the examples show three versions that work: fully formatted, "File:xxxxx.xxx" and "xxxx.xxx" Is there a simple way to expand the description to include the third case? Rmhermen (talk) 17:27, 29 March 2013 (UTC)

I've updated it a bit. There also the doc page at Module:InfoboxImage/doc which could do with some further expansion. Contributions are very welcome. -- WOSlinker (talk) 18:20, 29 March 2013 (UTC)

http/https

The tests for image names beginning "http:" should also catch "https:", shouldn't they? -- John of Reading (talk) 16:50, 4 April 2013 (UTC)

Yes and done. -- WOSlinker (talk) 18:04, 4 April 2013 (UTC)

Code optimization

image = mw.ustring.sub(image,6,mw.ustring.len(image)); can be shorten to image = mw.ustring.sub(image,6);. The third argument for ustring.sub can be omitted. mw:Extension:Scribunto/Lua reference manual#string.sub -- ChongDae (talk) 03:12, 8 April 2013 (UTC)

I've updated the code. -- WOSlinker (talk) 06:31, 8 April 2013 (UTC)

Documentation for module

Why doint we create a seprate documentation for module for example templates use template:documentation why doint we create module:documentation so that it support stuff for module which the template doesent instead of liking to start for documentation and then linking box for end box 86.139.246.76 (talk) 15:13, 20 April 2013 (UTC)

Error in the code

Hello. I just saw, that in the example

{{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|sizedefault=250px|alt=The front stairs and door of Abbey Road Studios}} The front stairs and door of Abbey Road Studios

the text from the alt-attribute doesn't appear in Firefox 21 like a tooltip. Why? I think, that the code has to be changed. The resulting Wiki code now is:

[[File:Abbey Rd Studios.jpg|250px|alt=The front stairs and door of Abbey Road Studios]]

But it has to be a little bit other:

[[File:Abbey Rd Studios.jpg|250px|The front stairs and door of Abbey Road Studios]]

I think, that you mixed the alt parameter of the module with the Wiki image coding. I created a working version on the page eo:Modulo:InfoboxImage. I also added a new parameter center there. It works very fine on the page eo:Vikipedio:Lua/Moduloj/InfoboxImage/en. But the linked version is a little bit localized for the language Esperanto. The code lines with dosiero: has not to be copied. Greetings --Tlustulimu (talk) 11:12, 22 June 2013 (UTC)

I just created a sandbox version of this module. It works now:
{{#invoke:InfoboxImage/sandbox|InfoboxImage|image=Abbey Rd Studios.jpg|sizedefault=250px|alt=The front stairs and door of Abbey Road Studios}} Script error: No such module "InfoboxImage/sandbox".
{{#invoke:InfoboxImage/sandbox|InfoboxImage|image=Abbey Rd Studios.jpg|sizedefault=250px|alt=The front stairs and door of Abbey Road Studios|center=yes}} Script error: No such module "InfoboxImage/sandbox".
The second example uses the new parameter center now. I works very fine. Greetings --Tlustulimu (talk) 11:32, 22 June 2013 (UTC)

Hi, Wikipedia has both alt and title params for images. I've listed the options below. I'll add the center param and for the alt, what I'll do is add a title param and do the code so that if the title param is blank, the alt value will be used instead. -- WOSlinker (talk) 11:45, 22 June 2013 (UTC)

[[File:Abbey Rd Studios.jpg|250px|alt=alt|title]] alt
[[File:Abbey Rd Studios.jpg|250px|alt=alt]] alt
[[File:Abbey Rd Studios.jpg|250px|title]] title

The parameter center doesn't work. Why? --Tlustulimu (talk) 11:59, 22 June 2013 (UTC)