Plugin Directory

Changeset 756875


Ignore:
Timestamp:
08/15/2013 09:35:30 PM (13 years ago)
Author:
cmstactics
Message:

Adding version 2.0.2 with fixes for splash image generation and not having to resave permalink structure upon install.

Location:
wp-video-posts/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • wp-video-posts/trunk/classes/wpvp-core-class.php

    r738862 r756875  
    218218        $capture_image = $this->options['capture_image'];
    219219        $ffmpeg_path = $this->options['ffmpeg_path'];
    220         $dimensions = ($width!=''&&$height!='') ? '-s'.$width.'x'.$height : '';
     220        $dimensions = ($width!=''&&$height!='') ? '-s '.$width.'x'.$height : '';
    221221        $capture_image = $capture_image ? $capture_image : 5;
    222222        $extra = '-vframes 1 '.$dimensions.' -ss '.$capture_image.' -f image2';
     
    233233        $height = $this->options['video_height'];
    234234        $ffmpeg_path = $this->options['ffmpeg_path'];
    235         $dimensions = ($width!=''&&$height!='') ? ' -s'.$width.'x'.$height : '';
    236         $extr = $dimensions."-ar 44100 -b 384k -ac 2 ";
     235        $dimensions = ($width!=''&&$height!='') ? ' -s '.$width.'x'.$height : '';
     236        //typo fix
     237        $extra = $dimensions."-ar 44100 -b 384k -ac 2 ";
    237238        if ($encodeFormat=='mp4') {
    238239                $extra .= "-acodec libfaac -vcodec libx264 -vpre normal -refs 1 -coder 1 -level 31 -threads 8 -partitions parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 -flags +mv4 -trellis 1 -cmp 256 -me_range 16 -sc_threshold 40 -i_qfactor 0.71 -bf 0 -g 250";             
  • wp-video-posts/trunk/readme.txt

    r738862 r756875  
    55Requires at least: 3.2.1
    66Tested up to: 3.5.1
    7 Stable tag: 2.0.1
     7Stable tag: 2.0.2
    88
    99Upload videos to create custom video posts. With FFMPEG installed, it encodes
     
    127127
    128128== Changelog ==
     129= 2.0.2 =
     130- Fixed bug with dimensions for thumb video typo not having a space after the flag therefore the thumb was not generated nor saved.
     131- Added flash rewrite rule on plugin activation/deactivation to update teh permalink structure on custom post creation so that you don't have to resave your permalink settings to allow the links to the video posts to work.
     132
    129133= 2.0.1 =
    130134- Fixed bug with dimensions for thumb and video due to a type in the variable named being used.
  • wp-video-posts/trunk/wpvp.php

    r738862 r756875  
    44Plugin URI: http://cmstactics.com
    55Description: WP Video Posts creates a custom post for uploaded videos. You can upload videos of different formats (FLV, F4V, MP4, AVI, MOV, 3GP and WMV) and the plugin will convert it to MP4 and play it using Flowplayer. 
    6 Version: 2.0.1
     6Version: 2.0.2
    77Author: Alex Rayan, cmstactics
    88Author URI: http://cmstactics.com
     
    135135        }
    136136    /*
    137     **register custom post type: videos on init action hook
    138     *@access private
    139     */
    140     public function wpvp_register_videos_post_type(){
    141             $labels = array(
    142                     'name' => _x('Videos', 'post type general name'),
    143                     'singular_name' => _x('Video Item', 'post type singular name'),
    144                     'add_new' => _x('Add New Video', 'video item'),
    145                     'add_new_item' => __('Add New Video Item'),
    146                     'edit_item' => __('Edit Video Item'),
    147                     'new_item' => __('New Video Item'),
    148                     'view_item' => __('View Video Item'),
    149                     'search_items' => __('Search Video'),
    150                     'not_found' =>  __('Nothing found'),
    151                     'not_found_in_trash' => __('Nothing found in Trash'),
    152                     'parent_item_colon' => ''
    153             );
    154             $args = array(
    155                     'labels' => $labels,
    156                     'public' => true,
    157                     'publicly_queryable' => true,
    158                     'show_ui' => true,
    159                     'query_var' => true,
    160                     'menu_icon' => plugins_url('/images/', __FILE__) . 'videos_menu_icon.png',
    161                     //'rewrite' => true,
    162                     'rewrite' => array('slug'=>'videos'),
    163                     'capability_type' => 'post',
    164                     'hierarchical' => false,
    165                     'menu_position' => null,
    166                     'supports' => array('title','editor','thumbnail','comments','author','custom-fields'),
    167                     'taxonomies'=>array('post_tag')
    168               );
    169             register_post_type( 'videos' , $args );
    170             register_taxonomy_for_object_type('category','videos');
    171     }
     137    **register custom post type: videos on init action hook
     138    *@access static
     139    */
     140    static function wpvp_register_videos_post_type(){
     141            $labels = array(
     142                'name' => _x('Videos', 'post type general name'),
     143                'singular_name' => _x('Video Item', 'post type singular name'),
     144                'add_new' => _x('Add New Video', 'video item'),
     145                'add_new_item' => __('Add New Video Item'),
     146                'edit_item' => __('Edit Video Item'),
     147                'new_item' => __('New Video Item'),
     148                'view_item' => __('View Video Item'),
     149                'search_items' => __('Search Video'),
     150                'not_found' =>  __('Nothing found'),
     151                'not_found_in_trash' => __('Nothing found in Trash'),
     152                'parent_item_colon' => ''
     153            );
     154            $args = array(
     155                'labels' => $labels,
     156                'public' => true,
     157                'publicly_queryable' => true,
     158                'show_ui' => true,
     159                'query_var' => true,
     160                'menu_icon' => plugins_url('/images/', __FILE__) . 'videos_menu_icon.png',
     161                'rewrite' => array('slug'=>'videos'),
     162                'capability_type' => 'post',
     163                'hierarchical' => false,
     164                'menu_position' => null,
     165                'supports' => array('title','editor','thumbnail','comments','author','custom-fields'),
     166                'taxonomies'=>array('post_tag')
     167            );
     168            register_post_type( 'videos' , $args );
     169            register_taxonomy_for_object_type('category','videos');
     170    }
     171    /**
     172    *Flush rewrite rules on plugin reactivation
     173    *@access static
     174    **/
     175    static function wpvp_create_video_post_flush_rewrite_rules(){
     176            self::wpvp_register_videos_post_type();
     177            self::wpvp_flush_rewrite_rules();
     178    }
     179    /**
     180    *Flush rewrite rules
     181    *@access static
     182    **/
     183    static function wpvp_flush_rewrite_rules(){
     184            flush_rewrite_rules();
     185    }
    172186    /*
    173187    *Enqueue scripts on wp_enqueue_scripts action hook
     
    177191            wp_enqueue_script('wpvp_flowplayer',plugins_url('/js/', __FILE__).'flowplayer-3.2.10.min.js',array('jquery'),NULL);
    178192            wp_enqueue_script( 'wpvp_front_end_js',plugins_url('/js/', __FILE__).'wpvp-front-end.js',array('jquery'),NULL );
    179         wp_enqueue_script( 'wpvp_flowplayer_js',plugins_url('/js/',__FILE__).'wpvp_flowplayer.js',array('jquery','wpvp_flowplayer'),NULL);
    180         $swf_loc = plugins_url('/js/', __FILE__).'flowplayer-3.2.11.swf';
    181         $vars_to_pass = array('swf'=>$swf_loc);
    182         wp_localize_script('wpvp_flowplayer_js','object_name',$vars_to_pass);
     193            wp_enqueue_script( 'wpvp_flowplayer_js',plugins_url('/js/',__FILE__).'wpvp_flowplayer.js',array('jquery','wpvp_flowplayer'),NULL);
     194            $swf_loc = plugins_url('/js/', __FILE__).'flowplayer-3.2.11.swf';
     195            $vars_to_pass = array('swf'=>$swf_loc);
     196            wp_localize_script('wpvp_flowplayer_js','object_name',$vars_to_pass);
    183197            wp_enqueue_style('wpvp_widget',plugins_url('/css/', __FILE__).'style.css');
    184198    }
     
    390404
    391405add_action('plugins_loaded',array('WPVPMediaEncoder','init'));
     406register_activation_hook( __FILE__, array('WPVPMediaEncoder', 'wpvp_create_video_post_flush_rewrite_rules' ) );
     407register_deactivation_hook( __FILE__, array('WPVPMediaEncoder', 'wpvp_flush_rewrite_rules' ) );
    392408?>
Note: See TracChangeset for help on using the changeset viewer.