When a search result includes a title or description of an image.. wouldn't it be appropriate to include an image thumbnail in that result item?
It'd be great if this were built-in. But, has anyone modded to do this?
Alrighty- I did some tweaking in my source and now Gallery Post items have thumbs in both Search results and Tag Filter results... like this:
This requires SDK/source modification and recompilation... here's what I did:
Add the "CS:Href.." to Skin-SearchResults.ascx and Skin-TagPostResults.ascx as follows:
The "clear:left" added to the CommonSearchResultDetails class is req in common.css
In each respective codefiles- \Controls\Search\SearchResults.cs and \Controls\Utility\TagPostResults.cs- add to ItemDataBound per following:
{
thumb.NavigateUrl = post.Url;
}
In \Components\Search\IndexPost.cs add the private and public properties:
And then, finally, in \CommunityServerSearchBarrel\GalleryBarrelItem.cs , add code to set ThumbURL property:
Style as you wish in common.css... for example:
.imgSearchThumb
.aSearchThumb
and don't forget the clear:left...
.CommonSearchResultDetails
That should do it! (pardon the formatting here in this post)
Please... recommend fixes.. changes!!
You right ,it don't need to import the gallery assembly
check cs2007 sp1 out ,it is
Excellent post! Thanks for this!!!
I assume it works with the latest SP for CS 2007, right? (I'm getting ready to try it next...)
It worked well for me.
Copyright© 2008 Telligent Systems Inc. All rights reserved CommunityServer.com • Telligent.com