################################################################# ## Mod Title: Highlight text BBcode Mod ## Mod Version: 2.0.0 ## Author: David Smith davidls14@yahoo.com.au - http://www27.brinkster.com/bb2c ## Description: adds a highlight bbcode tag to your forum ## ## Installation Level: easy ## Installation Time: 1 minute ## Files To Edit: bbcode.tpl bbcode.php ## Included Files: n/a ################################################################# ## Security Disclaimer: This MOD Cannot Be Posted To Or Added At Any Non-Official phpBB Sites without the direct permission of the author ################################################################# ## ## Author Note: ## This mod is ©2002 David Smith, All Rights Reserved ## Be sure to edit all templates you have loaded ## ################################################################# ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD ################################################################# # #-----[ Open includes/bbcode.phpex ]------------------------------------------ # # #-----[ Find ]------------------------------------------ # $bbcode_tpl['email'] = str_replace('{EMAIL}', '\\1', $bbcode_tpl['email']); # #-----[ Add after ]------------------------------------------ # //Begin Highlight Mod Copyright David Smith 2002 $bbcode_tpl['highlight_open'] = str_replace('{HIGHLIGHTCOLOR}', '\\1', $bbcode_tpl['highlight_open']); # #-----[ Find ]------------------------------------------ # // [i] and [/i] for italicizing text. $text = str_replace("[i:$uid]", $bbcode_tpl['i_open'], $text); $text = str_replace("[/i:$uid]", $bbcode_tpl['i_close'], $text); # #-----[ Add after ]------------------------------------------ # // Highlight $text = preg_replace("/\[highlight=(\#[0-9A-F]{6}|[a-z]+):$uid\]/si", $bbcode_tpl['highlight_open'], $text); $text = str_replace("[/highlight:$uid]", $bbcode_tpl['highlight_close'], $text); # #-----[ Find ]------------------------------------------ # // [i] and [/i] for italicizing text. $text = preg_replace("#\[i\](.*?)\[/i\]#si", "[i:$uid]\\1[/i:$uid]", $text); # #-----[ Add after ]------------------------------------------ # // [highlight] and [/highlight] for setting text highlight $text = preg_replace("#\[highlight=(\#[0-9A-F]{6}|[a-z\-]+)\](.*?)\[/highlight\]#si", "[highlight=\\1:$uid]\\2[/highlight:$uid]", $text); # #-----[ Open templates/your template/bbcode.tpl ]------------------------------------------ # # #-----[ Find ]------------------------------------------ # {EMAIL} # #-----[ Add after ]------------------------------------------ # # #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ # # EoM