內容簡介
這是一個 WordPress 外掛,使用Last.fm API,提供一個短碼可顯示您的 Last.fm 音樂收聽數據的圖表。此外掛使用Easy Chart Builder plugin,由dyerware所製作,來建立圖表,因此您需要先安裝並啟用該外掛。
下載外掛的最新版本或檢視原始碼。
使用方法
在文章或頁面中使用 [wp_lastfm_charts_top_artists] 或 [wp_lastfm_charts_top_tracks]短碼。指定user_name參數,您的 Last.fm 用戶名稱。使用period參數指定時間範圍例如12month,使用chart_type指定圖表類型例如horizbar或pie。
以下是一些範例:
[wp_lastfm_charts_top_artists user_name="cheshire137" period="12month" chart_type="horizbar"]
[wp_lastfm_charts_top_artists user_name="cheshire137" period="12month" chart_type="pie"]
[wp_lastfm_charts_top_tracks user_name="cheshire137" period="12month" chart_type="horizbar"]
[wp_lastfm_charts_top_tracks user_name="cheshire137" period="12month" chart_type="pie"]
其他參數包括chart_color、chart_fade_color、width、height、
colors、limit、title、data_table_css和image_alt。
chart_color 和 `chart_fade_color` 是圖表背景色的十六進位顏色代碼,不需使用 # 符號。預設為 FFFFFF(白色)。
limit 是圖表顯示的藝術家或曲目數量,預設為 12。
colors 應為十六進位顏色代碼的逗號分隔清單,不需使用 # 符號。
period 應為 overall、7day、1month、3month、6month 或
12month之一。
外掛標籤
開發者團隊
原文外掛簡介
Using the Last.fm API, this is a WordPress plugin
that provides a shortcode that will display charts
of your Last.fm music-listening data. This plugin uses the Easy Chart Builder plugin by dyerware to create charts, so
you will need to install and activate that plugin first.
Download the latest version of the plugin or view the source code.
Usage
In a post or page, use the [wp_lastfm_charts_top_artists] or [wp_lastfm_charts_top_tracks] shortcode. Specify the user_name parameter, using your Last.fm user name. Specify a time range with the period parameter, e.g., 12month. Specify a chart type with chart_type, e.g., horizbar or pie.
Some examples:
[wp_lastfm_charts_top_artists user_name="cheshire137" period="12month" chart_type="horizbar"]
[wp_lastfm_charts_top_artists user_name="cheshire137" period="12month" chart_type="pie"]
[wp_lastfm_charts_top_tracks user_name="cheshire137" period="12month" chart_type="horizbar"]
[wp_lastfm_charts_top_tracks user_name="cheshire137" period="12month" chart_type="pie"]
Other parameters include chart_color, chart_fade_color, width, height,
colors, limit, title, data_table_css, and image_alt.
chart_color and `chart_fade_color` refer to the background color of the chart
and should be hex color codes without the #. They default to FFFFFF (white).
limit refers to the number of artists or tracks to display in the chart. It
defaults to 12.
colors should be a comma-separated list of hex color codes without the #.
period should be one of `overall`, `7day`, `1month`, `3month`, `6month`, or
12month.
