Commit 5a2dd561 authored by Vadim's avatar Vadim

Versoin 2.5.4

Не отображался рейтинг на главной и в рубриках
parent e77a50a3
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
Plugin Name: Bg Az-Counter Plugin Name: Bg Az-Counter
Plugin URI: https://bogaiskov.ru Plugin URI: https://bogaiskov.ru
Description: Подсчет количества посещений страниц на базе stat.azbyka.ru Description: Подсчет количества посещений страниц на базе stat.azbyka.ru
Version: 2.5.3 Version: 2.5.4
Author: VBog Author: VBog
Author URI: https://bogaiskov.ru Author URI: https://bogaiskov.ru
License: GPL2 License: GPL2
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
if ( !defined('ABSPATH') ) { if ( !defined('ABSPATH') ) {
die( 'Sorry, you are not allowed to access this page directly.' ); die( 'Sorry, you are not allowed to access this page directly.' );
} }
define('BG_COUNTER_VERSION', '2.5.3'); define('BG_COUNTER_VERSION', '2.5.4');
define('BG_COUNTER_LOG', dirname(__FILE__ ).'/bg_counter.log'); define('BG_COUNTER_LOG', dirname(__FILE__ ).'/bg_counter.log');
define('BG_COUNTER_STAT_COUNTERS','https://stat.azbyka.ru/counters'); define('BG_COUNTER_STAT_COUNTERS','https://stat.azbyka.ru/counters');
......
...@@ -5,9 +5,10 @@ options.path=window.location.pathname; // Текущий путь ...@@ -5,9 +5,10 @@ options.path=window.location.pathname; // Текущий путь
jQuery( document ).ready(function() { jQuery( document ).ready(function() {
getAllRates();
if (!bg_counter.ID) return; // У объекта нет ID if (!bg_counter.ID) return; // У объекта нет ID
if (jQuery("div").is(".bg_counter_rating") == false) return; // На странице нет счетчика if (jQuery("div").is(".bg_counter_rating") == false) return; // На странице нет счетчика
getAllRates();
start_rate_index = parseFloat(jQuery( "#bg_counter_score" ).html()); start_rate_index = parseFloat(jQuery( "#bg_counter_score" ).html());
rating_voted = (jQuery( "#bg_counter_score" ).attr("data-voted")=='true')?true:false; rating_voted = (jQuery( "#bg_counter_score" ).attr("data-voted")=='true')?true:false;
iniRatingState(start_rate_index, rating_voted); iniRatingState(start_rate_index, rating_voted);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment