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
6cc7015e
Commit
6cc7015e
authored
Dec 19, 2019
by
Vadim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Version 2.7.5
* Форматирование виджетов
parent
8cece857
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
7 deletions
+32
-7
bg_az-counter.php
bg_az-counter.php
+2
-2
styles.css
css/styles.css
+26
-0
counter.php
inc/counter.php
+1
-1
widgets.php
inc/widgets.php
+3
-4
No files found.
bg_az-counter.php
View file @
6cc7015e
...
...
@@ -3,7 +3,7 @@
Plugin Name: Bg Az-Counter
Plugin URI: https://bogaiskov.ru
Description: Подсчет количества посещений страниц на базе stat.azbyka.ru
Version: 2.7.
4
Version: 2.7.
5
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.
4
'
);
define
(
'BG_COUNTER_VERSION'
,
'2.7.
5
'
);
define
(
'BG_COUNTER_LOG'
,
dirname
(
__FILE__
)
.
'/bg_counter.log'
);
define
(
'BG_COUNTER_STAT_COUNTERS'
,
'https://stat.azbyka.ru/counters'
);
...
...
css/styles.css
View file @
6cc7015e
...
...
@@ -27,6 +27,7 @@
}
.widget-item
li
.bg-az-count
,
.widget-item
p
.bg-az-counter-now
,
.widget-item
p
.bg-az-counter-unit
,
.widget-item
p
.bg-az-counter-views
,
.widget-item
p
.bg-az-counter-posts
{
color
:
#999
;
...
...
@@ -42,6 +43,31 @@ i.fa-star-o:before {
margin-left
:
1em
;
}
.widget-item
.bg-az-counter
,
.widget-item
.bg-az-top-posts
{
display
:
table
;
width
:
100%
;
max-width
:
35em
;
margin
:
0
auto
;
}
.widget-item
.bg-az-counter
p
,
.widget-item
.bg-az-top-posts
li
{
display
:
table-row
;
}
.widget-item
.bg-az-counter
p
>
span
,
.widget-item
li
>
a
,
.widget-item
li
>
span
{
display
:
table-cell
;
text-align
:
right
;
}
.widget-item
.bg-az-counter
p
>
span
.bg-az-counter-title
,
.widget-item
li
>
a
{
width
:
100%
;
padding
:
0
3px
5px
3px
;
text-align
:
left
;
}
/* Рейтинг */
.bg_counter_rating
{
position
:
relative
;
...
...
inc/counter.php
View file @
6cc7015e
...
...
@@ -63,7 +63,7 @@ function getPopularPosts ($limit, $offset=0, $number=false) {
if
(
!
$post
)
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
;
$quote
.=
'<li>'
.
$link
.
' <span class="bg-az-count">'
.
bg_counter_number_format
(
$p
->
value
)
.
'</span></li>'
.
PHP_EOL
;
}
if
(
$number
)
$quote
.=
'</ol>'
.
PHP_EOL
;
else
$quote
.=
'</ul>'
.
PHP_EOL
;
...
...
inc/widgets.php
View file @
6cc7015e
...
...
@@ -108,10 +108,9 @@ class bg_counter_OnlineNowWidget extends WP_Widget {
<div
class=
"widget-item"
>
<div
class=
"widget-inner"
>
<span
class=
"bg-az-counter"
>
<p>
<?php
echo
$subtitle1
;
?>
:
<span
class=
"bg-az-counter-now"
></span>
<?php
echo
$unit1
;
?>
</p>
<p>
<?php
echo
$subtitle2
;
?>
:
<span
class=
"bg-az-counter-views"
></span></p>
<p>
<?php
echo
$subtitle3
;
?>
:
<span
class=
"bg-az-counter-posts"
>
<?php
echo
$post_types_count
;
?>
</span></p>
<p><span
class=
"bg-az-counter-title"
>
<?php
echo
$subtitle1
;
?>
</span>
<span><span
class=
"bg-az-counter-now"
></span>
<span
class=
"bg-az-counter-unit"
>
<?php
echo
$unit1
;
?>
</span></span></p>
<p><span
class=
"bg-az-counter-title"
>
<?php
echo
$subtitle2
;
?>
</span>
<span
class=
"bg-az-counter-views"
></span></p>
<p><span
class=
"bg-az-counter-title"
>
<?php
echo
$subtitle3
;
?>
</span>
<span
class=
"bg-az-counter-posts"
>
<?php
echo
$post_types_count
;
?>
</span></p>
</span>
</div>
</div>
...
...
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