Right guys this is an area that i know absoulty nothing about.
$text = eregi_replace("\"http://www\.innovativedesigns\.org\.uk/id/go\.php\?threadID=([0-9]*)\" target=\"_blank\"", "\"asfunction:_root.getThreads,\\1\"", $text);
I am asuming that this searches $text for a match to http://www.innovativedesigns.org.uk/go.php?threadID=Whatever thread number and then replaces the url with asfunction:_root.getThreads, whatever thread number.
for some reason it does not do this. I dont know were to start looking for the problem so i thought i better leave this one to the experts.
The eregi_replace is part of a function see below.
function parseText($text) {
// Translate HTML '<' and '>' into '<' '>'
$text = str_replace("<", "<", $text);
$text = str_replace(">", ">", $text);
//$text = preg_replace("#\[url=([a-z]+?://){1}([a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]+)\](.*?)\[/url\]#si", "<font color=\"#cccccc\"><u><a href=\"\\1\\2\"target=\"_blank\">\\3</a></u></font>", $text);
// Parse: inline aim:goim links
$text = eregi_replace("(^|[^\">])(aim:goim\?([a-z0-9/?#&+._=-]*))([^\">]|$)", "\\1<font color=\"#ff6600\"><u><a href=\"\\2\" target=\"_blank\">\\2</a></u></font>\\4", $text);
// For bulleted lists
$text = str_replace("[ul]","<ul>",$text);
$text = str_replace("[/ul]","</ul>",$text);
$text = str_replace("[li]","<li>",$text);
// For colouring of text
$text = preg_replace("/\[color=(\#[0-9A-F]{6}|[a-z]+)\]/si","<font color=\"\\1\">",$text);
$text = str_replace("[/color]","</font>",$text);
//For underlining of text
$text = str_replace("[u]","<u>",$text);
$text = str_replace("[/u]","</u>",$text);
// For [url]xxxx://www.mydomain.com[/url] code
$text = preg_replace("#\[url\]([a-z0-9]+?://){1}([\w\-]+\.([\w\-]+\.)*[\w]+(:[0-9]+)?(/[^ \"\n\r\t<]*)?)\[/url\]#is","<a href=\"\\1\\2\" target=\"blank\">\\1\\2</a>",$text);
// For [url]www.mydomain.com[/url] code
$text = preg_replace("#\[url\]((www|ftp)\.([\w\-]+\.)*[\w]+(:[0-9]+)?(/[^ \"\n\r\t<]*?)?)\[/url\]#si","<a href=\"http://\\1\" target=\"blank\">\\1</a>",$text);
// For [url=xxxx://www.mydomain.com]My Domain[/url] code
$text = preg_replace("#\[url=([a-z0-9]+://)([\w\-]+\.([\w\-]+\.)*[\w]+(:[0-9]+)?(/[^ \"\n\r\t<]*?)?)\](.*?)\[/url\]#si","<a href=\"\\1\\2\" target=\"blank\">\\6</a>",$text);
// For [url=www.mydomain.com]My Domain[/url] code
$text = preg_replace("#\[url=(([\w\-]+\.)*?[\w]+(:[0-9]+)?(/[^ \"\n\r\t<]*)?)\](.*?)\[/url\]#si","<a href=\"http://\\1\" target=\"blank\">\\5</a>",$text);
// For [email]user@domain.com[/email] code
$text = preg_replace("#\[email\]([a-z0-9\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+)\[/email\]#si","<a href=\"mailto:\\1\">\\1</a>",$text);
// For [email=user@domain.com]My Email[/email] code
$text = preg_replace("#\[email=(([a-z0-9\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+))\](.*?)\[/email\]#si","<a href=\"mailto:\\1\">\\4</a>",$text);
// Parse DirectLink URLs
$text = eregi_replace("\"http://www\.innovativedesigns\.org\.uk/id/go\.php\?threadID=([0-9]*)\" target=\"_blank\"", "\"asfunction:_root.getThreads,\\1\"", $text);
return $text;
}
Idealy what i would like is the ergi_replace to search for:
http://www.innovativedesigns.org.uk/go.php?threadID=number&forumID=number
And then replace with
asfunction:_root.getThreads,number, number
Anyone
cheers
Paul