Plugin Directory

Changeset 469835


Ignore:
Timestamp:
12/01/2011 11:40:18 AM (14 years ago)
Author:
CJ_Jackson
Message:

Updated to 0.1.25

Location:
html5avmanager
Files:
78 added
3 edited

Legend:

Unmodified
Added
Removed
  • html5avmanager/trunk/html5avmanager.php

    r469250 r469835  
    55  Plugin URI: http://cj-jackson.com/
    66  Description: A video manager with a Modal-View-Controller and video uploader.
    7   Version: 0.1.24
     7  Version: 0.1.25
    88  Author: Christopher John Jackson
    99  Author URI: http://cj-jackson.com/
     
    3232 * SOFTWARE.
    3333 */
     34$noPDO = false;
     35
     36if (!class_exists("PDO")) {
     37    $noPDO = true;
     38} elseif (!in_array('mysql', PDO::getAvailableDrivers())) {
     39    $noPDO = true;
     40}
     41
     42if ($noPDO) {
     43    deactivate_plugins(basename(__FILE__));
     44    wp_die("HTML5 AV Manager for Wordpress failed to activate, because your
     45        server does not have PDO or PDO_MYSQL installed, make sure you have PDO
     46        and PDO_MYSQL installed or ask your host to install it for you,
     47        Thank you!");
     48}
     49
    3450require_once 'lib/time.php';
    3551require_once 'lib/html5av_dbal.php';
     
    6278        $pluginfolder = end($pluginfolder);
    6379        // Set up paths
    64         self::$DIR = WP_PLUGIN_DIR . '/'.$pluginfolder;
    65         self::$URL = WP_PLUGIN_URL . '/'.$pluginfolder;
     80        self::$DIR = WP_PLUGIN_DIR . '/' . $pluginfolder;
     81        self::$URL = WP_PLUGIN_URL . '/' . $pluginfolder;
    6682        self::$UPLOAD_DIR = WP_CONTENT_DIR . '/videoaudio';
    6783        self::$UPLOAD_URL = WP_CONTENT_URL . '/videoaudio';
     
    119135        );
    120136
    121         $videoView = array(
    122             'default'
    123         );
    124 
    125         $audioView = array(
    126             'default'
    127         );
    128 
    129137        self::$xml_mode = false;
    130138
     
    140148        if (file_exists(self::$theme_path . '/videoaudio/setting.php')) {
    141149            include self::$theme_path . '/videoaudio/setting.php';
     150            $viewsDir = self::$theme_path . '/videoaudio/';
    142151        } else {
    143152            include self::$DIR . '/view/videoaudio/setting.php';
    144         }
    145 
    146 
    147         self::$video_view = $videoView;
    148         self::$audio_view = $audioView;
    149        
     153            $viewsDir = self::$DIR . '/view/videoaudio/';
     154        }
     155
     156        $audioViews = glob($viewsDir . "audio-*.php");
     157
     158        foreach ($audioViews as $view) {
     159            $view = basename($view);
     160            $view = substr($view, 6, -4);
     161            if ($view != 'xml') {
     162                self::$audio_view[] = $view;
     163            }
     164            unset($view);
     165        }
     166
     167        $videoViews = glob($viewsDir . "video-*.php");
     168
     169        foreach ($videoViews as $view) {
     170            $view = basename($view);
     171            $view = substr($view, 6, -4);
     172            if ($view != 'xml') {
     173                self::$video_view[] = $view;
     174            }
     175            unset($view);
     176        }
     177
    150178        $db = new html5av_dbal();
    151179        $db->setUpTables();
     
    581609        if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE)
    582610            return;
    583        
     611
    584612        // Get the correct post ID if revision.
    585613        if ($wpdb->get_var("SELECT post_type FROM $wpdb->posts WHERE ID=$postID") == 'revision')
  • html5avmanager/trunk/readme.txt

    r469250 r469835  
    55Requires at least: 2.7
    66Tested up to: 3.2
    7 Stable tag: 0.1.24
     7Stable tag: 0.1.25
    88
    99A HTML5 Audio and Video manager that take full advantage of
     
    3535This plugin also includes [MediaElement.js](http://mediaelementjs.com/)
    3636
    37 Demo at: [http://cj-jackson.com/projects/html5-av-manager-for-wordpress/](http://cj-jackson.com/projects/html5-av-manager-for-wordpress/)
     37Demo at: [http://cj-jackson.com/portfolio/html5-av-manager-for-wordpress/](http://cj-jackson.com/portfolio/html5-av-manager-for-wordpress/)
    3838
    3939Note: This plugin requires PHP 5.2 and above with PDO (with PDO_MYSQL).
     
    5151== Screenshots ==
    5252
    53 1. Options in Admin Sidebar
     531. Options in Admin Sidebar.
    54542. HTML5 AV Settings.
    55553. Add Audio.
     
    6161
    6262== Changelog ==
     63
     64= 0.1.25 +
     65* Added sanity check for PDO & PDO_MYSQL existent, so no more Fatal Error
     66 because PDO did not exist.
     67* Now detect views automactically, no longer need to modify list.
    6368
    6469= 0.1.24 =
  • html5avmanager/trunk/view/videoaudio/setting.php

    r396591 r469835  
    1111wp_enqueue_style('mediaelementjs-html5av',
    1212        html5av_manager::getUrl().'/lib/mediaelement/mediaelementplayer.css');
    13 
    14 /*
    15  * Note: There no need to add xml view, also for example when adding 'alt' view
    16  * for video, make sure you create video-alt.php, or simply just copy and paste
    17  * from video-default.php
    18  */
    19 
    20 $videoView = array (
    21     'default'
    22 );
    23 
    24 $audioView = array (
    25     'default'
    26 );
Note: See TracChangeset for help on using the changeset viewer.