Jump to content

Extension:NearbyPages

本頁使用了標題或全文手工轉換
From mediawiki.org
Revision as of 17:17, 17 December 2023 by LowensteinYang (talk | contribs) (Created page with "提供$1功能")
MediaWiki扩展手册
NearbyPages
发行状态: 稳定版
描述 提供Special:Nearby功能
最新版本 1.40
MediaWiki 1.39
数据库更改
许可协议 GNU通用公眾授權條款2.0或更新版本
下載
README
  • $wgNearbyPagesNamespaces
  • $wgNearbyRandomButton
  • $wgNearbyRange
  • $wgNearbyPagesWikidataCompatibility
  • $wgNearbyPagesUrl
1.39
季度下載量 12 (Ranked 117th)
前往translatewiki.net翻譯NearbyPages扩展
問題 开启的任务 · 报告错误

NearbyPages的扩展功能通过Special:Nearby的特殊页面提供基于位置的文章。 It was previously part of Extension:移动版前端 but decoupled and rewritten with Vue.js . The extension can also be deployed as a static web app that is demoed as a standalone app for Wikipedia and Wikidata.

Special:Nearby

The page Special:Nearby lists articles that are geotagged nearest to the user's current location, as provided by their browser. Due to the limit of the geosearch API, only articles within a 10 km radius are listed by default, although this can be changed using the $wgMaxGeoSearchRadius and $wgNearbyRange variables.

It is also possible to manually specify a location by including its latitude and longitude as URL parameters. For example, this URL will generate a list of articles near the w:Statue of Liberty in New York City, US:

https://en.wikipedia.org/wiki/Special:Nearby#/coord/40.69,-74.04

Installation

  • 下载文件,并将解压后的NearbyPages文件夹移动到extensions/目录中。
    开发者和代码贡献人员应从Git安装扩展,输入:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/NearbyPages
  • 将下列代码放置在您的LocalSettings.php 的底部:
    wfLoadExtension( 'NearbyPages' );
    
  • Yes 完成 – 在您的wiki上导航至Special:Version,以验证已成功安装扩展。