CS 2007 Gallerylisting.aspx

rated by 0 users
Not Answered This post has 0 verified answers | 5 Replies | 0 Followers

iCareCommunity
Top 500 Contributor
54 Posts
Points 675
By: iCareCommunity
Posted: Sat, May 19 2007 10:02 PM

Hello,

In CS 2007, the GalleryListing.aspx (All Galleries page) shows the following columns:

Gallery

Last Changed

Photo Count

Is there a way to add the description and a thumbnail random picture?  I figured out how to add a new column with a custom header name...just need to add the data of the description and thumbnail.

Thanks,

iCareCommunity

 

All Replies

iCareCommunity
Top 500 Contributor
54 Posts
Points 675
By: iCareCommunity
Posted: Sun, May 20 2007 10:32 PM In reply to

Hello,

I got it working by adding the following code to the gallerylisting.aspx:

<CSGallery:GalleryPostData LinkTo="ViewPicture" UseRandomPost="True" runat="server" Tag="div" CssClass="SidebarPhotoBox">

<ContentTemplate><CSGallery:GalleryPostImage ImageType="Other" Width="166" Height="166" Quality="70" runat="server" /></ContentTemplate>

</CSGallery:GalleryPostData>

Thanks,

iCareCommunity

 
tmiller
Top 100 Contributor
207 Posts
Points 3,110
By: tmiller
Posted: Wed, Jun 6 2007 3:45 PM In reply to

 Could you post all the steps you took to get this working.

Much appreciated! 

 
  • Post Points: 5 |
shakes
Top 75 Contributor
307 Posts
Points 4,670
By: shakes
Posted: Wed, Jun 6 2007 7:12 PM In reply to

 icare...first off cool idea i hadn't even thought of doing this but it looks good...in any case i was wondering if you knew how to get the pic to link to the gallery instead of the actual picture. I tried just throwing ViewGallery in there but it didn't like that.

tmiller...to do this you will want to find themes/default/galleries/gallerylist.aspx

then to create a new column find the header template and add you a new column mine is in bold and it would be the second one.

<HeaderTemplate>
                                <table width="100%" cellpadding="0" cellspacing="0">
                                    <thead>
                                        <tr>
                                        <th class="CommonListHeaderLeftMost" width="*"><CSControl:ResourceControl ResourceName="Gallery_AggregateGalleryListing_Gallery" runat="server" /></th>
                                        <th class="CommonListHeader" align="center" width="*"><CScontrol:ResourceControl ResourceName="Gallery_AggregateGalleryListing_Random_Pic" runat="server"/></th>
                                        <th class="CommonListHeader" align="center" width="150"><CSControl:ResourceControl ResourceName="Gallery_AggregateGalleryListing_LastChanged" runat="server" /></th>
                                        <th class="CommonListHeader" align="center" width="150"><CSControl:ResourceControl ResourceName="Gallery_AggregateGalleryListing_PictureCount" runat="server" /></th>
                                        </tr>
                                    </thead>
                                    <tbody>
                            </HeaderTemplate>

If you notice ResourceName="something" this is the text of your column and refers to the name defined in languages/en-us/resources there are some threads out there on how to do this if you dont know.

Now find your item template and throw that code in there mine is in bold and i have made a few changes to the one above ie. used a thumbnail instead but either one would work. You will also want to add the code to the alternating item template in the same spot. 

<ItemTemplate>
                                <tr class="CommonListRow">
                                    <td class="CommonListCellLeftMost" align="center">

                                        <CSGallery:GalleryData runat="server" LinkTo="ViewGallery" Property="Name" /><br />
                                        <CSGallery:GalleryData runat="server" Property="Description" />
                                    </td>
                                    <td class="CommonListCell" align="center">
                                        <CSGallery:GalleryPostData LinkTo="ViewPicture" UseRandomPost="True" runat="server" Tag="div">
                                        <ContentTemplate>
                                        <CSGallery:GalleryPostImage ImageType="Thumbnail" runat="server" />
                                        </ContentTemplate>
                                        </CSGallery:GalleryPostData><br />                                    
                                    </td>

                                    <td class="CommonListCell" align="center"><CSGallery:GalleryData runat="server" Property="MostRecentPostDate" IncludeTimeInDate="true" />&nbsp;</td>
                                    <td class="CommonListCell" align="center"><CSGallery:GalleryData runat="server" Property="TotalThreads" /></td>
                                </tr>
                            </ItemTemplate>

If you want to see it in action i check out my site link below! hope this helps feel free to ask any questions 

peace shakes

Carolina Pulse

 
  • Post Points: 20 |
tmiller
Top 100 Contributor
207 Posts
Points 3,110
By: tmiller
Posted: Thu, Jun 7 2007 3:59 PM In reply to

 Thanks Shakes, worked like a champ!Yes

 
  • Post Points: 20 |
iCareCommunity
Top 500 Contributor
54 Posts
Points 675
By: iCareCommunity
Posted: Mon, Jun 11 2007 9:05 PM In reply to

Hello,

Does it have to be a random picture?  What happens if you set UseRandomPost="false?"  Can it be the first picture that is uploaded?

Thanks,

iCareCommunity

 
  • Post Points: 5 |
Page 1 of 1 (6 items) | RSS
Powered by Community Server (Commercial Edition), by Telligent Systems

Copyright© 2008 Telligent Systems Inc. All rights reserved
CommunityServer.com  •  Telligent.com