Community Server on my mind

J-O Eriksson's blog


  • Running on CS 2.1 SP 2

    See top menu for subscription options

    Technology Blogs - Blog Top Sites

    BlogRankers.com

    Add to Technorati Favorites



CS2: Modifying José Lemas modifications of videos.aspx

In June I talked about having a videogallery in Community Server. I referenced an article by José Lema where he talks about the videos.aspx and how to modify that file to get a more Google-like videgallery.

Today I implemented a videolibrary on my Community Server Sweden site. But since the videos/screencasts I do is 800 x 600 they don't fit in the new CS 2.1 skin within a forums post (José's modification links to the respective forums post for each video). The video gets truncated. So what I wanted to do, was to instead link directly to the video/screencast file itself, and also to open the video in a new window. Also I wanted to create a new menu button for my video gallery, that also became the selected button when I went to that page.

So what I did, was to first get the videos.aspx the way I wanted. To do that I modified José's modification in the following ways. (Red text shows the parts I changed)

First, change the row:

<a href="<%# Globals.GetSiteUrls().Post((int)DataBinder.Eval(Container.DataItem, "PostID")) %> "><img src="<%# DataBinder.Eval(Container.DataItem, "VideoImageUrl") %>" width="200" height="150" border="0" /></a>

to

<a href="<%# DataBinder.Eval(Container.DataItem, "VideoUrl") %>" target="_new"><img src="<%# DataBinder.Eval(Container.DataItem, "VideoImageUrl") %>" width="200" height="150" border="0" /></a>

Then change:

<a href="<%# Globals.GetSiteUrls().Post((int)DataBinder.Eval(Container.DataItem, "PostID")) %> "><%# Formatter.CheckStringLength(DataBinder.Eval(Container.DataItem, "Subject").ToString(), 35) %></a>

to

<a href="<%# DataBinder.Eval(Container.DataItem, "VideoUrl") %>" target="_new"><%# Formatter.CheckStringLength(DataBinder.Eval(Container.DataItem, "Subject").ToString(), 35) %></a>

That's it! Now a click on the video thumbnail or the video title in the video galleri will open the video in a new window.

As for the menu button, that was really easy. Just followed the instructions from Dave Burke's excellent article in the subject. The results can be seen in the picture below. Yes the site shows in a strange language......it's swedish.

 

Click the picture to view it in larger scale.

View the video gallery live!

Share this post: Email it! | bookmark it! | digg it! | reddit!
If you enjoyed this post Subscribe to my feed via RSS or e-mail!
Posted: Monday, July 17, 2006 7:24 AM by J-O Eriksson

Comments

No Comments

New Comments to this post are disabled