Creating a gallery

11 replies [Last post]
Joined: 03/29/2009
Points: 764

Creating a gallery with the All in One Video Pack.

Joined: 03/29/2009
Points: 764

Hi,

First off, great plugin and service, works amazingly.

I am working on a project where I would very much like to create a gallery of all videos associated to my Kaltura account.

I am allowing authors on this blog to post video content, and it would be awesome if I could somehow create a gallery page that showed all of the videos that have been uploaded.

If you could help me figure out a solution for this, I would be more than happy to spread the gospel of Kaltura ;)

If I could just nail down a solid, integrated video solution that a gallery could be created from I know several of my firm's clients would be ecstatic.

I mainly work with PHP so if there is a solution for importing/parsing XML, or an RSS, or something similar that would be great.

Thanks in advance for any help/suggestions you can offer.

Joined: 03/29/2009
Points: 764

This feature will hopefully be added to the next release - we are creating a sidebar widget, that will show and give access to all the videos posted on the blog.
if you know PHP you can easily retrieve the latest videos and show them just like in the admin managing screen.
Check out the file

Code: Select all
lib/kaltura_library_controller.php

Look at the end of the file for the code to retrieve the videos, then you can display it in your way.

Joined: 03/29/2009
Points: 764

Thanks for the quick responses guys. I managed to duplicate this functionality, lay out the videos as I wanted, and took out the toolbar for editing/deleting,etc for everyone except site admins.

One thing I'm having trouble with is how to actually play the video at this stage. Is there a way I could, say, create a template file and then create a link around the thumbnail that links to the template file and sends the video id as a GET variable?

So for instance, I've already created a video gallery template file. I have all of the thumbnails getting pulled in with the video titles. I know I can create a link around each video that would be something like http://mysite.com/video-player/?kid=73hdd22

So is there a way I can create a video player widget in my video-player template file that can use the kid variable to then generate a player widget?

Sorry if this answer is looking me right in the face somewhere (I'm sure it is and I just don't see it)

Thanks again for the help guys!

Joined: 03/29/2009
Points: 764

Yes, you can.

Code: Select all
$kalturaClient = getKalturaClient();
$flashVars = KalturaHelpers::getTinyPlayerFlashVars($kalturaClient->getKs(), $kshowId);

This code will send a request to Kaltura's servers to create a new session to display the video, make sure you don't run this code multiple times in the same page or on you homepage (Because of performance issues).

The KS only needed to display a video from the library, when a video is embeded inside a post, the session is created client side (Instead of server side, which makes better performance).

After you have the $flashVars param convert it into js param using:

Code: Select all
$flashVarsStr = KalturaHelpers::flashVarsToString($flashVars);

After that you can use swf object to embed the player:

Code: Select all
var kalturaSwf = new SWFObject(swfUrl, "swfKalturaPlayer", "250", "244", "9", "#000000");
kalturaSwf.addParam("flashVars", "<?php echo $flashVarsStr; ?>");
kalturaSwf.addParam("wmode", "opaque");
kalturaSwf.addParam("allowScriptAccess", "always");
kalturaSwf.addParam("allowFullScreen", "true");
kalturaSwf.addParam("allowNetworking", "all");
kalturaSwf.write("divKalturaPlayer");

swfUrl should be:
http://www.kaltura.com/index.php/kwidget/wid/510 for white/blue
http://www.kaltura.com/index.php/kwidget/wid/512 for dark
http://www.kaltura.com/index.php/kwidget/wid/514 for Grey

And make sure you have a div with the id "divKalturaPlayer" before the js code is run.

Joined: 11/24/2010
Points: 1

Thanks for your nice plugin and I have installed kaltura plugin in my Online Jobs blog. But sidebar breaks up when i add as widget. How can i resolve this issue?

Joined: 03/29/2009
Points: 764

Thanks Roman,

Worked like a charm. If anyone wants to see what can be accomplished using this method you check out our progress so far at:
http://74.86.26.207/gallery/video-gallery/

It's still on an IP b/c the site is still under development (and we're still building out the design, so if that page looks a little rough when you see it, bare with us).

Thanks for a great product and service so far guys.

Keep up the great work!

Joined: 03/29/2009
Points: 764

Hello there,

I'm using the kaltura widget in wordpress 2.7 and we also want to add a video gallery page
Is there a way to create a simple page and paste some code in it in order to load the video archives ?
I mean, without touching the PHP files ?

Something, like : [insert kaltura video galery]

And : Any news about the possibility to build a link to a video gallery in the sidebar ?

Thanks a lot in advance
Greatings from France

Joined: 03/29/2009
Points: 764

Hi,

With the current version, the only possibility is touching the PHP, as Roman mentioned above. We'll consider to add an easier way to do that in the future.

Joined: 03/29/2009
Points: 764

Hi there

Just wanted to say thank-you for the kaltura WP plugin. Its really impressive.
And just to add my support for a "Sidebar" widget. I'll keep checking the site for updates.
Thanks for all your hard work.

Regs

Joined: 03/29/2009
Points: 764

Thanks a lot for your kind comments! Stay tuned for the next version, which will be released in the next few days.

Joined: 06/06/2010
Points: 1

I am trying to recreate this in WordPress but not having much success. Do you have step-by-step instructions or sample files for this? It would be greatly appreciated. Thanks in advance!