Update of /cvsroot/php-blog/serendipity/plugins/serendipity_plugin_creativecommons
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3330/plugins/serendipity_plugin_creativecommons
Added Files:
serendipity_plugin_creativecommons.php
Log Message:
Added CC plugin from Evan Nemerson. Thanks for contributing!
--- NEW FILE: serendipity_plugin_creativecommons.php ---
<?php # $Id: serendipity_plugin_creativecommons.php,v 1.1 2004/04/02 09:09:30 garvinhicking Exp $
switch ($serendipity['lang']) {
case 'en':
default:
@define('PLUGIN_CREATIVECOMMONS_NAME', 'Creative Commons');
@define('PLUGIN_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_CREATIVECOMMONS_NAME);
$propbag->add('description', PLUGIN_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 : */
?>
|