guinsu
Starting Member
9 Posts |
Posted - 21 March 2001 : 13:00:42
|
I've made a mod that will turn text ending in .com (such as snitz.com) into an href. As far as I can tell, this won't conflict with the changes the software currently makes to www's and http's. Here are the changes to make in inc_functions.asp:
In FormatStr, change the end of the function to: fString = edit_hrefs(fString, 6) FormatStr = replace_affiliate_urls(fString)
In edit_hrefs:
if (type == 6) { var dot_com_match=/\b(http:\/\/)?(www\.)?([-\w\.]+\.com)\b/gi; s_str = s_str.replace(dot_com_match, function ($0,$1,$2,$3) { return check_domain($0,$1,$2,$3) } ); }//end if
And add this function in the Javascript section:
function check_domain(full,http,www,domain) { if(!http&&!www) return "<a href=\"http://"+domain+"\" target=\"_blank\">"+domain+"</a>"; else return full;
}
Edited by - guinsu on 22 March 2001 13:56:59 |
|