Plugin Directory

Changeset 1168652


Ignore:
Timestamp:
05/27/2015 03:30:25 PM (11 years ago)
Author:
RWSDev Team
Message:

updated and tested for compatability with WP 4.2.2

Location:
bliptv-admin-menu/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • bliptv-admin-menu/trunk/readme.txt

    r668779 r1168652  
    11=== Plugin Name ===
    2 Contributors: rwsdev-team
    3 Donate link: http://rwsdev.net/bliptv-admin-menu
     2Contributors: CrypTech Studios
     3Donate link: http://cryptechstudios.com/wp-plugins/bliptv-admin-menu
    44Tags: blip, blip.tv, api, video, upload
    55Requires at least: 3.0
    6 Tested up to: 3.5.1
     6Tested up to: 4.2.2
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4040
    4141== Changelog ==
    42 
     42= 2.0 =
     43* fine tuned and compatability tested for 4.2.2.
    4344= 1.0 =
    4445* updated path info.
  • bliptv-admin-menu/trunk/rwsdev-blip.php

    r629434 r1168652  
    22/*
    33Plugin Name: bliptv-admin-menu
    4 Plugin URI: http://rwsdev.net/bliptv-admin-menu
     4Plugin URI: http://CrypTechStudios.com/wp-plugins/bliptv-admin-menu
    55Description: Wordpress admin area interface for Blip.tv API.  Allow upload, delete and edit of uploaded files on blip.tv
    6 Author: Jason Becht (RWS Dev Team)
    7 Version: 1.0  Fri Nov 23 11:44:53 2012
    8 Author URI: http://rwsdev.net/
     6Author: Jason Becht (CrypTech Studios, Inc.)
     7Version: 2.0  Wed May 27 10:05:00 2015
     8Author URI: http://CrypTechStudios.com/
    99*/
    1010
     
    1212    class RWSDevBlip {
    1313        const DB_VERSION = 1;
    14    
     14
    1515        public function __construct() {
    1616            /* globalize $wpdb */
    1717            global $wpdb;
    18            
     18
    1919            /* include for pluggable.php */
    2020            include_once(ABSPATH.'wp-includes/pluggable.php');
     
    2222            /* blipPHP class */
    2323            include_once('includes/blip-php/blipPHP.php');
    24            
     24
    2525            /* set plugin path and url */
    2626            $this->pluginpath = dirname(__FILE__);
    2727            $this->pluginurl = WP_PLUGIN_URL.'/bliptv-admin-menu/';
    28            
     28
    2929            /* set table names */
    30            
     30
    3131            /* hooks, actions and filters */
    3232            register_activation_hook(__FILE__,array($this,'RWSDevBlip_create_tables'));
     
    3737            add_action('wp_ajax_load_video_info',array($this,'load_video_info'));
    3838            add_action('wp_ajax_delete_video',array($this,'delete_video'));
    39            
    40            
     39
     40
    4141            /* localize $_POST and $_FILES data if we have it */
    4242            $this->post_data = (isset($_POST))?$_POST:NULL;
    4343            $this->files_data = (isset($_FILES))?$_FILES:NULL;
    44            
     44
    4545        }
    4646        public function RWSDEVBlip_activate() {
     
    5454            /* set table names */
    5555            $this->videos_table = $wpdb->prefix."RWSDevBlip_videos";
    56            
     56
    5757            /* SQL for queries */
    5858            $sql[0] = "CREATE TABLE $this->videos_table(
     
    6868                UNIQUE INDEX(blip_id)
    6969                );";
    70            
     70
    7171            require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
    7272            foreach ($sql as $sqlQuery) {
     
    8585            wp_register_style('RWSDevBlip-style', $css_path);
    8686            wp_enqueue_style('RWSDevBlip-style');
    87            
     87
    8888            /* enqueue wp jquery */
    8989            wp_enqueue_script('jquery');
     
    106106            /* globalize $wpdb */
    107107            global $wpdb;
    108    
     108
    109109            if (isset($this->post_data['submit'])) {
    110110                $this->update_video();
     
    117117            /* globalize $wpdb */
    118118            global $wpdb;
    119            
     119
    120120            /* remove all video items from DB for refresh */
    121121            $wpdb->query("DELETE FROM ".$wpdb->prefix."RWSDevBlip_videos");
     
    123123            /* instantiate blipPHP */
    124124            $blip = new blipPHP(get_option('RWSDevBlip_username'),get_option('RWSDevBlip_password'));
    125            
     125
    126126            /* Blip API documentation states it returns 100 videos per page
    127127             * however they only return 12 and no indication of how many pages
     
    172172            global $wpdb;
    173173            if (check_admin_referer('RWSDevBlip-videos-form','_wpnonce')) {
    174    
     174
    175175                /* instantiate blipPHP */
    176176                $blip = new blipPHP(get_option('RWSDevBlip_username'),get_option('RWSDevBlip_password'));
    177                
     177
    178178                $videoArr = $this->post_data['video'];
    179                
     179
    180180                /* send edit to blip */
    181181                $res = $blip->edit($videoArr['blip_id'],$videoArr['title'],$videoArr['description']);
    182                
     182
    183183                /* if resp status is OK then update the db for the video */
    184184                if ($res->status == 'OK') {
     
    207207                /* instantiate blipPHP */
    208208                $blip = new blipPHP(get_option('RWSDevBlip_username'),get_option('RWSDevBlip_password'));
    209                
     209
    210210                $videoArr = $this->post_data['video'];
    211                
     211
    212212                /* send edit to blip */
    213213                $res = $blip->upload($target_path,$videoArr['title'],$videoArr['description']);
    214                
    215                
     214
     215
    216216                /* if resp status is OK then update the db for the video */
    217217                if ($res->status == 'OK') {
    218218                    $videoArr['blip_id'] = $res->payload->asset->item_id;
    219                    
     219
    220220                    /* remove local temp video */
    221221                    unlink($target_path);
     
    248248            $id = $this->post_data['id'];
    249249            $reason = ($this->post_data['reason'])?$this->post_data['reason']:'No reason given';
    250            
     250
    251251            /* get the blip_id for local video id */
    252252            $blip_id = $wpdb->get_var("SELECT blip_id FROM ".$wpdb->prefix."RWSDevBlip_videos WHERE id = ".$id);
     
    254254            $blip = new blipPHP(get_option('RWSDevBlip_username'),get_option('RWSDevBlip_password'));
    255255            $res = $blip->delete($blip_id,$reason);
    256            
     256
    257257            if ($res->payload->asset->deleted == 'true') {
    258258                $wpdb->delete($wpdb->prefix."RWSDevBlip_videos",array('id' => $id));
Note: See TracChangeset for help on using the changeset viewer.