itsRahul
04-05-2015, 02:40 PM
So I saw this code on another thread but it was for vb4. basically it allows you to change the color of the font of text within a post, automatically upon posting, and also during replies to the same post.
$pattern = htmlspecialchars('/(>.*)/');
$replacement = '<span style="color:#789922">$1</span>';
$this->post['message'] = preg_replace($pattern, $replacement, $this->post['message']);
I want to create the same thing, automatically changing the color of any line of text that begins with >, but when I added this plugin to postbit_display_complete, nothing changed. I've tinkered with it but no progress yet. I'm not too experienced with this, so can someone guide me in the right direction here?
$pattern = htmlspecialchars('/(>.*)/');
$replacement = '<span style="color:#789922">$1</span>';
$this->post['message'] = preg_replace($pattern, $replacement, $this->post['message']);
I want to create the same thing, automatically changing the color of any line of text that begins with >, but when I added this plugin to postbit_display_complete, nothing changed. I've tinkered with it but no progress yet. I'm not too experienced with this, so can someone guide me in the right direction here?