[WordPress] 外掛分享: ProgPress

首頁外掛目錄 › ProgPress
10+
安裝啟用
★★★★
4.5/5 分(2 則評價)
3424 天前
最後更新
問題解決
WordPress 2.2+ v1.2.2 上架:2008-02-09

內容簡介

ProgPress 提供一個簡單的 shortcode,以在您的 WordPress 網站上創建進度條。它們可以用於追踪任何您計算達成目標的事物,例如字數、募款等。您可以將它們放在個別文章和頁面中,或包含在文字小工具中。

要插入計量表,只需使用 [progpress] shortcode:

[progpress title="我的項目" goal="100000" current="1234"]

[progpress] shortcode 有以下選項:

必填:

- title:包含計量表標題的字符串。
- goal:一個數號,代表您的目標。
- current:一個數號,表示您的進度。

選填:

- previous:如果您想突顯最近的進度更新,可以在這裡輸入 current 的前一個值。它在默認樣式下不可見(但不會對任何事情造成傷害)。
- label:您要計算的內容,例如“單詞”。
- separator:顯示在 current 和 goal 之間的字符或字符串,默認為“/”。
- class:要應用於計量表容器的額外 CSS 類,如果您使用不同的樣式跟踪不同的項目,這很有用。
- prefix:要在每個數字前顯示的字符或字符串(例如“$”)。默認關閉。

ProgPress 設計成可通過 CSS 自定義。在截圖部分中提供了一些示例。

NaNoWriMo 支持

如果您參加 NaNoWriMo,ProgPress 可以自動追踪您的進度。只需啟用附加的 ProgPress-NaNoWriMo Support 插件(除了 ProgPress),並將 nanowrimo 屬性設置為您的 NaNoWriMo 用戶名(這是去年使用您的用戶 ID)。

[progpress title="我的 NaNoWriMo 進度" nanowrimo="jczorkmid" label="字詞"]

為了不過度加載他們的服務器,插件緩存您的字數信息,因此當您在 nanowrimo.org 更新字數時,它可能不會立即更新。

請注意,截至 2011 年 11 月 10 日,NaNoWriMo 字數 API 尚未正式發布。有時它會返回無效錯誤,說明您的用戶不存在或您今年沒有正在進行的小說。在我的測試中,這個問題會在一段時間後自動解決,一旦加載了一些數據,WordPress 就會將其緩存,而不是繼續顯示錯誤。

更多信息

- 查看我的其他 WordPress 插件。
- 查看這個出色的 ProgPress 設置和自定義指南,以獲得一些其他 CSS 示例。

致謝

特別感謝 Kris Johnson、K. L. Kerr、Chris Miller 和 Debbie Ridpath Ohi,他們貢獻了插件中使用的許多圖標和圖像。

外掛標籤

開發者團隊

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

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「ProgPress」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

ProgPress provides a simple
shortcode for creating
progress meters on your WordPress site. They can be used to track
just about anything where you count up towards a goal: word-count,
fundraising, etc. You can put them in individual posts and pages, or
include them in text widgets.
To insert a meter simply use the [progpress] shortcode:
[progpress title="My Project" goal="100000" current="1234"]

The [progpress] shortcode has the following options:

Required:

title: A string containing The title for your meter.
goal: A number. The one you are working towards.
current: A number showing how far along you are.

Optional:

previous: You can put your previous value of current here
if you want to highlight your most recent progress update. It’s
not visible using the default styling (but it doesn’t hurt
anything).
label: What it is that you’re counting, like "words" for
example.
separator: A character or string to display between
current and goal. Defaults to "/".
class: An extra CSS class to apply to the meter container.
Useful if you track different projects with different styles.
prefix: A character or string to display before each number
(like ‘$’). Off by default.

ProgPress was designed to be customizable via CSS. I’ve provided
some examples in the Screenshots section.
NaNoWriMo Support
If you are participating in NaNoWriMo, ProgPress can automatically
track your progress. Just enable the additional ProgPress –
NaNoWriMo Support plugin (in addition to ProgPress), and set the
nanowrimo attribute to your NaNoWriMo username (this is a change
from last year where your user id was used).
[progpress title="My NaNoWriMo Progress" nanowrimo="jczorkmid" label="words"]

So as to not overload their servers, the plugin caches your word count
info, so it may not update immediately when you update your word count
at nanowrimo.org.
Note that as of November 10, 2011 the NaNoWriMo Word Count API is
not yet officially released. At times it seems to return invalid
errors saying your user doesn’t exist, or you don’t have a novel in
progress this year. In my testing this clears itself up after a bit,
and once some data has been loaded WordPress will cache it rather than
continue to display errors if it keeps going up and down.
More Info

Check out my other WordPress
plugins.
Check out this excellent ProgPress Setup & Customization
Guide
for some additional CSS examples.

Thanks
Special thanks to Kris Johnson,
K. L. Kerr, Chris
Miller, Debbie Ohi,
and Scott Philips for their feedback and
support.

延伸相關外掛

文章
Filter
Mastodon