aboutsummaryrefslogtreecommitdiff
path: root/plugins/video_params
diff options
context:
space:
mode:
authorHeshan Wanigasooriya <heshanmw@gmail.com>2010-03-23 04:17:29 +0000
committerHeshan Wanigasooriya <heshanmw@gmail.com>2010-03-23 04:17:29 +0000
commit8041073c8d74e5d24e3b9f10143f3e4bd04db2de (patch)
tree89827aac40d499a41c4deae85719712630836568 /plugins/video_params
parentb66f50d2ce11d0cc8bb53af94ad86278d3fe8e51 (diff)
downloadvideo-8041073c8d74e5d24e3b9f10143f3e4bd04db2de.tar.gz
video-8041073c8d74e5d24e3b9f10143f3e4bd04db2de.tar.bz2
removing old files and commenting new file field and other files to the vidoe module page.
Diffstat (limited to 'plugins/video_params')
-rw-r--r--plugins/video_params/video_params.info7
-rw-r--r--plugins/video_params/video_params.module106
2 files changed, 0 insertions, 113 deletions
diff --git a/plugins/video_params/video_params.info b/plugins/video_params/video_params.info
deleted file mode 100644
index 612462e..0000000
--- a/plugins/video_params/video_params.info
+++ /dev/null
@@ -1,7 +0,0 @@
-;$Id$
-name = Video Params
-description = Enable addition of html params to object generated by video module. Useful if you need to use swf videos which needs params to be passed.
-dependencies[] = video
-package = "Video"
-core = 6.x
-
diff --git a/plugins/video_params/video_params.module b/plugins/video_params/video_params.module
deleted file mode 100644
index ee19a5c..0000000
--- a/plugins/video_params/video_params.module
+++ /dev/null
@@ -1,106 +0,0 @@
-<?php
-//$Id$
-/**
- * @file
- * Enable addition of params to object generated by video module
- *
- * @author Fabio Varesano <fvaresano at yahoo dot it>
- * @author Heshan Wanigasooriya <heshan at heidisoft.com><heshanmw at gmail dot com>
- * @todo
- */
-
-
-
-/**
- * Implementation of hook_help().
- */
-function video_params_help($path, $arg) {
- switch ($path) {
- case 'admin/modules#description':
- return t('Enable addition of html params to object generated by video module. Useful if you need to use swf videos which needs params to be passed.');
- }
-}
-
-
-/**
- * Implementation of hook_perm().
- */
-function video_params_perm() {
- return array('insert object params');
-}
-
-
-
-
-/**
- * Implementation of hook_form_alter()
- * We use this to add a text area to the video creation form.
- * In the text area the user will be able to insert his param value association.
- */
-function video_params_form_alter(&$form, &$form_state, $form_id) {
-
- if($form_id == 'video_node_form' && isset($form['video']) && user_access('insert object params')) {
-
- // get node object
- $node = $form['#node'];
-
- //We must convert the array data back to something that can go in the textarea.
- $textarea = '';
- if(is_array($node->serial_data['object_parameters'])) {
- foreach ($node->serial_data['object_parameters'] as $param => $value) {
- $textarea .= $param . '=' . $value . "\n";
- }
- $textarea = substr($textarea, 0, -1); //Remove the last newline "\n" from the end.
- }
- $form['parameters'] = array('#type' => 'fieldset', '#title' => t('HTML object parameters'), '#collapsible' => TRUE, '#collapsed' => TRUE, '#weight' => -17);
- $form['parameters']['object_parameters'] = array(
- '#title' => t('Embedded object parameters'),
- '#type' => 'textarea',
- '#rows' => 5,
- '#default_value' => $textarea,
- '#description' => t('Enter the values that you would like to be embedded in &#60;param name="param_1" value="value_1" /&#62; tags. Each parameter should be on a seperate line with an equal sign between the parameter and its assigned value. Like param=value for example.')
- );
- }
-}
-
-
-/**
- * Implementation of hook_nodeapi()
- */
-function video_params_nodeapi(&$node, $op, $teaser) {
- if($node->type == 'video') {
- switch ($op) {
- case 'submit':
- //Process the data in the object_parameters textarea.
- if ($node->object_parameters != '') { //Make sure the textarea was not empty.
- $lines = explode("\r\n", $node->object_parameters); //Make an array of each line from the textarea.
- foreach ($lines as $line) { //Loop through each line.
- $array = explode('=', $line); //Break apart at the "=" sign. $line should be in format param=value
- $node->serial_data['object_parameters'][$array[0]] = $array[1]; //Assign the "param" as the key and "value" as the value.
- }
- }
- break;
- }
- }
-}
-
-
-/**
- * Implementation of hook_v_get_param() - video module specific hook
- */
-function video_params_v_get_params(&$node) {
-
- $serial_data = $node->serial_data;
-
- if(is_array($serial_data) && array_key_exists('object_parameters', $serial_data) && !empty($serial_data['object_parameters'])) {
- return $serial_data['object_parameters'];
- }
- else {
- return NULL;
- }
-}
-
-
-
-
-