TOPIC:

Adding Videos (self-hosted, youtube, vimeo, etc.) 9 years 11 months ago #54663

  • TheMuffinMan's Avatar Topic Author
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 10064
  • Karma: 167
  • Thanks: 808
ContentBuilder provides a plugin for displaying self-hosted videos and YouTube, Vimeo and Dailymotion. The plugin can be obtained from here:

crosstec.org/solutions/contentbuilder.html

You'll find usage instructions in the plugin's details from within the plugin manager.

====================

Below there is an example how to embed videos without using the plugin. For example if you like to add a video community that is not supported. The example is for Youtube but the same principle will work for most video communities out there

====================

Let's say you created a data storage that provides a field to enter a youtube url and want to display an embeded video in the resulting article - with a simple setup you will be able to do so.

- Create your data storage with a field named "youtube" for the youtube url and publish it

- Create a view on that data storage item

- In that view, add this to the Content Template (you might want to turn off tinymce/jce as it will probably strip the iframe tag!)
<iframe src="http://www.youtube.com/embed/{youtube:value}" width="300" height="200" frameborder="0" allowfullscreen title="{youtube:label}"></iframe>

- In the Content Prepare tab, add this to strip the id from the url
$url = explode('?',$items["youtube"]["value"]);
$url = $url[1];
parse_str($url, $youtube);

$items["youtube"]["value"] = isset($youtube['v']) ? $youtube['v'] : '';

- Create an editable template

- In the settings of the text "youtube" text field add this in the "Scripts" tab under "Validation Code" (built-in form builder, NOT breezingforms):
$exploded = explode('?', $value);
if(count($exploded) != 2) {
  $msg = 'Invalid YouTube link!';
}
else {

   parse_str($exploded[1], $out);
   if(!isset($out['v']) || (isset($out['v']) && trim($out['v']) == '') ){
      $msg = 'Invalid YouTube link!';
   }
}

- Save the view and copy a youtube url into your youtube field when adding a new entry and you should see the video in the details/article

We are currently developing a video plugin with more features, but for now embed videos like described above. The procedure will be similiar for other video communitues, as well.

Regards,
Markus

Please Log in or Create an account to join the conversation.

Last edit: Post by TheMuffinMan.

Re: Adding Videos (self-hosted, youtube, vimeo, etc.) 9 years 7 months ago #66813

  • ecocentral
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 5
  • Thanks: 0
I would like to post a video from embed code along with a google map showing the route traveled in the video. I would also like to show graphs of speed, altitude etc. The poster would upload gps data and the embed code or url. The visitor could run the video and by clicking on the map route or the speed graph be able to forward the video to that time. Anyone got an ideaa how to accomplish that?

Jim

Please Log in or Create an account to join the conversation.

Re: Adding Videos (self-hosted, youtube, vimeo, etc.) 9 years 7 months ago #66868

  • TheMuffinMan's Avatar Topic Author
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 10064
  • Karma: 167
  • Thanks: 808
Hi,

that would require a lot of coding: 1. using the google maps api to populate the GPS data 2. adding javascript that is able to recognize a path and delivering the time. 3. transferring the time information to the video (depends if it is youtube videos, the local player or vimeo).

Well, the idea is great but contains a lot of research.

Regards,
Markus

Please Log in or Create an account to join the conversation.

Re: Adding Videos (self-hosted, youtube, vimeo, etc.) 9 years 7 months ago #67663

  • bremnerr
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 27
  • Thanks: 2
I'm a little unclear on how I would use this to list admin uploaded self-hosted videos. Would anyone be willing to break it down foe me?

Please Log in or Create an account to join the conversation.

Re: Adding Videos (self-hosted, youtube, vimeo, etc.) 9 years 7 months ago #67764

  • TheMuffinMan's Avatar Topic Author
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 10064
  • Karma: 167
  • Thanks: 808
Hi,

basically, you create a view with an upload field (for the self-hosted videos). Also make sure you downloaded, installed and enabled the video plugin.

Then you should disable "protect upload directory" in the view settings. (and in all other views that you might have, pointing to the same data storage or breezingforms form). So the video plugin has full access to the video.

Then in your content template call the plugin like this (assuming upload field is called "video"):

Content Template:
{CBVideo field: video; type: local_player; player-uploaded: true;}

List ("Item Wrap code" of "video" column):
${CBVideo type: local_player; player-uploaded: true;}

In the plugin's description there is a lot more information on this!

Regards,
Markus

Please Log in or Create an account to join the conversation.

Re: Adding Videos (self-hosted, youtube, vimeo, etc.) 9 years 7 months ago #67797

  • ecocentral
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 5
  • Thanks: 0
Thanks but I think this project is more complex than I first thought.

I have all the text fields and text areas I need. That is the easy part.

The project has 2 main parts. One is to get the data from a gps logger and/or camera into data arrays that a program can use to get usable data. There are many specs for the format produced from loggers. The most common is NMEA which has many different spec sentences that make it difficult to get data directly and know what data[X] actually contains. Fortunatelly there are online resources to convert a NMEA file to a GPX file which is actually an XML file type. Using xpath one can easily query the document to get useful data like time, speed, altitude, and waypoints.

The next part is to build a flash application to hold the video embed code, the google map embed code and the swf chart object. The flash app will produce a container swf that will contain the other 3 objects. This could be writen with flash or HTML5

All the code would be put into the "content prepare" tab of contentbuilder. Sounds easy but I think there is more to it than first meets the mind.

Please Log in or Create an account to join the conversation.

Moderators: ForumSupport
Time to create page: 0.051 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!