Exemplo n.º 1
0
 public static string AutoTagLink(Match match)
 {
     if (match.Groups["term"].Success)
     {
         return("<a href=\"" + TagUrlConfig.PrepareUrl(match.Groups["term"].Value, "blogs/") + "\" title=\"" + match.Groups["term"].Value.ToString().Trim() + "\">" + match.Groups["term"].Value.ToString() + "</a>");
     }
     else
     {
         // no match
         return(match.Groups["hrefurl"].Value);
     }
 }
Exemplo n.º 2
0
        public static string Bing_TagSitemap(ApplicationDbContext context, TagEntity Entity)
        {
            var str = new StringBuilder();

            str.AppendLine("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
            str.AppendLine("<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">");
            var    _lst = TagsBLL.LoadItems(context, Entity).Result;
            string path = "videos/";

            foreach (var Item in _lst)
            {
                str.AppendLine("<url>");
                str.AppendLine("<loc>" + TagUrlConfig.PrepareUrl(Item, path) + "</loc>");
                str.Append("</url>");
            }
            str.AppendLine("</urlset>");

            return(str.ToString());
        }