Home  >  Article  >  Backend Development  >  Discuz5.5.0 code highlighting + running code box synthesis plug-in Download page 1/4_PHP tutorial

Discuz5.5.0 code highlighting + running code box synthesis plug-in Download page 1/4_PHP tutorial

WBOY
WBOYOriginal
2016-07-21 15:54:27922browse

Main functions:
1. Supports highlighting of almost all program codes, including the following languages: Actionscript, ADA, Apache Log, AppleScript, ASM, ASP, AutoIT, Backus-Naur form, Bash, BlitzBasic, C, C for Macs, C#, C++, CAD DCL, CadLisp, CFDG, CFDG, ColdFusion, CSS, Delphi, DIV, DOS, Eiffel, Fortran, Fortran, FreeBasic, GML, Groovy, HTML, Inno, IO, Java, Java 5, Javascript, LaTeX, Lisp, Lua, Microprocessor ASM, mIRC, MySQL, NSIS, Objective C, OCaml, OpenOffice BASIC, Oracle 8 SQL, Pascal, Perl, PHP, PL/SQL, Python, Q(uick)BASIC, robots.txt, Ruby , SAS, Scheme, SDLBasic, Smalltalk, Smarty, SQL, T-SQL, TCL, thinBasic, Uno IDL, VB.NET, Visual BASIC, Visual Fox Pro, Winbatch, X++, XML, Z80 ASM, etc.
2. Code running box, including three functions: copy code, run code, and save code.

Usage:
1. If you want to highlight a language code, you can use the following format:
[languge=html]Here is the HTML code[/language]
[languge =xml]XML code here[/language]
[languge=css]CSS code here[/language]
[languge=javascript]Javascript code here[/language]
[languge=asp ]ASP code here[/language]
[languge=php]PHP code here[/language]
[languge=java]Java code here[/language]
[languge=cpp]here This is C++ code[/language]
[languge=csharp]This is C# code[/language]
[languge=mysql]This is Mysql code[/language]
2. If you just want a piece of code If it works, you can use the default

copy code . The code is as follows:
format.

Installation method:
1. Download and decompress the compressed package. If you are using the default template and have not modified the following files before:
/viewthread.php
/include/ discuzcode.func.php
/include/global.func.php
/include/javascript/common.js
Then, you can directly upload the decompressed file to the root directory of the website, Other templates can be modified by referring to the modification methods below.
2. If you have modified some or all of the files before, you can follow the instructions below to modify the files you have modified before. If you have not modified the files, just upload them directly and overwrite them:
(1) /viewthread.php
Found:
[code]
$post['message'] = discuzcode($post['message'], $post['smileyoff'], $post['bbcodeoff' ], $post['htmlon'], $forum['allowsmilies'], $forum['allowbbcode'], ($forum['allowimgcode'] && $showimages ? 1 : 0), $forum['allowhtml'] , ($forum['jammer'] && $post['authorid'] != $discuz_uid ? 1 : 0), $pasetype, $post['authorid']);

changed to
Copy code The code is as follows:

$post['message'] = discuzcode($post['message'], $post['smileyoff'], $post['bbcodeoff'], $post['htmlon'], $forum['allowsmilies'], $forum['allowbbcode'], ($forum['allowimgcode'] && $ showimages ? 1 : 0), $forum['allowhtml'], ($forum['jammer'] && $post['authorid'] != $discuz_uid ? 1 : 0), $pasetype, $post['authorid' ],$thread['subject']); //-----zouql code starts running------ ?)textareas*/ies", "cmsmb_no_br('$1')", $post['message']); ------

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/318480.htmlTechArticleMain functions: 1. Supports highlighting of almost all program codes, including the following languages: Actionscript, ADA, ApacheLog , AppleScript, ASM, ASP, AutoIT, Backus-Naurform, Bash, B...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn