+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Select a Thumbnail for flv video

Select a Thumbnail for flv video

7 posts, 1 answered
  1. Drew Greenwell
    Drew Greenwell avatar
    66 posts
    Registered:
    11 Feb 2010
    28 Apr 2010
    Link to this post
    Hello,

    We are implementing an flv video gallery on a sitefinity site.  I would like for the user to select or upload a thumbnail from the LibraryItemEdit Template.

    I've added the following to the "itemHolder" placeholder on the page so that the user can select an image.

    Is there an easy way to associate this control with the Thumbnail meta item for the content or do I need to manually add the thumbnail when they are done selecting. If so, how do I get the current item's guid and is there an event that fires when selection is complete?

    <li class="selector">
    <asp:Label ID="Label11" AssociatedControlID="Thumbnail" runat="server">
    <asp:Literal ID="Literal25" runat="server" Text="Thumbnail"></asp:Literal>
    <em id="ThumbnailLabel" runat="server"></em></asp:Label>
    <asp:TextBox ID="Thumbnail" Text="" runat="server" MaxLength="250"></asp:TextBox>
    <sfLib:ButtonSelector ID="ButtonSelector1" WindowNavigateUrl="~/Sitefinity/UserControls/Dialogs/ImageEditorDialog.aspx" AssociatedControls="Thumbnail" ItemTemplatePath="~/Sitefinity/Admin/ControlTemplates/News/Dialogs/ButtonSelector.ascx" runat="server" cssclass="pickerWrapper" ButtonText="Select" />
    <p class="example">
    <asp:Literal ID="Literal26" runat="server" Text="This thumbnail will be displayed in the gallery control"></asp:Literal>
    </p>
    </li>


    Thanks in advance for any help
  2. David
    David  avatar
    78 posts
    Registered:
    29 Dec 2008
    28 Apr 2010
    Link to this post
    Hi Drew,

       I am guessing your are working on a back-in module.  I had it set up where the site admin has to pick a thumbnail for the gallery (currently about 12 albums) on the list of galleries page.  I have the site admin use the image library module to upload the images into a library(album), then they go to Gallery module to wire up thumbnails to the gallery page.  I am using the ImageDialog, it returns the item GUID.  The front-in control pulls the data from the gallery table in the database to display the list of thumbnails linking to their gallery page.

    <asp:TextBox ID="txtBGimage" runat="server"></asp:TextBox>
                               <sfLib:ButtonSelector ID="ButtonSelector2" WindowNavigateUrl="~/Sitefinity/UserControls/Dialogs/ImageDialog.aspx"
                                       AssociatedControls="txtBGimage" ItemTemplatePath="~/Sitefinity/Admin/ControlTemplates/Libraries/Dialogs/ButtonSelector.ascx"
                                       runat="server" ButtonText="Select" />


    Hope that helps,
    David
  3. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    28 Apr 2010
    Link to this post
    Hello Drew,

    Actually you use the TextBox control to persist the data of the "Thumbnail"metakey

    <asp:TextBox ID="Thumbnail" Text="" runat="server" MaxLength="250"></asp:TextBox>

    The value that will be set is the item  url in dynamic format [Provider]Guid. You need to resolve the value at the place where you want to use the custom Thumbnail.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
    Answered
  4. Drew Greenwell
    Drew Greenwell avatar
    66 posts
    Registered:
    11 Feb 2010
    28 Apr 2010
    Link to this post
    Thanks for the response Ivan. I can't seem to get the value to persist

    i just added Thumbnail to the metafields list here(i've been trying it without because I thought the thumbnail was available for all of the Library Types), but it still doesnt show up in the ItemPreview repeater or when I try <%# Eval("Thumbnail").ToString() %>, context.Items["Tumbnail"]
    <add name="Video" title="Video" defaultExtenstions=".flv" metaKeys="Author, Extension, Name, Size, Category, Description, Thumbnail"></add>
    <!-- Note I just added thumbnail as a metafield above(even though it's already there in the code) and I'm still not seeing the data -->

    I added the selector to the ContentMetaFields control
    like this.  Do you see any reason why this would not be persisting the value
    <sfGCn:ContentMetaFields ID="itemMetaFields" runat="server">
                        <ItemTemplate>                       
                            <fieldset class="set">
                             <ol class="setIn">
                                <li class="selector">
                                        <asp:Label ID="Label11" AssociatedControlID="Thumbnail" runat="server">
                                            <asp:Literal ID="Literal25" runat="server" Text="Thumbnail"></asp:Literal>
                                            <em id="ThumbnailLabel" runat="server"></em></asp:Label>
                                        <asp:TextBox ID="Thumbnail" Text="" runat="server" MaxLength="250"></asp:TextBox>
                                        <sfLib:ButtonSelector ID="ButtonSelector1" WindowNavigateUrl="~/Sitefinity/UserControls/Dialogs/ImageEditorDialog.aspx" AssociatedControls="Thumbnail" ItemTemplatePath="~/Sitefinity/Admin/ControlTemplates/News/Dialogs/ButtonSelector.ascx" runat="server" cssclass="pickerWrapper" ButtonText="Select" />
                                        <p class="example">
                                            <asp:Literal ID="Literal26" runat="server" Text="This thumbnail will be displayed in the gallery control"></asp:Literal></p>
                                    </li>
                                    </ol>
                                    </fieldset>
                                     <div class="bottom">
                                <div>
                                    <!-- -->
                                </div>
                            </div>


  5. Drew Greenwell
    Drew Greenwell avatar
    66 posts
    Registered:
    11 Feb 2010
    29 Apr 2010
    Link to this post
    Thanks for the help yesterday Ivan, i just hadn't added Thumbnail to the available meta tags

    <add key="Libraries.Thumbnail" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    29 Apr 2010
    Link to this post
    Hi Drew Greenwell,

    Ok, it is good to hear that everything is fine now.

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  7. Ahmed Salman
    Ahmed Salman avatar
    31 posts
    Registered:
    13 Apr 2010
    08 Sep 2010
    Link to this post
    hi Drew
      can i get copy of your control ?


    Thank you
Register for webinar
7 posts, 1 answered