⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 serendipity_plugin_creativecommons.php

📁 中国源码站下载
💻 PHP
字号:
<?php # $Id: serendipity_plugin_creativecommons.php,v 1.4 2004/04/04 14:51:39 garvinhicking Exp $

/*******************************************************汉化作者:youngong(http://youngong.blogbus.com)       **官方主页:http://www.s9y.corg                        **我的信箱:youngong@163.com                           **如果有问题,欢迎和作者及汉化作者联系。                ********************************************************/

switch ($serendipity['lang']) {
    case 'de': {
        @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', 'Creative Commons');
        @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', 'Zeigt einen Creative Commons Hinweis an');
    }
    break;

    case 'cn': {
        @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', '创作共用');
        @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', '在工具条中显示创作共用声明');
    }
    break;
    case 'en':
    default:  {
        @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', 'Creative Commons');
        @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', 'Display a creative commons notification in the sidebar.');
    }
    break;
}

class serendipity_plugin_creativecommons extends serendipity_plugin {
    function introspect(&$propbag)
    {
        $propbag->add('name',        PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME);
        $propbag->add('description', PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC);
        $propbag->add('configuration', array('title'));

        $this->dependencies = array('serendipity_event_creativecommons' => 'remove');
    }

    function introspect_config_item($name, &$propbag)
    {
        switch($name) {
            case 'title':
                $propbag->add('type',          'string');
                $propbag->add('name',          TITLE);
                $propbag->add('description',   TITLE);
                break;
        }
        return true;
    }

    function generate_content(&$title) {
      global $serendipity;

      $title = $this->get_config('title');

      $eventData = array('display_dat' => '');
      serendipity_plugin_api::hook_event('frontend_display:html_layout', $eventData);
      echo $eventData['display_dat'];
    }
}

/* vim: set sts=4 ts=4 expandtab : */
?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -