[wordpress插件] Countdown Timer倒数计时器

wordpress 插件 文章 2020-04-03 11:50 607 0 全屏看文

AI助手支持GPT4.0

评分
94
描述

Countdown Timer allows you to setup one or more dates to count down to or away from.

倒数计时器可让您设置一个或多个日期来倒计时或倒计时。

Events can be inserted into the sidebar using the widget, or within posts and pages using shortcodes.

可以使用小部件将事件插入边栏中,或者使用短码将事件插入帖子和页面中。

Currently supports 22 languages.

当前支持22种语言。

Translations

翻译

Using another language

使用另一种语言

You’ll need to modify your wp-config.php file.

您需要修改wp-config.php文件。

To do this…

为此...

    1. Open your wp-config.php file in a text editor and search for: define ('WPLANG', '');
    2. 在文本编辑器中打开您的 wp-config.php 文件,然后搜索: define('WPLANG','');

    3. Edit this line according to the language you want to use (and is available).

    4. 根据您要使用的语言(可用)编辑此行。

      For example, for Deutsch spoken in Germany, you must add: ('WPLANG', 'de_DE');

    5. 例如,对于在德国所说的德语,您必须添加:('WPLANG','de_DE');

    6. Once you’ve added your language code, save the file.
    7. 添加语言代码后,保存文件。

    8. Upload the modified wp-config.php file into the WordPress root directory.
    9. 将修改后的wp-config.php文件上传到WordPress根目录。

    Of course, you’ll replace de_DE with the language extension that you want to use, unless of course you actually did want the German language translation.

    当然,您将de_DE替换为您要使用的语言扩展名,除非您确实确实需要德语翻译。

    For more information, consult Installing WordPress in Your Language on the WordPress Codex

    有关更多信息,请在WordPress法典上查阅以您的语言安装WordPress

    Languages Available

    可用语言

      • Bosnian translation: bs_BA
      • 波斯尼亚语翻译:bs_BA

      • Catalan (Spain) translation: ca_CA
      • 加泰罗尼亚语(西班牙)翻译:ca_CA

      • Czech translation: cs_CZ
      • 捷克语翻译:cs_CZ

      • Danish translation: da_DK
      • 丹麦语翻译:da_DK

      • German translation: de_DE
      • 德语翻译:de_DE

      • Spanish translation: es_ES
      • 西班牙语翻译:es_ES

      • French translation: fr_FR
      • 法语翻译:fr_FR

      • Hungarian translation: hu_HU
      • 匈牙利语翻译:hu_HU

      • Italian translation: it_IT
      • 意大利语翻译:it_IT

      • Lithuanian translation: lt_LT
      • 立陶宛语翻译:lt_LT

      • Latvian translation: lv_LV
      • 拉脱维亚语翻译:lv_LV

      • Dutch translation: nl_NL
      • 荷兰语翻译:nl_NL

      • Norwegian translation: nn_NO
      • 挪威语翻译:nn_NO

      • Polish translation: pl_PL
      • 波兰语翻译:pl_PL

      • Portuguese [Brazil] translation: pr_BR
      • 葡萄牙语[巴西]翻译:pr_BR

      • Romanian translation: ro_RO
      • 罗马尼亚语翻译:ro_RO

      • Russian translation: ru_RU
      • 俄语翻译:ru_RU

      • Serbian [Cyrilic] translation: sr_RS
      • 塞尔维亚语[cyrilic]翻译:sr_RS

      • Swedish translation: sv_SE
      • 瑞典语翻译:sv_SE

      • Turkish translation: tr_TR
      • 土耳其语翻译:tr_TR

      • Vietnamese translation: vi_VI
      • 越南语翻译:vi_VI

      • Chinese translation: zh_CN
      • 汉语翻译:zh_CN

