| Search Keyword bra ?)(\[/code\])@si', '@(\[code:[0-9][^\]]*?\])(.*?)(\[/code:[0-9]\])@si', '@(\[quote[^\]]*?\])(.*?)(\[/quote\])@si', '@(\[b[^\]]*?\])(.*?)(\[/b\])@si', '@(\[u[^\]]*?\])(.*?)(\[/u\])@si', '@(\[i[^\]]*?\])(.*?)(\[/i\])@si', '@(\[size[^\]]*?\])(.*?)(\[/size\])@si', '@(\[color[^\]]*?\])(.*?)(\[/color\])@si', '@(\[ol[^\]]*?\])(.*?)(\[/ol\])@si', '@(\[ul[^\]]*?\])(.*?)(\[/ul\])@si', '@(\[li[^\]]*?\])(.*?)(\[/li\])@si' ); $replace = array( '${4}', // URL '[USER POSTED IMAGE]', //IMG '${2}', // CODE '${2}', // CODE '${2}', // QUOTE '${2}', // BOLD '${2}', // UNDERLINE '${2}', // ITALIC '${2}', // SIZE '${2}', // COLOR '', // ORDERED LIST '', // UNORDERED LIST '${2}' // LIST ITEM ); } $rows_count = count($rows); for($xi = 0; $xi <= $rows_count-1; $xi++){ $rows[$xi]->text = preg_replace($BBC, $replace, $rows[$xi]->text); $rows[$xi]->text = stripslashes($rows[$xi]->text); } // Finally, send the results to Joomla! return $rows; } ?> |