Rrogahn,
It's clear using the built-in slideshow is limiting, so you might want to consider another alternative. There's always the Flickr Slideshow control that you can drop in anywhere. I created an Ajax CS Slideshow that seems to work pretty well on my site homepage. I haven't decided what to do with it yet and am currently out of town.
Here's my blog post on the Ajax CS Slideshow control if that helps.
Regards,Dave
Thanks Dave, I'm pretty new to commnity server. I'll give a look @ your control, is there anything special to getting images out of the galleries? Are there OM calls for that?
You'll be creating a query, returning a threadset, and passing back GalleryPost data objects. Probably the cleanest example of seeing this in action in the SDK is in class and method
\Galleries\Components\GallerySlideshowWriter.cs
protected virtual void WriteAlbum(Gallery g, PostCategory c) {}
So I was able to install all of the Ajax stuff on the server and have added the control to the page, but it's not working. Fiddler says that it can't reach the webmethod that I specified in the SlideShowServiceMethod property. Is there anything special that you did to get this to work?
Thanks for all the help so far
The Ajax Slideshow I wrote uses a Web Service I customized from the Ajax Control Toolkit. I wrote the control for one of my clients so I haven't released it yet and don't know if I will. Configuring CS for Ajax Toolkit support makes it a bit involved as well. I've been blogging about the process a bit on my blog if that helps. I haven't written about customizing the Ajax Toolkit Slideshow Control source code yet, but plan to.
Don't give up on SlideShowPro yet. I figured out how to make it only display the data you want. First, use Julio Casal's method of creating a new C# class library to make a custom GallerySlideShowWriter and a custom GallerySlideShowHandler. Drop the library in your bin folder just like Julio says.
Next, in your /photos folder, copy the SlideShowPictures.ashx and re-name the copy to CustomSlideShowPictures.ashx. You need two files: one to handle default behavior for viewing albums normally and one to handle your custom behavior, for example on the home page. Only change your copy, not the original, to point to your custom slideshow handler like this:
<%@ WebHandler Language="C#" Class="CommunityServer.Galleries.Components.CustomGallerySlideshowHandler" %>
Next, you need to change your siteurls_override.config to contain this:
<
</
See what's going on here? The home page will point to your new custom handler while the /photos folder will use the normal handler.
Now let's say I want my home page to only show a slideshow of just one gallery. In your custom GallerySideShowWriter, replace the Build() method with this:
{
StartDocument();
EndDocument();
}
In this case, I only wanted to use the gallery with ID=15. By getting creative with the Build() method, you can get just about any data you want.
Hey robhuz,
I'm a little confused as to how to get this working. I have a directory called "shows". I have a page withing that directory called pagename.aspx. I would like to have a slideshow on that page that shows the images from a specific gallery with the sectionID=2 . Instead of creating a new class library, I just added the new custom reader and handler to the CS Galleries/Components in the SDK. I'm not sure how exactly to handle the SiteUrl_Overrides and I'm not sure exactly what to add to the pagename.aspx page to drop a gallery in. Could you help me out a bit?
Thanks a lot
Is the ID supposed to be the sectionID or the groupID?
I'm not really a CS expert or anything, I just figured out how to solve one very specific case. You should research more about SiteUrl_Overrides. I don't know what they really mean, I just stumbled on a solution that worked. I wish CS had real documentation.
I have this working fine on the home page. I figured out how to get it working on the other page fine as well, but I can't filter the specific gallery I want.
What do you have in your Build method? Post it and I'll take a look. Have you compared it with the CS source code?
Thanks for taking the time. Here are both my custom writer and handler, 13 is the sectionID of the gallery I would like to show:
using System;using System.Collections;using CommunityServer.Components;using CommunityServer.Galleries.Controls;using CommunityServer.Galleries.Components;using System.Collections.Generic;
namespace CommunityServer.Galleries.Components{ public class CustomGallerySlideshowWriter : GallerySlideshowWriter { public CustomGallerySlideshowWriter(Gallery gallery, string baseUrl) : base(gallery, baseUrl) { }
public CustomGallerySlideshowWriter(Gallery gallery, string baseUrl, int categoryId, int mainImageWidth, int mainImageHeight) : base(gallery, baseUrl, categoryId, mainImageWidth, mainImageHeight) { }
protected override void Build() {
BuildSection(Galleries.GetGallery(13));
}}
using System;using System.Collections.Generic;using CommunityServer.Galleries.Components;using CommunityServer.Components;
namespace CommunityServer.Galleries.Components{ public class CustomGallerySlideshowHandler : GallerySlideshowHandler { public CustomGallerySlideshowHandler() { // // TODO: Add constructor logic here // }
protected override CachedFeed BuildFeed() { BaseSyndicationWriter writer = null; DateTime date = DateTime.Now;
writer = new CustomGallerySlideshowWriter(CurrentGallery, this.BaseUrl, this.CategoryID, this.MainImageWidth, this.MainImageHeight);
return new CachedFeed(date, date.ToString(), writer.GetXml());
} }}
Here are some things to try:
In my project, the custom handler is located at MyUrl.com/Photos/CustomSlideshowPictures.ashx. Find where yours is and browse it. You should get the XML for the gallery you want. If this works, then your handler and writer are fine - the problem is with our URL overrides.
If it doesn't work, then the problem is with your writer or handler. I would suggest putting some test code in your handler to see if it even gets called. If it is, test the writer the same way. You want to make sure your custom handler is calling your custom writer.
My source code for this project is gone, so I'd have to re-create it. Sorry.
I browsed it, it gives me a: The resource cannot be found. I will try the other checks. Thanks for the help.
I wouldn't rule out a URL Override problem.
Copyright© 2008 Telligent Systems Inc. All rights reserved CommunityServer.com • Telligent.com