Title: 勋章
Author: eroux
Published: <strong>2011 年 1 月 28 日</strong>
Last modified: 2024 年 5 月 3 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/badges.svg)

# 勋章

 作者：[eroux](https://profiles.wordpress.org/eroux/)

[下载](https://downloads.wordpress.org/plugin/badges.zip)

 * [详情](https://cn.wordpress.org/plugins/badges/#description)
 * [评价](https://cn.wordpress.org/plugins/badges/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/badges/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/badges/#developers)

 [支持](https://wordpress.org/support/plugin/badges/)

## 描述

Display “Badges” (which are really no more than HTML snippets) from a set of files
in a specified directory off the root of the blog. The directory will default to“./
badges” and the Zip file contains both that directory as well as a “Sample” badge.

Using the Widget you can choose whether to:

 1. enable “Display Badge in a Box” (enabled by default, uses internal CSS)
 2. enable “Display a Drop-Shadow” (probably best used with “Box Mode”)

as well as

 1. decide whether you would like to use a Title
 2. define the directory of the badges.

## 屏幕截图

 * [[
 * Configuring the widget to read badges from `damn-badges` and display them as “
   Badges”.
 * [[
 * The default configuration of the widget, displaying the default path (badges).
 * [[
 * 勋章 displayed Padded and Boxed, but with Drop-Shadows disabled.

## 安装

**Install**

 1. Unzip the `badges.zip` file.
 2. Upload `badges.php` to the `/wp-content/plugins/` directory.
 3. 通过WordPress的“插件”菜单激活插件。
 4. Use the “Badges” widget.

**Upgrade**

 1. Follow your normal installation process
 2. Open the Widget Control Panel for “Badges” and confirm settings.
 3. Sit back and enjoy…

**Use the WordPress Plug-in System**

 1. Select “Upgrade and Activate”
 2. Congratulate yourself on a sterling job.

## 常见问题

### Which naming convention is used for the badges

All badges needs to be named `XXname.inc`, where “XX” is a number (used to determine
ordering) and the “.inc” is required.

### What is the format of the “Badge” files?

You could view the included “demo” file: `00testbadge.inc`, but here’s another, 
slightly simpler, example:

    ```
    <!-- Support CC -->
    <div id="badge-supportcc-inner" onclick="location.href='http://creativecommons.org';" style="cursor: pointer;">
    <img width=88 height=31 alt="http://creativecommons.org" title="Support the Creative Commons!"
        src="http://creativecommons.org/images/support/2010/cc-support.png" />
    <br />
        Support the Creative Commons!
    </div>
    <!-- /Support CC -->
    ```

### How do I style the badges using CSS?

Quite simply by using the `div.badgegroup` class to style a set of badges. To style
them individually, use the `div.badge` class.

### How do I limit the styling to a set of badges?

Look for the relevant “Badge Group’s” ID and then use the `div#badge-ID > div.badge`
CSS selector.

### How do I style a single badge?

Easiest yet: every badge gets a unique ID generated by the plug-in based on the 
badge’s file-name and the directory. Simply use that (you’ll have to inspect the
source to see what the id is; by example the ID generated by my Site-Licence badge
is “badge-damn-licencing-licencing”).

## 评价

此插件暂无评价。

## 贡献者及开发者

「勋章」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ eroux ](https://profiles.wordpress.org/eroux/)

[帮助将「勋章」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/badges)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/badges/)，查看[SVN仓库](https://plugins.svn.wordpress.org/badges/)，
或通过[RSS](https://plugins.trac.wordpress.org/log/badges/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/badges/)。

## 更新日志

#### 2.3

 * Give groupings of badges a different class than badges

#### 2.2

 * Moved to a ‘<div>’ based layout instead of using Lists
 * Split Boxing and Padding into two separate options

#### 2.1

 * Fixed the HTML generated to be cleaner and identify the badge class better
 * Simplified the examples slightly

#### 2.0

 * Cosmetic changes
 * Added (better) examples to the documentation

#### 1.0

 * Initial Public Release

## 额外信息

 *  版本 **2.5**
 *  最后更新：**2 年前**
 *  活跃安装数量 **10+**
 *  WordPress 版本 ** 6.0 或更高版本 **
 *  已测试的最高版本为 **6.5.8**
 *  语言
 * [English (US)](https://wordpress.org/plugins/badges/)
 * 标签
 * [admin](https://cn.wordpress.org/plugins/tags/admin/)[administration](https://cn.wordpress.org/plugins/tags/administration/)
   [books](https://cn.wordpress.org/plugins/tags/books/)[read](https://cn.wordpress.org/plugins/tags/read/)
   [reading](https://cn.wordpress.org/plugins/tags/reading/)
 *  [高级视图](https://cn.wordpress.org/plugins/badges/advanced/)

## 评级

尚未提交反馈。

[Your review](https://wordpress.org/support/plugin/badges/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/badges/reviews/)

## 贡献者

 *   [ eroux ](https://profiles.wordpress.org/eroux/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/badges/)