? video.info ? video_updates_to_head.patch Index: video.module =================================================================== RCS file: /cvs/drupal/contributions/modules/video/video.module,v retrieving revision 1.51 diff -u -r1.51 video.module --- video.module 25 Aug 2006 23:43:28 -0000 1.51 +++ video.module 3 Sep 2006 04:45:18 -0000 @@ -35,10 +35,10 @@
'. t('For more information please read the configuration and customization handbook Video page.', array('%video' => 'http://www.drupal.org/handbook/modules/video/')) .'
'; return $output; - case 'admin/modules#description': + case 'admin/settings/modules#description': return t('Allows video nodes.'); case 'node/add#video': return t('Allows you to insert videos as nodes.'); @@ -91,6 +91,15 @@ 'path' => 'node/add/video', 'title' => t('video'), 'access' => user_access('create video')); + $items[] = array( + 'path' => 'admin/settings/video', + 'title' => t('Video settings'), + 'description' => t('administer video module settings'), + 'callback' => 'drupal_get_form', + 'callback arguments' => array('video_admin_settings'), + 'access' => user_access('administer site configuration'), + 'type' => MENU_NORMAL_ITEM, + ); } else { //If $may_cache is false. if (arg(0) == 'node' && is_numeric(arg(1))) { @@ -136,7 +145,7 @@ * array of link information */ function video_link($type, $node = NULL) { - $link = ''; + $link = array(); // Node links for a video if ($type == 'node' && $node->type == 'video' && $node->vidfile && user_access('access video')) { //If the video is of type youtube and multi-file downloads aren't turned on don't show the download link. @@ -149,38 +158,28 @@ if (user_access('play video')) { if (variable_get('video_displayplaylink', 1)) { - $link .= l(t('play'), "node/$node->nid/play", array('class' => 'outgoing', 'title' => t('play %link', array('%link' => $node->title)))); - $link .= ($display_download_link == 1) ? ' ' . t('or') . ' ' : ' | '; + $link['video_play'] = array( + 'title' => t('play'), + 'href' => "node/$node->nid/play", + 'attributes' => array( + 'class' => 'outgoing', + 'title' => t('play %link', array('%link' => $node->title)), + ), + ); } } - else { - $link .= l(t('login'), "user/login", array('class' => 'outgoing', 'title' => t('login to your account'))); - $link .= ' ' . t('or') . ' '; - $link .= l(t('register'), "user/register", array('class' => 'outgoing', 'title' => t('create a new account'))); - $link .= t(' to play video'); - $link .= ($display_download_link == 1) ? ' ' . t('or') . ' ' : ' | '; - } if ($display_download_link == 1) { - $link .= l(t('download'), "node/$node->nid/download", array('class' => 'outgoing', 'title' => t('download %link', array('%link' => $node->title)))); - $link .= ' | '; - } - if (variable_get('video_displayplaytime', 1)) { - $link .= format_interval($node->playtime_seconds) . ' | '; - } - if (variable_get('video_displayfilesize', 1) and $node->size != 0) { - $link .= format_size($node->size) . ' | '; - } - if (variable_get('video_playcounter', 1) and user_access('view play counter')) { - $link .= $node->play_counter . ' ' . t('plays') . ' | '; - } - if (variable_get('video_downloadcounter', 1) and user_access('view download counter')) { - $link .= $node->download_counter . ' ' . t('downloads') . ' | '; + $link['video_download'] = array( + 'title' => t('download'), + 'href' => "node/$node->nid/download", + 'attributes' => array( + 'class' => 'outgoing', + 'title' => t('download %link', array('%link' => $node->title)), + ), + ); } - - $link = substr($link, 0, -3); //Trim the last " | " off. - return array($link); } - return array(); + return $link; } /** @@ -242,7 +241,7 @@ * @return * string of form content or error message */ -function video_settings() { +function video_admin_settings() { global $base_url; //Must have "administer site configuration" and "administer video" privilages. @@ -318,8 +317,7 @@ '#default_value' => variable_get('video_downloadcounter', 1), '#description' => t('Counts a hit everytime someone downloads a video.')); - - return $form; + return system_settings_form($form); } /****************************************************************************** @@ -333,7 +331,11 @@ * array */ function video_node_info() { - return array('video' => array('name' => t('video'), 'base' => 'video')); + return array('video' => array( + 'name' => t('video'), + 'module' => 'video'), + 'description' => t('allow a variety of video formats to be posted as nodes in your site'), + ); } /** @@ -625,8 +627,10 @@ $node = node_prepare($node, $teaser); //Run the body through the standard filters. // include the video css file - theme_add_style(drupal_get_path('module', 'video').'/video.css'); + drupal_add_css(drupal_get_path('module', 'video').'/video.css'); + $node->content['body'] = array('#value' => $node->body); + return $node; } /******************************************************************** Index: plugins/video_image/video_image.module =================================================================== RCS file: /cvs/drupal/contributions/modules/video/plugins/video_image/video_image.module,v retrieving revision 1.3 diff -u -r1.3 video_image.module --- plugins/video_image/video_image.module 16 Jul 2006 09:41:09 -0000 1.3 +++ plugins/video_image/video_image.module 3 Sep 2006 04:45:18 -0000 @@ -63,7 +63,7 @@ break; case 'prepare': // check that image.module is actived - if ( !module_exist("image")) { + if ( !module_exists("image")) { db_query("UPDATE {system} SET status = 0 WHERE name ='video_image' AND type = 'module' LIMIT 1"); drupal_set_message(t('video_image module requires the %module module.