1<?php 2/** 3 * The syntax plugin to handle <recipe> tags 4 * 5 */ 6 7require_once(dirname(__FILE__).'/../conf.php'); 8require_once(dirname(__FILE__).'/../lib/code_block.php'); 9require_once DOKU_PLUGIN . 'syntax.php'; 10require_once DOKU_INC . 'inc/geshi.php'; 11 12class syntax_plugin_projects_content extends CodeBlock { 13 /** 14 * return some info 15 */ 16 function getInfo(){ 17 $info = parent::getInfo(); 18 $info['date'] = '2010-12-16'; 19 $info['name'] = 'Project-file content Plugin'; 20 $info['desc'] = 'display the content tag in a project file'; 21 return $info; 22 } 23 24 function tag_name() { return 'content'; } 25 26 function language() { 27 global $ID; 28 $parts = explode(".", $ID); 29 if (count($parts) <= 1) return NULL; 30 $extension = array_pop($parts); 31 $lang = GeSHi::get_language_name_from_extension($extension); 32 return $lang; 33 } 34 35 protected function add_content($file, $content) { 36 $file->add_content($content); 37 } 38} 39?>