Page 1 of 1

parse bbcodes in edit post reason

Posted: Mon Feb 16, 2009 6:34 am
by TiTex
if it's allready made , i couldn't find it with search :|

Re: parse bbcodes in edit post reason

Posted: Tue Feb 17, 2009 2:58 pm
by stickerboy
I'm not sure about full BBCode support, but this allow URL's to be used.
I grabbed it from a topic in the MOD Requests forum, but I don't have a note of the topic.

Viewtopic.php
FInd:

Code: Select all

'EDIT_REASON'      => $row['post_edit_reason'],
Replace with:

Code: Select all

'EDIT_REASON'      => preg_replace('#\[url=(.*?)\](.*?)\[/url\]#', '<a href="\\1">\\2</a>', $row['post_edit_reason']),