Return to Jive Software

Currently Being Moderated

Vimeo Macro

VERSION 7  Click to view document history

Created on: Jan 17, 2008 4:40 PM by Aaron Johnson - Last Modified:  Sep 4, 2008 5:24 PM by tim.neuwerth

This macro makes it easy to display Vimeo movies in documents, blog posts, and threads. Here's an example of how it's used:

 

 

{vimeo}318129{vimeo}

 

Technologies

The simple example code here illustrates how you can use a plugin to display media in Clearspace content.

 

What's Included

  • build.xml -- Ant build file.

  • plugin.xml -- Plugin descriptor required by Clearspace.

  • src/com.jivesoftware.clearspace.plugins.vimeo.VimeoMacro.java -- Macro class that gets the media and generates HTML needed to display it.

 

Building and Deploying the Code

The Ant build.xml file at the root of the plugin includes a build.plugins target you can use to compile the code and package it into a JAR file. There's also a deploy.plugins target that copies the JAR into the <jiveHome>/plugins directory that accompanies your Clearspace distribution. Paths into your test Clearspace distribution assume that this plugin project is in the standalone Clearspace distribution at: <root>/plugins/plugins/<plugin_name>. Be sure to update the targets if you're testing another way, such as with the Clearspace WAR distribution.

 

Be sure to read the notes below about dependencies. The JAR files you'll need are included as part of Clearspace.

 

Running the Samples

  1. Build and deploy the code.

  2. Open Clearspace and create a wiki document. Add whatever text you like, but be sure to add the vimeo macro using the syntax described above.

  3. Preview or publish the document to see its output.

 

You should see the media displayed and ready to play.

 

 

Dependencies

In addition to requiring Java 1.5, this code requires a few of the libraries you'll find in the WEB-INF/lib directory of your Clearspace installation, listed below.

 

  • clearspace-<version>.jar

 

If you'd rather deploy the plugin manually, you can do that in one of two ways:

 

  • Just copy the plugin JAR file into the <jiveHome>/plugins directory. Your running Clearspace instance will deploy it automatically.

  • Open the admin console and navigate to System > Settings > Plugins, then browse for your plugin JAR file.

 

You can also download the plugin source from svn

 

Clearspace 1.X Plugin Files

 

Clearspace 2 Plugin Files

Average User Rating
(0 ratings)
MikeRoseMJM MikeRoseMJM  says:

Works like a charm! Very exciting.

 

It would be great if the plugin could recognize the different aspect ratio on Vimeo's HD content:

 

http://www.vimeo.com/hd

 

and if there were a way to pass Vimeo user credentials to display private/protected content.

 

--Mike

MikeRoseMJM MikeRoseMJM  says:

Hrm. Now not working anymore with 2.0.3 or 2.0.5.

Nathan Krake Nathan Krake  says in response to MikeRoseMJM:

Hi Miketrose.. was there a resolution to this? I have justed loaded up the jar file and tried embeding a video, but I get just the vimeo ID appearing.. is this what you were experiencing?

 

Cheers

Nathan

Nathan Krake Nathan Krake  says in response to Nathan Krake:

Scratch my last comment..

 

I went back into the document and re-entered the code and it worked fine.. although it appears to pickup the default window size 400 x 327.. Is there anyway that this can be changed?

 

I can see where this occurs within Vimeo, but after increasing the size of the video, the clip in my document remained at the default size..

 

Cheers

Nathan

Download Plugin for

Plugin Info

  • vimeo
  • by Aaron Johnson
  • Compatible with 1.x
  • Last updated: 6/1/2008
  • Jive Certified Plugin This plugin has been certified by Jive.

Bookmarked By (0)

More Like This

  • Retrieving data ...