Fields required in a wrap-up report:
- Project description (as you would explain it to a layman who has no clue about MediaWiki). Please include screenshots with description - explaining how exactly the tool/extension works.
- Missing features/known bugs. Add links to phabricator tasks for the same and leave a short explanation.
- Demo server link
- Resource links (Project in gerrit/github, extension link on wiki etc.)
- Anything else you can think of, which can make contributing to this project easier for newcomers.
(Please edit this task itself to write your report. Make sure you complete it by 21st of August when end-term evaluations start.)
=WikidataPageBanner wrap-up report=
==About the project==
https://en.wikivoyage.org is a wiki about travel and holds rich details related to visiting places. This wiki has a special "culture" of showing page wide "banners" at the head of each of their articles to enhance the **aesthetic** appeal of their articles.
An example of such a banner can be seen here - https://en.wikivoyage.org/wiki/Agra
These banners are traditionally shown using a [[https://en.wikivoyage.org/wiki/Template:Pagebanner|template]] on the wiki.
The banners shown through templates however had a few shortcomings such as:
* Not delivering an optimum size banner for each device.
* Not rendering properly on mobile devices.
* Too small banners on small mobile screens.
* Not being able to show more than one level Table Of Contents inside the banners.
The project is all about addressing these issues and adding capabilities through a Mediawiki extension to take the banner experience to the next level.
The following is an example of showing the banner on mobile using the extension. Note how the banner maintains a decent height inspite of originally being of aspect ratio 7:1
{F1790016}
The extension also adds a new feature to focus the banner to specific spots if it is too large. Notice the focus in the three images
{F1790195,layout=left,float,width=200}
{F1790016,layout=left,float,width=200}
{F1790083,layout=left,width=200}
The above feature makes use of the **origin** parameter. More info can be found at https://www.mediawiki.org/wiki/Extension:WikidataPageBanner
==Usage==
The extension has the capability to fetch images from the wiki or from wikidata if a link to wikidata for the article is defined.
The extension adds a [[https://www.mediawiki.org/wiki/Help:Magic_words|magic word]] **PAGEBANNER** which can be used to invoke the banners on any page.
For example using **{{PAGEBANNER: Vatican banner Rafael's "School of Athens".jpg}}** would show a banner with the given image name. The extension will try to fetch the image from the wiki or from wikidata if an associated property exists.
The following page shows the example of using {{PAGEBANNER:Agra banner Taj Mahal.jpg|icon-unesco=Unesco}}
{F1789978}
For accessing the wikidata banner, the extension uses a configuration variable **$wgWPBBannerProperty** to look for the banner image on wikidata.
Eg. the page http://pagebanner.wmflabs.org/wiki/NorthAmerica fetches a banner from a wikidata linked property defined here http://pagebanner.wmflabs.org/wiki/Item:Q8
{F1789946}
The extension also has the feature to add a wikidata banner or a default defined banner if **$wgWPBEnableDefaultBanner** is set to true
==Demo server link==
The extension can be tested at - https://pagebanner.wmflabs.org
==Resources==
* Test server - https://pagebanner.wmflabs.org
* Documentation - https://www.mediawiki.org/wiki/Extension:WikidataPageBanner
* Extension is deployed on https://en.wikivoyage.org/wiki
=Suggestions for contributions in future=
The extension's code is heavily documented at each step and coupling it with the documentation at https://www.mediawiki.org/wiki/Extension:WikidataPageBanner would make it fairly easy in future to contribute to it.
Giving a read to https://en.wikivoyage.org/wiki/Wikivoyage:Banner_Expedition would help make the objectives of the extension clearer.