Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add random image of ISIL organization to homepage #321

Closed
acka47 opened this issue Mar 9, 2017 · 15 comments · Fixed by #329
Closed

Add random image of ISIL organization to homepage #321

acka47 opened this issue Mar 9, 2017 · 15 comments · Fixed by #329
Labels

Comments

@acka47
Copy link
Contributor

acka47 commented Mar 9, 2017

We thought about replacing the big lobid butterfly+triple log at http://lobid.org/organisations by a random picture of an ISIL organization from Germany, Austria and Switzerland. Here is a wikidata query for getting such pictures: http://tinyurl.com/hlz5e4x

##defaultView:ImageGrid
SELECT ?image ?item ?itemLabel
WHERE
{
  ?item wdt:P18 ?image .  
  ?item wdt:P791 ?isil  .
  FILTER (regex(?isil, "(AT|CH|DE)-.*")).
  SERVICE wikibase:label { bd:serviceParam wikibase:language "de" }
}

Each picture should have the organization name and place (both from lobid data) as caption linking to the corresponding lobid entry, naming wikimedia commons as source with an underlying link to the picture's commons page for attribution. The picture itself should also link to the commons page.

E.g. https://upload.wikimedia.org/wikipedia/commons/2/29/Steintor_Anklam.JPG should have the following caption:

Museum im Steintor, Anklam (Quelle: Wikimedia Commons)

