Version Description
- Added: Dashborad Bubble Notifications. (Last Likes Counter)
- Updated: wp-ulike-scripts.js method.
- Removed: Cookie structure on "logged by user" method for some tests.
- Fixed: Pagination class name problem.
Download this release
Release Info
Developer | alimir |
Plugin | WP ULike |
Version | 2.4.2 |
Comparing to | |
See all releases |
Code changes from version 2.4.1 to 2.4.2
- admin/admin.php +67 -4
- admin/classes/class-pagination.php +197 -207
- admin/logs.php +8 -4
- assets/js/wp-ulike-scripts.js +2 -1
- assets/js/wp-ulike-scripts.min.js +2 -2
- inc/classes/class-ulike.php +11 -8
- lang/wp-ulike-fa_IR.mo +0 -0
- lang/wp-ulike-fa_IR.po +46 -46
- readme.txt +11 -2
- wp-ulike.php +2 -2
admin/admin.php
CHANGED
@@ -58,6 +58,7 @@
|
|
58 |
* @author Alimir
|
59 |
* @since 1.7
|
60 |
* @updated 2.0
|
|
|
61 |
* @return String
|
62 |
*/
|
63 |
|
@@ -73,6 +74,7 @@
|
|
73 |
array(
|
74 |
'parent' => false,
|
75 |
'title' => __( 'WP ULike', WP_ULIKE_SLUG ),
|
|
|
76 |
'icon_url' => 'dashicons-smiley'
|
77 |
),
|
78 |
array(
|
@@ -93,7 +95,13 @@
|
|
93 |
'wp_ulike_customize' => $wp_ulike_customize
|
94 |
) );
|
95 |
|
96 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
function wp_ulike_delete_all_logs() {
|
98 |
global $wpdb;
|
99 |
$get_action = $_POST['action'];
|
@@ -115,7 +123,14 @@
|
|
115 |
wp_send_json_success( __( 'Success! All ULike Logs/Data Have Been Deleted', WP_ULIKE_SLUG ) );
|
116 |
}
|
117 |
}
|
118 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
function wp_ulike_delete_all_data() {
|
120 |
global $wpdb;
|
121 |
$get_action = $_POST['action'];
|
@@ -150,11 +165,14 @@
|
|
150 |
* @author Alimir
|
151 |
* @since 1.0
|
152 |
* @updated 2.2
|
|
|
153 |
* @return String
|
154 |
*/
|
155 |
add_action('admin_menu', 'wp_ulike_admin_menu');
|
156 |
function wp_ulike_admin_menu() {
|
157 |
-
|
|
|
|
|
158 |
//Post Like Logs Menu
|
159 |
$posts_screen = add_submenu_page(null, __( 'Post Likes Logs', WP_ULIKE_SLUG ), __( 'Post Likes Logs', WP_ULIKE_SLUG ), 'manage_options', 'wp-ulike-post-logs', 'wp_ulike_post_likes_logs');
|
160 |
add_action("load-$posts_screen",'wp_ulike_logs_per_page');
|
@@ -176,5 +194,50 @@
|
|
176 |
add_action("load-$statistics_screen",'wp_ulike_statistics_register_option');
|
177 |
|
178 |
//WP ULike About Menu
|
179 |
-
add_submenu_page('wp-ulike-settings', __( 'About WP ULike', WP_ULIKE_SLUG ), __( 'About WP ULike', WP_ULIKE_SLUG ), 'manage_options', 'wp-ulike-about', 'wp_ulike_about_page');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
}
|
58 |
* @author Alimir
|
59 |
* @since 1.7
|
60 |
* @updated 2.0
|
61 |
+
* @updated 2.4.2
|
62 |
* @return String
|
63 |
*/
|
64 |
|
74 |
array(
|
75 |
'parent' => false,
|
76 |
'title' => __( 'WP ULike', WP_ULIKE_SLUG ),
|
77 |
+
'position' => 313,
|
78 |
'icon_url' => 'dashicons-smiley'
|
79 |
),
|
80 |
array(
|
95 |
'wp_ulike_customize' => $wp_ulike_customize
|
96 |
) );
|
97 |
|
98 |
+
/**
|
99 |
+
* Delete all the users likes logs by ajax process.
|
100 |
+
*
|
101 |
+
* @author Alimir
|
102 |
+
* @since 2.2
|
103 |
+
* @return Void
|
104 |
+
*/
|
105 |
function wp_ulike_delete_all_logs() {
|
106 |
global $wpdb;
|
107 |
$get_action = $_POST['action'];
|
123 |
wp_send_json_success( __( 'Success! All ULike Logs/Data Have Been Deleted', WP_ULIKE_SLUG ) );
|
124 |
}
|
125 |
}
|
126 |
+
|
127 |
+
/**
|
128 |
+
* Delete all likes number by ajax process.
|
129 |
+
*
|
130 |
+
* @author Alimir
|
131 |
+
* @since 2.2
|
132 |
+
* @return Void
|
133 |
+
*/
|
134 |
function wp_ulike_delete_all_data() {
|
135 |
global $wpdb;
|
136 |
$get_action = $_POST['action'];
|
165 |
* @author Alimir
|
166 |
* @since 1.0
|
167 |
* @updated 2.2
|
168 |
+
* @updated 2.4.2
|
169 |
* @return String
|
170 |
*/
|
171 |
add_action('admin_menu', 'wp_ulike_admin_menu');
|
172 |
function wp_ulike_admin_menu() {
|
173 |
+
|
174 |
+
global $menu;
|
175 |
+
|
176 |
//Post Like Logs Menu
|
177 |
$posts_screen = add_submenu_page(null, __( 'Post Likes Logs', WP_ULIKE_SLUG ), __( 'Post Likes Logs', WP_ULIKE_SLUG ), 'manage_options', 'wp-ulike-post-logs', 'wp_ulike_post_likes_logs');
|
178 |
add_action("load-$posts_screen",'wp_ulike_logs_per_page');
|
194 |
add_action("load-$statistics_screen",'wp_ulike_statistics_register_option');
|
195 |
|
196 |
//WP ULike About Menu
|
197 |
+
add_submenu_page('wp-ulike-settings', __( 'About WP ULike', WP_ULIKE_SLUG ), __( 'About WP ULike', WP_ULIKE_SLUG ), 'manage_options', 'wp-ulike-about', 'wp_ulike_about_page');
|
198 |
+
|
199 |
+
$newvotes = wp_ulike_get_number_of_new_likes();
|
200 |
+
$menu[313][0] .= $newvotes ? " <span class='update-plugins count-1'><span class='update-count'>". number_format_i18n($newvotes) ."</span></span> " : '';
|
201 |
+
|
202 |
+
}
|
203 |
+
|
204 |
+
/**
|
205 |
+
* The counter of last likes by the admin last login time.
|
206 |
+
*
|
207 |
+
* @author Alimir
|
208 |
+
* @since 2.4.2
|
209 |
+
* @return String
|
210 |
+
*/
|
211 |
+
function wp_ulike_get_number_of_new_likes()
|
212 |
+
{
|
213 |
+
global $wpdb;
|
214 |
+
|
215 |
+
if(isset($_GET["page"]) && stripos($_GET["page"], "wp-ulike-statistics") !== false && is_super_admin())
|
216 |
+
update_option('wpulike_lastvisit', current_time('mysql',0));
|
217 |
+
|
218 |
+
$request = "SELECT
|
219 |
+
(SELECT COUNT(*) FROM ".$wpdb->prefix."ulike WHERE (date_time<=NOW() AND date_time>='".get_option( 'wpulike_lastvisit')."'))
|
220 |
+
+
|
221 |
+
(SELECT COUNT(*) FROM ".$wpdb->prefix."ulike_activities WHERE (date_time<=NOW() AND date_time>='".get_option( 'wpulike_lastvisit')."'))
|
222 |
+
+
|
223 |
+
(SELECT COUNT(*) FROM ".$wpdb->prefix."ulike_comments WHERE (date_time<=NOW() AND date_time>='".get_option( 'wpulike_lastvisit')."'))
|
224 |
+
+
|
225 |
+
(SELECT COUNT(*) FROM ".$wpdb->prefix."ulike_forums WHERE (date_time<=NOW() AND date_time>='".get_option( 'wpulike_lastvisit')."'));";
|
226 |
+
|
227 |
+
return $wpdb->get_var($request);
|
228 |
+
}
|
229 |
+
|
230 |
+
/**
|
231 |
+
* Set the admin login time.
|
232 |
+
*
|
233 |
+
* @author Alimir
|
234 |
+
* @since 2.4.2
|
235 |
+
* @return Void
|
236 |
+
*/
|
237 |
+
add_action('wp_logout', 'wp_ulike_set_lastvisit');
|
238 |
+
function wp_ulike_set_lastvisit() {
|
239 |
+
if (is_super_admin())
|
240 |
+
update_option('wpulike_lastvisit', current_time('mysql',0));
|
241 |
+
else
|
242 |
+
return;
|
243 |
}
|
admin/classes/class-pagination.php
CHANGED
@@ -1,207 +1,197 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
/*
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
var $
|
13 |
-
var $
|
14 |
-
var $
|
15 |
-
|
16 |
-
|
17 |
-
var $
|
18 |
-
var $
|
19 |
-
var $
|
20 |
-
var $
|
21 |
-
|
22 |
-
|
23 |
-
var $
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
#
|
32 |
-
function
|
33 |
-
|
34 |
-
#
|
35 |
-
function
|
36 |
-
|
37 |
-
#
|
38 |
-
function
|
39 |
-
|
40 |
-
#
|
41 |
-
function
|
42 |
-
|
43 |
-
#
|
44 |
-
function
|
45 |
-
|
46 |
-
|
47 |
-
function
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
function
|
53 |
-
|
54 |
-
|
55 |
-
function
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
function
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
if($
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
/* Setup vars for
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
/*
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
$this->pagination .= "
|
162 |
-
$this->pagination .= "<a href=\"".$this->get_pagenum_link(
|
163 |
-
$this->pagination .= "
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
$this->pagination .= "...";
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
$this->pagination .= "
|
176 |
-
$this->pagination .= "<a href=\"".$this->get_pagenum_link(
|
177 |
-
$this->pagination .= "
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
}
|
199 |
-
}
|
200 |
-
|
201 |
-
return true;
|
202 |
-
}
|
203 |
-
}
|
204 |
-
|
205 |
-
}
|
206 |
-
|
207 |
-
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class wp_ulike_pagination{
|
4 |
+
|
5 |
+
/*Default values*/
|
6 |
+
var $total_pages = -1;//items
|
7 |
+
var $limit = null;
|
8 |
+
var $target = "";
|
9 |
+
var $page = 1;
|
10 |
+
var $adjacents = 2;
|
11 |
+
var $showCounter = false;
|
12 |
+
var $className = "pagination-links";
|
13 |
+
var $parameterName = "page";
|
14 |
+
var $urlF = false;//urlFriendly
|
15 |
+
|
16 |
+
/*Buttons next and previous*/
|
17 |
+
var $nextT = "";
|
18 |
+
var $nextI = "»"; //►
|
19 |
+
var $prevT = "";
|
20 |
+
var $prevI = "«"; //◄
|
21 |
+
|
22 |
+
/*****/
|
23 |
+
var $calculate = false;
|
24 |
+
|
25 |
+
#Total items
|
26 |
+
function items($value){$this->total_pages = (int) $value;}
|
27 |
+
|
28 |
+
#how many items to show per page
|
29 |
+
function limit($value){$this->limit = (int) $value;}
|
30 |
+
|
31 |
+
#Page to sent the page value
|
32 |
+
function target($value){$this->target = $value;}
|
33 |
+
|
34 |
+
#Current page
|
35 |
+
function currentPage($value){$this->page = (int) $value;}
|
36 |
+
|
37 |
+
#How many adjacent pages should be shown on each side of the current page?
|
38 |
+
function adjacents($value){$this->adjacents = (int) $value;}
|
39 |
+
|
40 |
+
#show counter?
|
41 |
+
function showCounter($value=""){$this->showCounter=($value===true)?true:false;}
|
42 |
+
|
43 |
+
#to change the class name of the pagination div
|
44 |
+
function changeClass($value=""){$this->className=$value;}
|
45 |
+
|
46 |
+
function nextLabel($value){$this->nextT = $value;}
|
47 |
+
function nextIcon($value){$this->nextI = $value;}
|
48 |
+
function prevLabel($value){$this->prevT = $value;}
|
49 |
+
function prevIcon($value){$this->prevI = $value;}
|
50 |
+
|
51 |
+
#to change the class name of the pagination div
|
52 |
+
function parameterName($value=""){$this->parameterName=$value;}
|
53 |
+
|
54 |
+
#to change urlFriendly
|
55 |
+
function urlFriendly($value="%"){
|
56 |
+
if(eregi('^ *$',$value)){
|
57 |
+
$this->urlF=false;
|
58 |
+
return false;
|
59 |
+
}
|
60 |
+
$this->urlF=$value;
|
61 |
+
}
|
62 |
+
|
63 |
+
var $pagination;
|
64 |
+
|
65 |
+
function pagination(){}
|
66 |
+
function show(){
|
67 |
+
if(!$this->calculate)
|
68 |
+
if($this->calculate())
|
69 |
+
echo "<span class=\"$this->className\">$this->pagination</span>\n";
|
70 |
+
}
|
71 |
+
function getOutput(){
|
72 |
+
if(!$this->calculate)
|
73 |
+
if($this->calculate())
|
74 |
+
return "<span class=\"$this->className\">$this->pagination</span>\n";
|
75 |
+
}
|
76 |
+
function get_pagenum_link($id){
|
77 |
+
if(strpos($this->target,'?')===false)
|
78 |
+
if($this->urlF)
|
79 |
+
return str_replace($this->urlF,$id,$this->target);
|
80 |
+
else
|
81 |
+
return "$this->target?$this->parameterName=$id";
|
82 |
+
else
|
83 |
+
return "$this->target&$this->parameterName=$id";
|
84 |
+
}
|
85 |
+
|
86 |
+
function calculate(){
|
87 |
+
$this->pagination = "";
|
88 |
+
$this->calculate == true;
|
89 |
+
$error = false;
|
90 |
+
if($this->urlF and $this->urlF != '%' and strpos($this->target,$this->urlF)===false){
|
91 |
+
//Es necesario especificar el comodin para sustituir
|
92 |
+
echo "Especificaste un wildcard para sustituir, pero no existe en el target<br />";
|
93 |
+
$error = true;
|
94 |
+
}elseif($this->urlF and $this->urlF == '%' and strpos($this->target,$this->urlF)===false){
|
95 |
+
echo "Es necesario especificar en el target el comodin % para sustituir el número de página<br />";
|
96 |
+
$error = true;
|
97 |
+
}
|
98 |
+
|
99 |
+
if($this->total_pages < 0){
|
100 |
+
echo "It is necessary to specify the <strong>number of pages</strong> (\$class->items(1000))<br />";
|
101 |
+
$error = true;
|
102 |
+
}
|
103 |
+
if($this->limit == null){
|
104 |
+
echo "It is necessary to specify the <strong>limit of items</strong> to show per page (\$class->limit(10))<br />";
|
105 |
+
$error = true;
|
106 |
+
}
|
107 |
+
if($error)return false;
|
108 |
+
|
109 |
+
$n = trim($this->nextT.' '.$this->nextI);
|
110 |
+
$p = trim($this->prevI.' '.$this->prevT);
|
111 |
+
|
112 |
+
/* Setup vars for query. */
|
113 |
+
if($this->page)
|
114 |
+
$start = ($this->page - 1) * $this->limit; //first item to display on this page
|
115 |
+
else
|
116 |
+
$start = 0; //if no page var is given, set start to 0
|
117 |
+
|
118 |
+
/* Setup page vars for display. */
|
119 |
+
$prev = $this->page - 1; //previous page is page - 1
|
120 |
+
$next = $this->page + 1; //next page is page + 1
|
121 |
+
$lastpage = ceil($this->total_pages/$this->limit); //lastpage is = total pages / items per page, rounded up.
|
122 |
+
$lpm1 = $lastpage - 1; //last page minus 1
|
123 |
+
|
124 |
+
/*
|
125 |
+
Now we apply our rules and draw the pagination object.
|
126 |
+
We're actually saving the code to a variable in case we want to draw it more than once.
|
127 |
+
*/
|
128 |
+
|
129 |
+
if($lastpage > 1){
|
130 |
+
if($this->page){
|
131 |
+
//anterior button
|
132 |
+
if($this->page > 1)
|
133 |
+
$this->pagination .= "<a href=\"".$this->get_pagenum_link($prev)."\" class=\"prev\">$p</a>";
|
134 |
+
else
|
135 |
+
$this->pagination .= "<span class=\"disabled\">$p</span>";
|
136 |
+
}
|
137 |
+
//pages
|
138 |
+
if ($lastpage < 7 + ($this->adjacents * 2)){//not enough pages to bother breaking it up
|
139 |
+
for ($counter = 1; $counter <= $lastpage; $counter++){
|
140 |
+
if ($counter == $this->page)
|
141 |
+
$this->pagination .= "<span class=\"current\">$counter</span>";
|
142 |
+
else
|
143 |
+
$this->pagination .= "<a href=\"".$this->get_pagenum_link($counter)."\">$counter</a>";
|
144 |
+
}
|
145 |
+
}
|
146 |
+
elseif($lastpage > 5 + ($this->adjacents * 2)){//enough pages to hide some
|
147 |
+
//close to beginning; only hide later pages
|
148 |
+
if($this->page < 1 + ($this->adjacents * 2)){
|
149 |
+
for ($counter = 1; $counter < 4 + ($this->adjacents * 2); $counter++){
|
150 |
+
if ($counter == $this->page)
|
151 |
+
$this->pagination .= "<span class=\"current\">$counter</span>";
|
152 |
+
else
|
153 |
+
$this->pagination .= "<a href=\"".$this->get_pagenum_link($counter)."\">$counter</a>";
|
154 |
+
}
|
155 |
+
$this->pagination .= "...";
|
156 |
+
$this->pagination .= "<a href=\"".$this->get_pagenum_link($lpm1)."\">$lpm1</a>";
|
157 |
+
$this->pagination .= "<a href=\"".$this->get_pagenum_link($lastpage)."\">$lastpage</a>";
|
158 |
+
}
|
159 |
+
//in middle; hide some front and some back
|
160 |
+
elseif($lastpage - ($this->adjacents * 2) > $this->page && $this->page > ($this->adjacents * 2)){
|
161 |
+
$this->pagination .= "<a href=\"".$this->get_pagenum_link(1)."\">1</a>";
|
162 |
+
$this->pagination .= "<a href=\"".$this->get_pagenum_link(2)."\">2</a>";
|
163 |
+
$this->pagination .= "...";
|
164 |
+
for ($counter = $this->page - $this->adjacents; $counter <= $this->page + $this->adjacents; $counter++)
|
165 |
+
if ($counter == $this->page)
|
166 |
+
$this->pagination .= "<span class=\"current\">$counter</span>";
|
167 |
+
else
|
168 |
+
$this->pagination .= "<a href=\"".$this->get_pagenum_link($counter)."\">$counter</a>";
|
169 |
+
$this->pagination .= "...";
|
170 |
+
$this->pagination .= "<a href=\"".$this->get_pagenum_link($lpm1)."\">$lpm1</a>";
|
171 |
+
$this->pagination .= "<a href=\"".$this->get_pagenum_link($lastpage)."\">$lastpage</a>";
|
172 |
+
}
|
173 |
+
//close to end; only hide early pages
|
174 |
+
else{
|
175 |
+
$this->pagination .= "<a href=\"".$this->get_pagenum_link(1)."\">1</a>";
|
176 |
+
$this->pagination .= "<a href=\"".$this->get_pagenum_link(2)."\">2</a>";
|
177 |
+
$this->pagination .= "...";
|
178 |
+
for ($counter = $lastpage - (2 + ($this->adjacents * 2)); $counter <= $lastpage; $counter++)
|
179 |
+
if ($counter == $this->page)
|
180 |
+
$this->pagination .= "<span class=\"current\">$counter</span>";
|
181 |
+
else
|
182 |
+
$this->pagination .= "<a href=\"".$this->get_pagenum_link($counter)."\">$counter</a>";
|
183 |
+
}
|
184 |
+
}
|
185 |
+
if($this->page){
|
186 |
+
//siguiente button
|
187 |
+
if ($this->page < $counter - 1)
|
188 |
+
$this->pagination .= "<a href=\"".$this->get_pagenum_link($next)."\" class=\"next\">$n</a>";
|
189 |
+
else
|
190 |
+
$this->pagination .= "<span class=\"disabled\">$n</span>";
|
191 |
+
if($this->showCounter)$this->pagination .= "<span class=\"pagination_data\">($this->total_pages Pages)</span>";
|
192 |
+
}
|
193 |
+
}
|
194 |
+
|
195 |
+
return true;
|
196 |
+
}
|
197 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/logs.php
CHANGED
@@ -107,6 +107,7 @@
|
|
107 |
* @author Alimir
|
108 |
* @since 1.7
|
109 |
* @updated 2.1
|
|
|
110 |
* @return String
|
111 |
*/
|
112 |
function wp_ulike_post_likes_logs(){
|
@@ -114,7 +115,7 @@
|
|
114 |
$alternate = true;
|
115 |
$items = $wpdb->get_var("SELECT COUNT(*) FROM ".$wpdb->prefix."ulike");
|
116 |
if($items > 0) {
|
117 |
-
$p = new
|
118 |
$p->items($items);
|
119 |
$p->limit(wp_ulike_logs_return_per_page()); // Limit entries per page
|
120 |
$p->target("admin.php?page=wp-ulike-post-logs");
|
@@ -229,6 +230,7 @@
|
|
229 |
* @author Alimir
|
230 |
* @since 1.7
|
231 |
* @updated 2.1
|
|
|
232 |
* @return String
|
233 |
*/
|
234 |
function wp_ulike_comment_likes_logs(){
|
@@ -236,7 +238,7 @@
|
|
236 |
$alternate = true;
|
237 |
$items = $wpdb->get_var("SELECT COUNT(*) FROM ".$wpdb->prefix."ulike_comments");
|
238 |
if($items > 0) {
|
239 |
-
$p = new
|
240 |
$p->items($items);
|
241 |
$p->limit(wp_ulike_logs_return_per_page()); // Limit entries per page
|
242 |
$p->target("admin.php?page=wp-ulike-comment-logs");
|
@@ -355,6 +357,7 @@
|
|
355 |
* @author Alimir
|
356 |
* @since 1.7
|
357 |
* @updated 2.1
|
|
|
358 |
* @return String
|
359 |
*/
|
360 |
function wp_ulike_buddypress_likes_logs(){
|
@@ -362,7 +365,7 @@
|
|
362 |
$alternate = true;
|
363 |
$items = $wpdb->get_var("SELECT COUNT(*) FROM ".$wpdb->prefix."ulike_activities");
|
364 |
if($items > 0) {
|
365 |
-
$p = new
|
366 |
$p->items($items);
|
367 |
$p->limit(wp_ulike_logs_return_per_page()); // Limit entries per page
|
368 |
$p->target("admin.php?page=wp-ulike-bp-logs");
|
@@ -477,6 +480,7 @@
|
|
477 |
*
|
478 |
* @author Alimir
|
479 |
* @since 2.2
|
|
|
480 |
* @return String
|
481 |
*/
|
482 |
function wp_ulike_bbpress_likes_logs(){
|
@@ -484,7 +488,7 @@
|
|
484 |
$alternate = true;
|
485 |
$items = $wpdb->get_var("SELECT COUNT(*) FROM ".$wpdb->prefix."ulike_forums");
|
486 |
if($items > 0) {
|
487 |
-
$p = new
|
488 |
$p->items($items);
|
489 |
$p->limit(wp_ulike_logs_return_per_page()); // Limit entries per page
|
490 |
$p->target("admin.php?page=wp-ulike-bbpress-logs");
|
107 |
* @author Alimir
|
108 |
* @since 1.7
|
109 |
* @updated 2.1
|
110 |
+
* @updated 2.4.2
|
111 |
* @return String
|
112 |
*/
|
113 |
function wp_ulike_post_likes_logs(){
|
115 |
$alternate = true;
|
116 |
$items = $wpdb->get_var("SELECT COUNT(*) FROM ".$wpdb->prefix."ulike");
|
117 |
if($items > 0) {
|
118 |
+
$p = new wp_ulike_pagination;
|
119 |
$p->items($items);
|
120 |
$p->limit(wp_ulike_logs_return_per_page()); // Limit entries per page
|
121 |
$p->target("admin.php?page=wp-ulike-post-logs");
|
230 |
* @author Alimir
|
231 |
* @since 1.7
|
232 |
* @updated 2.1
|
233 |
+
* @updated 2.4.2
|
234 |
* @return String
|
235 |
*/
|
236 |
function wp_ulike_comment_likes_logs(){
|
238 |
$alternate = true;
|
239 |
$items = $wpdb->get_var("SELECT COUNT(*) FROM ".$wpdb->prefix."ulike_comments");
|
240 |
if($items > 0) {
|
241 |
+
$p = new wp_ulike_pagination;
|
242 |
$p->items($items);
|
243 |
$p->limit(wp_ulike_logs_return_per_page()); // Limit entries per page
|
244 |
$p->target("admin.php?page=wp-ulike-comment-logs");
|
357 |
* @author Alimir
|
358 |
* @since 1.7
|
359 |
* @updated 2.1
|
360 |
+
* @updated 2.4.2
|
361 |
* @return String
|
362 |
*/
|
363 |
function wp_ulike_buddypress_likes_logs(){
|
365 |
$alternate = true;
|
366 |
$items = $wpdb->get_var("SELECT COUNT(*) FROM ".$wpdb->prefix."ulike_activities");
|
367 |
if($items > 0) {
|
368 |
+
$p = new wp_ulike_pagination;
|
369 |
$p->items($items);
|
370 |
$p->limit(wp_ulike_logs_return_per_page()); // Limit entries per page
|
371 |
$p->target("admin.php?page=wp-ulike-bp-logs");
|
480 |
*
|
481 |
* @author Alimir
|
482 |
* @since 2.2
|
483 |
+
* @updated 2.4.2
|
484 |
* @return String
|
485 |
*/
|
486 |
function wp_ulike_bbpress_likes_logs(){
|
488 |
$alternate = true;
|
489 |
$items = $wpdb->get_var("SELECT COUNT(*) FROM ".$wpdb->prefix."ulike_forums");
|
490 |
if($items > 0) {
|
491 |
+
$p = new wp_ulike_pagination;
|
492 |
$p->items($items);
|
493 |
$p->limit(wp_ulike_logs_return_per_page()); // Limit entries per page
|
494 |
$p->target("admin.php?page=wp-ulike-bbpress-logs");
|
assets/js/wp-ulike-scripts.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
* WP ULike Plugin 2.4.
|
3 |
*
|
4 |
* http://wordpress.org/plugins/wp-ulike/
|
5 |
* https://github.com/Alimir/wp-ulike
|
@@ -39,6 +39,7 @@ jQuery(document).ready(function($) {
|
|
39 |
//start AJAX
|
40 |
jQuery.ajax({
|
41 |
type:'POST',
|
|
|
42 |
url: ulike_obj.ajaxurl,
|
43 |
data:{
|
44 |
action:'wp_ulike_process',
|
1 |
/**
|
2 |
+
* WP ULike Plugin 2.4.2
|
3 |
*
|
4 |
* http://wordpress.org/plugins/wp-ulike/
|
5 |
* https://github.com/Alimir/wp-ulike
|
39 |
//start AJAX
|
40 |
jQuery.ajax({
|
41 |
type:'POST',
|
42 |
+
cache: false,
|
43 |
url: ulike_obj.ajaxurl,
|
44 |
data:{
|
45 |
action:'wp_ulike_process',
|
assets/js/wp-ulike-scripts.min.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
/**
|
2 |
-
* WP ULike Plugin 2.4.
|
3 |
*
|
4 |
* http://wordpress.org/plugins/wp-ulike/
|
5 |
* https://github.com/Alimir/wp-ulike
|
6 |
*
|
7 |
*/
|
8 |
-
jQuery(document).ready(function(a){a(document).on("click",".wp_ulike_btn",function(b){var c=a(this).data("ulike-type"),d=a(this).data("ulike-status"),e=a(this).data("ulike-id"),g=(a(this).data("ulike-class"),a(b.target).closest("a").parent());if(1==ulike_obj.notifications){var h=ulike_obj.like_notice,i=ulike_obj.unlike_notice;toastr.options={closeButton:!1,debug:!1,newestOnTop:!1,progressBar:!1,positionClass:"toast-bottom-right",preventDuplicates:!1,showDuration:"300",hideDuration:"1000",timeOut:"5000",extendedTimeOut:"1000",showEasing:"swing",hideEasing:"linear",showMethod:"fadeIn",hideMethod:"fadeOut"}}""!=e&&(jQuery.ajax({type:"POST",url:ulike_obj.ajaxurl,data:{action:"wp_ulike_process",id:e,type:c},beforeSend:function(){g.html('<a class="loading"></a><span class="count-box">...</span>')},success:function(a){var b=jQuery(a).find("response_data").text();1==d&&("image"==ulike_obj.button_type?g.html("<a data-ulike-id='"+e+"' data-ulike-type='"+c+"' data-ulike-status='2' class='wp_ulike_btn image-unlike'></a><span class='count-box'>"+b+"</span>"):g.html("<a data-ulike-id='"+e+"' data-ulike-type='"+c+"' data-ulike-status='2' class='wp_ulike_btn text'>"+ulike_obj.button_text_u+"</a><span class='count-box'>"+b+"</span>"),"undefined"!=typeof h&&""!=h&&toastr.success(h)),2==d&&("image"==ulike_obj.button_type?g.html("<a data-ulike-id='"+e+"' data-ulike-type='"+c+"' data-ulike-status='1' class='wp_ulike_btn image'></a><span class='count-box'>"+b+"</span>"):g.html("<a data-ulike-id='"+e+"' data-ulike-type='"+c+"' data-ulike-status='1' class='wp_ulike_btn text'>"+ulike_obj.button_text+"</a><span class='count-box'>"+b+"</span>"),"undefined"!=typeof i&&""!=i&&toastr.error(i)),3==d&&("image"==ulike_obj.button_type?g.html("<a class='image-unlike user-tooltip' title='Already Voted'></a><span class='count-box'>"+b+"</span>"):g.html("<a class='text user-tooltip' title='Already Voted'>"+ulike_obj.button_text_u+"</a><span class='count-box'>"+b+"</span>"),"undefined"!=typeof h&&""!=h&&toastr.success(h)),4==d&&("image"==ulike_obj.button_type?g.html("<a class='image' title='You Liked This'></a><span class='count-box'>"+b+"</span>"):g.html("<a class='text' title='You Liked This'>"+ulike_obj.button_text+"</a><span class='count-box'>"+b+"</span>"),"undefined"!=typeof h&&""!=h&&toastr.success(h))}}),b.preventDefault())})});
|
1 |
/**
|
2 |
+
* WP ULike Plugin 2.4.2
|
3 |
*
|
4 |
* http://wordpress.org/plugins/wp-ulike/
|
5 |
* https://github.com/Alimir/wp-ulike
|
6 |
*
|
7 |
*/
|
8 |
+
jQuery(document).ready(function(a){a(document).on("click",".wp_ulike_btn",function(b){var c=a(this).data("ulike-type"),d=a(this).data("ulike-status"),e=a(this).data("ulike-id"),g=(a(this).data("ulike-class"),a(b.target).closest("a").parent());if(1==ulike_obj.notifications){var h=ulike_obj.like_notice,i=ulike_obj.unlike_notice;toastr.options={closeButton:!1,debug:!1,newestOnTop:!1,progressBar:!1,positionClass:"toast-bottom-right",preventDuplicates:!1,showDuration:"300",hideDuration:"1000",timeOut:"5000",extendedTimeOut:"1000",showEasing:"swing",hideEasing:"linear",showMethod:"fadeIn",hideMethod:"fadeOut"}}""!=e&&(jQuery.ajax({type:"POST",cache:!1,url:ulike_obj.ajaxurl,data:{action:"wp_ulike_process",id:e,type:c},beforeSend:function(){g.html('<a class="loading"></a><span class="count-box">...</span>')},success:function(a){var b=jQuery(a).find("response_data").text();1==d&&("image"==ulike_obj.button_type?g.html("<a data-ulike-id='"+e+"' data-ulike-type='"+c+"' data-ulike-status='2' class='wp_ulike_btn image-unlike'></a><span class='count-box'>"+b+"</span>"):g.html("<a data-ulike-id='"+e+"' data-ulike-type='"+c+"' data-ulike-status='2' class='wp_ulike_btn text'>"+ulike_obj.button_text_u+"</a><span class='count-box'>"+b+"</span>"),"undefined"!=typeof h&&""!=h&&toastr.success(h)),2==d&&("image"==ulike_obj.button_type?g.html("<a data-ulike-id='"+e+"' data-ulike-type='"+c+"' data-ulike-status='1' class='wp_ulike_btn image'></a><span class='count-box'>"+b+"</span>"):g.html("<a data-ulike-id='"+e+"' data-ulike-type='"+c+"' data-ulike-status='1' class='wp_ulike_btn text'>"+ulike_obj.button_text+"</a><span class='count-box'>"+b+"</span>"),"undefined"!=typeof i&&""!=i&&toastr.error(i)),3==d&&("image"==ulike_obj.button_type?g.html("<a class='image-unlike user-tooltip' title='Already Voted'></a><span class='count-box'>"+b+"</span>"):g.html("<a class='text user-tooltip' title='Already Voted'>"+ulike_obj.button_text_u+"</a><span class='count-box'>"+b+"</span>"),"undefined"!=typeof h&&""!=h&&toastr.success(h)),4==d&&("image"==ulike_obj.button_type?g.html("<a class='image' title='You Liked This'></a><span class='count-box'>"+b+"</span>"):g.html("<a class='text' title='You Liked This'>"+ulike_obj.button_text+"</a><span class='count-box'>"+b+"</span>"),"undefined"!=typeof h&&""!=h&&toastr.success(h))}}),b.preventDefault())})});
|
inc/classes/class-ulike.php
CHANGED
@@ -219,6 +219,7 @@ if ( ! class_exists( 'wp_ulike' ) ) {
|
|
219 |
* @param Array $data
|
220 |
* @since 2.0
|
221 |
* @updated 2.3
|
|
|
222 |
* @return String
|
223 |
*/
|
224 |
public function loggedby_other_ways(array $data){
|
@@ -229,12 +230,13 @@ if ( ! class_exists( 'wp_ulike' ) ) {
|
|
229 |
$button_type = wp_ulike_get_setting( 'wp_ulike_general', 'button_type');
|
230 |
$second_condition = true; //check for by_username login method
|
231 |
|
|
|
232 |
if($loggin_method == 'by_cookie_ip'){
|
233 |
$condition = $this->wpdb->get_var("SELECT COUNT(*) FROM ".$this->wpdb->prefix.$data['table']." WHERE ".$data['column']." = '".$data['id']."' AND ip = '".$data['user_ip']."'");
|
234 |
$second_column = 'ip';
|
235 |
$second_val = $data['user_ip'];
|
236 |
-
}
|
237 |
-
else if($loggin_method == 'by_username'){
|
238 |
$condition = $this->wpdb->get_var("SELECT COUNT(*) FROM ".$this->wpdb->prefix.$data['table']." WHERE ".$data['column']." = '".$data['id']."' AND user_id = '".$data['user_id']."'");
|
239 |
$user_info = get_userdata($data['user_id']);// check for user data
|
240 |
if(!$user_info) $second_condition = false;// if user not exist, condition will be false
|
@@ -242,10 +244,11 @@ if ( ! class_exists( 'wp_ulike' ) ) {
|
|
242 |
$second_val = $data['user_id'];
|
243 |
if(!is_user_logged_in())
|
244 |
$tmp1 = $this->get_template($data["id"],$data["method"],$liked,1,2);
|
245 |
-
}
|
|
|
246 |
|
247 |
if($data["type"] == 'post'){
|
248 |
-
if($condition == 0
|
249 |
if ($button_type == 'image') {
|
250 |
$counter = $tmp1['like_img'];
|
251 |
}
|
@@ -253,7 +256,7 @@ if ( ! class_exists( 'wp_ulike' ) ) {
|
|
253 |
$counter = $tmp1['like_text'];
|
254 |
}
|
255 |
}
|
256 |
-
else if($condition != 0
|
257 |
if($this->get_user_status($data['table'],$data['column'],$second_column,$data['id'],$second_val) == "like"){
|
258 |
if ($button_type == 'image') {
|
259 |
$counter = $tmp2['unlike_img'];
|
@@ -280,18 +283,18 @@ if ( ! class_exists( 'wp_ulike' ) ) {
|
|
280 |
} }
|
281 |
}//end post button
|
282 |
else if($data["type"] == 'process'){
|
283 |
-
if($condition == 0
|
284 |
$newLike = $data["get_like"] + 1;
|
285 |
$this->update_meta_data($data["id"], $data["key"], $newLike);
|
286 |
$this->wpdb->query("INSERT INTO ".$this->wpdb->prefix.$data['table']." VALUES ('', '".$data['id']."', NOW(), '".$data['user_ip']."', '".$data['user_id']."', 'like')");
|
287 |
if(is_user_logged_in()){
|
288 |
wp_ulike_bp_activity_add($data['user_id'],$data['id'],$data['key']);
|
289 |
}
|
290 |
-
setcookie($data["cookie"].$data["id"], time(), time()+3600*24*365, '/');
|
291 |
do_action('wp_ulike_mycred_like', $data['id'], $data['key']);
|
292 |
$counter = wp_ulike_format_number($newLike);
|
293 |
}
|
294 |
-
else if($condition != 0
|
295 |
if($this->get_user_status($data['table'],$data['column'],$second_column,$data['id'],$second_val) == "like"){
|
296 |
$newLike = $data["get_like"] - 1;
|
297 |
$this->update_meta_data($data["id"], $data["key"], $newLike);
|
219 |
* @param Array $data
|
220 |
* @since 2.0
|
221 |
* @updated 2.3
|
222 |
+
* @updated 2.4.2
|
223 |
* @return String
|
224 |
*/
|
225 |
public function loggedby_other_ways(array $data){
|
230 |
$button_type = wp_ulike_get_setting( 'wp_ulike_general', 'button_type');
|
231 |
$second_condition = true; //check for by_username login method
|
232 |
|
233 |
+
/* I removed this section (by_cookie_ip method) for some tests on v2.4.2
|
234 |
if($loggin_method == 'by_cookie_ip'){
|
235 |
$condition = $this->wpdb->get_var("SELECT COUNT(*) FROM ".$this->wpdb->prefix.$data['table']." WHERE ".$data['column']." = '".$data['id']."' AND ip = '".$data['user_ip']."'");
|
236 |
$second_column = 'ip';
|
237 |
$second_val = $data['user_ip'];
|
238 |
+
}*/
|
239 |
+
//else if($loggin_method == 'by_username'){
|
240 |
$condition = $this->wpdb->get_var("SELECT COUNT(*) FROM ".$this->wpdb->prefix.$data['table']." WHERE ".$data['column']." = '".$data['id']."' AND user_id = '".$data['user_id']."'");
|
241 |
$user_info = get_userdata($data['user_id']);// check for user data
|
242 |
if(!$user_info) $second_condition = false;// if user not exist, condition will be false
|
244 |
$second_val = $data['user_id'];
|
245 |
if(!is_user_logged_in())
|
246 |
$tmp1 = $this->get_template($data["id"],$data["method"],$liked,1,2);
|
247 |
+
//}
|
248 |
+
|
249 |
|
250 |
if($data["type"] == 'post'){
|
251 |
+
if($condition == 0 /*&& !isset($_COOKIE[$data["cookie"].$data["id"]])*/){
|
252 |
if ($button_type == 'image') {
|
253 |
$counter = $tmp1['like_img'];
|
254 |
}
|
256 |
$counter = $tmp1['like_text'];
|
257 |
}
|
258 |
}
|
259 |
+
else if($condition != 0 /*&& isset($_COOKIE[$data["cookie"].$data["id"]])*/ && $second_condition){
|
260 |
if($this->get_user_status($data['table'],$data['column'],$second_column,$data['id'],$second_val) == "like"){
|
261 |
if ($button_type == 'image') {
|
262 |
$counter = $tmp2['unlike_img'];
|
283 |
} }
|
284 |
}//end post button
|
285 |
else if($data["type"] == 'process'){
|
286 |
+
if($condition == 0 /*&& !isset($_COOKIE[$data["cookie"].$data["id"]])*/){
|
287 |
$newLike = $data["get_like"] + 1;
|
288 |
$this->update_meta_data($data["id"], $data["key"], $newLike);
|
289 |
$this->wpdb->query("INSERT INTO ".$this->wpdb->prefix.$data['table']." VALUES ('', '".$data['id']."', NOW(), '".$data['user_ip']."', '".$data['user_id']."', 'like')");
|
290 |
if(is_user_logged_in()){
|
291 |
wp_ulike_bp_activity_add($data['user_id'],$data['id'],$data['key']);
|
292 |
}
|
293 |
+
//setcookie($data["cookie"].$data["id"], time(), time()+3600*24*365, '/');
|
294 |
do_action('wp_ulike_mycred_like', $data['id'], $data['key']);
|
295 |
$counter = wp_ulike_format_number($newLike);
|
296 |
}
|
297 |
+
else if($condition != 0 /*&&isset($_COOKIE[$data["cookie"].$data["id"]])*/ && $second_condition){
|
298 |
if($this->get_user_status($data['table'],$data['column'],$second_column,$data['id'],$second_val) == "like"){
|
299 |
$newLike = $data["get_like"] - 1;
|
300 |
$this->update_meta_data($data["id"], $data["key"], $newLike);
|
lang/wp-ulike-fa_IR.mo
CHANGED
Binary file
|
lang/wp-ulike-fa_IR.po
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: WP ULike\n"
|
4 |
-
"POT-Creation-Date: 2017-
|
5 |
-
"PO-Revision-Date: 2017-
|
6 |
"Last-Translator: Alimir <alimir71@yahoo.com>\n"
|
7 |
"Language-Team: alimir.ir <info@alimir.ir>\n"
|
8 |
"Language: fa_IR\n"
|
@@ -74,7 +74,7 @@ msgstr "امتیازدهی"
|
|
74 |
msgid "Introducing WP ULike"
|
75 |
msgstr "معرفی وردپرس یولاک"
|
76 |
|
77 |
-
#: ../admin/about.php:131 ../admin/stats.php:36 ../admin/admin.php:
|
78 |
msgid "About WP ULike"
|
79 |
msgstr "درباره وردپرس یولایک"
|
80 |
|
@@ -166,7 +166,7 @@ msgstr ""
|
|
166 |
"از نسخه ۲.۳ افزونه یولایک، امکان بررسی جغرافیایی لایک کنندگان به همراه "
|
167 |
"ابزراک ویژه برترین لایک کنندگان اضافه شده است."
|
168 |
|
169 |
-
#: ../admin/about.php:218 ../admin/stats.php:23 ../admin/admin.php:
|
170 |
msgid "WP ULike Statistics"
|
171 |
msgstr "آماره وردپرس یولایک"
|
172 |
|
@@ -178,7 +178,7 @@ msgstr "خانه"
|
|
178 |
msgid "OR"
|
179 |
msgstr "یا"
|
180 |
|
181 |
-
#: ../admin/about.php:218 ../admin/admin.php:
|
182 |
msgid "WP ULike Settings"
|
183 |
msgstr "تنظیمات وردپرس یولایک"
|
184 |
|
@@ -226,9 +226,9 @@ msgstr ""
|
|
226 |
"حمایتتون رو از این افزونه، با امتیاز 5 ستاره در <a href=\"http://wordpress."
|
227 |
"org/plugins/wp-ulike\">مخزن وردپرس</a> مشخص کنید..."
|
228 |
|
229 |
-
#: ../admin/logs.php:17 ../admin/logs.php:
|
230 |
-
#: ../admin/logs.php:
|
231 |
-
#: ../admin/logs.php:
|
232 |
msgid "Logs"
|
233 |
msgstr "وقایع"
|
234 |
|
@@ -236,60 +236,60 @@ msgstr "وقایع"
|
|
236 |
msgid "Are you sure to remove this item?!"
|
237 |
msgstr "آیا از حذف این آیتم اطمینان دارید؟!"
|
238 |
|
239 |
-
#: ../admin/logs.php:
|
240 |
-
#: ../admin/logs.php:
|
241 |
msgid "WP ULike Logs"
|
242 |
msgstr "وقایع اتفاقیه در وردپرس یولایک"
|
243 |
|
244 |
-
#: ../admin/logs.php:
|
245 |
msgid "Post Likes Logs"
|
246 |
msgstr "وقایع لایک در نوشتارها"
|
247 |
|
248 |
-
#: ../admin/logs.php:
|
249 |
-
#: ../admin/logs.php:
|
250 |
msgid "ID"
|
251 |
msgstr "شناسه"
|
252 |
|
253 |
-
#: ../admin/logs.php:
|
254 |
-
#: ../admin/logs.php:
|
255 |
msgid "Username"
|
256 |
msgstr "نام کاربری"
|
257 |
|
258 |
-
#: ../admin/logs.php:
|
259 |
-
#: ../admin/logs.php:
|
260 |
msgid "Status"
|
261 |
msgstr "وضعیت"
|
262 |
|
263 |
-
#: ../admin/logs.php:
|
264 |
msgid "Post ID"
|
265 |
msgstr "شناسه نوشتار"
|
266 |
|
267 |
-
#: ../admin/logs.php:
|
268 |
msgid "Post Title"
|
269 |
msgstr "عنوان نوشتار"
|
270 |
|
271 |
-
#: ../admin/logs.php:
|
272 |
-
#: ../admin/logs.php:
|
273 |
msgid "Date / Time"
|
274 |
msgstr "تاریخ / زمان"
|
275 |
|
276 |
-
#: ../admin/logs.php:
|
277 |
-
#: ../admin/logs.php:
|
278 |
msgid "IP"
|
279 |
msgstr "آدرس IP"
|
280 |
|
281 |
-
#: ../admin/logs.php:
|
282 |
-
#: ../admin/logs.php:
|
283 |
msgid "Actions"
|
284 |
msgstr "کارها"
|
285 |
|
286 |
-
#: ../admin/logs.php:
|
287 |
-
#: ../admin/logs.php:
|
288 |
msgid "Guest User"
|
289 |
msgstr "کاربر مهمان"
|
290 |
|
291 |
-
#: ../admin/logs.php:
|
292 |
-
#: ../admin/logs.php:
|
293 |
msgid ""
|
294 |
"<strong>ERROR:</strong> No Record Found. (This problem is created because "
|
295 |
"you don't have any data on this table)"
|
@@ -297,48 +297,48 @@ msgstr ""
|
|
297 |
"<strong>خطا:</strong> چیزی یافت نشد. (این مشکل به خاطر این مسأله ایجاد شده "
|
298 |
"است که شما هیچ اطلاعاتی را در این جدول ندارید)"
|
299 |
|
300 |
-
#: ../admin/logs.php:
|
301 |
msgid "Comment Likes Logs"
|
302 |
msgstr "وقایع لایک در دیدگاه ها"
|
303 |
|
304 |
-
#: ../admin/logs.php:
|
305 |
msgid "Comment ID"
|
306 |
msgstr "شناسه دیدگاه"
|
307 |
|
308 |
-
#: ../admin/logs.php:
|
309 |
msgid "Comment Author"
|
310 |
msgstr "نویسنده دیدگاه"
|
311 |
|
312 |
-
#: ../admin/logs.php:
|
313 |
msgid "Comment Text"
|
314 |
msgstr "متن دیدگاه"
|
315 |
|
316 |
-
#: ../admin/logs.php:
|
317 |
msgid "Activity Likes Logs"
|
318 |
msgstr "وقایع لایک در فعالیت ها"
|
319 |
|
320 |
-
#: ../admin/logs.php:
|
321 |
msgid "Activity ID"
|
322 |
msgstr "شناسه فعالیت"
|
323 |
|
324 |
-
#: ../admin/logs.php:
|
325 |
msgid "Permalink"
|
326 |
msgstr "لینک همیشگی"
|
327 |
|
328 |
-
#: ../admin/logs.php:
|
329 |
#, php-format
|
330 |
msgid "<a href=\"%1$s\">Activity Permalink</a>"
|
331 |
msgstr "<a href=\"%1$s\">مشاهده فعالیت</a>"
|
332 |
|
333 |
-
#: ../admin/logs.php:
|
334 |
msgid "Topics Likes Logs"
|
335 |
msgstr "وقایع لایک در تاپیک ها"
|
336 |
|
337 |
-
#: ../admin/logs.php:
|
338 |
msgid "Topic ID"
|
339 |
msgstr "شناسه تاپیک"
|
340 |
|
341 |
-
#: ../admin/logs.php:
|
342 |
msgid "Topic Title"
|
343 |
msgstr "عنوان تاپیک"
|
344 |
|
@@ -487,19 +487,19 @@ msgstr ""
|
|
487 |
"\">وردپرس يولايک را</a> انتخاب کرده ايد. طراحي و کدنويسي توسط <a href=\"%s\" "
|
488 |
"title=\"Wordpress ULike\" target=\"_blank\">علي ميرزائي</a>"
|
489 |
|
490 |
-
#: ../admin/admin.php:
|
491 |
msgid "WP ULike"
|
492 |
msgstr "وردپرس یولایک"
|
493 |
|
494 |
-
#: ../admin/admin.php:
|
495 |
msgid "Settings saved."
|
496 |
msgstr "تنظیمات ذخیره شد"
|
497 |
|
498 |
-
#: ../admin/admin.php:
|
499 |
msgid "Failed! An Error Has Occurred While Deleting All ULike Logs/Data"
|
500 |
msgstr "خطا! مشکلی در عملیات حذف وقایع/داده ها وجود دارد"
|
501 |
|
502 |
-
#: ../admin/admin.php:
|
503 |
msgid "Success! All ULike Logs/Data Have Been Deleted"
|
504 |
msgstr "هووورا! همه وقایع/داده ها با موفقیت حذف شدند"
|
505 |
|
@@ -773,7 +773,7 @@ msgid "Default Template:"
|
|
773 |
msgstr "قالب پیشفرض:"
|
774 |
|
775 |
#: ../admin/classes/class-settings.php:81
|
776 |
-
#: ../admin/classes/tmp/settings.php:169 ../inc/classes/class-ulike.php:
|
777 |
msgid "Users who have LIKED this post:"
|
778 |
msgstr "کاربرانی که این مطلب را پسندیده اند:"
|
779 |
|
@@ -1244,7 +1244,7 @@ msgstr "برای امتیاز دهی به این دیدگاه، لطفا وار
|
|
1244 |
msgid "You need to login in order to like this activity: "
|
1245 |
msgstr "برای امتیاز دهی به این فعالیت، لطفا وارد شوید: "
|
1246 |
|
1247 |
-
#: ../inc/wp-ulike.php:
|
1248 |
msgid "Error: This Method Is Not Exist!"
|
1249 |
msgstr "خطا: این متد وجود خارجی ندارد!"
|
1250 |
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: WP ULike\n"
|
4 |
+
"POT-Creation-Date: 2017-02-21 00:46+0330\n"
|
5 |
+
"PO-Revision-Date: 2017-02-21 00:46+0330\n"
|
6 |
"Last-Translator: Alimir <alimir71@yahoo.com>\n"
|
7 |
"Language-Team: alimir.ir <info@alimir.ir>\n"
|
8 |
"Language: fa_IR\n"
|
74 |
msgid "Introducing WP ULike"
|
75 |
msgstr "معرفی وردپرس یولاک"
|
76 |
|
77 |
+
#: ../admin/about.php:131 ../admin/stats.php:36 ../admin/admin.php:197
|
78 |
msgid "About WP ULike"
|
79 |
msgstr "درباره وردپرس یولایک"
|
80 |
|
166 |
"از نسخه ۲.۳ افزونه یولایک، امکان بررسی جغرافیایی لایک کنندگان به همراه "
|
167 |
"ابزراک ویژه برترین لایک کنندگان اضافه شده است."
|
168 |
|
169 |
+
#: ../admin/about.php:218 ../admin/stats.php:23 ../admin/admin.php:193
|
170 |
msgid "WP ULike Statistics"
|
171 |
msgstr "آماره وردپرس یولایک"
|
172 |
|
178 |
msgid "OR"
|
179 |
msgstr "یا"
|
180 |
|
181 |
+
#: ../admin/about.php:218 ../admin/admin.php:73
|
182 |
msgid "WP ULike Settings"
|
183 |
msgstr "تنظیمات وردپرس یولایک"
|
184 |
|
226 |
"حمایتتون رو از این افزونه، با امتیاز 5 ستاره در <a href=\"http://wordpress."
|
227 |
"org/plugins/wp-ulike\">مخزن وردپرس</a> مشخص کنید..."
|
228 |
|
229 |
+
#: ../admin/logs.php:17 ../admin/logs.php:143 ../admin/logs.php:213
|
230 |
+
#: ../admin/logs.php:265 ../admin/logs.php:339 ../admin/logs.php:393
|
231 |
+
#: ../admin/logs.php:463 ../admin/logs.php:516 ../admin/logs.php:586
|
232 |
msgid "Logs"
|
233 |
msgstr "وقایع"
|
234 |
|
236 |
msgid "Are you sure to remove this item?!"
|
237 |
msgstr "آیا از حذف این آیتم اطمینان دارید؟!"
|
238 |
|
239 |
+
#: ../admin/logs.php:139 ../admin/logs.php:261 ../admin/logs.php:389
|
240 |
+
#: ../admin/logs.php:512
|
241 |
msgid "WP ULike Logs"
|
242 |
msgstr "وقایع اتفاقیه در وردپرس یولایک"
|
243 |
|
244 |
+
#: ../admin/logs.php:140 ../admin/stats.php:42 ../admin/admin.php:177
|
245 |
msgid "Post Likes Logs"
|
246 |
msgstr "وقایع لایک در نوشتارها"
|
247 |
|
248 |
+
#: ../admin/logs.php:150 ../admin/logs.php:272 ../admin/logs.php:400
|
249 |
+
#: ../admin/logs.php:523
|
250 |
msgid "ID"
|
251 |
msgstr "شناسه"
|
252 |
|
253 |
+
#: ../admin/logs.php:151 ../admin/logs.php:273 ../admin/logs.php:401
|
254 |
+
#: ../admin/logs.php:524
|
255 |
msgid "Username"
|
256 |
msgstr "نام کاربری"
|
257 |
|
258 |
+
#: ../admin/logs.php:152 ../admin/logs.php:274 ../admin/logs.php:402
|
259 |
+
#: ../admin/logs.php:525
|
260 |
msgid "Status"
|
261 |
msgstr "وضعیت"
|
262 |
|
263 |
+
#: ../admin/logs.php:153
|
264 |
msgid "Post ID"
|
265 |
msgstr "شناسه نوشتار"
|
266 |
|
267 |
+
#: ../admin/logs.php:154
|
268 |
msgid "Post Title"
|
269 |
msgstr "عنوان نوشتار"
|
270 |
|
271 |
+
#: ../admin/logs.php:155 ../admin/logs.php:278 ../admin/logs.php:405
|
272 |
+
#: ../admin/logs.php:528
|
273 |
msgid "Date / Time"
|
274 |
msgstr "تاریخ / زمان"
|
275 |
|
276 |
+
#: ../admin/logs.php:156 ../admin/logs.php:279 ../admin/logs.php:406
|
277 |
+
#: ../admin/logs.php:529
|
278 |
msgid "IP"
|
279 |
msgstr "آدرس IP"
|
280 |
|
281 |
+
#: ../admin/logs.php:157 ../admin/logs.php:280 ../admin/logs.php:407
|
282 |
+
#: ../admin/logs.php:530
|
283 |
msgid "Actions"
|
284 |
msgstr "کارها"
|
285 |
|
286 |
+
#: ../admin/logs.php:175 ../admin/logs.php:298 ../admin/logs.php:425
|
287 |
+
#: ../admin/logs.php:548 ../admin/stats.php:198
|
288 |
msgid "Guest User"
|
289 |
msgstr "کاربر مهمان"
|
290 |
|
291 |
+
#: ../admin/logs.php:220 ../admin/logs.php:347 ../admin/logs.php:471
|
292 |
+
#: ../admin/logs.php:594
|
293 |
msgid ""
|
294 |
"<strong>ERROR:</strong> No Record Found. (This problem is created because "
|
295 |
"you don't have any data on this table)"
|
297 |
"<strong>خطا:</strong> چیزی یافت نشد. (این مشکل به خاطر این مسأله ایجاد شده "
|
298 |
"است که شما هیچ اطلاعاتی را در این جدول ندارید)"
|
299 |
|
300 |
+
#: ../admin/logs.php:262 ../admin/stats.php:43 ../admin/admin.php:181
|
301 |
msgid "Comment Likes Logs"
|
302 |
msgstr "وقایع لایک در دیدگاه ها"
|
303 |
|
304 |
+
#: ../admin/logs.php:275
|
305 |
msgid "Comment ID"
|
306 |
msgstr "شناسه دیدگاه"
|
307 |
|
308 |
+
#: ../admin/logs.php:276
|
309 |
msgid "Comment Author"
|
310 |
msgstr "نویسنده دیدگاه"
|
311 |
|
312 |
+
#: ../admin/logs.php:277
|
313 |
msgid "Comment Text"
|
314 |
msgstr "متن دیدگاه"
|
315 |
|
316 |
+
#: ../admin/logs.php:390 ../admin/stats.php:44 ../admin/admin.php:185
|
317 |
msgid "Activity Likes Logs"
|
318 |
msgstr "وقایع لایک در فعالیت ها"
|
319 |
|
320 |
+
#: ../admin/logs.php:403
|
321 |
msgid "Activity ID"
|
322 |
msgstr "شناسه فعالیت"
|
323 |
|
324 |
+
#: ../admin/logs.php:404
|
325 |
msgid "Permalink"
|
326 |
msgstr "لینک همیشگی"
|
327 |
|
328 |
+
#: ../admin/logs.php:441
|
329 |
#, php-format
|
330 |
msgid "<a href=\"%1$s\">Activity Permalink</a>"
|
331 |
msgstr "<a href=\"%1$s\">مشاهده فعالیت</a>"
|
332 |
|
333 |
+
#: ../admin/logs.php:513 ../admin/stats.php:45 ../admin/admin.php:189
|
334 |
msgid "Topics Likes Logs"
|
335 |
msgstr "وقایع لایک در تاپیک ها"
|
336 |
|
337 |
+
#: ../admin/logs.php:526
|
338 |
msgid "Topic ID"
|
339 |
msgstr "شناسه تاپیک"
|
340 |
|
341 |
+
#: ../admin/logs.php:527
|
342 |
msgid "Topic Title"
|
343 |
msgstr "عنوان تاپیک"
|
344 |
|
487 |
"\">وردپرس يولايک را</a> انتخاب کرده ايد. طراحي و کدنويسي توسط <a href=\"%s\" "
|
488 |
"title=\"Wordpress ULike\" target=\"_blank\">علي ميرزائي</a>"
|
489 |
|
490 |
+
#: ../admin/admin.php:76 ../inc/wp-functions.php:307
|
491 |
msgid "WP ULike"
|
492 |
msgstr "وردپرس یولایک"
|
493 |
|
494 |
+
#: ../admin/admin.php:85
|
495 |
msgid "Settings saved."
|
496 |
msgstr "تنظیمات ذخیره شد"
|
497 |
|
498 |
+
#: ../admin/admin.php:121 ../admin/admin.php:156
|
499 |
msgid "Failed! An Error Has Occurred While Deleting All ULike Logs/Data"
|
500 |
msgstr "خطا! مشکلی در عملیات حذف وقایع/داده ها وجود دارد"
|
501 |
|
502 |
+
#: ../admin/admin.php:123 ../admin/admin.php:158
|
503 |
msgid "Success! All ULike Logs/Data Have Been Deleted"
|
504 |
msgstr "هووورا! همه وقایع/داده ها با موفقیت حذف شدند"
|
505 |
|
773 |
msgstr "قالب پیشفرض:"
|
774 |
|
775 |
#: ../admin/classes/class-settings.php:81
|
776 |
+
#: ../admin/classes/tmp/settings.php:169 ../inc/classes/class-ulike.php:426
|
777 |
msgid "Users who have LIKED this post:"
|
778 |
msgstr "کاربرانی که این مطلب را پسندیده اند:"
|
779 |
|
1244 |
msgid "You need to login in order to like this activity: "
|
1245 |
msgstr "برای امتیاز دهی به این فعالیت، لطفا وارد شوید: "
|
1246 |
|
1247 |
+
#: ../inc/wp-ulike.php:353
|
1248 |
msgid "Error: This Method Is Not Exist!"
|
1249 |
msgstr "خطا: این متد وجود خارجی ندارد!"
|
1250 |
|
readme.txt
CHANGED
@@ -4,8 +4,8 @@ Donate link: http://alimir.ir
|
|
4 |
Author: Ali Mirzaei
|
5 |
Tags: wp ulike, wordpress youlike plugin, like button, rating, vote, voting, most liked posts, wordpress like page, wordpress like post, wordpress vote page, wordpress vote post, wp like page, wp like post, wp like plugin, buddypress like system, buddypress votes, comment like system, voting button, wordpress, buddypress, statistics, stats likes, bbpress, bbPress like, WP-Translations, forums, community, credit, points, mycred, users, ultimate member
|
6 |
Requires at least: 3.5
|
7 |
-
Tested up to: 4.7.
|
8 |
-
Stable tag: 2.4.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -179,6 +179,12 @@ endif;
|
|
179 |
|
180 |
== Changelog ==
|
181 |
|
|
|
|
|
|
|
|
|
|
|
|
|
182 |
= 2.4.1 =
|
183 |
* Added: Notifications System. (Custom toast messages after each activity)
|
184 |
* Fixed: bbPress replys bug.
|
@@ -362,6 +368,9 @@ endif;
|
|
362 |
|
363 |
== Upgrade Notice ==
|
364 |
|
|
|
|
|
|
|
365 |
= 2.4.1 =
|
366 |
Hello. Approximately 1 year, We haven't had any update! :( The reason for this delay was my military service. I apologize for this delay and unanswered support requests in wordpress forums and sented emails.
|
367 |
|
4 |
Author: Ali Mirzaei
|
5 |
Tags: wp ulike, wordpress youlike plugin, like button, rating, vote, voting, most liked posts, wordpress like page, wordpress like post, wordpress vote page, wordpress vote post, wp like page, wp like post, wp like plugin, buddypress like system, buddypress votes, comment like system, voting button, wordpress, buddypress, statistics, stats likes, bbpress, bbPress like, WP-Translations, forums, community, credit, points, mycred, users, ultimate member
|
6 |
Requires at least: 3.5
|
7 |
+
Tested up to: 4.7.2
|
8 |
+
Stable tag: 2.4.2
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
179 |
|
180 |
== Changelog ==
|
181 |
|
182 |
+
= 2.4.2 =
|
183 |
+
* Added: Dashborad Bubble Notifications. (Last Likes Counter)
|
184 |
+
* Updated: wp-ulike-scripts.js method.
|
185 |
+
* Removed: Cookie structure on "logged by user" method for some tests.
|
186 |
+
* Fixed: Pagination class name problem.
|
187 |
+
|
188 |
= 2.4.1 =
|
189 |
* Added: Notifications System. (Custom toast messages after each activity)
|
190 |
* Fixed: bbPress replys bug.
|
368 |
|
369 |
== Upgrade Notice ==
|
370 |
|
371 |
+
= 2.4.2 =
|
372 |
+
In this version, we have made some changes on plugin scripts! So, please clear your server cache after the plugin update.
|
373 |
+
|
374 |
= 2.4.1 =
|
375 |
Hello. Approximately 1 year, We haven't had any update! :( The reason for this delay was my military service. I apologize for this delay and unanswered support requests in wordpress forums and sented emails.
|
376 |
|
wp-ulike.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name:WP ULike
|
4 |
Plugin URI: http://preview.alimir.ir/developer/wp-ulike/
|
5 |
Description: WP ULike plugin allows to integrate a beautiful Ajax Like Button into your wordPress website to allow your visitors to like and unlike pages, posts, comments AND buddypress activities. Its very simple to use and supports many options.
|
6 |
-
Version: 2.4.
|
7 |
Author: Ali Mirzaei
|
8 |
Author URI: http://about.alimir.ir
|
9 |
Text Domain: wp-ulike
|
@@ -12,7 +12,7 @@ License: GPL2
|
|
12 |
*/
|
13 |
|
14 |
//Do not change this value
|
15 |
-
define( 'WP_ULIKE_VERSION' , '2.4.
|
16 |
define( 'WP_ULIKE_SLUG' , 'wp-ulike' );
|
17 |
define( 'WP_ULIKE_DB_VERSION' , '1.3' );
|
18 |
|
3 |
Plugin Name:WP ULike
|
4 |
Plugin URI: http://preview.alimir.ir/developer/wp-ulike/
|
5 |
Description: WP ULike plugin allows to integrate a beautiful Ajax Like Button into your wordPress website to allow your visitors to like and unlike pages, posts, comments AND buddypress activities. Its very simple to use and supports many options.
|
6 |
+
Version: 2.4.2
|
7 |
Author: Ali Mirzaei
|
8 |
Author URI: http://about.alimir.ir
|
9 |
Text Domain: wp-ulike
|
12 |
*/
|
13 |
|
14 |
//Do not change this value
|
15 |
+
define( 'WP_ULIKE_VERSION' , '2.4.2' );
|
16 |
define( 'WP_ULIKE_SLUG' , 'wp-ulike' );
|
17 |
define( 'WP_ULIKE_DB_VERSION' , '1.3' );
|
18 |
|