User Image Gallery

Last post 04-04-2006, 5:27 AM by bvkdurgarao. 9 replies.
Sort Posts: Previous Next
  •  08-10-2004, 11:07 AM 1468

    User Image Gallery

    Can the gallery be set up similar to yahoo user galleries to allow users to create their own image galleries?  I am using DotNetNuke and have been looking for a gallery module that allows user this ability to manage their own galleries and at the same time, the galleries are displayed to the public regardless of whose gallery it is.  In other words, I want the user to be able to create the gallery and control the images in the gallery and then post the gallery to the Site galleries section.
  •  08-18-2004, 5:18 AM 1542 in reply to 1468

    Re: User Image Gallery

    Hi,

    I built this functionality around the gallery control. 
    Essentially, what I did was when a user logs in and decides to create a gallery
    I dynamicaly create a folder usersPics/userID with userPics being my root image dir (for all user img folders) and userID being their folder using their unique ID (for example). 
    Then I programmatically change the FolderPath in my codebehind for the myGallery.ascx control (myGallery.ascx.cs)-like this:
     
    gallery1.FolderPath = "~/usersPics/" + user_id ;
     
    YES I made the control use a code-behind as I prefer to code this way (ez to do-of course).
    Obviously I can create N number of user folders under userPics/.  I turn off all editing and top controls for viewers BUT
    when the users is logged in I test for his login cookie and set bool isAdmin to true and do the following on the myGallery.ascx.cs
    page (everything is done on that page-btw): 

    if (isAdmin)

    {

    gallery1.ShowUpload=true;

    gallery1.ShowEditDescription=true;

    }

    else

    {

    gallery1.ShowUpload=false;

    gallery1.ShowEditDescription=false;

    }
    This allows the logged in user to upload and edit (as admin) their gallery while other can simply view.
    My solution is for a slightly different implementation then yours, but the functionality seems similar to me.
    The rest should be easy to code into DNuke.  If I missed anything or was unclear feel free to ask more (hope it helps).
    Cheers,
    DM.
  •  11-29-2004, 12:03 AM 2649 in reply to 1542

    Re: User Image Gallery

    For the people who don't program, can the lines

    ShowUpload=false

    ShowEditDescription=false
     
    be added to the show.aspx file somewhere to shut off these controls for all users?  I simply want to shut this it off.  I have added these lines with the rest of the true/false statements but the controls still appear.
     
    Thanks!  Jaye
     
    be added to the show.aspx file somewhere to shut off these controls for all users?  I simply want to shut this it off.  I have added these lines with the rest of the true/false statements but the controls still appear.
     
    Thanks!  Jaye
  •  11-29-2004, 12:04 AM 2650 in reply to 2649

    Re: User Image Gallery

    Interesting, I only typed the last paragraph once!
  •  11-29-2004, 12:34 AM 2651 in reply to 2650

    Re: User Image Gallery

    jbnelson,

    This is an example:

     <CE:Gallery
        id="gallery1"
        runat="server"
        Height="500"
        Width="600"
        Column = "8"
        MaxImageWidth="1024"
        BackColor="#ffffff"
        CellPadding="5"  
        AutoResizeUploadedImages = "true"  
        CellSpacing="5"
        ForeColor="#000000"
        BorderColor="#cc0000"
        BorderStyle="solid"
        BorderWidth="0"
        CssClass="container" 
        ShowUpload="false"
        ShowEditDescription="false"
     
        ShowThumbNailName="true" 
        ShowThumbNailSize="true" 
        ShowThumbNailDate="false" 
        ShowThumbNailDescription="true" 
        FolderPath = "~/samplefolder"
        ></CE:Gallery><br>    
       </p>

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  11-29-2004, 1:06 AM 2652 in reply to 2651

    Re: User Image Gallery

    Thanks for the super fast response!  I had tried this before but the icons still appear.
  •  11-29-2004, 1:28 AM 2653 in reply to 2652

    Re: User Image Gallery

     
    It's strange.
     
    Can you post whole page here.

    Tip: Please use the textarea button post the code
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  11-29-2004, 1:46 AM 2654 in reply to 2653

    Re: User Image Gallery

    Here ya go...


    <%@ Page Language="C#"%>
    <%@ Register TagPrefix="CE" Namespace="DotNetGallery" Assembly="DotNetGallery" %>

    <script runat="server">
        // Obtain the gallery folder from query string
        string album;

        void Page_Load(Object sender, EventArgs e)
        {
            album = Request.QueryString["album"];
            if (album == null || album=="/")
                gallery1.FolderPath = "album1";
            gallery1.FolderPath = album;
       }
    </script>

    <html>
        <head>
            <title>J a y e B N e l s o n . c o m - Photos</title>
    <link rel="stylesheet" type="text/css" href="/include/sd_style_lt_blue.css" title="sd_style_dk_blue">
    <script src="/js/email_page.js" type="text/javascript"></script>
    <script src="/js/popup.js" type="text/javascript"></script>
    <script src="/js/rollover.js" type="text/javascript"></script>
        <body bgcolor="#000000">
     <form runat="server" ID="mainform"><CENTER>
       <div align=center class="head"><b><font size=5>Photo Gallery - Oceanside (1)</b></font><P></div>
    <P>&nbsp;
    <P>&nbsp;
       <p align=center>
       <CE:Gallery
        id="gallery1"
        runat="server"
        Height="500" 
        Width="600"
        Column = "6"
        MaxImageWidth="1024"
        BackColor="#000099"
        CellPadding="5"  
        AutoResizeUploadedImages = "true"  
        CellSpacing="5"
        ForeColor="#000099"
        BorderColor="#ffffff"
        BorderStyle="solid"
        BorderWidth="1"
        CssClass="container"
                                    ShowUpload="false"
                                    ShowEditDescription="false"
        ShowThumbNailName="false" 
        ShowThumbNailSize="false" 
        ShowThumbNailDate="false" 
        ShowThumbNailDescription="true" 
        HomeURL="/photos"
        ></CE:Gallery><br>    
       </p>
         </form>
        </body>
    </html>

     

  •  11-29-2004, 2:28 AM 2655 in reply to 2654

    Re: User Image Gallery

    jbnelson,
     
    The code looks fine to me.
     
    Can you download the latest control from the server and try again?
     
    Keep me posted.
  •  04-04-2006, 5:27 AM 17856 in reply to 1542

    Re: User Image Gallery

    Hi
     
    Where do we need to do all these changes?
    I didn't find any file with name myGallery.ascx in my cute editor files.
     
    Thanks
     Durga
View as RSS news feed in XML