############################################################## ## MOD Title: Single Quote Mod ## MOD Author: Biffs < admin@biffopolis.com > http://www.biffopolis.com ## MOD Description: This mod strips all but the most recent ## quote when you are quoting someone else ## (Recursive quotes) ## MOD Version: 0.8 ## MOD Compatibility: 2.0.14 ## ## Installation Level: Easy ## Installation Time: 2 min ## Files To Edit: 1 ## posting.php ## ## Included Files: 0 ## ## Author Notes: ## ## 1. Full MOD description ## ----------- ## This mod allows you to quote a post with an existing quote in it ## and it will strip out the first quote and only keep the most recent ## post. ## ## This code is fairly well commented. I am not a pro php scripter ## Feel free to reccomend anything at all. ## ## 2. DEMO ## ----------- ## You can demo this at: www.biffopolis.com/index.php ## Register for an account to post, and try it out ## ## 3. Official last version link ## ----------- ## I will answer any questions about this mod on my own website ## quicker than any of the PHPBB sites, so try it out there first. ## http://www.biffopolis.com/viewtopic.php?t=1235 ## ############################################################## ## MOD History: ## ## 2005-??-?? - Version 0.8 ## - Initial Release. Basic Functions ## ############################################################## ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD ############################################################## # # #-----[ OPEN ]------------------------------------------------ # posting.php # #-----[ FIND ]------------------------------------------------ # $message = '[quote="' . $quote_username . '"]' . $message . '[/quote]'; # #-----[ BEFORE, ADD ]------------------------------------------ # //----[START: Single Quote Mod by Jeremy Biffis]--------------------------------- //----[Add]---------------------------------------------------------------------- //This takes the text of the message to be quoted and searches to see if there is //a quote within it. IF there is, then it eliminates the stuff between the start //Quote and the end quote tags $message_copy = $message; $start_find = '[quote'; //The opening quote $end_find = '[/quote]'; //Closing Quote $start_pos = strpos($message_copy, $start_find); //Find the start point of the first Quote - usually 0, but some people reply, then quote $end_pos = strpos($message_copy, $end_find); //Start point of the end quote //This replaces the stuff between and including the two quotes tags if(!($start_pos===false) && !(end_pos===false)) { $message_copy = substr_replace($message, '', $start_find, ($end_pos+strlen($end_find) ) ); } //----[END: Single Quote Mod]----------------------------------------------------- # #-----[ SAVE/CLOSE ALL FILES ]-------------------------------- # # EoM