Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }