[wordpress插件] Ad Rotator广告轮播

wordpress 插件 文章 2020-01-28 23:20 509 0 全屏看文

AI助手支持GPT4.0

评分

100

100

描述

Ad Rotator is a simple WordPress widget to display random HTML code

Ad Rotator是一个简单的WordPress小部件,用于显示随机HTML代码

from a given group of HTML-chunks separated with

从以 <!-more->
分隔的一组给定HTML块中

on sidebar.

在侧边栏上。

Basically it shows different HTML every time you requesting

基本上,每次您请求时,它都会显示不同的HTML

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 kpumuk@kpumuk.info.

您”,请随时给我发送电子邮件 kpumuk@kpumuk.info

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插件迁移

AdRotator

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

Angsuman Chakraborty很久以前,但偶尔我们有相同的

plugin names from WordPress’ point of view.

从WordPress的角度来看插件名称。

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:

因此,您现在有两种方法来解决问题'getad()'函数未定义

1. you can download AdRotator and ignore upgrade notices, or

1.您可以下载AdRotator并忽略升级通知,或者

2. you can upgrade your theme to use Ad Rotator Widget.

2.您可以升级主题以使用Ad Rotator Widget。

Here is how to upgrade your theme.

这里是如何升级主题的方法。

Find all occurrences of getad function,

查找所有出现的 getad 函数,

and replace them with something like this:

并替换成这样:

register_sidebar(array(  

  register_sidebar(array(  

'name' => 'ad-area',  

'名称'=>'广告区域',  

'id' => 'ad-area',  

'id'=>'广告区域',  

'before_widget' => '',  

'before_widget'=>'',  

'after_widget' => '',  

'after_widget'=>'',  

'before_title' => '',  

'before_title'=>'',  

'after_title' => ''

'after_title'=>''

));

));

Make sure you’ve replaced ad-area with the name suitable for you.

确保已使用适合您的名称替换了 ad-area

Also


you can specify additional options, like before_title and after_title.

您可以指定其他选项,例如 before_title after_title

Then open the Appearence/Widgets page in Site Admin and configure

然后在 Site Admin 中打开外观/小部件页面并配置

Ad Rotator widget instances for your advertisements area.

广告区域的“广告轮播”窗口小部件实例。

Just take into

只要考虑

account, that in files for AdRotator ads are separated with new line

帐户,用于AdRotator广告的文件中用新行分隔

character (ie each line means separate ad), but in Ad Rotator widget

字符(即每行表示单独的广告),但在“广告旋转器”小部件中

you should separate you blocks with (so each of them

您应该使用 <!-more-> 分隔块(因此每个块

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:

此插件的来源在SVN和Git中均可用:

    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:

    通过电子邮件发送补丁,建议或错误报告:

    kpumuk@kpumuk.info.

    kpumuk@kpumuk.info

安装步骤

    1. Download and unpack plugin files to the wp-content/plugins/ad-rotator

    2. 将插件文件下载并解压缩到 wp-content / plugins / ad-rotator

      directory.

    3. 目录。

    4. Enable Ad Rotator plugin on your Plugins page in



      插件页面上

    5. 启用 Ad Rotator 插件

      Site Admin.

    6. 网站管理员

    7. Go to the Appearence/Widgets page in Site Admin and drag as

    8. 转到 Site Admin 中的外观/小部件页面,然后将其拖动为

      many Ad Rotator widgets to your sidebars as you wish.

      您可以根据需要将许多Ad Rotator小部件添加到侧边栏。

      Configure

      配置

      instances separating HTML blocks with .

      <!-more-> 分隔HTML块的实例。

      Save changes.

    9. 保存更改。

    10. Now on Ad Rotator blocks should appear on your sidebars.
    11. 现在,广告旋转器上的广告块应该会出现在侧边栏上。

下载地址

https://downloads.wordpress.org/plugin/ad-rotator.2.0.3.zip

https://downloads.wordpress.org/plugin/ad-rotator.2.0.3.zip

-EOF-

AI助手支持GPT4.0