Extension:Favorites
![]() | A request to archive this extension has been made on Phabricator. See task T334320 for the archival request and the rationale for the request, and to leave comments about the request. |
![]() | This extension is incompatible with MediaWiki 1.33 or any later release! You are advised against using this extension on a live site.
|
![]() | This extension is currently not actively maintained! Although it may still work, any bug reports or feature requests will more than likely be ignored. If you are interested in taking on the task of developing and maintaining this extension, you can request repository ownership. As a courtesy, you may want to contact the author. You should also remove this template and list yourself as maintaining the extension in the page's {{extension}} infobox. |
![]() Release status: unmaintained |
|
---|---|
![]() |
|
Implementation | Special page , Tag |
Description | Allows users to create a list of favorite pages. |
Author(s) | Jeremy Lemley (Jlemleytalk) |
Latest version | 1.1.3 (2019-11-04) |
Compatibility policy | Snapshots releases along with MediaWiki. Master is not backward compatible. |
MediaWiki | 1.32.0 |
PHP | 5.3+ |
Database changes | Yes |
License | GNU General Public License 3.0 or later |
Download | |
Example | ![]() |
|
|
favorites |
|
Quarterly downloads | 8 (Ranked 151st) |
Translate the Favorites extension if it is available at translatewiki.net | |
The Favorites extension makes it easy for users to add pages to their personal favorites list with just one click, so they can browse through them again later or share their favorites with others. It creates a new special page that contains a list of Favorites for each user, similar to the Watchlist. It also allows for the list of favorites to be publicly embedded on a page using a tag.
Usage[edit]
Users add items to the Favorite list by either selecting Favorite
from the navigation menu, or by clicking the Star icon (if implemented - see Configuration parameters).
Conversely, removing a Favorite from the list is a matter of clicking Unfavorite
or clicking the Star a second time.
Users can also edit their list through the Special:Favoritelist page using the same features included with the Watchlist.
Parser tag[edit]
You can dynamically embed favorites on any page or template using the following tag:
<favorites/>
This tag takes the following arguments:
editlink=true userpage=true
- The "editlink" argument will add a link at the bottom of the list that will allow the user to edit their list of favorites.
- The "userpage" argument will allow you to display your favorites on your user page. This argument will only work on a user page. Of course, leaving this argument off will display the logged-in user's own list, even while viewing someone else's user page.
- If both arguments are combined, the edit link will display, but it will take the user back to their list of favorites, not those of the user they are viewing. This could get confusing, so it's not recommended.
Examples:
<favorites editlink=true /> <favorites userpage=true />
Special page[edit]
This extension also creates a new Special page called "Special:Favoritelist". This special page allows users to view or edit their list of favorites. A link to this page can be added to the Personal Urls section of MediaWiki. See Configuration parameters for more details.
Installation[edit]
- Download and place the file(s) in a directory called
Favorites
in yourextensions/
folder. - Add the following code at the bottom of your LocalSettings.php file:
wfLoadExtension( 'Favorites' ); // Optional parameters: // Add a Star icon for selecting favorites: // $wgUseIconFavorite = true; // Add a "My Favorites" link to the personal URLs area: // $wgFavoritesPersonalURL = true;
- 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.
Configuration[edit]
The $wgUseIconFavorite parameter will use the same "Star" icon that is included with the Vector Watchlist. If you are already using the Star icon for your watched items, you may want to set $wgVectorUseIconWatch to false in LocalSettings.php.
The $wgFavoritesPersonalURL parameter adds a link to "My Favorites" to the Personal Urls section of MediaWiki next to "My Watchlist".
Uninstalling[edit]
Most extensions can be removed by deleting them and editing LocalSettings.php to remove references to it. Since this extension makes changes to your database, removing it additionally requires undoing database changes. It's as simple as removing the favoritelist table from the database.
If you have access to your database using a tool like PHPMyAdmin, you can just delete the table. For commandline access or to use a script, you would use this command:
drop table favoritelist;
- Extensions incompatible with 1.33
- Unmaintained extensions
- Special page extensions
- Tag extensions
- GPL licensed extensions
- Extensions in Wikimedia version control
- ArticleDeleteComplete extensions
- BeforePageDisplay extensions
- LoadExtensionSchemaUpdates extensions
- ParserFirstCallInit extensions
- SkinTemplateNavigation::Universal extensions
- TitleMoveComplete extensions
- All extensions