Changeset 1904

Show
Ignore:
Timestamp:
2006-01-31 13:30:17 (3 years ago)
Author:
ctford
Message:

Remove remaining dependencies to class_video.inc- we want to be able to use Annodexes even if for some reason the video module isn't present.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Anode/trunk/acidfree/class_annodex.inc

    r1903 r1904  
    2828 
    2929require_once('image_manip.inc'); 
    30 require_once('class_video.inc'); 
    3130require_once("output_annodex.php"); 
    3231 
     
    7675    switch ($op) { 
    7776    case 'new': 
    78         $nailer = variable_get('acidfree_video_thumbnailer', 'none'); 
     77        $nailer = variable_get('acidfree_annodex_thumbnailer', 'none'); 
    7978        $output = ''; 
    8079        switch ($nailer) { 
    8180        case 'none': 
    82             $output .= form_textfield(t('Video width'), $name_prefix.'videox', 320, 10, 10); 
    83             $output .= form_textfield(t('Video height'), $name_prefix.'videoy', 240, 10, 10); 
     81            $output .= form_textfield(t('Annodex width'), $name_prefix.'annodexx', 320, 10, 10); 
     82            $output .= form_textfield(t('Annodex height'), $name_prefix.'annodexy', 240, 10, 10); 
    8483            break; 
    8584        case 'user': 
    86             $output .= form_file(t('Video thumbnail'), $name_prefix.'userthumb', 50, NULL, true); 
     85            $output .= form_file(t('Annodex thumbnail'), $name_prefix.'userthumb', 50, NULL, true); 
    8786            break; 
    8887        case 'mplayer': 
     
    105104 
    106105function _class_annodex_destroy(&$node) { 
    107         return( _class_video_destroy($node) ); 
    108106} 
    109107 
    110108function _class_annodex_mplayer_options() { 
    111         return( _class_video_mplayer_options() );  
     109    $name = 'acidfree_path_to_mplayer'; 
     110    $mplayer_path = variable_get($name, '/usr/bin/mplayer'); 
     111    if (!is_executable($mplayer_path)) 
     112        form_set_error($name, t('Path to mplayer is not correct — Annodex thumbnails will not be generated')); 
     113    return  form_textfield(t('Path to mplayer'), $name, $mplayer_path, 64, 64); 
     114
     115 
     116function _class_annodex_manipulation_options() { 
     117    $options = array( 
     118            'none'=>t('No thumbnail — use Annodex image'), 
     119            'user'=>t('User uploaded thumbnails'), 
     120            'mplayer'=>t('Use mplayer to create thumbnails') 
     121    ); 
     122    $name = 'acidfree_annodex_thumbnailer'; 
     123    $value = variable_get($name, 'none'); 
     124    return form_radios(t('Annodex thumbnail options'), $name, $value, $options). 
     125        acidfree_call("_class_annodex_{$value}_options"); 
    112126} 
    113127 
     
    124138 
    125139function theme_acidfree_print_thumb_annodex(&$node, $parent=null) { 
    126         return( theme_acidfree_print_thumb_video( $node, $parent ) ); 
    127140} 
    128141