HTML (<figure> approach from http://tosbourn.com/correct-way-markup-image-caption-html/):

<figure>
    <img src="https://upload.wikimedia.org/wikipedia/commons/2/29/Steintor_Anklam.JPG" alt="Museum im Steintor, Anklam" />
 <figcaption>
 <a href="http://lobid.org/organisations/DE-MUS-890115">Museum im Steintor, Anklam</a> (Quelle: <a href="https://commons.wikimedia.org/wiki/File:Steintor_Anklam.JPG">Wikimedia Commons</a>
 </figcaption>
</figure>
@acka47 acka47 changed the title Add slideshow of library images to homepage Add random image of ISIL organization to homepage Mar 9, 2017
@acka47
Copy link
Contributor Author

acka47 commented Mar 9, 2017

For correct attribution referencing Wikimedia Commons is not enough. We also have to get creator and license information. This is easy via the Wikimedia Commons API, thanks to @raymondde for helping me out. For the current example the call ist: https://commons.wikimedia.org/w/api.php?action=query&format=json&prop=imageinfo&list=&titles=file%3ASteintor_Anklam.JPG+&iiprop=extmetadata

Response.

{
   "batchcomplete":"",
   "query":{
      "normalized":[
         {
            "from":"file:Steintor_Anklam.JPG ",
            "to":"File:Steintor Anklam.JPG"
         }
      ],
      "pages":{
         "7515535":{
            "pageid":7515535,
            "ns":6,
            "title":"File:Steintor Anklam.JPG",
            "imagerepository":"local",
            "imageinfo":[
               {
                  "extmetadata":{
                     "DateTime":{
                        "value":"2009-08-09 09:01:37",
                        "source":"mediawiki-metadata",
                        "hidden":""
                     },
                     "ObjectName":{
                        "value":"Steintor Anklam",
                        "source":"mediawiki-metadata",
                        "hidden":""
                     },
                     "CommonsMetadataExtension":{
                        "value":1.2,
                        "source":"extension",
                        "hidden":""
                     },
                     "Categories":{
                        "value":"CC-BY-SA-3.0,2.5,2.0,1.0|GFDL|License migration redundant|Self-published work|Steintor (Anklam)",
                        "source":"commons-categories",
                        "hidden":""
                     },
                     "Assessments":{
                        "value":"",
                        "source":"commons-categories",
                        "hidden":""
                     },
                     "ImageDescription":{
                        "value":"<p>Das Steintor in Anklam (Vorpommern).\n</p>",
                        "source":"commons-desc-page"
                     },
                     "DateTimeOriginal":{
                        "value":"2009-08-01",
                        "source":"commons-desc-page"
                     },
                     "Credit":{
                        "value":"<span class=\"int-own-work\" lang=\"en\">Own work</span>",
                        "source":"commons-desc-page",
                        "hidden":""
                     },
                     "Artist":{
                        "value":"<a href=\"//commons.wikimedia.org/wiki/User:Michael_Sander\" title=\"User:Michael Sander\">Michael Sander</a>",
                        "source":"commons-desc-page"
                     },
                     "LicenseShortName":{
                        "value":"CC BY-SA 3.0",
                        "source":"commons-desc-page",
                        "hidden":""
                     },
                     "UsageTerms":{
                        "value":"Creative Commons Attribution-Share Alike 3.0",
                        "source":"commons-desc-page",
                        "hidden":""
                     },
                     "AttributionRequired":{
                        "value":"true",
                        "source":"commons-desc-page",
                        "hidden":""
                     },
                     "LicenseUrl":{
                        "value":"http://creativecommons.org/licenses/by-sa/3.0",
                        "source":"commons-desc-page",
                        "hidden":""
                     },
                     "Copyrighted":{
                        "value":"True",
                        "source":"commons-desc-page",
                        "hidden":""
                     },
                     "Restrictions":{
                        "value":"",
                        "source":"commons-desc-page",
                        "hidden":""
                     },
                     "License":{
                        "value":"cc-by-sa-3.0",
                        "source":"commons-templates",
                        "hidden":""
                     }
                  }
               }
            ]
         }
      }
   }
}

We need imageinfo.Artist.value and imageinfo.LicenseShortName.value+imageinfo.LicenseUrl.value for creating the correct attribution. For the example this would look like:

<figure>
    <img src="https://upload.wikimedia.org/wikipedia/commons/2/29/Steintor_Anklam.JPG" alt="Museum im Steintor, Anklam" />
 <figcaption>
 <a href="http://lobid.org/organisations/DE-MUS-890115">Museum im Steintor, Anklam</a> (Quelle: <a href="https://commons.wikimedia.org/wiki/User:Michael_Sander">Michael Sander</a>, <a href="https://commons.wikimedia.org/wiki/File:Steintor_Anklam.JPG">Wikimedia Commons</a>, <a href="http://creativecommons.org/licenses/by-sa/3.0">CC BY-SA 3.0</a> )
 </figcaption>
</figure>

@fsteeg
Copy link
Member

fsteeg commented Mar 17, 2017

Deployed to staging: http://test.lobid.org/organisations

@fsteeg fsteeg assigned acka47 and ChristophEwertowski and unassigned fsteeg Mar 17, 2017
@acka47
Copy link
Contributor Author

acka47 commented Mar 17, 2017

Nice. I see two things that need improvement:

  1. Currently the images are loading extremely slow. (When I load the same image at wikimedia commons it is much faster.)
  2. The placing of the images is not ideal as the image is shown at the right margin. It would be better to have it right next to the description text or in the middle between text and the right margin.

Example view on my laptop browser:

bildschirmfoto vom 2017-03-17 18 27 12

@acka47 acka47 removed their assignment Mar 17, 2017
@fsteeg
Copy link
Member

fsteeg commented Mar 20, 2017

I think the slow loading is a VPN issue. It's slow here for me today as well, but it was not an issue in the office on Friday. The left-alignment looked odd, because the nav and search bar are full width. Left section left-aligned and right section right-aligned looks much better. Also the previous image was right-aligned as well. Maybe the issue is the general unlimited page width, which makes it look a little odd on wide screens. We might want to make it more like http://lobid.org/resources (in hbz/lobid-resources#281).

@acka47
Copy link
Contributor Author

acka47 commented Mar 20, 2017

Maybe the issue is the general unlimited page width, which makes it look a little odd on wide screens. We might want to make it more like http://lobid.org/resources (in hbz/lobid-resources#281).

+1

@acka47 acka47 removed their assignment Mar 20, 2017
@acka47
Copy link
Contributor Author

acka47 commented Mar 20, 2017

+1

@ChristophEwertowski
Copy link

Going through the comments, I miss the place of the organisations at the caption (like "organisation, place"). If there is no place given like for the DNB (Wikidata) it's no tragedy either.
It is better that the picture links to the organisation and not to the commons page. And I also agree on the centralising of the pace like in lobid resources.

@fsteeg
Copy link
Member

fsteeg commented Mar 20, 2017

I miss the place of the organisations at the caption (like "organisation, place"). If there is no place given like for the DNB (Wikidata) it's no tragedy either.

Yes, most organisations don't have the location in their name.

@acka47
Copy link
Contributor Author

acka47 commented Mar 20, 2017

@ChristophEwertowski is referring to my requirement from above:

Each picture should have the organization name and place (both from lobid data) as caption linking to the corresponding lobid entry

I agree that this should be added.

@fsteeg fsteeg added deploy and removed review labels Mar 20, 2017
@fsteeg
Copy link
Member

fsteeg commented Mar 20, 2017

Redeployed to staging: http://test.lobid.org/organisations

@fsteeg fsteeg assigned acka47 and ChristophEwertowski and unassigned fsteeg Mar 20, 2017
@fsteeg fsteeg added review and removed working labels Mar 20, 2017
@acka47
Copy link
Contributor Author

acka47 commented Mar 20, 2017

I can now see the location. Now I realized that the actual picture links to the lobid entry (with an empty format parameter in the end that could be removed). above I said

The picture itself should also link to the commons page.

@fsteeg Any special reason you linked to lobid?

@ChristophEwertowski
Copy link

+1
@acka47 : If I am on a website with information about organisations I want to access them, e.g. "tell me more about it". In most cases the pictures aren't so beautiful that I would want to access them to save them for my desktop screen ;)

@ChristophEwertowski ChristophEwertowski removed their assignment Mar 20, 2017
@fsteeg
Copy link
Member

fsteeg commented Mar 21, 2017

The picture itself should also link to the commons page.

@fsteeg Any special reason you linked to lobid?

Must have missed that part, I thought this was what we came up with when we originally talked about it. I agree with @ChristophEwertowski that the image is the place most people will click to get details about the organisation. To get to the image source, there's the 'Wikimedia Common' link below the caption.

@acka47
Copy link
Contributor Author

acka47 commented Mar 21, 2017

Ok. +1 then.

@acka47
Copy link
Contributor Author

acka47 commented Apr 17, 2017

For the record, the query for items with ISIL and without an image: http://tinyurl.com/kdgjpc6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants