Yes, I'm trying out the suggestion from ManOnDaMoon and as I'm terrible with Regex I can't get it to work
The parsed output of <a href="{xen:link mylink, $thread}"> would be something like <a href="index.php?mylink/thread-name.2">
The preg_replace needs to be something like:
The parsed output of <a href="{xen:link mylink, $thread}"> would be something like <a href="index.php?mylink/thread-name.2">
The preg_replace needs to be something like:
PHP:
$pattern = '/<li id="thread-' . $thread['thread_id'] . '" class=(.+)<div class="controls faint">(.+)<a href="/'
$replace = ????????;
$contents = preg_replace($pattern, $replace, $contents);