Plugin Directory

Changeset 2147059


Ignore:
Timestamp:
08/28/2019 12:03:55 PM (7 years ago)
Author:
CommonNinja
Message:

Common Ninja script update

Location:
charts-ninja-graphs-and-charts/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • charts-ninja-graphs-and-charts/trunk/chartsninja.php

    r845829 r2147059  
    22/*
    33 * Plugin Name: Charts Ninja - Graphs and Charts
    4  * Plugin URI: http://chartsninja.com
     4 * Plugin URI: https://charts.commoninja.com
    55 * Description: Add & create <strong>Graphs and Charts</strong> for your Wordpress website on-the-fly. No prior knowledge required. Just a simple integration with Charts Ninja.
    6  * Version: 1.0.1
     6 * Version: 2.0.1
    77 * Author: Common Ninja
    8  * Author URI: http://commoninja.com/
     8 * Author URI: https://www.commoninja.com/
    99 * License: GPLv2 or later
    1010 */
     
    1919function chartsninja_shortcode( $atts ) {
    2020    extract( shortcode_atts( array(
    21         'chartid' => 'd0d6bb681ba34b49b6cb2541f6a6e889'
     21        'chartid' => '95320fe4-2f7a-4b1b-a9b0-4551533dab58'
    2222    ), $atts ) );
    2323
     
    3232    }
    3333   
    34     $html = "<div id=\"ChartsNinja_$chartid\"></div>
     34    $html = "<div class=\"commonninja_component\" comp-type=\"chart\" comp-id=\"$chartid\"></div>
    3535    <script type=\"text/javascript\">
    3636    (function() {
    37         var pn = document.createElement('script'); pn.type = 'text/javascript';
    38         pn.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'chartsninja.com/api/chart/$chartid?pnurl=' + window.location.href;
    39         var s = document.getElementsByTagName('head')[0].appendChild(pn);
     37        var script = document.createElement('script');
     38        script.type = 'text/javascript';
     39        script.src = 'https://cdn.commoninja.com/sdk/latest/commonninja.js';
     40        document.getElementsByTagName('head')[0].appendChild(script);
    4041    })();
    4142    </script>";
  • charts-ninja-graphs-and-charts/trunk/js/chartsninja.js

    r828739 r2147059  
    66            image : url + '/chartsninja.png',
    77            onclick : function() {
    8                 var chartID = prompt("Chart ID (from http://chartsninja.com)", "");
    9                 if (chartID != null && chartID != '') {
    10                     ed.execCommand('mceInsertContent', false, '[chartsninja chartid="' + chartID + '"]');
    11                     /*var height = prompt("Height (in pixels)", "500");
    12                     if(height != null && height != '') {
    13                         ed.execCommand('mceInsertContent', false, '[chartsninja chartid="' + chartID + '" height="' + height + '"]');
    14                     }
    15                     else {
    16                         ed.execCommand('mceInsertContent', false, '[chartsninja chartid="' + chartID + '"]');
    17                     }*/
    18                 }
     8               var chartID = prompt("Chart ID (from https://charts.commoninja.com)", "");
     9               if (chartID != null && chartID != '') {
     10                  ed.execCommand('mceInsertContent', false, '[chartsninja chartid="' + chartID + '"]');
     11               }
    1912            }
    2013         });
     
    2518      getInfo : function() {
    2619         return {
    27             longname : "Charts",
     20            longname : 'Charts',
    2821            author : 'Common Ninja',
    29             authorurl : 'http://commoninja.com',
    30             infourl : 'http://commoninja.com',
    31             version : "1.0"
     22            authorurl : 'https://www.commoninja.com',
     23            infourl : 'https://charts.commoninja.com',
     24            version : '1.0'
    3225         };
    3326      }
  • charts-ninja-graphs-and-charts/trunk/readme.txt

    r2031115 r2147059  
    33Donate link: https://commoninja.com
    44Tags: Charts, Graphs, Chart, Graph, HTML5 Chart, HTML5 Graph, Pie, Line chart, Pyramid chart, Bar chart, Stacked chart, Donut chart, Wordpress graphs, Charts and Graphs, Common Ninja
    5 Requires at least: 3.0
    6 Tested up to: 5.1
    7 Stable tag: 1.0.1
     5Requires at least: 4.0
     6Tested up to: 5.2.2
     7Stable tag: 2.0.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1313== Description ==
    1414
    15 [ChartsNinja](https://www.chartsninja.com/about) Charts Ninja is a super powerful tool for adding beautiful graphs and charts to your website. Charts Ninja's charts are responsive, meaning, they will be displayed properly on all devices including smartphones, tablets, laptops, and desktop computers.
     15[ChartsNinja](https://charts.commoninja.com/about) Charts Ninja is a super powerful tool for adding beautiful graphs and charts to your website. Charts Ninja's charts are responsive, meaning, they will be displayed properly on all devices including smartphones, tablets, laptops, and desktop computers.
    1616
    17 [See thousands of graphs and charts examples created with Charts Ninja.](https://www.chartsninja.com/charts)
     17[See thousands of graphs and charts examples created with Charts Ninja.](https://charts.commoninja.com/charts)
    1818
    19 **IMPORTANT: You will FIRST need to go to [Charts Ninja](https://www.chartsninja.com), sign up for FREE, and create a new chart before you can embed it into your Wordpress website.**
     19**IMPORTANT: You will FIRST need to go to [Charts Ninja](https://charts.commoninja.com), sign up for FREE, and create a new chart before you can embed it into your Wordpress website.**
    2020
    2121Got any feedback or question? Contact us via contact{at}chartsninja.com.
     
    2727= Creating a chart =
    2828
    29 1. Create a free account at [Charts Ninja](https://www.chartsninja.com).
     291. Create a free account at [Charts Ninja](https://charts.commoninja.com).
    30302. Create a new chart by clicking the "Start Now" button on Charts Ninja's homepage.
    31313. Customize your chart. Add data, select chart type, and change colors.
     
    5959= Q: How do I start using Charts Ninja? =
    6060
    61 Sign up to [Charts Ninja](https://www.chartsninja.com), create a new chart and install the Charts Ninja plugin on your Wordpress admin panel.
     61Sign up to [Charts Ninja](https://charts.commoninja.com), create a new chart and install the Charts Ninja plugin on your Wordpress admin panel.
    6262
    6363
     
    7474== Changelog ==
    7575
     76= 2.0.1 =
     77* Updating main script
     78
    7679= 1.0.1 =
    7780* Editor plugin path fix
Note: See TracChangeset for help on using the changeset viewer.