Release status: beta |
|
|---|---|
| Implementation | Parser function, Special page |
| Description | Allows for importing photos from Flickr |
| Author(s) | Sam Wilson (samwilsontalk) |
| Latest version | 0.1.0 (2018-05-03) |
| MediaWiki | 1.30+ |
| PHP | 5.5+ |
| Database changes | No |
| Composer | samwilson/flickr-importer |
| License | GNU General Public License 3.0 or later |
| Download | GitHub: Note: CHANGELOG |
|
Parameters
|
|
|
Hooks used
|
|
The FlickrImporter extension allows for importing photos from the social photograph sharing website Flickr.
Installation
- Download and place the file(s) in a directory called
FlickrImporterin yourextensions/folder. - Add the following code at the bottom of your LocalSettings.php file:
wfLoadExtension( 'FlickrImporter' ); $wgFlickrImporterKey = '<key here>'; $wgFlickrImporterSecret = '<secret here>';
- Register a new app on Flickr: https://www.flickr.com/services/apps/create/
- Add your new API key and secret to LocalSettings.php
Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Usage
- Log in to MediaWiki, go to your user Preferences page, and click on the 'Misc' section
- Click on the 'Connect to Flickr' link, and follow the prompts (you'll be sent to Flickr, asked to authenticate, and then returned to your wiki)
- Your Flickr connection will be saved, so you won't have to do this again unless you disconnect
- Add your import definitions to
User:<Username>/FlickrImporter.json(where <Username> is your username; there's a link to your import page on the Preferences page)
Import definitions are JSON-formatted objects containing the following information:
description: Informative text about this import. Optional.type: one of:user,group,album, orgallery.id: ID or username of user; or ID of group, album, or gallery.privacy: an array of privacy levels (see below). Defaults to 1 just to be safe.1public photos (the default)2private photos visible to friends3private photos visible to family4private photos visible to friends & family5completely private photos
For example, the complete contents of User:CommonsLover/FlickrImporter.json could be:
[
{
"description": "My photos",
"type": "user",
"id": "CommonsLover"
},
{
"description": "Wikimedia Commons group",
"type": "group",
"id": "30009679@N00"
}
]
Magic word
This extension adds a new magic word: {{FLICKRID:1234}} that renders as a link to the given photos Flickr page, e.g.
<span class="flickr-id">Flickr ID: <a href="https://flic.kr/p/nh">1234</a></span>. The text of the link can be modified via the flickrimporter-flickrid-link system message.
Template
Each photo will be imported and have the following template added to its File page:
{{photo
| title =
| description =
| author =
| date_taken =
| date_taken_granularity =
| date_published =
| latitude =
| longitude =
| license =
| privacy =
| flickr_id =
}}
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.