public static string GetRawImageUrl(this INewsEntry newsEntry) { var image = newsEntry.GetImage(); if (image != null) { return(Globals.AddHTTP(PortalSettings.Current.PortalAlias.HTTPAlias) + FileManager.Instance.GetUrl(image)); } return(string.Empty); }
public static string GetImageUrl(this INewsEntry newsEntry, int width) { var image = newsEntry.GetImage(); if (image != null) { return(Globals.AddHTTP(PortalSettings.Current.PortalAlias.HTTPAlias) + "/imagehandler.ashx?fileticket=" + UrlUtils.EncryptParameter(image.FileId.ToString()) + "&width=" + width + "&ext=." + image.Extension); } return(string.Empty); }
public static string GetImageUrl(this INewsEntry newsEntry, int width) { var image = newsEntry.GetImage(); if (image != null) { return(Globals.AddHTTP(PortalSettings.Current.PortalAlias.HTTPAlias) + "/dnnimagehandler.ashx" + "?mode=securefile" + "&fileid=" + image.FileId + "&filter=resize" + "&w=" + width // this helps external services to understand mimetype + "&ext=." + image.Extension); } return(string.Empty); }