adding content to the popup photogallery

Last post 06-06-2012, 9:11 AM by Kenneth. 5 replies.
Sort Posts: Previous Next
  •  05-31-2012, 1:03 AM 73798

    adding content to the popup photogallery

    Hello guys,
    is it possible to
     
    1. add custom content to the popup photo gallery.
    2. Add a label from a database or something ?
    3. Tag pictures
     
    e.g. Like add other links to our website, where you have the comments section ???
     
    many thanks
    Ehi
  •  05-31-2012, 11:41 AM 73803 in reply to 73798

    Re: adding content to the popup photogallery

    Hi afrika,
     
     1. add custom content to the popup photo gallery.
     
    Can you make a screenshot to show where you want to add the content?
     
    2. Add a label from a database or something ?
     
    For the classic layout, the photos add by the code below
     
    Open file "CuteSoft_Client\Gallery\Layout\Classic\Code.js "
     
    Find section below, the red code div is the photo section, you can add anything you need in it.
     
    GalleryLayout.prototype.DrawUI=function _GalleryLayout_DrawUI()
    {
    clearTimeout(this._animationTimerid);
    this.dng_photolist.innerHTML="";
    var photos=[];
    for(var i=0;i<this._categories.length;i++)
    {
    photos=photos.concat(this._categories[i].Photos);
    }
    for(var i=0;i<photos.length;i++)
    {
    var div=this.CreatePhotoDiv(photos[i]);
    this.AttachItemEvent(div);
    this.dng_photolist.appendChild(div);
    }
    }
     
    3. Tag pictures
     
    Can you explain this question in detail?
     
    Regards,
     
    ken 
  •  06-03-2012, 5:43 PM 73814 in reply to 73803

    Re: adding content to the popup photogallery

    Kenneth:
     
     
    GalleryLayout.prototype.DrawUI=function _GalleryLayout_DrawUI()
    {
    clearTimeout(this._animationTimerid);
    this.dng_photolist.innerHTML="";
    var photos=[];
    for(var i=0;i<this._categories.length;i++)
    {
    photos=photos.concat(this._categories[i].Photos);
    }
    for(var i=0;i<photos.length;i++)
    {
    var div=this.CreatePhotoDiv(photos[i]);
    this.AttachItemEvent(div);
    this.dng_photolist.appendChild(div);
    }
    }
     
     
     
    Am sorry, but dont understand what you mean, I tried adding the text below to the code, but nothing shows
     
    for(var i=0;i<photos.length;i++)
    {
    var div=this.CreatePhotoDiv(photos[i]);
    this.AttachItemEvent(div);
    this.dng_photolist.appendChild(div +"Some text goes here");
    }
     
  •  06-05-2012, 8:03 AM 73829 in reply to 73814

    Re: adding content to the popup photogallery

    Hi afrika,
     
    the div is an object, can not use div+"string".  Please try the code below, I added a <span> target into this div to shows your custom text.
     
    for(var i=0;i<photos.length;i++)
    {
    var div=this.CreatePhotoDiv(photos[i]);
    this.AttachItemEvent(div);
    var span1=document.createElement("span");
                    span1.innerHTML="some text";
    div.appendChild(span1);
    this.dng_photolist.appendChild(div);
    }
     
    Regards,
     
    Ken 
  •  06-05-2012, 8:30 AM 73832 in reply to 73829

    Re: adding content to the popup photogallery

    thanks it worked.
     
    1. However when I put dont allow posts, it still does
    2. And How do i remove the file name, e.g. blah.jpg
     

    <

    dotnetgallery:gallerybrowser runat="server" AllowPostComment="false" AllowShowComment="false" id="GalleryBrowser1" Width="780" Height="400" />
     
     
    many many thanks
    Ehi
  •  06-06-2012, 9:11 AM 73841 in reply to 73832

    Re: adding content to the popup photogallery

    Hi afrika,
     
    #1
     
    Can you show me the full code of your page?
     
    Can you post a screenshot to show where you can still posts the comment?
     
    #2
     
    Open file "\CuteSoft_Client\Gallery\Layout\Classic\Code.js"
     
    Find section below and delete it, that is the file name section.
     
    c2.firstChild.appendChild(document.createTextNode(titltText)); 
     
    Regards,
     
    Ken 
     
View as RSS news feed in XML