=====Loading a Vimeo video===== This action inserts a Vimeo video into a page by loading it into an iframe. It was adapted from VideoAction by TormodHaugen, which embeds the video instead. That also works fine, but it does not match XHTML specification. To use this action, copy or note the video **id** from the Vimeo url (currently a large integer). Use it as parameter when calling the action. Optional parameters are **width** and **height** which are set with arbitrary default values. An example: ""{{vimeo id="13942000" width="800" height="600"}}"" Since version 0.68, it is also possible to embed a [[http://vimeo.com/help/faq#what_the_heck_is_a_hubnut | Hubnut]] with this action. Instead of using the **id**, use the **data** parameter to do this. It needs the full URL that Vimeo gives you when creating the Hubnut. To illustrate, the URL that you will use as **data** needs to be taken from code that looks like this: %%(html) %% And you need to call it like this: ""{{vimeo data="http://vimeo.com/hubnut/?user_id=thisisyou&color=00adef&background=ffffff&fullscreen=1&slideshow=0&stream=album&id=someinteger&server=vimeo.com" width="800" height="600"}}"" The Hubnut feature was written in a hurry, so I cannot make any statement about its safety. Please think for yourself before using it. (or make a statement about its safety right here) Save the following file as ''vimeo.php'' under the plugins/actions folder: %%(php) $value) { if ($param == 'id') {$id = $this->htmlspecialchars_ent($vars['id']);} if ($param == 'data') {$data = $vars['data'];} if ($param == 'width' && (int)$vars['width'] > 0) {$width = (int)$vars['width'];} if ($param == 'height' && (int)$vars['height'] > 0) {$height = (int)$vars['height'];} } } if($id == '') { $errors .= 'You did not provide a correct id or Hubnut URL! ' . "\n"; } // building output if ( $data != '' ){ $output = ''; $output = str_replace("%width", $width, $output); $output = str_replace("%height", $height, $output); $output = str_replace("%data", $data, $output); } elseif ( $id != '' ) { $output = '' . "\n"; } else { $output = $errors; } echo $output; ?> %% CategoryUserContributions