guessme
Banned User
393 Posts |
Posted - 21 August 2003 : 19:34:17
|
I have been using this to kill all the links on my whole forum. Is there a way that i can pick which forums they are dead on.
inc_func_common.asp
add the /* and */ to kill the links:
<script language="javascript1.2" runat="server"> function edit_hrefs(sURL, iType) { sOutput = new String(sURL); /* if (iType == 1) { sOutput = sOutput.replace(/\b(http\:\/\/[\w+\.]+[\w+\.\:\/\@\_\?\=\&\-\'\#\%\~\;\,\$\!\+\*]+)/gi, "<a href=\"$1\" target=\"_blank\">$1<\/a>"); } else if (iType == 2) { sOutput = sOutput.replace(/\b(https\:\/\/[\w+\.]+[\w+\.\:\/\@\_\?\=\&\-\'\#\%\~\;\,\$\!\+\*]+)/gi, "<a href=\"$1\" target=\"_blank\">$1<\/a>"); } else if (iType == 3) { sOutput = sOutput.replace(/\b(www\.[\w+\.\:\/\@\_\?\=\&\-\'\#\%\~\;\,\$\!\+\*]+)/gi, "<a href=\"http://$1\" target=\"_blank\">$1<\/a>"); } else if (iType == 4) { sOutput = sOutput.replace(/\b([\w+\-\'\#\%\.\_\,\$\!\+\*]+@[\w+\.?\-\'\#\%\~\_\.\;\,\$\!\+\*]+\.[\w+\.?\-\'\#\%\~\_\.\;\,\$\!\+\*]+)/gi, "<a href=\"mailto\:$1\">$1<\/a>"); } else if (iType == 5) { sOutput = sOutput.replace(/\b(ftp\:\/\/[\w+\.]+[\w+\.\:\/\@\_\?\=\&\-\'\#\%\~\;\,\$\!\+\*]+)/gi, "<a href=\"$1\" target=\"_blank\">$1<\/a>"); } else if (iType == 6) { sOutput = sOutput.replace(/\b(file\:\/\/\/[\w+\:\/\\]+[\w+\/\w+\.\:\/\\\@\_\?\=\&\-\'\#\%\~\;\,\$\!\+\*]+)/gi, "<a href=\"$1\" target=\"_blank\">$1<\/a>"); } */ return sOutput; } </script> |
|
Edited by - guessme on 21 August 2003 19:34:56 |
|