Skip to content

Commit

Permalink
All uses Ajax. Add msising images in spiders
Browse files Browse the repository at this point in the history
  • Loading branch information
ice committed Oct 24, 2016
1 parent dba5e3a commit 18e10ac
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 19 deletions.
5 changes: 3 additions & 2 deletions README.md
Expand Up @@ -40,8 +40,9 @@ IMPORTANT CRITICAL UPDATE
- [x] fix widget variable list
- [x] Use javascript+ajax fo variables API
- [x] Remove the usage of wp_load
- [ ] Complete name conversion
- [ ] Rewrite API authentication
- [x] Complete name conversion
- [x] External API via WP Ajax
- [x] Fix missing 2 spider images

PLEASE

Expand Down
Binary file added images/spider/facebook.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/spider/proximic.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions includes/js/nsp_overview.js
@@ -1,8 +1,9 @@
(function($) {
$( "#nsp_error-overview").hide();
$.post(ExtData.Url, {
$.post(nsp_externalAjax_overview.ajaxurl, {
action : 'nsp_external',
VAR: "overview",
KEY: ExtData.Key,
KEY: nsp_externalAjax_overview.Key,
PAR: "0",
TYP: "HTML"
},
Expand Down
2 changes: 0 additions & 2 deletions includes/nsp_dashboard.php
Expand Up @@ -17,8 +17,6 @@ function nsp_BuildDashboardWidget() {
$newstatpress_url=PluginUrl();

wp_enqueue_script('wp_ajax_nsp_js_dashbord', plugins_url('./js/nsp_dashboard.js', __FILE__), array('jquery'));
// wp_enqueue_script('jquery');
// wp_enqueue_script('wp_ajax_nsp_js_dashbord');
wp_localize_script( 'wp_ajax_nsp_js_dashbord', 'nsp_externalAjax_dashboard', array(
'ajaxurl' => admin_url( 'admin-ajax.php' ),
'Key' => md5(gmdate('m-d-y H i').$api_key)
Expand Down
21 changes: 8 additions & 13 deletions includes/nsp_overview.php
Expand Up @@ -391,11 +391,9 @@ function nsp_NewStatPressMain() {

get_option('newstatpress_externalapi')=='checked' ? $message=$msg_activated:$message=$msg_not_activated;

wp_register_script('wp_ajax_nsp_js_overview', plugins_url('./js/nsp_overview.js', __FILE__), array('jquery'));
wp_enqueue_script('jquery');
wp_enqueue_script('wp_ajax_nsp_js_overview');
wp_localize_script( 'wp_ajax_nsp_js_overview', 'ExtData', array(
'Url' => $url,
wp_enqueue_script('wp_ajax_nsp_js_overview', plugins_url('./js/nsp_overview.js', __FILE__), array('jquery'));
wp_localize_script( 'wp_ajax_nsp_js_overview', 'nsp_externalAjax_overview', array(
'ajaxurl' => admin_url( 'admin-ajax.php' ),
'Key' => md5(gmdate('m-d-y H i').$api_key)
));

Expand Down Expand Up @@ -432,14 +430,11 @@ function nsp_NewStatPressMain3() {
$_newstatpress_url=PluginUrl();
$url=$_newstatpress_url."/includes/api/external.php";

wp_register_script('wp_ajax_nsp_js_overview', plugins_url('./js/nsp_overview.js', __FILE__), array('jquery'));
wp_enqueue_script('jquery');
wp_enqueue_script('wp_ajax_nsp_js_overview');
wp_localize_script( 'wp_ajax_nsp_js_overview', 'ExtData', array(
'Url' => $url,
'Key' => md5(gmdate('m-d-y H i').$api_key)
));

wp_enqueue_script('wp_ajax_nsp_js_overview', plugins_url('./js/nsp_overview.js', __FILE__), array('jquery'));
wp_localize_script( 'wp_ajax_nsp_js_overview', 'nsp_externalAjax_overview', array(
'ajaxurl' => admin_url( 'admin-ajax.php' ),
'Key' => md5(gmdate('m-d-y H i').$api_key)
));
echo "<div id=\"nsp_result-overview\"><img id=\"nsp_loader-overview\" src=\"$_newstatpress_url/images/ajax-loader.gif\"></div>";


Expand Down

0 comments on commit 18e10ac

Please sign in to comment.