[WordPress] 外掛分享: Gweather

首頁外掛目錄 › Gweather
10+
安裝啟用
尚無評分
5889 天前
最後更新
問題解決
WordPress 2.5+ v1.10 上架:2009-11-03

內容簡介

透過 gweather 外掛,你可以在 WordPress 文章和頁面使用下列短代碼顯示並嵌入 Google 天氣的資訊:

[gweather city="城市" country="國家的縮寫" temp="攝氏或華氏" credit="1"]

篩選器使用方法

簡單模式:

只需要在文章內插入 [gweather city="城市" country="國家的縮寫" temp="攝氏或華氏" credit="1"],就能顯示當地的天氣狀況。

命名參數:

如果需要客制化,你可以使用以下選項:

city : 導入您需要查詢天氣狀況的城市名稱。
country : 填入您國家的縮寫 (例如:美國用 US ,南非用ZA,荷蘭用 NL)。
temp: 攝氏填 C 或華氏填 F。
credit: 填 1 會顯示出引用連結,填 0 就不會顯示引用連結(我相信您會想標示出出處)。

舉例:

[gweather city="比勒陀利亞" country="ZA" temp="C" credit=0](顯示比勒陀利亞的攝氏氣溫狀況並且不顯示引用連結)

[gweather city="倫敦" country="英國" temp="F" credit="1"](顯示倫敦的華氏溫度並且顯示引用連結)

請注意代碼必需在一行上,若有換行就會造成外掛無法運行。

表格的框架沒有樣式,但是表格為 gweather 類別類型,因此你可以在你的樣式表中加入一個該類別的樣式,設計你的天氣狀況輸出的外觀。

1.00 初始版本。
1.10 修正 Bug ,將有空格的城市名稱正常渲染。

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.10) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Gweather」→ 直接安裝(推薦)

原文外掛簡介

With the gweather plugin you can display and embed Google Weather Feeds in your WordPress posts and pages using the following shortcode:
[gweather city="City" country="Country Shortcode" temp="C" credit="1"]

FILTER USAGE

Simple:

Just put a [gweather city="city" country="country shortcode" temp="C" credit="1"] in your post, and the weather will show up.

NAMED PARAMETERS

For some customisation there are some options you can use.

city : Which city would you like the weather for
country : Your Country Shortcode (e.g. US for the United States, ZA for South Africa, NL for the Netherlands)
temp: C for celcius or F for Fahrenheit
credit: 1 if you want to show a credit link, 0 if you don’t want to show a credit link (I hope you would like to show it)

Examples:
[gweather city="Pretoria" country="ZA" temp="C" credit=0] (weather in pretoria in Celcius with no credit link)

[gweather city="London" country="UK" temp="F" credit="1"] (weather in london in Fahrenheit with credit link)

Finally note the whole thing must be on ONE line. No line breaks or else it won’t work.
There is no styling in the table, but the table is generated with a class of gweather. So you can style the look of the output by adding a class for that in your stylesheet
1.00 Initial release.
1.10 Bug Fix Cities with spaces where not renedered properly

延伸相關外掛

文章
Filter
Apply Filters
Mastodon