OneDrive Gallery & File Documentation for WordPress

WordPress plugin
  1. Plugin configuration

    Register your site in Windows Live application management that WordPress could connect to your OneDrive.

    Remember to set Redirect URL as shown in plugin configuration and it should look like this:
    http://yourdomain.com/path-to-wordpress/wp-content/pwebonedrive/callback.php
    or if you have enabled Permalinks in WordPress Settings then it should look like this:
    http://yourdomain.com/path-to-wordpress/pwebonedrive/callback

    and Mobile client app: No
    and if available Enhanced redirection security: Enabled (for applications created before June 2014).

    Read how to get your Client ID.

    Each time you would enable / disable WordPress Permalinks Settings, Redirect URL will change and you will have to update it in Windows Live Application.

  2. First run of OneDrive buttons

    Disable pop-up windows blocking, because OneDrive would display login and permissions screen in a new pop-up window.

  3. Change size of thumbnails in gallery

    OneDrive offers only two sizes of thumbnails.
    To change it, add to your shortcode a following attribute:
    [onedrivegallery id="..." thumbnail="thumbnail"]
    Default thumbnail size is:
    [onedrivegallery id="..." thumbnail="album"]

    You can also change size of lightbox image, by adding to your shortcode a following attribute:
    [onedrivegallery id="..." full="full"]
    Default lightbox image size is:
    [onedrivegallery id="..." full="normal"]

  4. Blank Lightbox or error

    If you clicked OneDrive button in editor and nothing has happened after a few minutes or a blank Lightbox window has display with message: Error Microsoft OneDrive, then remove cookie named: wl_auth and reload post edit page.

    Use OneDrive emergency exit button to close all blank layers.

    Remember to save post before using OneDrive buttons or at least before reloading page.

  5. Microsoft account is experiencing technical problems

    Since 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.

    Each time you would enable / disable WordPress Permalinks Settings, Redirect URL will change and you will have to update it in Windows Live Application. Make sure that it is up to date.

    If you get such message in popup window then check error_description of URL in address bar.

    If you have following error description:
    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
    then make sure that you have plugin version 1.1.0 or newer
    and you have set the same Redirect URL in Windows Live application management as in plugin configuration.

    Make 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.
    If it is possible to access your site with and without www then you should correct it in .htaccess file and allow only one way.

    If you have other error description then send it to our support.

  6. Debugging

    Enable debug in WordPress (read how to).

    Go to Post editor. Remove wl_auth cookie. Reload page. Try to use OneDrive button again. You will see some alerts with debug informations.

    Check also /wp-content/debug.log file. Read only lines with pweb_onedrive or LiveConnectClient. If you would not find there any error message then send this log file to our support.

  7. Good practices in using OneDrive buttons

    Save post before using OneDrive buttons. Disable pop-up windows blocking.

  8. Gallery shortcode attributes

    Never enter shortcode on your own, always use editor button to load proper ID of OneDrive folder

    [onedrivegallery attribute="value"]

    After inserting shortcode with editor button you can enter following attributes:

    • single = 1 - signle image which shows full gallery in Lightbox
    • thumbnail = thumbnail, album - thumbnail image size
    • full = full, normal - full image size
    • sort = default, updated, name, size - sort images by
    • sort_order = asc, desc - images sort order
    • limit = integer - limit number of images
    • offset = integer - start offset
    • class = string - custom CSS class for gallery container

  9. File shortcode attributes

    Never enter shortcode on your own, always use editor button to load proper ID of OneDrive folder

    [onedrivefile attribute="value"]

    After inserting shortcode with editor button you can enter following attributes:

    • icon = 1 - show file icon before filename (default), 0 - hide
    • size = 1 - show formated file size after filename (default), 0 - hide
    • open = 1 - open file in a new tab, 0 - force download (default)
    • embed = 1 - embed file in content of page
    • image = album, thumbnail, normal (default), full - size of image; download - display image as link for download
    • width = integer - width of image or embeded iframe
    • height = integer - height of image or embeded iframe
    • class = string - custom CSS class for file container

  10. Folder shortcode attributes

    Never enter shortcode on your own, always use editor button to load proper ID of OneDrive folder

    [onedrivefolder attribute="value"]

    After inserting shortcode with editor button you can enter following attributes:

    • icon = 1 - show file icon before filename (default), 0 - hide
    • size = 1 - show formated file size after filename (default), 0 - hide
    • open = 1 - open file in a new tab, 0 - force download (default)
    • sort = default, updated, name, size - sort files by
    • sort_order = asc, desc - files sort order
    • limit = integer - limit number of files
    • offset = integer - start offset
    • class = string - custom CSS class for folder container