How can I change a thumbnail image to the regular image?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Hace 14 años
I've created a separate "Home" page where I want to display the categories.  That parts no problem using Modules/HomePageCategories.ascx.  However the coding calls the thumbnail via this code in the .cs file:
                    hlImageLink.ImageUrl = PictureManager.GetPictureUrl(category.PictureID, SettingManager.GetSettingValueInteger("Media.Category.ThumbnailImageSize", 125), true);

Is there some way to change this so that it calls the original image that I uploaded for the category?  

BTW, the new change that you made in 1.2 that enables control of the thumbnail sizes, is much appreciated!  This product is truely amazing.  I'm hoping that in the next few months, as I learn the ins and outs of it that I can become a contributor!
Hace 14 años
Replace

hlImageLink.ImageUrl = PictureManager.GetPictureUrl(category.PictureID, SettingManager.GetSettingValueInteger("Media.Category.ThumbnailImageSize", 125), true);

with

hlImageLink.ImageUrl = PictureManager.GetPictureUrl(category.PictureID, true);
Hace 14 años
Thanks for the quick reply.  I did try putting that code in, but the first thing that it balked at was the "true", so I changed it to 300 -- it required an integer which I assume is the size of the image.  It felt better!  However, when I compiled, I was still getting the thumbnail.  So I ran Default.aspx, which uses HomePageCategories.ascx, it did the same thing.  Here's the code as generated for the page:
<div class="picture">
                    <a id="ctl00_ctl00_cph1_cph1_ctrlHomePageCategories_dlCategories_ctl01_hlImageLink" title="Show products in category Check Accessories" href="http://localhost/Category/53-check-accessories.aspx"><img title="Show products in category Check Accessories" src="http://localhost/images/thumbs/0000172_250.gif" alt="Picture for category Check Accessories" style="border-width:0px;" /></a>
                </div>

I must be missing something really simple!

On Modules/HomePageCategories.ascx.cs, here's the part where I made the line of code change:
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                Category category = e.Item.DataItem as Category;
                HyperLink hlImageLink = e.Item.FindControl("hlImageLink") as HyperLink;
                string categoryURL = SEOHelper.GetCategoryURL(category.CategoryID);
                if (hlImageLink != null)
                {
                    hlImageLink.ImageUrl = PictureManager.GetPictureUrl(category.PictureID, 300);
                    hlImageLink.NavigateUrl = categoryURL;
                    hlImageLink.ToolTip = String.Format(GetLocaleResourceString("Media.Category.ImageLinkTitleFormat"), category.Name);
                    hlImageLink.Text = String.Format(GetLocaleResourceString("Media.Category.ImageAlternateTextFormat"), category.Name);
                }
                else
                    hlImageLink.ImageUrl = PictureManager.GetDefaultPictureUrl(SettingManager.GetSettingValueInteger("Media.Category.ThumbnailImageSize", 125));
                HyperLink hlCategory = e.Item.FindControl("hlCategory") as HyperLink;
                if (hlCategory != null)
                {
                    hlCategory.NavigateUrl = categoryURL;
                }
            }

Can you give me some further guidance?  The original size of the image uploaded is:  300x175
Hace 14 años
Did you solve this issue?
Hace 14 años
Actually, no.  The answer given didn't work, so I created a work-around page.  Not the most elegant, but it works.

If you get an answer, I'd be very interested!
Hace 13 años
I was able to do it by modifying the earlier post to:
hlCatImageLink.ImageUrl = PictureManager.GetPictureUrl(category.PictureId, SettingManager.GetSettingValueInteger("Media.Category.PictureID", 175), true);
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.