[wordpress插件] Cricket Moods板球心情

wordpress 插件 文章 2020-04-05 00:00 0 211 全屏看文
评分
0
描述

Cricket Moods is a flexible “mood tag” WordPress plugin.

C情绪是一个灵活的“情绪标签” WordPress插件。

It allows an author to

它允许作者

add one or more “moods” to every post.

在每个帖子中添加一个或多个“心情”。

Each mood can be associated with an

每种心情都可以与
相关

image file.

图像文件。

The result would be that the author could have an animated happy

结果将是作者可以有一个快乐的动画

smiley face next to the words I’m Happy! for every post she wishes.

她希望发表的每条帖子,我很高兴!字样旁边的笑脸。

Cricket Moods presents you with a list of available moods when you go to create

C情绪会在您创建时为您提供可用心情列表

or edit a post.

或编辑帖子。

There is no need for you to remember your list of moods.

您无需记住自己的情绪清单。

Using

使用

an option panel in WordPress’ administrative menus, you can rename your moods or

WordPress管理菜单中的选项面板,您可以重命名心情或

even change a mood’s graphic without modifying every post that uses that mood.

甚至可以更改心情的图形,而无需修改所有使用该心情的帖子。

Despite this plugin’s name and my continual references to “moods”, this plugin

尽管此插件的名称以及我对“心情”的不断引用,但该插件

can be used for more than just moods.

不仅可以用于心情。

For example, instead of displaying your

例如,不显示您的

current mood, you could give your readers the current weather where you are.

当前的心情,您可以为读者提供您当前所在的天气。

You could rename the mood tags to things like “Sunny”, “Overcast”, and “Raining

您可以将心情标签重命名为“晴天”,“阴暗”和“下雨

Cats and Dogs.”

猫和狗。”

You could then upload little cloud and sun images and use those

然后,您可以上传少量的云和太阳图像并使用这些图像

with the tags instead of the pre-defined mood smilies.

标签,而不是预先定义的表情符号。

You could even leave the

您甚至可以离开

tag text or the tag images blank to have either just text or just images.

将文本标记为标签或将图像标记为空白,以仅包含文本或仅包含图像。

Please note that Cricket Moods will only be receiving critical bug fixes from

请注意,板球心情将仅收到来自
的严重错误修复

this point forth (if we’re lucky).

指出这一点(如果幸运的话)。

I am working on a complete rewrite of the

我正在完全重写

plugin called PostBits.

名为PostBits的插件。

The code for it isn’t complete and needs a lot of

它的代码不完整,需要很多

work.

工作。

If you’d like to help, let me know.

如果您想提供帮助,请告诉我。

Check it out at:

在以下位置查看:

http://code.google.com/p/postbits/

http://code.google.com/p/postbits/

Usage

用法

By default, Cricket Moods will automatically print each post’s moods just above

默认情况下,板球情绪会自动在上方显示每个帖子的心情

each post’s content.

每个帖子的内容。

You may also have it automatically print the mood just

您也可以让它自动打印心情

below the post content by changing the appropriate option in the Cricket Moods

通过更改“板球心情”中的相应选项,在帖子内容下方添加

options panel.

选项面板。

Using the “Moods” panel under “Manage” in the WordPress administrative area, you

使用WordPress管理区域中“管理”下的“心情”面板,您

can add, modify, and delete moods as you see fit.

可以根据自己的喜好添加,修改和删除情绪。

Leaving the “Mood Name” blank

将“心情名称”留空

will cause Cricket Moods not to display any text with that mood’s image for a

会导致板球心情不显示带有该心情图像的任何文字,

purely pictorial representation of your mood.

纯粹代表您的心情。

Conversely, you can leave the

相反,您可以离开

“Image File” blank and no smilie or other image will be shown with that mood.

“图像文件”为空白,不会以这种心情显示笑脸或其他图像。

Deleting a mood will also remove any references to that mood from your blog

删除心情也会从您的博客中删除对该心情的任何引用

posts.

帖子。

`cm_the_moods()`

`cm_the_moods()`

If you want your moods to be displayed somewhere other than directly above or

如果您希望将情绪显示在上方或
以外的其他地方,

below the content, you must place cm_the_moods() somewhere inside The Loop and

在内容下方,您必须将 cm_the_moods()放置在The Loop内的某处,并且

disable AutoPrint in the Cricket Moods options.

在“板球情绪”选项中禁用“自动打印”。

When called with no parameters,
    

不带参数调用时,
    

cm_the_moods() only prints the mood image followed by the mood name, an

cm_the_moods()仅打印心情图像,后跟心情名称,

ampersand, and any more moods followed by ampersands.

连字号,之后会出现连号。

For example, on a post

例如,在帖子

with the moods “Happy” and “Bored” it will print:

情绪为“快乐”和“无聊”时,它将打印:

  Happy emoticon Happy      

  “快乐表情”快乐      

&

&

Bored emoticon      

“无聊的表情”      

Bored

无聊

If there are no moods for the current post, it will print nothing.

如果当前帖子没有心情,它将不会打印任何内容。

cm_the_moods() can take three parameters:    

  cm_the_moods()可以采用三个参数:    

<?php cm_the_moods('separator','before','after');

?>

?>

    • separator (string) Text to place in between multiple moods.

    • 分隔符(字符串)放置在多种心情之间的文本。

      Default is ' &

      默认值为'&amp;

      '.

    • '

    • before (string) Text to place before the first mood.

    • before (字符串)放置在第一种心情之前的文本。

      Default is nothing.

    • 默认为空。

    • after (string) Text to place after the last mood.

    • 之后(字符串)上一种心情之后要放置的文本。

      Default is nothing.

    • 默认为空。

    A good way to implement this would be:

    实现此目标的好方法是:

        My mood is: ', '.

    ');

      <?php cm_the_moods('和','

    我的心情是:','。');

    ?>

    ?>

    `cm_has_moods()`

    `cm_has_moods()`

    You can also use cm_has_moods() to determine if the current post or a specific

    您还可以使用 cm_has_moods()确定是当前帖子还是特定帖子

    post has moods associated with it.

    帖子有与之相关的心情。

    It will return true or false accordingly.

    它将相应地返回true或false。

    cm_has_moods() can take one parameter:    

      cm_has_moods()可以采用一个参数:    

    <?php cm_has_moods(post_id);

    ?>

    ?>

      • post_id (integer) The ID of the post you are inquiring about.

        post_id (整数)您要查询的帖子的ID。

        Default is the ID of the current post.

        默认值为当前帖子的ID。

        cm_has_moods() must be used inside The Loop if post_id is not provided.

        如果未提供 post_id ,则必须在The Loop中使用

        cm_has_moods()。

        Known Issues

        已知问题

      • Things get a little fuzzy when you change the author of an existing post with

      • 使用
        更改现有帖子的作者时,事情会变得有些模糊

        mood tags.

        心情标签。

        If the two authors do not have the exact same mood list, the

        如果两位作者的心情清单不完全相同,则

        associated moods may seem to unexpectedly change or not show at all.

        相关的情绪似乎会意外地改变或根本不显示。

        It is


        recommended that you disassociate all the moods from a post before changing the

        建议您在更改
        之前取消发布后的所有心情

        post’s author.

      • 帖子的作者。

      • Editing the post of another user will cause that user’s moods to be

      • 编辑其他用户的帖子将导致 用户的心情

        displayed, not yours.

        显示,而不是您的。

        This is an unavoidable feature.

      • 这是不可避免的功能。

      Copying

      复制

      Cricket Moods: A flexible mood tag plugin for the WordPress publishing platform.

      C情绪:适用于WordPress发布平台的灵活的心情标签插件。

      Copyright (c) 2008 Keith Constable

      版权所有(c)2008 Keith Constable

      This program is free software;

      该程序是免费软件;

      you can redistribute it and/or modify

      您可以重新分发和/或修改

      it under the terms of the GNU General Public License as published by

      根据
      发布的GNU通用公共许可的条款进行

      the Free Software Foundation;

      自由软件基金会;

      either version 2 of the License, or

      许可的版本2或

      (at your option) any later version.

      (您可以选择)任何更高版本。

      This program is distributed in the hope that it will be useful,

      分发该程序是希望它会有用,

      but WITHOUT ANY WARRANTY;

      但没有任何保证;

      without even the implied warranty of

      甚至没有
      的暗示保证

      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

      特定目的的适销性或适用性。

      See the

      参见

      GNU General Public License for more details.

      GNU通用公共许可证以获取更多详细信息。

      You should have received a copy of the GNU General Public License along

      您应该已经随同收到了GNU通用公共许可证的副本

      with this program;

      这个程序;

      if not, write to the Free Software Foundation, Inc.,

      如果不是,请写信给自由软件基金会有限公司。

      51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

      美国,马萨诸塞州波士顿,富兰克林街51号五楼,邮编02110-1301。

安装步骤

    1. Place cricket-moods.php into /wp-content/plugins.
    2. cricket-moods.php 放入 / wp-content / plugins

    3. Activate the Cricket Moods plugin from the “Plugin Management” panel of


    4. 的“插件管理”面板中激活Cricket Moods插件

      WordPress.

    5. WordPress。

    Upgrading

    升级

    This version of Cricket Moods does not support upgrading from Cricket Moods 1.x.

    此版本的Cricket Moods不支持从Cricket Moods 1.x升级。

    Upgrades from Cricket Moods 2.x are automagic.

    从板球心情2.x升级是自动的。

下载地址
https://downloads.wordpress.org/plugin/cricket-moods.3.7.2.zip
-EOF-