## MOD Title: PHP Syntax Highlighter BBCode ## MOD Author: Fubonis < php_fubonis@yahoo.com > (JW Frazier) http://www.fubonis.com ## MOD Description: Highlights PHP specific code when used. ## MOD Version: 3.0.3 ## ## Installation Level: Easy ## Installation Time: 10 Minutes ## templates/subSilver/bbcode.tpl ## templates/subSilver/posting_body.tpl ## Included Files: N/A ############################################################## ## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the ## latest version of this MOD. Downloading this MOD from other sites could cause malicious code ## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered ## in our MOD-Database, located at: http://www.phpbb.com/mods/ ############################################################## ## Author Notes: ## You MUST install the following MOD for my MOD work: ## http://www.phpbb.com/phpBB/viewtopic.php?t=74705 ## It was made for phpBB 2.0.4, but it works with phpBB 2.0.5/6 great! ## Also, code from this MOD was incorporated into my MOD, so that extra ## BBCode buttons could be used in Private Messages. See the ## privmsg.php editing section for the code. ## Large pieces of code used within this BBCode can slow down the page viewing. ## This MOD will ONLY work for PHP 4. ## I tested this MOD with EasyMOD 0.0.9c and it installed perfectly. ############################################################## ## MOD History: ## ## 2003-08-06 - Version 3.0.3 ## - I started developing this first version of this mod way back in the ## day. Since then, the way highlight_string() has been updated. If ## you have PHP 4.2.0 or greater, you might have a speed improvement, ## because as of PHP 4.2.0, highlight_string() has a second boolean ## arguement that will return the highlighted string, rather than ## output it directly. It is faster, because before we would have to ## use output buffering to catch the string, which is slow. ## ############################################################## ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD ############################################################## # #-----[ OPEN ]------------------------------------------ # templates/subSilver/bbcode.tpl # #-----[ FIND ]------------------------------------------ # # #-----[ AFTER, ADD ]------------------------------------------ #
{L_PHP}:
# #-----[ OPEN ]------------------------------------------ # templates/subSilver/posting_body.tpl # #-----[ FIND ]------------------------------------------ # f_help = "{L_BBCODE_F_HELP}"; # #-----[ AFTER, ADD ]------------------------------------------ # x_help = "{L_BBCODE_X_HELP}"; # #-----[ FIND ]------------------------------------------ # bbtags = new Array( # #-----[ IN-LINE FIND ]--------------------------------- # '[url]','[/url]' # #-----[ IN-LINE AFTER, ADD ]--------------------------------- # ,'[php]','[/php]' # #-----[ OPEN ]------------------------------------------ # language/lang_english/lang_main.php # #-----[ FIND ]------------------------------------------ # $lang['Code'] = 'Code'; // comes before bbcode code output. # #-----[ AFTER, ADD]------------------------------------------ # $lang['PHPCode'] = 'PHP'; // PHP MOD # #-----[ FIND ]------------------------------------------ # $lang['bbcode_f_help'] = 'Font size: [size=x-small]small text[/size]'; # #-----[ AFTER, ADD]------------------------------------------ # $lang['bbcode_x_help'] = 'PHP syntax highlighter. [php][/php] (alt+x)'; // PHP MOD # #-----[ OPEN ]------------------------------------------ # language/lang_english/lang_bbcode.php # #-----[ FIND ]------------------------------------------ # // // This ends the BBCode guide entries // # #-----[ BEFORE, ADD]------------------------------------------ # $faq[] = array('What\'s all this PHP nonsense!?', 'The PHP BBCode is similar to the Code BBCode, except that it should only be used for PHP code. Why? Because it highlights certain sections of the PHP code, making it easier to read.'); # #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ # # EoM