Permalink
Browse files

upd languages for Geshi

  • Loading branch information...
1 parent 8de43f6 commit 0545ee569c3512c87bbc8cf461da33810b249f8b @Gemorroj Gemorroj committed with Sep 15, 2011
Showing with 203 additions and 80 deletions.
  1. +4 −2 Xbb/Tags/Code.php
  2. +199 −78 config/tags.php
View
@@ -30,8 +30,10 @@ class Xbb_Tags_Code extends bbcode {
public $behaviour = 'pre';
/* Альтернативные названия языков и их трансляция в обозначения GeSHi */
public $lang_synonym = array(
+ 'algol' => 'algol86',
'c++' => 'cpp',
'c#' => 'csharp',
+ 'f++' => 'fsharp',
'html' => 'html4strict',
'html4' => 'html4strict',
'js' => 'javascript',
@@ -104,14 +106,14 @@ function get_html($tree = null) {
$result = '<span class="bb_code_lang">'
. $this->_geshi->get_language_name() . '</span>';
if (isset($this->attrib['title'])) {
- $result = htmlspecialchars($this->attrib['title']);
+ $result = htmlspecialchars($this->attrib['title'], ENT_NOQUOTES);
}
// Получаем подсвеченный код
$result = '<div class="bb_code"><div class="bb_code_header">' .$result
. '</div>' . $this->_geshi->parse_code();
// Формируем подпись под кодом
if (isset($this->attrib['footer'])) {
- $content = htmlspecialchars($this->attrib['footer']);
+ $content = htmlspecialchars($this->attrib['footer'], ENT_NOQUOTES);
$content = '<div class="bb_code_footer">' . $content . '</div>';
$result .= $content;
}
View
@@ -85,84 +85,205 @@
'var' => 'Xbb_Tags_Simple' ,
// Теги для вывода кода и подсветки синтаксисов (с помощью GeSHi)
- 'actionscript' => 'Xbb_Tags_Code' ,
- 'ada' => 'Xbb_Tags_Code' ,
- 'apache' => 'Xbb_Tags_Code' ,
- 'applescript' => 'Xbb_Tags_Code' ,
- 'asm' => 'Xbb_Tags_Code' ,
- 'asp' => 'Xbb_Tags_Code' ,
- 'autoit' => 'Xbb_Tags_Code' ,
- 'bash' => 'Xbb_Tags_Code' ,
- 'blitzbasic' => 'Xbb_Tags_Code' ,
- 'bnf' => 'Xbb_Tags_Code' ,
- 'c' => 'Xbb_Tags_Code' ,
- 'c++' => 'Xbb_Tags_Code' ,
- 'c#' => 'Xbb_Tags_Code' ,
- 'c_mac' => 'Xbb_Tags_Code' ,
- 'caddcl' => 'Xbb_Tags_Code' ,
- 'cadlisp' => 'Xbb_Tags_Code' ,
- 'cfdg' => 'Xbb_Tags_Code' ,
- 'cfm' => 'Xbb_Tags_Code' ,
- 'code' => 'Xbb_Tags_Code' ,
- 'cpp-qt' => 'Xbb_Tags_Code' ,
- 'css' => 'Xbb_Tags_Code' ,
- 'd' => 'Xbb_Tags_Code' ,
- 'delphi' => 'Xbb_Tags_Code' ,
- 'diff' => 'Xbb_Tags_Code' ,
- 'div' => 'Xbb_Tags_Code' ,
- 'dos' => 'Xbb_Tags_Code' ,
- 'eiffel' => 'Xbb_Tags_Code' ,
- 'fortran' => 'Xbb_Tags_Code' ,
- 'freebasic' => 'Xbb_Tags_Code' ,
- 'gml' => 'Xbb_Tags_Code' ,
- 'groovy' => 'Xbb_Tags_Code' ,
- 'html4' => 'Xbb_Tags_Code' ,
- 'idl' => 'Xbb_Tags_Code' ,
- 'ini' => 'Xbb_Tags_Code' ,
- 'inno' => 'Xbb_Tags_Code' ,
- 'io' => 'Xbb_Tags_Code' ,
- 'java' => 'Xbb_Tags_Code' ,
- 'java5' => 'Xbb_Tags_Code' ,
- 'js' => 'Xbb_Tags_Code' ,
- 'latex' => 'Xbb_Tags_Code' ,
- 'lisp' => 'Xbb_Tags_Code' ,
- 'lua' => 'Xbb_Tags_Code' ,
- 'matlab' => 'Xbb_Tags_Code' ,
- 'mirc' => 'Xbb_Tags_Code' ,
- 'mpasm' => 'Xbb_Tags_Code' ,
- 'mysql' => 'Xbb_Tags_Code' ,
- 'nsis' => 'Xbb_Tags_Code' ,
- 'objc' => 'Xbb_Tags_Code' ,
- 'ocaml' => 'Xbb_Tags_Code' ,
- 'oobas' => 'Xbb_Tags_Code' ,
- 'oracle' => 'Xbb_Tags_Code' ,
- 'pascal' => 'Xbb_Tags_Code' ,
- 'perl' => 'Xbb_Tags_Code' ,
- 'php' => 'Xbb_Tags_Code' ,
- 'plsql' => 'Xbb_Tags_Code' ,
- 'pre' => 'Xbb_Tags_Code' ,
- 'python' => 'Xbb_Tags_Code' ,
- 'qbasic' => 'Xbb_Tags_Code' ,
- 'reg' => 'Xbb_Tags_Code' ,
- 'robots' => 'Xbb_Tags_Code' ,
- 'ruby' => 'Xbb_Tags_Code' ,
- 'sas' => 'Xbb_Tags_Code' ,
- 'scheme' => 'Xbb_Tags_Code' ,
- 'sdlbasic' => 'Xbb_Tags_Code' ,
- 'smalltalk' => 'Xbb_Tags_Code' ,
- 'smarty' => 'Xbb_Tags_Code' ,
- 'sql' => 'Xbb_Tags_Code' ,
- 't-sql' => 'Xbb_Tags_Code' ,
- 'tcl' => 'Xbb_Tags_Code' ,
- 'text' => 'Xbb_Tags_Code' ,
- 'thinbasic' => 'Xbb_Tags_Code' ,
- 'vb' => 'Xbb_Tags_Code' ,
- 'vb.net' => 'Xbb_Tags_Code' ,
- 'vhdl' => 'Xbb_Tags_Code' ,
- 'visualfoxpro' => 'Xbb_Tags_Code' ,
- 'winbatch' => 'Xbb_Tags_Code' ,
- 'xml' => 'Xbb_Tags_Code' ,
- 'z80' => 'Xbb_Tags_Code' ,
+ '4cs' => 'Xbb_Tags_Code' ,
+ '6502acme' => 'Xbb_Tags_Code' ,
+ '6502kickass' => 'Xbb_Tags_Code' ,
+ '6502tasm' => 'Xbb_Tags_Code' ,
+ '68000devpac' => 'Xbb_Tags_Code' ,
+ 'abap' => 'Xbb_Tags_Code' ,
+ 'actionscript' => 'Xbb_Tags_Code' ,
+ 'actionscript3' => 'Xbb_Tags_Code' ,
+ 'ada' => 'Xbb_Tags_Code' ,
+ 'algol' => 'Xbb_Tags_Code' ,
+ 'apache' => 'Xbb_Tags_Code' ,
+ 'applescript' => 'Xbb_Tags_Code' ,
+ 'apt_sources' => 'Xbb_Tags_Code' ,
+ 'asm' => 'Xbb_Tags_Code' ,
+ 'asp' => 'Xbb_Tags_Code' ,
+ 'autoconf' => 'Xbb_Tags_Code' ,
+ 'autohotkey' => 'Xbb_Tags_Code' ,
+ 'autoit' => 'Xbb_Tags_Code' ,
+ 'avisynth' => 'Xbb_Tags_Code' ,
+ 'awk' => 'Xbb_Tags_Code' ,
+ 'bascomavr' => 'Xbb_Tags_Code' ,
+ 'bash' => 'Xbb_Tags_Code' ,
+ 'basic4gl' => 'Xbb_Tags_Code' ,
+ 'bf' => 'Xbb_Tags_Code' ,
+ 'bibtex' => 'Xbb_Tags_Code' ,
+ 'blitzbasic' => 'Xbb_Tags_Code' ,
+ 'bnf' => 'Xbb_Tags_Code' ,
+ 'boo' => 'Xbb_Tags_Code' ,
+ 'c' => 'Xbb_Tags_Code' ,
+ 'c++' => 'Xbb_Tags_Code' ,
+ 'c#' => 'Xbb_Tags_Code' ,
+ 'c_loadrunner' => 'Xbb_Tags_Code' ,
+ 'c_mac' => 'Xbb_Tags_Code' ,
+ 'caddcl' => 'Xbb_Tags_Code' ,
+ 'cadlisp' => 'Xbb_Tags_Code' ,
+ 'cfdg' => 'Xbb_Tags_Code' ,
+ 'cfm' => 'Xbb_Tags_Code' ,
+ 'chaiscript' => 'Xbb_Tags_Code' ,
+ 'cil' => 'Xbb_Tags_Code' ,
+ 'clojure' => 'Xbb_Tags_Code' ,
+ 'cmake' => 'Xbb_Tags_Code' ,
+ 'cobol' => 'Xbb_Tags_Code' ,
+ 'code' => 'Xbb_Tags_Code' ,
+ 'coffeescript' => 'Xbb_Tags_Code' ,
+ 'cpp-qt' => 'Xbb_Tags_Code' ,
+ 'css' => 'Xbb_Tags_Code' ,
+ 'cuesheet' => 'Xbb_Tags_Code' ,
+ 'd' => 'Xbb_Tags_Code' ,
+ 'dcs' => 'Xbb_Tags_Code' ,
+ 'delphi' => 'Xbb_Tags_Code' ,
+ 'diff' => 'Xbb_Tags_Code' ,
+ 'div' => 'Xbb_Tags_Code' ,
+ 'dos' => 'Xbb_Tags_Code' ,
+ 'e' => 'Xbb_Tags_Code' ,
+ 'ecmascript' => 'Xbb_Tags_Code' ,
+ 'eiffel' => 'Xbb_Tags_Code' ,
+ 'email' => 'Xbb_Tags_Code' ,
+ 'epc' => 'Xbb_Tags_Code' ,
+ 'erlang' => 'Xbb_Tags_Code' ,
+ 'euphoria' => 'Xbb_Tags_Code' ,
+ 'f++' => 'Xbb_Tags_Code',
+ 'f1' => 'Xbb_Tags_Code' ,
+ 'falcon' => 'Xbb_Tags_Code' ,
+ 'fo' => 'Xbb_Tags_Code' ,
+ 'fortran' => 'Xbb_Tags_Code' ,
+ 'freebasic' => 'Xbb_Tags_Code' ,
+ 'gambas' => 'Xbb_Tags_Code' ,
+ 'gdb' => 'Xbb_Tags_Code' ,
+ 'genero' => 'Xbb_Tags_Code' ,
+ 'genie' => 'Xbb_Tags_Code' ,
+ 'gettext' => 'Xbb_Tags_Code' ,
+ 'glsl' => 'Xbb_Tags_Code' ,
+ 'gml' => 'Xbb_Tags_Code' ,
+ 'gnuplot' => 'Xbb_Tags_Code' ,
+ 'go' => 'Xbb_Tags_Code' ,
+ 'groovy' => 'Xbb_Tags_Code' ,
+ 'gwbasic' => 'Xbb_Tags_Code' ,
+ 'haskell' => 'Xbb_Tags_Code' ,
+ 'hicest' => 'Xbb_Tags_Code' ,
+ 'hq9plus' => 'Xbb_Tags_Code' ,
+ 'html4' => 'Xbb_Tags_Code' ,
+ 'html5' => 'Xbb_Tags_Code' ,
+ 'icon' => 'Xbb_Tags_Code' ,
+ 'idl' => 'Xbb_Tags_Code' ,
+ 'ini' => 'Xbb_Tags_Code' ,
+ 'inno' => 'Xbb_Tags_Code' ,
+ 'intercal' => 'Xbb_Tags_Code' ,
+ 'io' => 'Xbb_Tags_Code' ,
+ 'j' => 'Xbb_Tags_Code' ,
+ 'java' => 'Xbb_Tags_Code' ,
+ 'java5' => 'Xbb_Tags_Code' ,
+ 'jquery' => 'Xbb_Tags_Code' ,
+ 'js' => 'Xbb_Tags_Code' ,
+ 'kixtart' => 'Xbb_Tags_Code' ,
+ 'klonec' => 'Xbb_Tags_Code' ,
+ 'klonecpp' => 'Xbb_Tags_Code' ,
+ 'latex' => 'Xbb_Tags_Code' ,
+ 'lb' => 'Xbb_Tags_Code' ,
+ 'lisp' => 'Xbb_Tags_Code' ,
+ 'llvm' => 'Xbb_Tags_Code' ,
+ 'locobasic' => 'Xbb_Tags_Code' ,
+ 'logtalk' => 'Xbb_Tags_Code' ,
+ 'lolcode' => 'Xbb_Tags_Code' ,
+ 'lotusformulas' => 'Xbb_Tags_Code' ,
+ 'lotusscript' => 'Xbb_Tags_Code' ,
+ 'lscript' => 'Xbb_Tags_Code' ,
+ 'lsl2' => 'Xbb_Tags_Code' ,
+ 'lua' => 'Xbb_Tags_Code' ,
+ 'm68k' => 'Xbb_Tags_Code' ,
+ 'magiksf' => 'Xbb_Tags_Code' ,
+ 'make' => 'Xbb_Tags_Code' ,
+ 'mapbasic' => 'Xbb_Tags_Code' ,
+ 'matlab' => 'Xbb_Tags_Code' ,
+ 'mirc' => 'Xbb_Tags_Code' ,
+ 'mmix' => 'Xbb_Tags_Code' ,
+ 'modula2' => 'Xbb_Tags_Code' ,
+ 'modula3' => 'Xbb_Tags_Code' ,
+ 'mpasm' => 'Xbb_Tags_Code' ,
+ 'mxml' => 'Xbb_Tags_Code' ,
+ 'mysql' => 'Xbb_Tags_Code' ,
+ 'newlisp' => 'Xbb_Tags_Code' ,
+ 'nsis' => 'Xbb_Tags_Code' ,
+ 'oberon2' => 'Xbb_Tags_Code' ,
+ 'objc' => 'Xbb_Tags_Code' ,
+ 'objeck' => 'Xbb_Tags_Code' ,
+ 'ocaml' => 'Xbb_Tags_Code' ,
+ 'oobas' => 'Xbb_Tags_Code' ,
+ 'oracle' => 'Xbb_Tags_Code' ,
+ 'oracle11' => 'Xbb_Tags_Code' ,
+ 'oxygene' => 'Xbb_Tags_Code' ,
+ 'oz' => 'Xbb_Tags_Code' ,
+ 'pascal' => 'Xbb_Tags_Code' ,
+ 'pcre' => 'Xbb_Tags_Code' ,
+ 'per' => 'Xbb_Tags_Code' ,
+ 'perl' => 'Xbb_Tags_Code' ,
+ 'perl6' => 'Xbb_Tags_Code' ,
+ 'pf' => 'Xbb_Tags_Code' ,
+ 'php' => 'Xbb_Tags_Code' ,
+ 'pic16' => 'Xbb_Tags_Code' ,
+ 'pike' => 'Xbb_Tags_Code' ,
+ 'pixelbender' => 'Xbb_Tags_Code' ,
+ 'pli' => 'Xbb_Tags_Code' ,
+ 'plsql' => 'Xbb_Tags_Code' ,
+ 'postgresql' => 'Xbb_Tags_Code' ,
+ 'povray' => 'Xbb_Tags_Code' ,
+ 'powershell' => 'Xbb_Tags_Code' ,
+ 'pre' => 'Xbb_Tags_Code' ,
+ 'proftpd' => 'Xbb_Tags_Code' ,
+ 'progress' => 'Xbb_Tags_Code' ,
+ 'prolog' => 'Xbb_Tags_Code' ,
+ 'properties' => 'Xbb_Tags_Code' ,
+ 'providex' => 'Xbb_Tags_Code' ,
+ 'purebasic' => 'Xbb_Tags_Code' ,
+ 'pycon' => 'Xbb_Tags_Code' ,
+ 'python' => 'Xbb_Tags_Code' ,
+ 'q' => 'Xbb_Tags_Code' ,
+ 'qbasic' => 'Xbb_Tags_Code' ,
+ 'rails' => 'Xbb_Tags_Code' ,
+ 'rebol' => 'Xbb_Tags_Code' ,
+ 'reg' => 'Xbb_Tags_Code' ,
+ 'robots' => 'Xbb_Tags_Code' ,
+ 'rpmspec' => 'Xbb_Tags_Code' ,
+ 'rsplus' => 'Xbb_Tags_Code' ,
+ 'ruby' => 'Xbb_Tags_Code' ,
+ 'sas' => 'Xbb_Tags_Code' ,
+ 'scala' => 'Xbb_Tags_Code' ,
+ 'scheme' => 'Xbb_Tags_Code' ,
+ 'scilab' => 'Xbb_Tags_Code' ,
+ 'sdlbasic' => 'Xbb_Tags_Code' ,
+ 'smalltalk' => 'Xbb_Tags_Code' ,
+ 'smarty' => 'Xbb_Tags_Code' ,
+ 'sql' => 'Xbb_Tags_Code' ,
+ 'systemverilog' => 'Xbb_Tags_Code' ,
+ 't-sql' => 'Xbb_Tags_Code' ,
+ 'tcl' => 'Xbb_Tags_Code' ,
+ 'teraterm' => 'Xbb_Tags_Code' ,
+ 'text' => 'Xbb_Tags_Code' ,
+ 'thinbasic' => 'Xbb_Tags_Code' ,
+ 'typoscript' => 'Xbb_Tags_Code' ,
+ 'unicon' => 'Xbb_Tags_Code' ,
+ 'uscript' => 'Xbb_Tags_Code' ,
+ 'vala' => 'Xbb_Tags_Code' ,
+ 'vb' => 'Xbb_Tags_Code' ,
+ 'vb.net' => 'Xbb_Tags_Code' ,
+ 'verilog' => 'Xbb_Tags_Code' ,
+ 'vhdl' => 'Xbb_Tags_Code' ,
+ 'vim' => 'Xbb_Tags_Code' ,
+ 'visualfoxpro' => 'Xbb_Tags_Code' ,
+ 'visualprolog' => 'Xbb_Tags_Code' ,
+ 'whitespace' => 'Xbb_Tags_Code' ,
+ 'whois' => 'Xbb_Tags_Code' ,
+ 'winbatch' => 'Xbb_Tags_Code' ,
+ 'xbasic' => 'Xbb_Tags_Code' ,
+ 'xml' => 'Xbb_Tags_Code' ,
+ 'xorg_conf' => 'Xbb_Tags_Code' ,
+ 'xpp' => 'Xbb_Tags_Code' ,
+ 'yaml' => 'Xbb_Tags_Code' ,
+ 'z80' => 'Xbb_Tags_Code' ,
+ 'zxbasic' => 'Xbb_Tags_Code' ,
);
/*

0 comments on commit 0545ee5

Please sign in to comment.