[WordPress] 外掛分享: Ad Rotator

首頁外掛目錄 › Ad Rotator
200+
安裝啟用
★★★★★
5/5 分(1 則評價)
6077 天前
最後更新
問題解決
WordPress 2.8.0+ v2.0.3 上架:2009-07-28

內容簡介

Ad Rotator 是一個簡單的 WordPress 小工具,用於顯示從一組 HTML 區塊中隨機抽取出的 HTML 代碼,這些區塊使用 <!--more--> 分隔,在側邊欄上顯示。基本上,它每次在請求頁面時都會顯示不同的 HTML。可以無限制地存在許多個此小工具實例。

支援

如果您有任何建議、發現錯誤或只是想說“謝謝”,請隨時發送電子郵件給我:[email protected]。我會回答每一封收到的電子郵件。

如果您想貢獻您的程式碼,請參閱其他備註選項卡下的開發部分。

從 AdRotator 外掛遷移

AdRotator 外掛是一個簡單的基於文件的廣告輪播解決方案。它是由 Angsuman Chakraborty 開發的很長一段時間,但 WordPress 的觀點中偶爾會有相同的外掛名稱。如果您正在使用此外掛,您可以從插件頁面點擊升級鏈接,它將被 Ad Rotator 小工具替換。

所以現在您有兩種方法來解決問題 'getad()' function is undefined:

1. 您可以下載 AdRotator 並忽略升級通知,或

2. 您可以升級您的主題以使用 Ad Rotator Widget。

以下是升級主題的方法。查找所有出現 getad 函數的地方,並將它們替換為這樣的內容:

register_sidebar(array(
'name' => 'ad-area',
'id' => 'ad-area',
'before_widget' => '',
'after_widget' => '',
'before_title' => '',
'after_title' => ''
));

請確保您已將 ad-area 替換為適合您的名稱。此外,您可以指定其他選項,如 before_title 和 after_title。

接下來,在站點管理員中打開 Appearence/Widgets 頁面,並為您的廣告區域配置 Ad Rotator 小工具實例。只需要注意,在 AdRotator 中,廣告是使用換行符 (即每行表示單獨的廣告) 分隔的,但在 Ad Rotator Widget 中,您應該使用 <!--more--> 分隔您的塊(因此,每個塊可能包含多行)。)

無論如何,對於混淆,我不想欺騙您。

開發

此外掛的源代碼在 SVN 和 Git 中均可使用:

WordPress SVN 存儲庫
GitHub

隨意檢查它們,進行更改並向我發送補丁。

承諾,我將應用每個補丁(當然,如果它們為產品添加一個值)。 補丁、建議或錯誤報告的電子郵件:[email protected]

外掛標籤

開發者團隊

⬇ 下載最新版 (v2.0.3) 或搜尋安裝

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

原文外掛簡介

Ad Rotator is a simple WordPress widget to display random HTML code
from a given group of HTML-chunks separated with
on sidebar. Basically it shows different HTML every time you requesting
page. There are infinite number of instances of this widget may exist.
Support
If you have any suggestions, found a bug, or just wanted to say “thank
you”,– feel free to email me [email protected].
Promise, I will answer every email I received.
If you want to contribute your code, see the Development section under
the Other Notes tab.
Migrating from AdRotator plugin
AdRotator
plugin is a simple file-based ad rotation solution. It was developed by
Angsuman Chakraborty long time ago, but occasionally we have the same
plugin names from WordPress’ point of view. If you are using this plugin,
you may click upgrade link from your Plugins page and it being replaced
with Ad Rotator widget.
So now you have two ways to solve the problem 'getad()' function is undefined:
1. you can download AdRotator and ignore upgrade notices, or
2. you can upgrade your theme to use Ad Rotator Widget.
Here is how to upgrade your theme. Find all occurrences of getad function,
and replace them with something like this:
register_sidebar(array(
'name' => 'ad-area',
'id' => 'ad-area',
'before_widget' => '',
'after_widget' => '',
'before_title' => '',
'after_title' => ''
));

Make sure you’ve replaced ad-area with the name suitable for you. Also
you can specify additional options, like before_title and after_title.
Then open the Appearence/Widgets page in Site Admin and configure
Ad Rotator widget instances for your advertisements area. Just take into
account, that in files for AdRotator ads are separated with new line
character (ie each line means separate ad), but in Ad Rotator widget
you should separate you blocks with (so each of them
may contain more then one line.)
Anyways, sorry for сonfusion, I did not want to сheat on you.
Development
Sources of this plugin are available both in SVN and Git:

WordPress SVN repository
GitHub

Feel free to check them out, make your changes and send me patches.
Promise, I will apply every patch (of course, if they add a value to the
product). Email for patches, suggestions, or bug reports:
[email protected].

延伸相關外掛

文章
Filter
Apply Filters
Mastodon