Last modified: 2011-07-22 00:11:29 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T32004, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 30004 - Gallery format needs the gallery caption attribute
Gallery format needs the gallery caption attribute
Status: RESOLVED INVALID
Product: MediaWiki extensions
Classification: Unclassified
SemanticResultFormats (Other open bugs)
unspecified
All All
: Unprioritized enhancement (vote)
: ---
Assigned To: Jeroen De Dauw
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-07-21 20:09 UTC by badon
Modified: 2011-07-22 00:11 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description badon 2011-07-21 20:09:40 UTC
The gallery caption attribute is described here:

http://www.mediawiki.org/wiki/Help:Images#Optional_gallery_attributes

It is handy to show what exactly the semantic gallery represents:

Images of horses? Images of grapes? Images of white horses owned by kings? Images of non-extinct grape cultivars used for wine-making in a Mediterranean climate?

A query using the gallery caption attribute should look something like this:

{{#ask: [[Category:Images]] ?The property for captions of individual images goes here | format=gallery | caption=The caption for the whole gallery goes here | widths=60px | limit=20}}

Note that the gallery caption is distinct from each individual image caption, which is already implemented, and not addressed in this report.
Comment 1 badon 2011-07-21 20:11:52 UTC
(In reply to comment #0)
> A query using the gallery caption attribute should look something like this:
> 
> {{#ask: [[Category:Images]] ?The property for captions of individual images
> goes here | format=gallery | caption=The caption for the whole gallery goes
> here | widths=60px | limit=20}}

That's a missing pipe typo. It should be:

{{#ask: [[Category:Images]] | ?The property for captions of individual images goes here | format=gallery | caption=The caption for the whole gallery goes here | widths=60px | limit=20}}
Comment 2 Jeroen De Dauw 2011-07-21 20:19:39 UTC
Do you happen to know if the native MediaWiki gallery supports such a global caption.
Comment 3 badon 2011-07-21 20:22:32 UTC
Yes, it does:

http://www.mediawiki.org/wiki/Help:Images#Optional_gallery_attributes

caption={caption}: sets a caption on the gallery.
Comment 4 Jeroen De Dauw 2011-07-21 20:42:55 UTC
Looks like this is already supported by using SMWs into= parameter.
Comment 5 badon 2011-07-21 20:45:20 UTC
I haven't been able to find any documentation of that. Can you link?
Comment 6 Jeroen De Dauw 2011-07-21 20:53:12 UTC
I just added it to: https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Extension:Semantic_Result_Formats/gallery_format

Wasn't documented before, as quite a few things are not, sadly enough.
Comment 7 badon 2011-07-21 21:00:30 UTC
> SMW parameters
> into
> is used as global gallery caption.

I tested something similar to this, but no gallery caption was produced:

{{#ask: [[Category:Images]] | ?The property for captions of individual images
goes here | format=gallery | into=The caption for the whole gallery goes
here}}
Comment 8 Jeroen De Dauw 2011-07-21 21:15:08 UTC
Typo; should be intro, not into.
Comment 9 badon 2011-07-22 00:01:10 UTC
Confirmed working. I have updated the documentation with detailed explanation and several examples:

http://www.mediawiki.org/wiki/Extension:Semantic_Result_Formats/gallery_format
Comment 10 Jeroen De Dauw 2011-07-22 00:11:29 UTC
Awesome! Thanks :)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links