![]() Release status: beta |
|
---|---|
Implementation | API |
Description | Provides an API for storing and retrieving private lists of pages. |
Author(s) | User:Tgr (WMF) |
Latest version | 0.1.0 (2017-07-20) |
Compatibility policy | Snapshots releases along with MediaWiki. Master is not backward compatible. |
MediaWiki | 1.30+ |
PHP | 5.5+ |
Database changes | Yes |
Tables | reading_list reading_list_entry reading_list_project |
License | GNU General Public License 2.0 or later |
Download | Download extension Git [?]: README.md |
Parameters
|
|
Services defined
|
|
Hooks used
|
|
Quarterly downloads | 9 (Ranked 161st) |
Public wikis using | 859 (Ranked 305th) |
Translate the ReadingLists extension if it is available at translatewiki.net | |
Vagrant role | readinglists |
Issues | Open tasks · Report a bug |
The ReadingLists extension provides an API to store and retrieve private lists of pages, e.g. for a "bookmark" or "read it later" feature. On wikifarms, lists can contain pages from multiple wikis.
When RESTBase is installed, the extension powers the Reading List Service.
Installation
- Download and place the file(s) in a directory called
ReadingLists
in yourextensions/
folder. - Add the following code at the bottom of your LocalSettings.php
wfLoadExtension( 'ReadingLists' );
file: - Run the update script which will automatically create the necessary database tables that this extension needs.
Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Vagrant installation:
- If using Vagrant
vagrant roles enable readinglists --provision
, install with
Setting up project whitelist
The project part of list entries needs to be selected from a static list stored in readinglists.sql
. If the SiteMatrix extension is installed, you can run the populateProjectsFromSiteMatrix.php
maintenance script to fill the list with project domain names (in the format http://example.org
). Alternatively you can just fill it by hand.
Setting up read only web interface
In 1.40 a read only web interface will be provided. See gerrit patch. you will be able to enable it using the following feature flags:
$wgReadingListsWeb = true;
$wgReadingListsWebAuthenticatedPreviews = true;
Setting up import functionality with apps
The reading list page supports ?limport and lexport query string parameters that can be read by an app to support importing/exporting lists.
To enable this functionality you will need to configure URLs to suitable apps like so:
$wgReadingListsWeb = true;
$wgReadingListAndroidAppDownloadLink = "https://play.google.com/store/apps/details?id=org.wikipedia&referrer=utm_source%3DreadingListsShare";
$wgReadingListiOSAppDownloadLink = "https://itunes.apple.com/app/apple-store/id324715238?pt=208305&ct=readingListsShare";
// Optionally you can also anonymize the import URL (enable anonymized previews)
$wgReadingListsAnonymizedPreviews = true;
You will also need to define the message keys MediaWiki:readinglists-import-app, MediaWiki:readinglists-list-empty-message to mention the application.
On Wikimedia wikis this is done using WikimediaMessages.
Configuration
parameter | default | comment |
---|---|---|
$wgReadingListsCluster | false
|
Database cluster to use, or false for using the default cluster |
$wgReadingListsDatabase | false
|
Database to use, or false for using the default database. |
$wgReadingListsCentralWiki | true
|
Database name of the central wiki, or false to always assume the current wiki is the central one. This will only be used to make sure things like DB schema upgrades or scheduled jobs are not executed multiple times. |
$wgReadingListsMaxListsPerUser | 100
|
Maximum allowed number of lists per user. |
$wgReadingListsMaxEntriesPerList | 1000
|
Maximum allowed number of entries per list. |
$wgReadingListsDeletedRetentionDays | 30
|
Number of days after which soft-deleted lists and list entries become hard-deleted. Clients which haven't synced changes for this long cannot use sync, and need to re-download all lists. |
API
Special:ApiHelp/query+readinglists Special:ApiHelp/query+readinglistentries Special:ApiHelp/readinglists Special:ApiHelp/readinglists+setup Special:ApiHelp/readinglists+teardown Special:ApiHelp/readinglists+create Special:ApiHelp/readinglists+update Special:ApiHelp/readinglists+delete Special:ApiHelp/readinglists+createentry Special:ApiHelp/readinglists+deleteentry
Maintenance scripts
purge.php
Hard-deletes deleted lists and entries older than a cutoff date. Also does other DB cleanup that has no effect on functionality. Meant to be called from a cron job.
Option | Description |
---|---|
--before <timestamp> | Cutoff date in a wfTimestamp() -compatible format. Defaults to $wgReadingListsDeletedRetentionDays days ago. |
populateProjectsFromSiteMatrix.php
Fills the reading_list_project
with the origins (schema + domain name) of the wikifarm's wikis. Requires the SiteMatrix extension.
See also
- Reading/Reading_Lists
- Browser plugin to add articles to a list: Chrome, Firefox, source
![]() | This extension is being used on one or more Wikimedia projects. This probably means that the extension is stable and works well enough to be used by such high-traffic websites. Look for this extension's name in Wikimedia's CommonSettings.php and InitialiseSettings.php configuration files to see where it's installed. A full list of the extensions installed on a particular wiki can be seen on the wiki's Special:Version page. |