[ Index ] |
|
Code source de Serendipity 1.2 |
1 <?php # $Id: serendipity_plugin_creativecommons.php 692 2005-11-13 07:15:39Z elf2000 $ 2 3 // Probe for a language include with constants. Still include defines later on, if some constants were missing 4 $probelang = dirname(__FILE__) . '/' . $serendipity['charset'] . 'lang_' . $serendipity['lang'] . '.inc.php'; 5 if (file_exists($probelang)) { 6 include $probelang; 7 } 8 9 include dirname(__FILE__) . '/lang_en.inc.php'; 10 11 class serendipity_plugin_creativecommons extends serendipity_plugin { 12 var $title = PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME; 13 14 function introspect(&$propbag) 15 { 16 $this->title = $this->get_config('title', $this->title); 17 18 $propbag->add('name', PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME); 19 $propbag->add('description', PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC); 20 $propbag->add('stackable', true); 21 $propbag->add('author', 'Evan Nemerson'); 22 $propbag->add('version', '1.0'); 23 $propbag->add('requirements', array( 24 'serendipity' => '0.8', 25 'smarty' => '2.6.7', 26 'php' => '4.1.0' 27 )); 28 $propbag->add('configuration', array('title')); 29 $propbag->add('groups', array('FRONTEND_EXTERNAL_SERVICES')); 30 31 $this->dependencies = array('serendipity_event_creativecommons' => 'remove'); 32 } 33 34 function introspect_config_item($name, &$propbag) 35 { 36 switch($name) { 37 case 'title': 38 $propbag->add('type', 'string'); 39 $propbag->add('name', TITLE); 40 $propbag->add('description', TITLE); 41 $propbag->add('default', ''); 42 break; 43 } 44 return true; 45 } 46 47 function generate_content(&$title) { 48 global $serendipity; 49 50 $title = $this->get_config('title', $this->title); 51 52 $eventData = array('display_dat' => ''); 53 serendipity_plugin_api::hook_event('frontend_display:html_layout', $eventData); 54 echo $eventData['display_dat']; 55 } 56 } 57 58 /* vim: set sts=4 ts=4 expandtab : */ 59 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sat Nov 24 09:00:37 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |