parse bbcodes in edit post reason

Looking for a MOD? Have a MOD request? Post here for help. (Note: This forum is community supported; phpBB does not have official MOD authors)
Scam Warning
Locked
TiTex
Registered User
Posts: 79
Joined: Sun Jul 06, 2008 1:27 pm

parse bbcodes in edit post reason

Post by TiTex »

if it's allready made , i couldn't find it with search :|
User avatar
stickerboy
Former Team Member
Posts: 7349
Joined: Mon Mar 29, 2004 2:27 pm
Location: Airdrie, UK (127.0.0.1)
Name: Kenny Cameron
Contact:

Re: parse bbcodes in edit post reason

Post 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']),
I'm a web-designing code-decrypting tech-support musician
|| Twitter || Flickr || phpBB Snippets ||
Formerly known as cherokee red
Locked

Return to “[3.0.x] MOD Requests”