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)
 No Follow links in user posts
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Loyola05
Starting Member

24 Posts

Posted - 10 July 2007 :  21:09:27  Show Profile  Visit Loyola05's Homepage  Reply with Quote
I haven't seen this MOD posted, but I thought it could be valuable. As users often post links to their own websites, this prevents your forum from sharing your page rank with moochers.

In the file inc_func_common.asp, there is a JavaScript function at the very end of the file (this is the last 27 or so lines).

Replace the exisiting code with the following:


<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\" target=\"_blank\">$1<\/a>");
	} else if (iType == 2) {
		sOutput = sOutput.replace(/\b(https\:\/\/[\w+\.]+[\w+\.\:\/\@\_\?\=\&\-\'\#\%\~\;\,\$\!\+\*]+)/gi,
			"<a href=\"$1\" rel=\"nofollow\" target=\"_blank\">$1<\/a>");
	} else if (iType == 3) {
		sOutput = sOutput.replace(/\b(www\.[\w+\.\:\/\@\_\?\=\&\-\'\#\%\~\;\,\$\!\+\*]+)/gi,
			"<a href=\"http://$1\" rel=\"nofollow\" 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\" rel=\"nofollow\" target=\"_blank\">$1<\/a>");
	} else if (iType == 6) {
		sOutput = sOutput.replace(/\b(file\:\/\/\/[\w+\:\/\\]+[\w+\/\w+\.\:\/\\\@\_\?\=\&\-\'\#\%\~\;\,\$\!\+\*]+)/gi,
		  	"<a href=\"$1\" rel=\"nofollow\" target=\"_blank\">$1<\/a>");
	}

	return sOutput;
}
</script>


If you look carefully, the only thing I have added is rel=\"nofollow\" to several of the links.

As far as I can tell, this only works for links posted in the message area and footer - if you allow users to post a Homepage in their profile, the homepage icon (displayed in their post) will not have this rel="nofollow" attribute.

I'd love some feedback on this MOD - let me know if there are more suggestions. My site's forum (http://www.whyilovechicago.com/forum) implements this MOD, so you can see it in action (although, since it's new, I don't think any users have posted links yet). I have also used this MOD on my former company's forum (http://www.fathomseo.com/forum).

Thanks!<

Art
http://www.whyilovechicago.com

Podge
Support Moderator

Ireland
3775 Posts

Posted - 11 July 2007 :  05:45:31  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message  Reply with Quote
Been done before - http://forum.snitz.com/forum/topic.asp?TOPIC_ID=59382#336266<

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

Loyola05
Starting Member

24 Posts

Posted - 11 July 2007 :  10:03:05  Show Profile  Visit Loyola05's Homepage  Reply with Quote
I figured someone had to have done that before... but I searched for like 20 minutes trying to find it here and I couldn't locate that thread.

Anyways, the post you link to speaks of parsing URLs for hyperlinked text, and doesn't mention the reasons behind using rel="nofollow" in terms of SEO or link crawlers/spiders. Maybe this can/should be listed as a specific MOD for that reason, and not lumped in with parsed URLs.<

Art
http://www.whyilovechicago.com
Go to Top of Page

blackinwhite
Average Member

Turkey
657 Posts

Posted - 14 July 2007 :  07:38:13  Show Profile  Reply with Quote
quote:
Originally posted by Loyola05

I figured someone had to have done that before... but I searched for like 20 minutes trying to find it here and I couldn't locate that thread.

Anyways, the post you link to speaks of parsing URLs for hyperlinked text, and doesn't mention the reasons behind using rel="nofollow" in terms of SEO or link crawlers/spiders. Maybe this can/should be listed as a specific MOD for that reason, and not lumped in with parsed URLs.



thank you, I start to use it. ;)<
Go to Top of Page
  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.11 seconds. Powered By: Snitz Forums 2000 Version 3.4.07