The Forum has been Updated
The code has been upgraded to the latest .NET core version. Please check instructions in the Community Announcements about migrating your account.
Starting with this topic (http://forum.snitz.com/forum/topic.asp?TOPIC_ID=65151 - thanks Loyola05) I have changed the code in inc_func_common.asp to this:
If you use Google Analytics, by doing that you will see how many times or which links clicked in your forum pages.
<
If you use Google Analytics, by doing that you will see how many times or which links clicked in your forum pages.
Code:
<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\" rel=\"nofollow\" onclick=\"javascript:urchinTracker ('/externalLink/$1');\" target=\"_blank\">$1<\/a>");
} else if (iType == 2) {
sOutput = sOutput.replace(/\b(https\:\/\/[\w+\.]+[\w+\.\:\/\@\_\?\=\&\-\'\#\%\~\;\,\$\!\+\*]+)/gi,
"<a href=\"$1\" rel=\"nofollow\" onclick=\"javascript:urchinTracker ('/externalLink/$1');\" target=\"_blank\">$1<\/a>");
} else if (iType == 3) {
sOutput = sOutput.replace(/\b(www\.[\w+\.\:\/\@\_\?\=\&\-\'\#\%\~\;\,\$\!\+\*]+)/gi,
"<a href=\"http://$1\" onclick=\"javascript:urchinTracker ('/externalLink/$1');\" rel=\"nofollow\" target=\"_blank\">$1<\/a>");
} else if (iType == 4) {
sOutput = sOutput.replace(/\b([\w+\-\'\#\%\.\_\,\$\!\+\*]+@[\w+\.?\-\'\#\%\~\_\.\;\,\$\!\+\*]+\.[\w+\.?\-\'\#\%\~\_\.\;\,\$\!\+\*]+)/gi,
"<a href=\"mailto\:$1\" onclick=\"javascript:urchinTracker ('/mailto/$1');\">$1<\/a>");
} else if (iType == 5) {
sOutput = sOutput.replace(/\b(ftp\:\/\/[\w+\.]+[\w+\.\:\/\@\_\?\=\&\-\'\#\%\~\;\,\$\!\+\*]+)/gi,
"<a href=\"$1\" rel=\"nofollow\" onclick=\"javascript:urchinTracker ('/externalLink/$1');\" target=\"_blank\">$1<\/a>");
} else if (iType == 6) {
sOutput = sOutput.replace(/\b(file\:\/\/\/[\w+\:\/\\]+[\w+\/\w+\.\:\/\\\@\_\?\=\&\-\'\#\%\~\;\,\$\!\+\*]+)/gi,
"<a href=\"$1\" rel=\"nofollow\" onclick=\"javascript:urchinTracker ('/externalLink/$1');\" target=\"_blank\">$1<\/a>");
}
return sOutput;
}
</script>
No replies