Extension:FeaturedFeeds/WMF deployment

From MediaWiki.org
Jump to: navigation, search

Contents

Notes to site administrators [edit]

The following feed types are supported:

Name Description Projects available on
featured Featured articles Wikipedia
onthisday On this day... Wikipedia
dyk Did you know? Wikipedia
potd Picture of the day Wikipedia, Commons
motd Media of the day Wikipedia, Commons
qotd Quote of the day Wikiquote
featuredtexts Featured text Wikisource

Each feed has the following messages controlling its behavior (replace * with feed name, chosen among those above):

Message Description Example
ffeed-*-page Title of the page that contains day's featured content.
Has one optional parameter, $1, which gets substituted with feed language code for use in multilingual feeds (currently, only on Commons).
Wikipedia:Today's featured article/{{#time:F j, Y}}
ffeed-*-title Feed name Wikipedia featured articles feed
ffeed-*-short-title Short feed name, could be used on sidebar in the future Featured articles
ffeed-*-desc More lengthy feed description Best articles on Wikipedia!!!
ffeed-*-entry Title of each day's entry {{CURRENTMONTHNAME}} {{CURRENTDAY}} Wikipedia featured article

How to set up a feed [edit]

Create page named MediaWiki:Ffeed-*-page containing page title (again, substitute * with feed name). The title will be processed with date and time functions such as {{CURRENTDAY}} is set to feed entry's current date. Two cases are possible here:

  • Wiki uses different templates for each day, e.g. Wikipedia:Today's featured article/May 23, 2013 on the English Wikipedia. In such case, use expression that evaluates to page title directly, e.g. Wikipedia:Today's featured article/{{#time:F j, Y}}.
  • Wiki uses a single template that uses date magic internally to display proper content. In such cases, either point MediaWiki:Ffeed-*-page to that template directly, or, if it has <noinclude> sections not intended for readers to see, point it to a page that contains a transclusion of the said template and nothing else.
If you need to translate or tweak interface messages of a feed, do that before creating MediaWiki:Ffeed-*-page, otherwise your new feed might take up to one hour to catch up these changes.

How to publish feeds in the sidebar [edit]

Just create page MediaWiki:Ffeed-enable-sidebar-links with content other than a dash (-) or an empty string. A section called "Featured content feeds" will appear in the sidebar on the main page.

FAQ [edit]

When FeaturedFeeds can be used and when it can't? [edit]

This extension requires an automatic featured content rotation system based on date. Currently, only content that changes once per day or less frequently is supported. Manual updates won't work.

Where can the feed be accessed? [edit]

The feed address will be in the form https://it.wikiquote.org/w/api.php?action=featuredfeed&feed=qotd&feedformat=atom (with your domain and feed name, obviously). Feeds are linked from the <head> HTML section of the main page. The extension creates a permanent link for each feed entry (e.g. q:it:Speciale:FeedItem/qotd/20120117000000/it) even if the feed is loaded from a single template.

Our wiki's current featured content changes less than once per day, how can we use FeaturedFeeds? [edit]

FeaturedFeeds outputs 10 days worth of featured content by default. Thus, if your content changes at least once per 10 days, everything will work. Just make sure that ffeed-*-page evaluates to a valid title only on days there's new content available. Examples:

  • Featured article every Monday: {{#ifeq: 1 | {{LOCALDOW}} | Template:Featured article/{{LOCALYEAR}}/{{LOCALWEEK}} |}} will evaluate to Template:Featured article/2013/21 every monday and will be empty on other days.
  • Sometimes we have a new featured picture, sometimes not: {{#ifexist: Wikipedia:POTD/{{#time:F j, Y}} | {{POTD}} |}}.

I have made an edit to a relevant message, but the feed does not change [edit]

Feeds are cached for up to one hour. Because they are all cached in one batch, you may also not see a change after adding a new feed.

Can we put whole featured articles into the feed? [edit]

You'd better not. Typical featured articles on Wikipedia are huge and are slow to render - even though rendered text is cached, it still requires CPU time and bandwidth to serve. You don't want to have a sysadmin running after you with a huge banhammer, don't you? :) Just stick to the same short excerpts shown on main page along with "read more" links.

Our wiki has a type of featured content not currently supported. Can we just reuse an existing feed name? [edit]

For the sake of reusers that might expect a certain type of content under a feed name, just ask us to add a new feed type and we'll do it quickly.

Our wiki uses timezone other than UTC. Anything we should know? [edit]

FeaturedFeeds honors time zones. You might want to use functions that output local time and date such as {{LOCALTIME}} instead of {{CURRENTTIME}}.

I did not understand a single word! [edit]

Just ask for help on IRC, channels #mediawiki and #wikimedia-mobile, we'll be happy to help you set up the extension on your wiki.

Technical notes for deployment [edit]

  • There's FeaturedFeedsWMF.php that contains typical feeds for every project, it should be included after extension's main file.
  • Requires r102851 and r102861 for deployment to 1.18wmf1. Yes check.svg Done
  • Requires ParserFunctions r106642 to function properly on many wikis. Due to intermediate revisions, easiest would be to upgrade PF to trunk - seems to work fine on Labs.
  • Requires a change of $out->getLanguage()->getCode() into $out->getLang()->getCode() to work on 1.18wmf1. Not needed anymore.
  • $wgDisplayFeedsInSidebar should be set to false, at least initially.
  • Should be deployed to Wikipedia, Commons and Wikiquote.

Per-site rollout [edit]

For languages yours sincerely could grok in 5 minutes:

Commons [edit]

Wikipedias [edit]

English (en)

Indonesian (id)

Malay (ms)

Bulgarian (bg)

Catalan (ca)

Chinese (zh)

French (fr)

Tamil (ta)

Czech (cs)

Swedish (sv)