This contribution is based on the svn Revision 275.
How to do :
+ in /themes/default/templates/pfcclient.js.tpl.php
after
- Code: Select all
/* try to parse http adresses */
rx = new RegExp('(http://[^ ]*)','ig');
msg = msg.replace(rx, '<a href="$1"<?php if($openlinknewwindow) echo ' target="_blank"'; ?>>$1</a>');
add
- Code: Select all
/* try to parse bbcode */
rx = new RegExp('\[b\](.+?)\[/b\]','ig');
msg = msg.replace(rx, '<strong>$1</strong>');
rx = new RegExp('\[i\](.+?)\[/i\]','ig');
msg = msg.replace(rx, '<em>$1</em>');
rx = new RegExp('\[u\](.+?)\[/u\]','ig');
msg = msg.replace(rx, '<span style="text-decoration: underline">$1</span>');
rx = new RegExp('\[s\](.+?)\[/s\]','ig');
msg = msg.replace(rx, '<del>$1</del>');
rx = new RegExp('\[email\]([^[]*?)\[/email\]','ig');
msg = msg.replace(rx, '<a href="mailto:$1">$1</a>');
rx = new RegExp('\[email=([^[]*?)\](.*?)\[/email\]','ig');
msg = msg.replace(rx, '<a href="mailto:$1">$2</a>');
rx = new RegExp('\[color=([a-zA-Z]*|\#?[0-9a-fA-F]{6})](.*?)\[/color\]','ig');
msg = msg.replace(rx, '<span style="color: $1">$2</span>');