Extension:Favorites

This page is a translated version of the page Extension:Favorites and the translation is 100% complete.
MediaWiki 拡張機能マニュアル
Favorites
リリースの状態: 安定
実装 特別ページ , タグ
説明 お気に入りのページのリストを作成することができます。
作者 Jeremy Lemley (Jlemleyトーク)
最新バージョン 1.1.3
互換性の方針 MediaWiki とともにリリースされるスナップショット。 master には後方互換性がありません。
MediaWiki >= 1.36.0
データベースの変更 はい
ライセンス GNU 一般公衆利用許諾書 3.0 以降
ダウンロード
  • $wgFavoritesPersonalURL
  • $wgUseIconFavorite
favorites
Quarterly downloads 10 (Ranked 128th)
translatewiki.net で翻訳を利用できる場合は、Favorites 拡張機能の翻訳にご協力ください

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. ウォッチリストと同様に、各ユーザーのお気に入りリストを含む新しい特別なページを作成します。 また、タグを使ってお気に入りリストをページ上に公開埋め込みすることも可能です。

使用法

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.

パーサタグ

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.

例:

<favorites editlink=true />
<favorites userpage=true />

特別ページ

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.

インストール

  • ダウンロードして、ファイルをextensions/フォルダー内のFavoritesという名前のディレクトリ内に配置します。
    開発者とコード寄稿者は、上記の代わりに以下を使用してGitからインストールします:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Favorites
  • 以下のコードを LocalSettings.php ファイルの末尾に追加します:
    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;
    
  • 更新スクリプトを実行します。このスクリプトは、この拡張機能が必要とするデータベーステーブルを自動的に作成します。
  •   完了 – ウィキの「Special:Version」に移動して、拡張機能が正しくインストールされたことを確認します。


設定

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".

アンインストール

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;