I'm using this plugin for one of my projects and my client asked me to add the ability to have the URL's that are put into messages be automatically linked inside the message box.
I have added the following code:
$pattern = “/\[link\=(.*)\](.*)\[\/link\]/i”;
$replace = “$2“;
echo preg_replace($pattern, $replace, $subject);
and it does work inside a comment to the message, but it does not work in the message box when you first create a message.
Anyone have any ideas. A file perhaps that I also need to add the above code, or an entirely different code snippet?
Any thoughts are greatly appreciated.
You don't need any regex, just use this single line:
[php]add_filter( ‘cpm_get_content', ‘make_clickable' );[/php]
Where do I add that code? Do I add that in the CPM.php file?
Nevermind. I added this code to CPM.php and everything is working. Thanks
Glad to know it solved. Cheers.
The topic ‘Clickable URL's in Messages’ is closed to new replies.