The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#4
|
|||
|
|||
![]()
OK, there may be some more elegant way someone knows to do it (in which case, please post it), but here's what I came up with:
Code:
$word = array( 'google', 'yahoo' ); $link = array( '<a href="http://google.com">google</a>', '<a href="http://yahoo.com">yahoo</a>' ); $parts = preg_split('#(<a|</a)#i', $this->post['message'], -1, PREG_SPLIT_DELIM_CAPTURE); $newmsg = ''; $inlink = false; foreach ($parts as $part) { if (strcasecmp($part, "<a") == 0) $inlink = true; else if (strcasecmp($part, "</a") == 0) $inlink = false; else if (!$inlink) $part = str_replace($word, $link, $part); $newmsg .= $part; } $this->post['message'] = $newmsg; |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|