Plugin Directory

Changeset 1457486


Ignore:
Timestamp:
07/20/2016 10:56:54 AM (10 years ago)
Author:
playbuzz
Message:

Version 0.9.3

Location:
playbuzz
Files:
189 added
8 edited

Legend:

Unmodified
Added
Removed
  • playbuzz/trunk/css/admin.css

    r1431235 r1457486  
    550550    right: 0;
    551551    bottom: 0;
    552     background-color: #2F3338;
     552    background-color: #25282c;
    553553}
    554554#playbuzz_search_header .playbuzz_search_logo {
     
    701701    padding: 7px 20px;
    702702    border-radius: 3px;
    703     background-color: #f64040;
     703    background-color: #bc49ff;
    704704    box-sizing: border-box;
    705705    color: #fff;
     
    711711#playbuzz_search_input_form .playbuzz_create_button:hover,
    712712#playbuzz_search_input_form .playbuzz_create_button:focus {
    713     background-color: #dd3a3a;
     713    opacity: 0.85;
    714714}
    715715
  • playbuzz/trunk/index.php

    r1431255 r1457486  
    44Plugin URI:  https://www.playbuzz.com/
    55Description: Embed customized playful content from Playbuzz.com into your WordPress site
    6 Version:     0.9.2
     6Version:     0.9.3
    77Author:      Playbuzz
    88Author URI:  https://www.playbuzz.com/
  • playbuzz/trunk/js/playbuzz-tinymce.js

    r1431235 r1457486  
    1010         */
    1111
     12        var protocol = document.location.protocol === "https:" ? "https:" : "http:";
     13        var apiBaseUrl = protocol + "//rest-api-v2.playbuzz.com/v2/items";
    1214
    1315        // Get attribute from pattern
     
    487489            // Load items using the Playbuzz API
    488490            (jQuery).ajax({
    489                 url      : "http://rest-api-v2.playbuzz.com/v2/items",
     491                url      : apiBaseUrl,
    490492                type     : "get",
    491493                dataType : "json",
     
    501503                    // Server Error
    502504                    playbuzz_popup_message( results_title, translation.server_error, translation.try_in_a_few_minutes );
     505                    console.error("Couldn't get data: ", data);
    503506
    504507                },
     
    530533        window.playbuzz_featured_items = playbuzz_featured_items;
    531534
     535        function is_playbuzz_url( url ) {
     536            var valid = ["http://www.playbuzz.com/", "https://www.playbuzz.com", "www.playbuzz.com"];
     537            for(var i=0; i<valid.length; i++) {
     538                if(url.indexOf(valid[i]) === 0) {
     539                    return true;
     540                }
     541            }
     542
     543            return false;
     544        }
     545
    532546        // Playbuzz general search screen
    533547        function playbuzz_general_search( current_page ) {
     548            var search_param = (jQuery)("#playbuzz_search").val();
    534549
    535550            // Set variables
     
    542557            (jQuery)("#playbuzz_popup_tab_myitems").removeClass("playbuzz_active_tab");
    543558
     559            var dataObject;
     560            if(is_playbuzz_url(search_param)) {
     561                dataObject = {
     562                    playbuzzUrl : search_param
     563                };
     564            } else {
     565                dataObject = {
     566                    q         : search_param,
     567                    format    : (jQuery)("#playbuzz_search_type").val(),
     568                    sort      : (jQuery)("#playbuzz_search_sort").val(),
     569                    size      : items_per_page,
     570                    from      : (current_page*items_per_page)-items_per_page
     571                };
     572            }
     573
    544574            // Load items using the Playbuzz API
    545575            (jQuery).ajax({
    546                 url      : "http://rest-api-v2.playbuzz.com/v2/items",
     576                url      : apiBaseUrl,
    547577                type     : "get",
    548578                dataType : "json",
    549                 data     : {
    550                     q         : (jQuery)("#playbuzz_search").val(),
    551                     format    : (jQuery)("#playbuzz_search_type").val(),
    552                     sort      : (jQuery)("#playbuzz_search_sort").val(),
    553                     size      : items_per_page,
    554                     from      : (current_page*items_per_page)-items_per_page
    555                 },
     579                data     : dataObject,
    556580                error    : function( data ) {
    557581
    558582                    // Server Error
    559583                    playbuzz_popup_message( results_title, translation.server_error, translation.try_in_a_few_minutes );
     584                    console.error("Couldn't get data: ", data);
    560585
    561586                },
     
    607632            // Load items using the Playbuzz API
    608633            (jQuery).ajax({
    609                 url      : "http://rest-api-v2.playbuzz.com/v2/items",
     634                url      : apiBaseUrl,
    610635                type     : "get",
    611636                dataType : "json",
     
    622647                    // Server Error
    623648                    playbuzz_popup_message( results_title, translation.server_error, translation.try_in_a_few_minutes );
     649                    console.error("Couldn't get data: ", data);
    624650
    625651                },
     
    662688            }
    663689
     690            var search_param = (jQuery)("#playbuzz_search").val();
     691
    664692            // Set variables
    665693            var results_layout = "list",
     
    667695                items_per_page = 30;
    668696
     697            var dataObject;
     698            if(is_playbuzz_url(search_param)) {
     699                dataObject = {
     700                    playbuzzUrl: search_param
     701                };
     702            } else {
     703                dataObject = {
     704                    q                : search_param,
     705                    format           : (jQuery)("#playbuzz_search_type").val(),
     706                    sort             : (jQuery)("#playbuzz_search_sort").val(),
     707                    size             : items_per_page,
     708                    from             : (current_page*items_per_page)-items_per_page,
     709                    channelAlias     : site_settings.pb_user,
     710                    moderation       : false
     711                };
     712            }
     713
    669714            // Update tabs
    670715            (jQuery)("#playbuzz_popup_tab_content").removeClass("playbuzz_active_tab");
     
    673718            // Load items using the Playbuzz API
    674719            (jQuery).ajax({
    675                 url      : "http://rest-api-v2.playbuzz.com/v2/items",
     720                url      : apiBaseUrl,
    676721                type     : "get",
    677722                dataType : "json",
    678                 data     : {
    679                     q                : (jQuery)("#playbuzz_search").val(),
    680                     format           : (jQuery)("#playbuzz_search_type").val(),
    681                     sort             : (jQuery)("#playbuzz_search_sort").val(),
    682                     size             : items_per_page,
    683                     from             : (current_page*items_per_page)-items_per_page,
    684                     channelAlias     : site_settings.pb_user,
    685                     moderation       : false
    686                 },
     723                data     : dataObject,
    687724                error    : function( data ) {
    688725
    689726                    // Server Error
    690727                    playbuzz_popup_message( results_title, translation.server_error, translation.try_in_a_few_minutes );
     728                    console.error("Couldn't get data: ", data);
    691729
    692730                },
     
    773811                // Get Item info
    774812                (jQuery).ajax({
    775                     url      : "http://rest-api-v2.playbuzz.com/v2/items",
     813                    url      : apiBaseUrl,
    776814                    type     : "get",
    777815                    dataType : "json",
     
    933971                // Item Preview
    934972                (jQuery).ajax({
    935                     url      : "http://rest-api-v2.playbuzz.com/v2/items",
     973                    url      : apiBaseUrl,
    936974                    type     : "get",
    937975                    dataType : "json",
     
    945983                        // Clear preview
    946984                        (jQuery)("#playbuzz_item_preview").empty();
     985                        console.error("Couldn't get data: ", data);
    947986
    948987                    },
  • playbuzz/trunk/readme.txt

    r1431235 r1457486  
    1 === Playbuzz ===
     1=== Playbuzz ===
    22Contributors: playbuzz
    33Tags: Playbuzz, playful content, feed, feeds, embed, oembed, content, viral, related, syndication, related content, quiz, quizzes, test yourself, list, poll, Personality Quiz, personality, entertainment, celebs, celebrities, celebrity, animals
    44Requires at least: 3.9
    55Tested up to: 4.5.2
    6 Stable tag: 0.9.2
     6Stable tag: 0.9.3
    77License: GPLv2 or later
    88License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    9090
    9191== Changelog ==
     92
     93= 0.9.3 (2016-07-17) =
     94* Fixed a bug which preventing items to be fetched correctly in https
     95* Added the ability to search for items by pasting the full URL
     96* Rebranded the plugin with new logo and screenshots
    9297
    9398= 0.9.2 (2016-06-05) =
Note: See TracChangeset for help on using the changeset viewer.