Links appearance in UBB improved

main
Inga 🏳‍🌈 14 years ago
parent 32abd709aa
commit a81738d234
  1. 2
      Builder/IISMainHandler/build.txt
  2. 2
      Common/BBCodes/Google.cs
  3. 2
      Common/BBCodes/Lurk.cs
  4. 2
      Common/BBCodes/RuWiki.cs
  5. 2
      Common/BBCodes/Wiki.cs
  6. 8
      Common/BBCodes/helpers/UrlProcessor.cs

@ -13,7 +13,7 @@ namespace FLocal.Common.BBCodes {
}
public override string Format(ITextFormatter formatter) {
return "<a href=\"http://lmgtfy.com/?q=" + HttpUtility.UrlEncode(this.DefaultOrValue) + "\">" + this.GetInnerHTML(formatter) + "</a>";
return "<a href=\"http://lmgtfy.com/?q=" + HttpUtility.UrlEncode(this.DefaultOrValue) + "\">g:" + this.GetInnerHTML(formatter) + "</a>";
}
}

@ -13,7 +13,7 @@ namespace FLocal.Common.BBCodes {
}
public override string Format(ITextFormatter formatter) {
return "<a href=\"http://lurkmore.ru/" + HttpUtility.UrlEncode(this.DefaultOrValue) + "\">" + this.GetInnerHTML(formatter) + "</a>";
return "<a href=\"http://lurkmore.ru/" + HttpUtility.UrlEncode(this.DefaultOrValue) + "\">l:" + this.GetInnerHTML(formatter) + "</a>";
}
}

@ -13,7 +13,7 @@ namespace FLocal.Common.BBCodes {
}
public override string Format(ITextFormatter formatter) {
return "<a href=\"http://ru.wikipedia.org/wiki/" + HttpUtility.UrlEncode(this.DefaultOrValue) + "\">" + this.GetInnerHTML(formatter) + "</a>";
return "<a href=\"http://ru.wikipedia.org/wiki/" + HttpUtility.UrlEncode(this.DefaultOrValue) + "\">в:" + this.GetInnerHTML(formatter) + "</a>";
}
}

@ -13,7 +13,7 @@ namespace FLocal.Common.BBCodes {
}
public override string Format(ITextFormatter formatter) {
return "<a href=\"http://en.wikipedia.org/wiki/" + HttpUtility.UrlEncode(this.DefaultOrValue) + "\">" + this.GetInnerHTML(formatter) + "</a>";
return "<a href=\"http://en.wikipedia.org/wiki/" + HttpUtility.UrlEncode(this.DefaultOrValue) + "\">w:" + this.GetInnerHTML(formatter) + "</a>";
}
}

@ -57,15 +57,21 @@ namespace FLocal.Common.BBCodes {
if(title == null) {
title = link;
}
bool isExternal = true;
string url;
if(shortenRelative) {
var urlInfo = UrlProcessor.Process(link);
url = urlInfo.relativeUrl;
isExternal = !urlInfo.isLocal;
} else {
var urlInfo = new Uri(link);
url = urlInfo.ToString();
}
return "<a href=\"" + url + "\">" + title + "</a>";
string result = "<a href=\"" + url + "\">" + title + "</a>";
if(isExternal) {
result += "<img src=\"/static/images/external.png\" border=\"0\"/>";
}
return result;
}
}

Loading…
Cancel
Save