private string Generate_General_Post_Content(string description, string source) { StringBuilder str = new StringBuilder(); // url fetch from canonical link string url = Fetch_Canonical_Link(source); if (url == "") { url = this.ContentUrl; } if (this.ShowUrl && url != "") { str.Append("<div class=\"item_pad_2\">\n"); string _url = url; if (_url.Length > 50) { _url = _url.Substring(0, 50) + ".."; } str.Append("<a target=\"_blank\" href=\"" + this.ContentUrl + "\" class=\"" + this.NormalLinkCssClass + "\">" + _url + "</a>\n"); str.Append("</div>\n"); } // Description if (this.ShowDescription && description != "") { str.Append("<div class=\"item_pad_2\">\n"); str.Append("<span class=\"light\">" + UGeneral.Prepare_Description(description, this.DescriptionLength) + "</span>"); str.Append("</div>\n"); } return(str.ToString()); }
private string Process_OG_Content(string title, string url, string description) { StringBuilder str = new StringBuilder(); // title if (this.ShowTitle && title != "") { string _title = title; if (_title.Length > this.TitleLength && this.TitleLength > 0) { _title = _title.Substring(0, this.TitleLength) + ".."; } if (_title != "") { str.Append("<div class=\"item_pad_2\">\n"); string _title_url = "<a target=\"_blank\" href=\"" + this.ContentUrl + "\" class=\"" + this.BoldLinkCssClass + "\" title=\"" + title + "\">" + _title + "</a>"; str.Append("</div>\n"); str.Append(_title_url); } } // url if (this.ShowUrl && url != "") { str.Append("<div class=\"item_pad_2\">\n"); string _url = url; if (_url.Length > 50) { _url = _url.Substring(0, 50) + ".."; } str.Append("<a target=\"_blank\" href=\"" + this.ContentUrl + "\" class=\"" + this.NormalLinkCssClass + "\">" + _url + "</a>\n"); str.Append("</div>\n"); } // Description if (this.ShowDescription && description != "") { str.Append("<div class=\"item_pad_2\">\n"); str.Append("<span class=\"light\">" + UGeneral.Prepare_Description(description, this.DescriptionLength) + "</span>"); str.Append("</div>\n"); } return(str.ToString()); }