安装步骤

    1. Install the plugin using your preferred method of choice.

      使用您喜欢的选择方法安装插件。

      Using the built-in WordPress installer is the preferred choice, but you can also do things the hard/manual way.

      首选使用内置的WordPress安装程序,但您也可以用手动方式进行操作。

    2. Activate the timer.

      激活计时器。

    3. Events can be added and other settings modified in Settings > Countdown Timer in The Dashboard.

      可以在控制台的“设置”>“倒数计时器”中添加事件并修改其他设置。

    Inserting countdown timers into your blog

    将倒数计时器插入博客中

    There are three places you can insert a countdown timer:

    您可以在三个位置插入倒数计时器:

      1. Sidebar (using the widget)
      2. 侧边栏(使用小部件)

      3. A post or page (using shortcodes)
      4. 帖子或信息页(使用简码)

      5. PHP (experts only)
      6. PHP(仅限专家)

      Adding to the sidebar

      添加到侧边栏

      Add the widget to the sidebar by going to Appearances > Widget in The Dashboard.

      通过转到“仪表板”中的“外观”>“小部件”,将小部件添加到边栏中。

      Adding to a post or page

      添加到帖子或页面

      If you want to insert the Countdown Timer into a page or post, you can use the following shortcodes to return all or a limited number of Countdown Timers, respectively:
          

      如果要在页面或帖子中插入倒数计时器,可以使用以下短代码分别返回全部或有限数量的倒数计时器:
          

      [fergcorp_cdt]
          

      [fergcorp_cdt]
          

      [fergcorp_cdt max=##]

      [fergcorp_cdt max = ##]

      Where ## is maximum number of results to be displayed, ordered by date.

      其中 ## 是要显示的最大结果数,按日期排序。

      If you want to insert individual countdown timers, such as in posts or on pages, you can use the following shortcode:

      如果要插入单独的倒数计时器,例如在帖子或页面中,可以使用以下短代码:

      [fergcorp_cdt_single date="ENTER_DATE_HERE"]

        [fergcorp_cdt_single date =“ ENTER_DATE_HERE”]

      Example:
          

      示例:
          

      Time until our wedding:
          

      直到我们结婚的时间:
          

      [fergcorp_cdt_single date=”08 December 2012″]

      [fergcorp_cdt_single date =” 2012年12月8日”]

      Where “ENTER_DATE_HERE” uses PHP’s strtotime function and will parse about any English textual date/time description (such as “08 December 2012”).

      其中“ ENTER_DATE_HERE”使用PHP的strtotime函数,并将解析任何英文文本日期/时间描述(例如“ 2012年12月8日”)。

      A complete list of valid formats can be found on PHP's Supported Date and Time Format

      有效格式的完整列表可在PHP的支持的日期和时间格式

      > page.

      >页面。

      PHP

      PHP

      Countdown Timer also provides a PHP function designed to be accessed publicly so you can include it in elements of your site that may not be in The Loop.

      倒数计时器还提供了一个旨在公开访问的PHP函数,因此您可以将其包含在站点中可能不在循环中的元素中。

      fergcorp_countdownTimer(##)

        fergcorp_countdownTimer(##)

      Where ## is the maximum number of events you wish to be displayed.

      其中 ## 是您希望显示的最大事件数。

      If $maxEvents is not given, the function will return all timers.

      如果未给出 $ maxEvents ,则该函数将返回所有计时器。

      Events are automatically sorted by date of occurrence.

      事件会根据发生日期自动排序。

      Note: You should also encapsulate calls with “function_exists” to prevent unintentional fatal errors if the plugin is deactivated.

      注意:如果停用了插件,您还应该使用“ function_exists”封装调用,以防止意外的致命错误。

      Limiting the number of countdown timers displayed

      限制显示的倒数计时器数量

      If you’re using the widget, there is an option to set the maximum number of timers shown.

      如果您使用的是小部件,则可以使用一个选项来设置显示的最大计时器数。

      If you are using the PHP code, $maxEvents is the maximum number of events you wish to be displayed.

      如果您使用的是PHP代码,则 $ maxEvents 是您希望显示的最大事件数。

      Events are automatically sorted by date of occurrence.

      事件会根据发生日期自动排序。

      Changing the font, size, and style using CSS

      使用CSS更改字体,大小和样式

      You can makes changes to the appearance of Countdown Timer display using CSS.

      您可以使用CSS更改倒数计时器的显示外观。

      The following CSS classes are available:

      以下CSS类可用:

        • fergcorp_countdownTimer_event_li styles each List Item, each item encompasses one countdown event
        • fergcorp_countdownTimer_event_li 为每个列表项设置样式,每个项包含一个倒计时事件

        • fergcorp_countdownTimer_event_title styles the title of the event
        • fergcorp_countdownTimer_event_title 设置事件标题的样式

        • fergcorp_countdownTimer_event_linkTitle styles the title of an event if it is linked
        • fergcorp_countdownTimer_event_linkTitle 设置事件标题(如果已链接)的样式

        • fergcorp_countdownTimer_event_time styles the actual countdown timer
        • fergcorp_countdownTimer_event_time 为实际倒数计时器设置样式

        • fergcorp_countdownTimer_timeUnit styles the units (e.g. “25 days”)
        • fergcorp_countdownTimer_timeUnit 为单位设置样式(例如“ 25天”)

        • fergcorp_countdownTimer_year styles the year text
        • fergcorp_countdownTimer_year 为年份文本设置样式

        • fergcorp_countdownTimer_month styles the month text
        • fergcorp_countdownTimer_month 为月份文本设置样式

        • fergcorp_countdownTimer_week styles the week text
        • fergcorp_countdownTimer_week 为周文本设置样式

        • fergcorp_countdownTimer_day styles the day text
        • fergcorp_countdownTimer_day 为日期文本设置样式

        • fergcorp_countdownTimer_hour styles the hour text
        • fergcorp_countdownTimer_hour 为小时文本设置样式

        • fergcorp_countdownTimer_minute styles the minute text
        • fergcorp_countdownTimer_minute 为分钟文本设置样式

        • fergcorp_countdownTimer_second styles the second text
        • fergcorp_countdownTimer_second 为第二个文本设置样式

下载地址
https://downloads.wordpress.org/plugin/countdown-timer.3.0.7.zip
-EOF-

AI助手支持GPT4.0