[WordPress] 外掛分享: Terms Before Download

首頁外掛目錄 › Terms Before Download
70+
安裝啟用
★★★★
4.7/5 分(3 則評價)
217 天前
最後更新
問題解決
WordPress 3.5+ v1.0.5 上架:2014-06-25

內容簡介

「下載前條款」 (Terms Before Download) 外掛程式新增了一個短代碼,可替代 HTML 錨點來連結可下載的檔案。如果點擊此類連結,將會顯示彈出式對話框,顯示必須接受的使用者許可協議條款 (EULA),才能開始下載。

使用者許可協議的條款取自 WordPress 的網頁,這樣一來就只需維護一個位置的條款,而且可以輕易地獨立於外掛程式之外顯示條款。

此外掛程式支援 Google Analytics,以便追蹤下載次數。支援的 GA scripts: ga.js、analytics.js。

此外掛程式的實際使用範例可在此處查看:https://helgeklein.com/download/

使用方法

在需要顯示條款的每個頁面或文章中,添加一次 tbd_terms 的短代碼 (!),並設定包含這些條款的網頁的 ID。範例如下:

[tbd_terms terms_page_id=5670]

當在管理介面編輯頁面時,網頁 ID 為 URL 的一部分。例如:https://domain.com/wp-admin/post.php?post=5670&action=edit

建立可下載檔案的連結方式如下:

[tbd_link url=\”URL\”]連結文字[/tbd_link]

參數

可用於短代碼 tbd_terms 的以下參數:

terms_page_id:在對話框中顯示條款的網頁 ID [必填]
dialog_title:要顯示的對話框標題 [選填]
class:包含對話框內容的 div 的 CSS 類別 [選填]
padding:對話框與內部內容的間距 [選填]
width:對話框的寬度 [選填]
ok_button_text:「確定」按鈕的文字 [選填]

可用於短代碼 tbd_link 的以下參數:

url:要連結的 URL [必填]
text:連結文字 [如果未使用於文字中,則必填]
gacategory:Google Analytics 類別 [選填]
gaaction:Google Analytics 操作 [選填]
galabel:Google Analytics 標籤 [選填]

外掛標籤

開發者團隊

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

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

原文外掛簡介

Terms Before Download adds a shortcode that can be used instead of HTML anchors to link to downloadable files. If such a link is clicked a popup dialog shows terms and conditions (EULA) which must be accepted for the download to start.
The terms and conditions are read from a WordPress page. That way there is only a single place to maintain the terms and they can easily be displayed independently of the plugin.
The plugin supports Google Analytics to keep track of the number of downloads. Supported GA scripts: ga.js, analytics.js.
An example of the plugin in action can be found here: https://helgeklein.com/download/
Usage
Add the shortcode tbd_terms once (!) to each page or post where terms need to be displayed and configure the ID of the page that contains the terms. Example:
[tbd_terms terms_page_id=5670]
The page ID is part of the URL when editing a page in the admin UI. Example: https://domain.com/wp-admin/post.php?post=5670&action=edit
Create a link to a downloadable file like this:
[tbd_link url=\”URL\”]link text[/tbd_link]
Parameters
The following parameters can be used with the shortcode tbd_terms:

terms_page_id: ID of the terms page displayed in the dialog [required]
dialog_title: The title of the dialog to be displayed [optional]
class: CSS class of the div enclosing the dialog content [optional]
padding: Padding between the dialog frame and the inner content [optional]
width: Width of the dialog [optional]
ok_button_text: Text for the OK button [optional]

The following parameters can be used with the shortcode tbd_link:

url: The URL to link to [required]
text: Link text [required if text is not enclosed]
gacategory: Google Analytics Category [optional]
gaaction: Google Analytics Action [optional]
galabel: Google Analytics Label [optional]

延伸相關外掛

文章
Filter
Mastodon