Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Image Galery and DNN CachingImage Galery and DNN Caching
Previous
 
Next
New Post
4/15/2009 9:31 PM
 

Hello, I am about to create a simple module, that loads photos from Picasa, showing them as thumbnails, and on click, you are getting full-size picture.

I  am recieving image's urls and I am binding them to DataList.

The thumbnails are displaying ok, but instead of big images, I get empty containers with red cross. When I right-click on such container , then go to properties, I see the correct image url. When I copy that url and paste it in adress bar in browser, the image is displayoing with no problems.

In the settings for the page that contains my module, the cache time is 0.

 

In page load, I try to clear cache like this:

 Response.Cache.SetCacheability(HttpCacheability.NoCache);

 

but it does not help.

 

Any suggestions?

Thank you.

 

 
New Post
4/16/2009 12:37 AM
 

That doesn't sound like a caching problem. When you look at the html source of the page containing the thumbnails, do the links to the full-size images appear to be correctly formed? How are you building your thumbnails when binding the DataList and their associated links to the full-size images?


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
New Post
4/16/2009 7:05 PM
 

I have created simple, empty web project to test my gallery. It's working there with no problems.

This is my DataList:

 <asp:Panel ID="panelFilter" runat="server">
    <table width="100%">
        <tr>
            <td>
                <dnn:Label ID="lblAlbum" runat="server" Text="Album" Suffix=":" />
            </td>
            <td>
                <asp:DropDownList ID="cboAlbum" runat="server">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:LinkButton ID="linkShowPhotos" runat="server" OnClick="linkShowPhotos_Click"
                    Text="Show Photos" />
            </td>
        </tr>
    </table>
</asp:Panel>
<asp:Panel ID="panelImages" runat="server">
    <asp:DataList ID="listPhotos" runat="server" OnItemCommand="listPhotos_ItemCommand" RepeatColumns="5"
        RepeatDirection="Horizontal" RepeatLayout="Table">
        <ItemTemplate>
            <asp:ImageButton ID="imgThumbnail" runat="server" ImageUrl='<%# DataBinder.Eval(Container.DataItem, "PhotoThumbnailUrl")%>'
            CommandName="click" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "PhotoUrl")%>' />
        </ItemTemplate>
    </asp:DataList>
</asp:Panel>
<asp:Panel ID="panelImageLarge" runat="server" Visible="false" Height="480" Width="640">
    <asp:LinkButton ID="linkClose" runat="server" Text="Close" OnClick="linkClose_Click" />
    <hr />
    <asp:Image ID="imgLarge" runat="server" AlternateText="" />
</asp:Panel>

 

and code behind:

 

        #region Events

        protected void Page_Load(object sender, System.EventArgs e)
        {
            // disable cache to avoid image load problem
            Response.Cache.SetCacheability(HttpCacheability.NoCache);

            try
            {
                BindData();
            }
            catch (Exception exc) //Module failed to load
            {
                Exceptions.ProcessModuleLoadException(this, exc);
            }

        }

        protected void linkShowPhotos_Click(object sender, System.EventArgs e)
        {
            ShowPhotos(cboAlbum.SelectedItem.Value);
        }

        protected void listPhotos_ItemCommand(object sender, DataListCommandEventArgs e)
        {
            if (e.CommandName.ToLower() == "click")
            {
                this.imgLarge.ImageUrl = e.CommandArgument.ToString();
                this.panelFilter.Visible = false;
                this.panelImages.Visible = false;
                this.panelImageLarge.Visible = true;
            }
        }

        protected void linkClose_Click(object sender, System.EventArgs e)
        {
       
        }

        #endregion

        #region Methods

        protected void BindData()
        {
            // get controller
            PicasaGalleryController galleryController = new PicasaGalleryController();

            // get list of albums
            List<PicasaAlbumInfo> listPicasaAlbums = galleryController.GetAlbumsList();

            // bind DropDown of albums
            foreach (PicasaAlbumInfo picasaAlbumInfo in listPicasaAlbums)
            {
                ListItem listItem = new ListItem(picasaAlbumInfo.AlbumTitle, picasaAlbumInfo.AlbumID);
                cboAlbum.Items.Add(listItem);
            }
        }

        protected void ShowPhotos(string albumID)
        {
            // get controller
            PicasaGalleryController galleryController = new PicasaGalleryController();

            // bind list of photos
            listPhotos.DataSource = galleryController.GetPhotosList(albumID);
            listPhotos.DataBind();
        }

        #endregion

 

 

--------------------------------------------

All is appearing in one page, on thumbnail click, some panels are changing their visibility. Simple.

I do not have any idea why it is working somewhere else, but not in DNN.

 

 

 
New Post
4/17/2009 3:01 PM
 

Any ideas?

Help, someone, please!

 
New Post
4/17/2009 7:16 PM
 

Hello again.

I found a "solution" while searching forums on the internet.

Here what one guy was suggesting:

This is because original images in picasa web albums are restricted to be used only in Google own service. When you show them in other place, you only could use small versions, at most 800px in width.

So using url like http://lh5.ggpht.com/7thGeneraton/SFFdFffeCaI/AAAAAAAAACQ/nujPrCfuTp4/IMG_0246.JPG?imgmax=800 will be OK.

So, I tested this kind of solution, by adding ?imgmax=800 to my full-size images urls, and it WORKS!

 

But, I am not satisfied. Is it only temp solution? Who knows if tomorrow Google stuff will change something and my gallery willl be dead?

 

 

 

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Image Galery and DNN CachingImage Galery and DNN Caching


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out