Plugin Directory

Changeset 939310


Ignore:
Timestamp:
06/26/2014 08:46:36 PM (12 years ago)
Author:
perfect-web
Message:

Vwersion 1.1.0 - Fixed redirect URL for new Windows Live applications

Location:
pwebonedrive/trunk
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • pwebonedrive/trunk/admin-buttons.php

    r866880 r939310  
    11<?php
    22/**
    3  * @version 1.0.0
     3 * @version 1.1.0
    44 * @package OneDrive
    55 * @copyright © 2014 Perfect Web sp. z o.o., All rights reserved. http://www.perfect-web.co
     
    5656        'client_id:"'.get_option('pweb_onedrive_client_id').'"',
    5757        'task_url:"'.admin_url( 'admin-ajax.php?action=pweb_onedrive_' ).'"',
     58        'redirect_url:"'.plugins_url( 'callback.php', __FILE__ ).'"',
    5859        'spinner_url:"'.includes_url().'images/wpspin-2x.gif"'
    5960    );
  • pwebonedrive/trunk/admin.php

    r886240 r939310  
    11<?php
    22/**
    3  * @version 1.0.2
     3 * @version 1.1.0
    44 * @package OneDrive
    55 * @copyright © 2014 Perfect Web sp. z o.o., All rights reserved. http://www.perfect-web.co
     
    113113                            <?php _e('Register your site in', 'pwebonedrive'); ?>
    114114                            <a target="_blank" href="https://account.live.com/developers/applications/index"><?php _e('Windows Live application management', 'pwebonedrive'); ?></a>.<br>
    115                             <?php _e('Remember to set', 'pwebonedrive'); ?> <strong><?php _e('Redirect domain', 'pwebonedrive'); ?></strong>:
    116                             <script>document.write('<a href="'+document.location.protocol+'//'+document.location.host+'" target="_blank">'+document.location.protocol+'//'+document.location.host+'<'+'/a>')</script>
    117                             <?php _e('and', 'pwebonedrive'); ?> <strong><?php _e('Mobile client app: No', 'pwebonedrive'); ?></strong>,
    118                             <strong><?php _e('Enhanced redirection security: Disabled', 'pwebonedrive'); ?></strong>.<br>
     115                            <?php _e('Remember to set', 'pwebonedrive'); ?> <strong><?php _e('Redirect URL', 'pwebonedrive'); ?></strong>:
     116                            <a href="<?php echo plugins_url( 'callback.php', __FILE__ ); ?>" target="_blank"><?php echo plugins_url( 'callback.php', __FILE__ ); ?></a><br>
     117                            <?php _e('and', 'pwebonedrive'); ?> <strong><?php _e('Mobile client app: No', 'pwebonedrive'); ?></strong><br>
     118                            <?php _e('and if available', 'pwebonedrive'); ?> <strong><?php _e('Enhanced redirection security: Enabled', 'pwebonedrive'); ?></strong> <?php _e('(for applications created before June 2014)', 'pwebonedrive'); ?><br>
    119119                            <?php _e('Read how to', 'pwebonedrive'); ?> <a target="_blank" href="http://msdn.microsoft.com/library/cc287659.aspx"><?php _e('get your Client ID', 'pwebonedrive'); ?></a>.
    120120                        </p>
     
    164164
    165165
    166 add_action('wp_ajax_pweb_onedrive_callback', 'pweb_onedrive_ajax_callback');
    167 add_action('wp_ajax_nopriv_pweb_onedrive_callback', 'pweb_onedrive_ajax_callback');
    168 
    169 function pweb_onedrive_ajax_callback()
    170 {
    171     $client = LiveConnectClient::getInstance();
    172     $client->log(__FUNCTION__);
    173    
    174     echo $client->handlePageRequest();
    175    
    176     $client->log(__FUNCTION__.'. Die');
    177    
    178     die();
    179 }
    180 
    181166function pweb_onedrive_get_version() {
    182167   
  • pwebonedrive/trunk/js/onedrive.js

    r888832 r939310  
    11/**
    2  * @version 1.0.3
     2 * @version 1.1.0
    33 * @package OneDrive
    44 * @copyright © 2014 Perfect Web sp. z o.o., All rights reserved. http://www.perfect-web.co
     
    1313        client_id: null,
    1414        task_url: null,
     15        redirect_url: null,
    1516        spinner_url: null,
    1617        token: false,
     
    5051            WL.init({
    5152                client_id: this.options.client_id,
    52                 redirect_uri: this.options.task_url + "callback",
     53                redirect_uri: this.options.redirect_url,
    5354                response_type: "code",
    5455                logging: this.options.debug > 0
  • pwebonedrive/trunk/languages/pwebonedrive-en_GB.pot

    r900202 r939310  
    22msgstr ""
    33"Project-Id-Version: Perfect OneDrive\n"
    4 "POT-Creation-Date: 2014-04-15 15:52+0100\n"
    5 "PO-Revision-Date: 2014-04-15 15:55+0100\n"
     4"POT-Creation-Date: 2014-06-26 22:37+0100\n"
     5"PO-Revision-Date: 2014-06-26 22:38+0100\n"
    66"Last-Translator: Piotr Moćko <[email protected]>\n"
    77"Language-Team: Perfect-Web.co <[email protected]>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "X-Generator: Poedit 1.6.4\n"
     12"X-Generator: Poedit 1.6.5\n"
    1313"X-Poedit-Basepath: ../\n"
    1414"Plural-Forms: nplurals=2; plural=(n != 1);\n"
     
    3737msgstr ""
    3838
    39 #: admin-buttons.php:105
     39#: admin-buttons.php:106
    4040msgid "Error while saving selected resource. Try again."
    4141msgstr ""
    4242
    43 #: admin-buttons.php:107
     43#: admin-buttons.php:108
    4444msgid ""
    4545"Access token for current OneDrive session was not saved. Logout from "
     
    118118
    119119#: admin.php:115
    120 msgid "Redirect domain"
     120msgid "Redirect URL"
    121121msgstr ""
    122122
     
    130130
    131131#: admin.php:118
    132 msgid "Enhanced redirection security: Disabled"
     132msgid "and if available"
     133msgstr ""
     134
     135#: admin.php:118
     136msgid "Enhanced redirection security: Enabled"
     137msgstr ""
     138
     139#: admin.php:118
     140msgid "(for applications created before June 2014)"
    133141msgstr ""
    134142
  • pwebonedrive/trunk/liveconnect.php

    r930391 r939310  
    11<?php
    22/**
    3  * @version 1.0.5
     3 * @version 1.1.0
    44 * @package OneDrive
    55 * @copyright © 2014 Perfect Web sp. z o.o., All rights reserved. http://www.perfect-web.co
     
    3333            'authurl'       => 'https://login.live.com/oauth20_token.srf',
    3434            'tokenurl'      => 'https://login.live.com/oauth20_token.srf',
    35             'redirecturi'   => admin_url( 'admin-ajax.php?action=pweb_onedrive_callback' ),
     35            'redirecturi'   => plugins_url( 'callback.php', __FILE__ ),
    3636            'userefresh'    => true,
    3737            'storetoken'    => true,
     
    4848    }
    4949   
    50     public static function getInstance()
     50    public static function getInstance($options = null)
    5151    {
    5252        // Automatically instantiate the singleton object if not already done.
    5353        if (empty(self::$instance))
    5454        {
    55             self::setInstance(new LiveConnectClient);
     55            self::setInstance(new LiveConnectClient($options));
    5656        }
    5757        return self::$instance;
  • pwebonedrive/trunk/pwebonedrive.php

    r930391 r939310  
    44 * Plugin URI: http://www.perfect-web.co/wordpress/microsoft-onedrive-gallery-file
    55 * Description: Share easily your photos and files stored on Microsoft OneDrive. You can display a gallery with your photos or a link to a file for download.
    6  * Version: 1.0.5
     6 * Version: 1.1.0
    77 * Author: Piotr Moćko
    88 * Author URI: http://www.perfect-web.co
  • pwebonedrive/trunk/readme.txt

    r938396 r939310  
    55Requires at least: 2.8.0
    66Tested up to: 3.9.1
    7 Stable tag: 1.0.5
     7Stable tag: 1.1.0
    88License: GPLv3
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    1212
    1313== Description ==
    14 
    15 **Warning! OneDrvie plugin is not working with Windwos Live Applications created after 1st of June 2014. We are waiting for update of Microsoft OneDrive API documentation to make necessary changes in our software.**
    16 
    1714
    1815![OneDrive](http://www.perfect-web.co/media/com_skydrive/images/onedrive-logo.png)
     
    60571. Create **Windows Live ID** account for [OneDrive](https://onedrive.live.com/) if you do not have already
    61581. **Register your site** in [Windows Live application management](https://account.live.com/developers/applications/index) that WordPress could connect to your OneDrive.
    62 Remember to set your site URL as **Redirect domain** and **Mobile client app: No**, **Enhanced redirection security: Disabled**.
     59Remember to set **Redirect URL** *http://yourdomain.com/wp-content/plugins/pwebonedrive/callback.php*
     60and **Mobile client app: No**
     61and if available **Enhanced redirection security: Enabled** (for applications created before June 2014).
    6362[Read how to get your Client ID](http://msdn.microsoft.com/library/cc287659.aspx).
    64631. Go to **plugin configuration** panel and set all details from **Windows Live application management**.
     
    7069
    7170[Visit full documentation page](http://www.perfect-web.co/wordpress/microsoft-onedrive-gallery-file/documentation)
    72 
    73 
    74 **Warning! OneDrvie plugin is not working with Windwos Live Applications created after 1st of June 2014. We are waiting for update of Microsoft OneDrive API documentation to make necessary changes in our software.**
    75 
    7671
    7772= First use of OneDrive buttons =
     
    8984= Error in Microsoft popup =
    9085
     86Since plugin version 1.1.0 there is a new Redirect URL. Make sure you have updated it! You can also enable **Enhanced redirection security** in old Windows Live applications - created before June 2014.
     87
    9188If you got message: *Microsoft account is experiencing technical problems* in popup window then check **error_description** of URL in address bar.
    9289
    9390If you have following error description:
    9491*The provided value for the input parameter 'redirect_uri' is not valid. The expected value is 'https://login.live.com/oauth20_desktop.srf' or a URL which matches the redirect URI registered for this client application*
    95 then go to Windows Live application management and set in your application **Enhanced redirection security: Disabled**.
     92then make sure that you have plugin version 1.1.0 or newer
     93and you have set the same **Redirect URL** in Windows Live application management as in plugin configuration.
     94
     95Make sure that if you have set in Windows Live application management **redirect URL with www** then you access back-end and front-end site also with www otherwise it would not work.
     96If it is possible to access your site with and without www then you should correct it in .htaccess file and allow only one way.
    9697
    9798If you have other error description then send it to our support.
     
    123124== Changelog ==
    124125
     126= 1.1.0 / 26-06-2014 =
     127* Fixed redirect URL for new Windows Live applications
     128
    125129= 1.0.5 / 11-06-2014 =
    126130* Fixed hook where wp_register_style is used
     
    144148== Upgrade Notice ==
    145149
    146 N/A
     150= 1.1.0 =
     151New redirect URL for Windows Live applications! See configuration of plugin after upgrade.
Note: See TracChangeset for help on using the changeset viewer.