Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Mod: Google Analytics Track External Links
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

blackinwhite
Average Member

Turkey
657 Posts

Posted - 14 July 2007 :  07:47:18  Show Profile  Reply with Quote
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.

<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>
<

Edited by - blackinwhite on 14 July 2007 07:47:37
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.1 seconds. Powered By: Snitz Forums 2000 Version 3.4.07