Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bg-az-counter
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
azbyka_bg
bg-az-counter
Commits
f6bba74c
Commit
f6bba74c
authored
Dec 20, 2019
by
Vadim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Version 2.7.6
Исправление мелкие ошибки
parent
aab3a5a6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
bg_az-counter.php
bg_az-counter.php
+2
-2
styles.css
css/styles.css
+1
-1
counter.php
inc/counter.php
+3
-2
No files found.
bg_az-counter.php
View file @
f6bba74c
...
...
@@ -3,7 +3,7 @@
Plugin Name: Bg Az-Counter
Plugin URI: https://bogaiskov.ru
Description: Подсчет количества посещений страниц на базе stat.azbyka.ru
Version: 2.7.
5
Version: 2.7.
6
Author: VBog
Author URI: https://bogaiskov.ru
License: GPL2
...
...
@@ -38,7 +38,7 @@
if
(
!
defined
(
'ABSPATH'
)
)
{
die
(
'Sorry, you are not allowed to access this page directly.'
);
}
define
(
'BG_COUNTER_VERSION'
,
'2.7.
5
'
);
define
(
'BG_COUNTER_VERSION'
,
'2.7.
6
'
);
define
(
'BG_COUNTER_LOG'
,
dirname
(
__FILE__
)
.
'/bg_counter.log'
);
define
(
'BG_COUNTER_STAT_COUNTERS'
,
'https://stat.azbyka.ru/counters'
);
...
...
css/styles.css
View file @
f6bba74c
...
...
@@ -89,7 +89,7 @@ i.fa-star-o:before {
height
:
20px
;
margin-right
:
3px
;
list-style
:
none
;
cursor
:
defult
;
cursor
:
def
a
ult
;
background-image
:
url(stars.png)
;
background-size
:
20px
auto
;
background-position
:
0px
20px
;
...
...
inc/counter.php
View file @
f6bba74c
...
...
@@ -61,6 +61,7 @@ function getPopularPosts ($limit, $offset=0, $number=false) {
if
(
!
$id
)
continue
;
$post
=
get_post
(
$id
);
if
(
!
$post
)
continue
;
if
(
$post
->
post_status
!=
'publish'
)
continue
;
$title
=
$post
->
post_title
;
$link
=
'<a href="'
.
get_permalink
(
$post
)
.
'" title="'
.
$title
.
'" data-ID="'
.
$p
->
id
.
'" data-type="'
.
$p
->
type
.
'" data-value="'
.
$p
->
value
.
'" data-status="'
.
$post
->
post_status
.
'">'
.
$title
.
'</a>'
;
$quote
.=
'<li>'
.
$link
.
' <span class="bg-az-count">'
.
bg_counter_number_format
(
$p
->
value
)
.
'</span></li>'
.
PHP_EOL
;
...
...
@@ -269,8 +270,8 @@ function bg_counter_number_format ($num) {
$num
=
round
(
$num
/
1000000.0
,
0
)
.
" млн."
;
else
$num
=
round
(
$num
/
1000000.0
,
1
)
.
" млн."
;
}
elseif
(
$num
>
1000
0
.0
)
{
if
(
$num
>
10000
0
.0
)
}
elseif
(
$num
>
1000.0
)
{
if
(
$num
>
10000.0
)
$num
=
round
(
$num
/
1000.0
,
0
)
.
" тыс."
;
else
$num
=
round
(
$num
/
1000.0
,
1
)
.
" тыс."
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment