內容目錄
前言介紹
- 這款 WordPress 外掛「WP Quadratum」是 2012-04-14 上架。
- 目前有 10 個安裝啟用數。
- 上一次更新是 2015-02-05,距離現在已有 3741 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 3.9.0 以上版本才可以安裝。
- 尚未有人給過這款外掛評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
vicchi |
外掛標籤
map | maps | checkins | foursquare | wp-quadratum |
內容簡介
這個外掛允許您在 WordPress 網站的側邊欄中以地圖小工具顯示您的最新 Swarm 簽到,或透過短碼嵌入文章或頁面中。
設置和選項包括以下內容:
1. 使用 OAuth 2.0 將您的 WordPress 網站與 Foursquare 帳戶關聯,以保持您的個人資訊安全。
2. 選擇要在哪個地圖供應商上顯示您的簽到;您可以從以下選擇:
- HERE Maps
- Google Maps v3
- Bing Maps v7
- 使用 Leaflet 的 OpenStreetMap
- 使用 OpenLayers 的 OpenStreetMap
- 使用 MapQuest 的 OpenStreetMap
3. 添加所選地圖供應商的地圖 API 金鑰;HERE、Google、Bing 和 MapQuest 地圖都需要 API 金鑰。
4. 選擇側邊欄上小工具和地圖的寬度和高度。寬度和高度可以指定為像素 (px) 或百分比。
5. 選擇地圖顯示的縮放級別。
經由外掛的篩選器,可以自訂包含場所名稱、場所 URL 和您最後 Swarm 簽到的時間戳記的副標題文字。
此外掛的當前版本允許您將單個 Foursquare 帳戶與 WordPress 網站相關聯;目前不支援將多個 Foursquare 帳戶(每個使用者帳戶一個)相關聯。
短碼支援和使用方式:
WP Quadratum 支援兩個短碼和三個短碼別名;使用 [wp_quadratum_map] 短碼將其展開插入文章或頁面中,並替換簽到地圖,透過 [wp_quadratum_locality] 短碼,您可以在文章或頁面中嵌入最後一次簽到的某些方面。
[wp_quadratum_map] 短碼支援多個屬性,使您可以自訂短碼如何展開為簽到地圖:
- 寬度屬性 (width)
- 寬度單位屬性 (width_units)
- 高度屬性 (height)
- 高度單位屬性 (height_units)
- 縮放屬性 (zoom)
"寬度" 屬性與 "高度" 屬性相結合,可指定要插入到文章或頁面中的地圖的寬度。如果未指定,地圖寬度將預設為 300。
"寬度單位" 屬性,指定如何解釋 "寬度" 屬性中指定的值。這個屬性的有效值為 "px" 和 "%",分別表示 "寬度" 屬性應該以像素或百分比來解釋。如果未指定此屬性,它的預設值為 "px"。
"高度" 屬性表示地圖將插入到文章或頁面中時的高度。如果未指定,地圖的高度將預設為 300。
原文外掛簡介
This plugin allows you to display your last Swarm checkin as a map widget on the sidebar or embedded via a shortcode in a post or page of your WordPress powered site.
Setting and options include:
Associate your WordPress powered site with your Foursquare account using OAuth 2.0, which keeps your personal information safe and secure.
Choose which map provider you want your checkin shown on; you can choose from:
HERE Maps
Google Maps v3
Bing Maps v7
OpenStreetMap from Leaflet
OpenStreetMap from OpenLayers
OpenStreetMap from MapQuest
Add your maps API key(s) for your chosen map provider; HERE, Google, Bing and MapQuest maps all require API keys.
Choose the width and height of the widget and map on the sidebar. The width and height can be specified either as pixels (px) or as a percentage.
Choose the zoom level of the map display.
The strapline text containing the venue name, venue URL and timestamp of your last Swarm checkin can be customised via the plugin’s filters. See the Filter Support And Usage section for more information.
The current version of this plugin allows you to associate a single Foursquare account with your WordPress site; associating multiple Foursquare accounts, one per user account is not currently supported.
Shortcode Support And Usage
WP Quadratum supports two shortcodes and three shortcode aliases; [wp_quadratum_map] to expand the shortcode in a post or page and replace it with the checkin map and [wp_quadratum_locality] to allow you to embed aspects of your last checkin in a post or page.
[wp_quadratum_map]
Adding this shortcode to the content of a post or page as content, expands the shortcode and replaces it with a checkin map.
The shortcode also supports multiple attributes which allow you to customise the way in which the shortcode is expanded into the checkin map:
the width attribute
the width_units attribute
the height attribute
the height_units attribute
the zoom attribute
** The “width” Attribute **
The width attribute, in conjunction with the height attribute specifies the width of the map to be inserted into a post or page. If omitted, the map width defaults to a value of 300.
** The “width_units” Attribute **
The width_units attribute, specifies how the value specified in the width attribute should be interpreted. Valid values for this attribute as px and %, denoting that the width attribute should be interpreted in pixels or as a percentage respectively. If omitted, this attribute defaults to a value of px.
** The “height” Attribute **
The height attribute, in conjunction with the width attribute specifies the height of the map to be inserted into a post or page. If omitted, the map height defaults to a value of 300.
** The “height_units” Attribute **
The height_units attribute, specifies how the value specified in the height attribute should be interpreted. Valid values for this attribute as px and %, denoting that the height attribute should be interpreted in pixels or as a percentage respectively. If omitted, this attribute defaults to a value of px.
** The “zoom” Attribute **
The zoom attribute specifies the zoom level to be used when displaying the checkin map. If omitted, the zoom level defaults to a value of 16 which is roughly analogous to a neighbourhood zoom.
[wp_quadratum]
The [wp_quadratum] shortcode is an alias for the [wp_quadratum_map] shortcode and has the same functionality.
[wpq_map]
The [wpq_map] shortcode is an alias for the [wp_quadratum_map] shortcode and has the same functionality.
[wp_quadratum_locality]
Adding this shortcode to the content of a post or page, expands the shortcode and replaces it with information about your last Foursquare checkin. The information to be displayed is selected by the shortcode’s type attribute, which allows you to select the venue name, address, region, postal code, coordinates, timezone or timezone offset.
By default, the [wp_quadratum_locality] shortcode and the [wpq_locality] alias are disabled. This is because not all Foursquare venues contain the full scope of locality elements that the shortcode supports (the minimum requirements for a Foursquare venue are name, category and coordinates). To backfill any missing venue elements, WP Quadratum uses a reverse geocoding service from Factual to supply the missing information.
To enable the [wp_quadratum_locality] shortcode, from the Dashboard navigate to Settings / WP Quadratum and click on the Shortcodes tab. Select the Enable Locality Shortcode Usage checkbox and the Factual OAuth Settings meta-box will appear. You’ll then need to sign up for a Factual API key after which you’ll be given an OAuth Key and OAuth Secret. Copy and paste these into the Factual OAuth text fields and click on Save Shortcode Settings. You’ll now be able to use the [wp_quadratum_locality] shortcode or its alias.
The “type” Attribute
The type attribute specifies the element of your last Foursquare checkin that is to be displayed in a post or page and can take one of the following values:
venue – the name of the last Foursquare venue you checked into.
address – the street address of the venue; not including the region, locality or postal code.
region – the region of the venue; the geographic context of the region will vary from country to country but is roughly analogous to the venue’s city.
postcode – the postal code of the venue, if the country or region supports postal codes.
coordinates – the geographic coordinates of the venue, in the form latitude,longitude.
timezone – the timezone name of the time of the checkin, such as Europe/London.
tzoffset – the offset from GMT of the time of the checkin, in the form GMT[-+]hours, such as GMT-1 or GMT+2.
locality – the locality of the venue; the geographic context of the locality will vary according to country, but is roughly analogous to the town or neighbourhood.
If the type attribute is not supplied, or if the value of this attribute is not one of the above values, type="locality" will be assumed. The shortcode’s replacement value can be modified via the plugin’s wp_quadratum_locality filter; see the Filter Support and Usage section for more information.
[wpq_locality]
The [wpq_locality] shortcode is an alias for the [wp_quadratum_locality] shortcode and has the same functionality.
Filter Support And Usage
WP Quadratum supports three filters, which are described in more detail below. The plugin’s filters allow you to:
change the descriptive text that appears immediately below the map when displayed via the plugin’s widget or shortcode.
gain access to the checkin metadata that is returned from the Foursquare API
change the output of the [wp_quadratum_locality]` shortcode
wp_quadratum_checkin
Allow a filter hook function to gain access to the checkin metadata that is returned from the Foursquare API and which is used to build the checkin map and strapline. It’s important to note that the implementation of this filter isn’t strictly a WordPress filter per se. The user defined hook function is passed only the checkin metadata. Any changes made to the metadata will not be reflected in the output of the plugin’s or shortcode’s map, nor will any return value from the hook function be honoured by the plugin. The filter will be called before the wp_quadratum_strapline filter, if used, allowing you to store the checkin contents and use them within the wp_quadratum_strapline filter hook.
The contents of the checkin data this filter can access are a Checkin Response object, which is documented on the Foursquare Developer Site.
Example: Store the contents of the Foursquare checkin that the plugin will be to display the checkin map.
$last_checkin = null;
add_filter('wp_quadratum_checkin', store_last_checkin, 10, 1);
function store_last_checkin($checkin) {
$last_checkin = $checkin;
}
wp_quadratum_strapline
Applied to the strapline that is displayed via the plugin’s widget or shortcode. The strapline is the text that appears immediately below the checkin map.
Example: Change the date and time formatting in the strapline
add_filter('wp_quadratum_strapline', 'format_strapline', 10, 2);
function format_strapline($content, $params) {
// $params = array (
// 'venue-url' => '4Sq venue url for checkin',
// 'venue-name' => 'checkin venue name',
// 'checked-in-at' => 'timestamp of checkin'
// );
$strapline = '
Last seen at ' . $params['venue-name'] . ' on ' . date('l jS \of F Y h:i:s A', $params['checked-in-at']) . '
';
return $strapline;
}
wp_quadratum_locality
Applied to the replacement content of the [wp_quadratum_locality] shortcode immediately before the shortcode is replaced. The filter’s hook function is passed two arguments; the shortcode’s value and corresponding type attribute.
Example: Wrap each invocation of the [wp_quadratum_locality] shortcode in a div whose class includes the attribute type.
add_filter('wp_quadratum_locality', 'format_locality', 10, 2);
function format_locality($value, $type) {
$class = 'wp-quadratum-locality-' . $type;
return '
';
}
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「WP Quadratum」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
1.0.0 | 1.0.1 | 1.0.2 | 1.1.0 | 1.2.0 | 1.3.0 | 1.3.1 | trunk | 1.3.1.1 | 1.3.1.2 | 1.3.1.3 | 1.3.1.4 |
延伸相關外掛(你可能也想知道)
WP Go Maps (formerly WP Google Maps) 》這是一款易於使用的 Google 地圖和 Open Layers 地圖外掛程式(包括地圖區塊)!, 使用提供的短代碼,快速輕鬆地向 WordPress 文章和/或頁面添加自定義 Googl...。
Snazzy Maps 》Snazzy Maps可以輕鬆地為您現有的 Google 地圖添加風格。, 功能特色, , 瀏覽數百種免費風格。, 快速應用風格到您的 WordPress 網站上所有的 Google 地圖。, ...。
MapPress Maps for WordPress 》MapPress 是將互動式 Google 和 Leaflet 地圖添加到 WordPress 網站的最簡單方法。, 使用 Gutenberg 區塊或傳統編輯器創建無限的地圖和標記。彈出式地圖編輯...。
Image Hotspot by DevVN 》Image Hotspot by DevVN 可以幫助您在圖片上添加熱點。, 使用方法, 複製您的短代碼以查看,例如:[devvn_ihotspot id=”YOUR_ID”], , jQuery 插件...。
YaMaps for WordPress Plugin 》YaMaps外掛是在你的網站上插入Yandex地圖的最簡單方式。該外掛具有用戶友好的界面。您可以在Yandex地圖上視覺化地放置標記,用鼠標移動它們,更改圖標等等。,...。
Maps Plugin using Google Maps for WordPress – WP Google Map 》WordPress 的谷歌地圖外掛, , WordPress 的谷歌地圖使用手冊, 如何在 WordPress 網站中使用谷歌地圖, , WP Google Map 是一個很棒的外掛,可以在你的網站新增...。
Flexible Map 》Flexible Map 允許您通過簡單的短代碼將 Google 地圖添加到 WordPress 網站中。, 功能, , 三種加載地圖的方式:, , 通過中心座標, 通過街道地址, 通過指向 Go...。
10Web Map Builder for Google Maps 》10Web Google Maps 建立者, 示範, 使用者指南, 10Web Google Maps 建立者為你提供了質量和簡單性的結合,輕鬆地為你的網站添加無限的地圖。它是一個開箱即用...。
Mihdan: Elementor Yandex Maps 》這款 Elementor Yandex Maps 外掛可以協助您建立符合 SEO 標準的地圖。這款外掛支援不同的地圖類型(路線圖/衛星圖/混合圖/地形圖)和自訂地圖樣式,輕鬆地在...。
Map Multi Marker 》這個外掛是最簡單、有用和強大的 Google 地圖外掛!可輕鬆建立無數數量的 Google 地圖和標記點。有很多選項可供選擇,讓您完全自由地自訂地圖和標記點。, , ...。
HTML5 Maps 》在您的 WordPress 網站上放置一個互動性高的 HTML5 地圖吧!選擇預定義的地圖,包括世界、美國、英國、法國、德國、意大利等多個國家和地區。持續添加新版圖...。
WP GPX Maps 》這個外掛的輸入是包含使用者運動軌跡的 GPX 檔案,輸出則顯示軌跡地圖和互動式高度圖表((若有))。, 完全可配置:, , 自訂顏色, 自訂圖示, 多種語言支援, ...。
Very Simple Google Maps 》大多數網站都必須添加嵌入式Google地圖。我已經創建了一個簡單的方法,只需使用簡單的短代碼即可添加您的地圖。儘管名稱上有些功能,但這款外掛具有簡單而強...。
Simple Shortcode for Google Maps 》簡單易用卻功能強大的 Google 地圖外掛程式!評價中說這是「最佳 Google 地圖短代外掛程式」。, 這款外掛程式可讓您透過簡易的短代,在 WordPress 文章和頁面...。
Oi Yandex.Maps for WordPress 》注意!, 當您升級外掛到版本3.1.6時,它將被停用並顯示“找不到檔案”的錯誤 - 別擔心,只需重新啟用該外掛程式,...。