[ Index ] |
|
Code source de b2evolution 2.1.0-beta |
1 <?php 2 /** 3 * This file is part of the AstonishMe Code plugin. 4 * 5 * This file is part of the b2evolution project - {@link http://b2evolution.net/} 6 * 7 * @copyright (c)2003-2007 by Francois PLANQUE - {@link http://fplanque.net/} 8 * Parts of this file are copyright (c)2005-2007 by Yabba/Scott - {@link http://astonishme.co.uk/contact/}. 9 * 10 * {@internal License choice 11 * - If you have received this file as part of a package, please find the license.txt file in 12 * the same folder or the closest folder above for complete license terms. 13 * - If you have received this file individually (e-g: from http://cvs.sourceforge.net/viewcvs.py/evocms/) 14 * then you must choose one of the following licenses before using the file: 15 * - GNU General Public License 2 (GPL) - http://www.opensource.org/licenses/gpl-license.php 16 * - Mozilla Public License 1.1 (MPL) - http://www.opensource.org/licenses/mozilla1.1.php 17 * }} 18 * 19 * {@internal Open Source relicensing agreement: 20 * Yabba/Scott grant Francois PLANQUE the right to license 21 * Yabba's/Scott's contributions to this file and the b2evolution project 22 * under any OSI approved OSS license (http://www.opensource.org/licenses/). 23 * }} 24 * 25 * @package plugins 26 * 27 * @author Yabba: Paul Jones - {@link http://astonishme.co.uk/} 28 * @author Stk: Scott Kimler - {@link http://astonishme.co.uk/} 29 * 30 */ 31 if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' ); 32 33 /** 34 * @package plugins 35 */ 36 class am_code_highlighter 37 { 38 /** 39 * Text name of language for display 40 * 41 * This is unused whilst "Experimental" as it requires a modification of the plugin 42 * it would be used to replace the text output above the codeblock instead of ucfirst( language ) 43 * 44 */ 45 var $language_title = 'Code'; 46 47 48 /** 49 * Name of language that was desired by user 50 * This can be used to make geshi simpler to implement 51 * 52 */ 53 var $requested_language; 54 55 56 /** 57 * Boolean are we in strict mode ? 58 * 59 */ 60 var $strict_mode = false; 61 62 63 /** 64 * Called automatically on class innit 65 * 66 * @param object $parent 67 * @return object am_code_highlighter 68 */ 69 function am_code_highlighter( & $parent ) 70 { 71 $this->parent = & $parent; 72 return $this; 73 } 74 75 76 /** 77 * Highlights code ready for displaying 78 * 79 * @param string $block - the code 80 * @return string highlighted code 81 */ 82 83 function highlight_code( $block ) 84 { 85 return $this->parent->tidy_code_output( '<span class="amc_default">'.$block.'</span>' ); 86 } 87 88 } 89 /** 90 * $Log: code.highlighter.php,v $ 91 * Revision 1.7 2007/07/03 10:44:23 yabs 92 * minor change 93 * 94 * Revision 1.6 2007/06/26 02:40:54 fplanque 95 * security checks 96 * 97 * Revision 1.5 2007/06/20 21:33:23 blueyed 98 * fixed doc 99 * 100 * Revision 1.4 2007/06/20 19:16:36 blueyed 101 * Fixed doc 102 * 103 * Revision 1.3 2007/06/17 13:28:22 blueyed 104 * Fixed doc 105 * 106 * Revision 1.2 2007/05/04 20:43:08 fplanque 107 * MFB 108 * 109 * Revision 1.1.2.3 2007/04/23 11:59:58 yabs 110 * removed "extend Plugins" 111 * 112 * 113 */ 114 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Thu Nov 29 23:58:50 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |