Help talk:Gallery format
Talk pages on this wiki should primarily be used to address possible mistakes as well as missing and superseded information in the documentation.
In case you are seeking support concerning individual questions, please have a look at this page. The Semantic MediaWiki user mailing list is always a good idea for seeking help.
Discussions prio the SMW and SRF 1.8.0 release can be found here.
Only for local files
As far as I understand, this only works for local files. I guess that should be pointed out in this page, unless I missed something? Leo Wallentin (talk) 23:03, 6 October 2012 (CEST)
Overlay images not available for displaying
I may be missing something from the examples and the docs, but I cant get the gallery format to display the full size images with the overlay option. I do get the results and their thumbs but when I click on them, I get the "The requested content cannot be loaded. Please try again later." message. Inspecting the HTML I see that the "href" attribute on the <a> element is empty, which is why the image is not loaded on the fancybox. Any suggestions? Thanks in advance :) Bmachin (talk) 15:54, 9 April 2013 (UTC)
- It works on this wiki. Unless you provide more information (SRF/SMW/MW version) and how to replicate the described behaviour (best to have have access to a public wiki), it will hard for anyone to provide useful assistance. James Hong Kong (talk) 17:25, 9 April 2013 (UTC)
Hello, thanks for the reply. My last attempt looks like this:
{{#ask: [[File:picture1.jpg]] OR [[File:picture2.jpg]]|?A_property|format=gallery|overlay=yes}}
Version details: MediaWiki 1.20.2, Semantic MW 1.8, SRF 1.8 Bmachin (talk) 17:56, 9 April 2013 (UTC)
- The above cited example works on this wiki as well. See [1]
- [1] Select images directly James Hong Kong (talk) 18:33, 9 April 2013 (UTC)
Well, we managed to solve it at last. We are not sure its the best solution, but it works for now. On the "ext.srf.gallery.overlay.js" we changed the line 64 from this:
var title = image.attr( 'href' ).replace(/.+?\File:(.*)$/, "$1" ).replace( "%27", "\'" ),
to this:
var title = image.attr( 'href' ).replace(/.+?\Archivo:(.*)$/, "$1" ).replace( "%27", "\'" ),
We are using a Wiki in Spanish, I should've mencioned it ("Archivo" is spanish for "File"). Is there a better solution?
Cheers, Benjamín.- Bmachin (talk) 21:54, 10 April 2013 (UTC)
- Nice, you are the first testing it with a non-En language therefore [1] should fix this. This change will only go into 1.9, any other version should apply it manually.
- [1] https://gerrit.wikimedia.org/r/#/c/58646/ James Hong Kong (talk) 01:10, 11 April 2013 (UTC)
- I tested on Opera 12.15 for Win/Linux and the images overlay option stops working on this wiki. It was fine a few days ago. Aanet (talk) 23:29, 19 April 2013 (UTC)
- I tested on Opera 12.15 for Win/Linux and the images overlay option stops working on this wiki. It was fine a few days ago. Aanet (talk) 23:29, 19 April 2013 (UTC)
- I just checked Overlay images with Opera 12.02 and it works.
- Due to the language issue, the JS script needed a change therefore pages served by the ResourceLoader need to be purged. James Hong Kong (talk) 00:45, 20 April 2013 (UTC)
I'm getting the same error, though I'm using English language. MW 1.19.3, SMW 1.8.0.3, SRF 1.8 on IIS7.5 Windows Server 2008 R2.
{{#ask: [[Category:some category]] [[Has some property::property1]]
|format=gallery
|overlay=yes
}}
The little square boxes don't show up. And when I hover over the image, the browser shows the destination URL to be the page URL, whereas on the demo page, it shows the destination URL as the image's File: URL or the actual image URL.
I wonder if this has something to do with a conflict with another extension.
Without the overlay=yes parameter, a standard gallery is shown, and inspecting the destination URL when hovered over the image shows the File: URL. Tommyheyser (talk) 05:11, 3 May 2013 (UTC)
- With no accessible public source available to inspect the issue and the format working on smw.org, there is yet little chance for making suggestions about the possible cause or solution.
- The only advice I can give is to compare the examples on smw.org with the examples you have employed and check for possible JavaScript errors (see here).
- PS: The change cited above for multilingual namespace support is only deployed with SMW/SRF 1.9. James Hong Kong (talk) 10:18, 3 May 2013 (UTC)
- I know this is old, but I just ran across this problem myself. On Windows servers, the href uses "%3A" instead of ":". Changing
var title = image.attr( 'href' ).split( encodedNsText + ':' ),tovar title = image.attr( 'href' ).split( encodedNsText + '%3A' ),- on line 96 of ext.srf.gallery.overlay.js worked for me. D3mon187 (talk) 19:49, 12 January 2015 (UTC)
- [0] tries to address your suggestion.
- [0] https://github.com/SemanticMediaWiki/SemanticResultFormats/commit/65abda94e901dbb0f6f8be52837eefd2659c72ae James Hong Kong (talk) 21:41, 16 January 2015 (UTC)
Enabling redirects feature when image are displayed in simpel #ask query
Hello, I have a simple ask query that displays some pages on a table including some pictures attached by a semantic value to the pages.
Is that possible to enable the redirects in order to go directly to the page when clicking to the picture ?
You can see the table here in which pictures are displayed in the column "Image"
Thanks Nicolas NALLET (Sémantiki) 12:06, 1 June 2013 (UTC)
The simple answer is no because your query
{{#ask: [[Category:Module]] [[Type de module::Emetteur]]
|mainlabel=Emetteur
|?Forme du module
|?Construit par
|?Prix
|?Protocole
|redirects=Redirection
|?Image
}}
uses the table format to display images. Image redirects is a feature only supported by format=gallery and since format=gallery and format=table are two different result formats they can't be mixed unless someone adds a capability to the table printer to do so as well as in case of format=gallery. James Hong Kong (talk) 18:27, 1 June 2013 (UTC)
Ok thanks for your answer I understand that you can't work more on this extension which is very useful already,
For those who would like doing the same thing : This could be easily workarouned in storing in a "string" value the following sentence:
[[File:''Image''|''anyparameter'']]
Cheers Nicolas NALLET (Sémantiki) 15:59, 4 August 2013 (UTC)
faster the slideshow
Hello, Is it possible to faster the slideshow ? Thanks, Nicolas NALLET (Sémantiki) 20:24, 14 July 2013 (UTC)
- I'm not planning to make any changes to the Gallery format but it would be easy for anyone with some JS knowledge to achieve what you were asking for.
- The gallery slideshow makes use of the responsiveSlides plug-in which is initialized with data found in ext.srf.gallery.slideshow.js or with its responsiveSlides defaults. James Hong Kong (talk) 22:10, 14 July 2013 (UTC)
How to hide the border around images ?
Thanks, Nicolas NALLET (Sémantiki) 16:04, 4 August 2013 (UTC)
feature request: multiple caption properties
Can't there be more then one caption property whithin the gallery? like:
This would improve this format behave more like other result formats. Carchaias (talk) 09:13, 8 October 2013 (UTC)
Captions
Some issues I am finding:
- Text properties containing wikitext are not parsed as expected when referred as captionproperty.
- autocaptions=no appears to be ignored.
For example; http://psychonautwiki.org/wiki/Template_talk:RandomReplication PJosepherum (talk) 18:05, 23 September 2014 (UTC)
Gallery query with no results returns strange string that is actually not empty
Apparently there is an issue with queries in gallery format that have no results.
(All results in the following examples are live, not simulated)
A query with no results must return an empty string, right?
Example:
{{#if: {{#ask: [[No such page]] }}
| string is not empty
| string is empty
}}
Result: string is empty
The result is as expected, which means that both #ask and #if work fine.
But when the query is in gallery format, then the result is not empty.
Example:
{{#if: {{#ask: [[No such page]] | format = gallery }}
| string is not empty
| string is empty
}}
Result: string is not empty
This is puzzling because there is actually no result.
If for example we try this:
123{{#ask: [[No such page]] | format = gallery }}456
we get: 123456
Notice that there is nothing between 3 and 4. Even if you inspect the returned HTML with your browser you'll see nothing at all. Ioannis Protonotarios (talk) 22:42, 26 January 2017 (UTC)
Example gallery does not work in SMW 2.5.5
Summary: Gallery format requires Extension "Semantic Result Formats" extension.
Simple code
{{#ask: [[Category:Pictures]] | format=gallery }}
does not work in the following configuration:
- MediaWiki version: 1.27.1
- Semantic MediaWiki: 2.5.5
Test page: http://sysadminwiki.ru/wiki/Project:Test
More advanced code does not work either. The installation and configuration were made as official manual suggests. Semantic queries work.
Is it something "obvious" that the instruction skipped, but that should be done, so the semantic gallery will work?