Version Description
- added option to link user names to their author page
- allow displaying online users from a different page than the current page
- bundle language files
- more info
Download this release
Release Info
Developer | GamerZ |
Plugin | WP-UserOnline |
Version | 2.70 |
Comparing to | |
See all releases |
Code changes from version 2.83 to 2.70
- admin.php +86 -93
- bots.php +0 -37
- core.php +0 -213
- deprecated.php +6 -6
- lang/wp-useronline-ar.mo +0 -0
- lang/wp-useronline-ar.po +0 -385
- lang/wp-useronline-et.mo +0 -0
- lang/wp-useronline-et.po +0 -361
- lang/wp-useronline-he_IL.mo +0 -0
- lang/wp-useronline-he_IL.po +332 -253
- lang/wp-useronline-hu_HU.mo +0 -0
- lang/wp-useronline-hu_HU.po +252 -221
- lang/wp-useronline-nl_NL.mo +0 -0
- lang/wp-useronline-nl_NL.po +34 -34
- lang/wp-useronline-pt_PT.mo +0 -0
- lang/wp-useronline-pt_PT.po +50 -50
- lang/wp-useronline-ro_RO.mo +0 -0
- lang/wp-useronline-ro_RO.po +170 -162
- lang/wp-useronline-vi_VN.mo +0 -0
- lang/wp-useronline-vi_VN.po +0 -275
- lang/wp-useronline-zh_TW.mo +0 -0
- lang/wp-useronline-zh_TW.po +0 -292
- lang/wp-useronline.pot +130 -103
- readme.txt +38 -56
- scb/AdminPage.php +282 -333
- scb/BoxesPage.php +0 -260
- scb/Cron.php +0 -184
- scb/Forms.php +257 -820
- scb/Hooks.php +0 -72
- scb/Options.php +63 -42
- scb/PostMetabox.php +0 -182
- scb/Table.php +22 -13
- scb/Util.php +80 -223
- scb/Widget.php +50 -25
- scb/composer.json +0 -22
- scb/load-composer.php +0 -11
- scb/load.php +39 -61
- screenshot-1.png +0 -0
- screenshot-2.png +0 -0
- screenshot-3.png +0 -0
- template-tags.php +83 -108
- useronline.dev.js +11 -9
- useronline.js +1 -1
- widget.php +29 -29
- wp-stats.php +14 -14
- wp-useronline.php +303 -75
admin.php
CHANGED
@@ -6,21 +6,18 @@ class UserOnline_Admin_Integration extends scbAdminPage {
|
|
6 |
$this->textdomain = 'wp-useronline';
|
7 |
|
8 |
$this->args = array(
|
9 |
-
'page_title' => __(
|
10 |
-
'menu_title' => __(
|
11 |
'page_slug' => 'useronline',
|
12 |
'parent' => 'index.php',
|
|
|
13 |
'action_link' => false,
|
14 |
-
'capability' => 'list_users',
|
15 |
);
|
16 |
|
17 |
-
add_action(
|
18 |
}
|
19 |
|
20 |
function rightnow() {
|
21 |
-
if ( !current_user_can( 'manage_options' ) )
|
22 |
-
return;
|
23 |
-
|
24 |
$total_users = get_users_online_count();
|
25 |
|
26 |
$str = _n(
|
@@ -29,19 +26,18 @@ class UserOnline_Admin_Integration extends scbAdminPage {
|
|
29 |
$total_users, 'wp-useronline'
|
30 |
);
|
31 |
|
32 |
-
|
33 |
-
$
|
34 |
-
|
35 |
-
if ( $tmp = get_users_browsing_site() )
|
36 |
-
$out .= $tmp . '<br>';
|
37 |
|
38 |
-
|
39 |
-
|
40 |
-
echo
|
|
|
|
|
41 |
}
|
42 |
|
43 |
function page_content() {
|
44 |
-
echo users_online_page();
|
45 |
}
|
46 |
}
|
47 |
|
@@ -52,24 +48,24 @@ class UserOnline_Options extends scbAdminPage {
|
|
52 |
$this->textdomain = 'wp-useronline';
|
53 |
|
54 |
$this->args = array(
|
55 |
-
'page_title' => __(
|
56 |
-
'menu_title' => __(
|
57 |
'page_slug' => 'useronline-settings',
|
58 |
);
|
59 |
-
|
60 |
-
$this->option_name =
|
61 |
}
|
62 |
|
63 |
-
function validate(
|
64 |
-
$options['timeout'] = absint(
|
65 |
-
$options['url'] = trim(
|
66 |
-
$options['names'] =
|
67 |
|
68 |
foreach ( $options['templates'] as $key => $template )
|
69 |
-
if ( is_array(
|
70 |
-
$options['templates'][$key]['text'] = trim(
|
71 |
else
|
72 |
-
$options['templates'][$key] = trim(
|
73 |
|
74 |
return $options;
|
75 |
}
|
@@ -85,13 +81,13 @@ class UserOnline_Options extends scbAdminPage {
|
|
85 |
|
86 |
<script type="text/javascript">
|
87 |
function useronline_default_naming() {
|
88 |
-
jQuery(
|
89 |
|
90 |
return false;
|
91 |
}
|
92 |
|
93 |
-
function useronline_default_template(
|
94 |
-
jQuery(
|
95 |
|
96 |
return false;
|
97 |
}
|
@@ -102,112 +98,109 @@ class UserOnline_Options extends scbAdminPage {
|
|
102 |
function page_content() {
|
103 |
$options = $this->options->get();
|
104 |
$defaults = $this->options->get_defaults();
|
105 |
-
|
106 |
?>
|
107 |
-
<form method="post" action="">
|
108 |
-
<?php
|
|
|
109 |
<table class="form-table">
|
110 |
<?php
|
111 |
$rows = array(
|
112 |
array(
|
113 |
-
'title' => __(
|
114 |
'type' => 'text',
|
115 |
-
'
|
116 |
-
'desc' => '<br />' . __(
|
117 |
'extra' => 'size="4"'
|
118 |
),
|
119 |
|
120 |
array(
|
121 |
-
'title' => __(
|
122 |
'type' => 'text',
|
123 |
-
'
|
124 |
-
'desc' => '<br />' . __(
|
125 |
),
|
126 |
|
127 |
array(
|
128 |
-
'title' => __(
|
129 |
-
'type' => '
|
130 |
-
'
|
131 |
-
'
|
132 |
-
'desc' => '<br />' . __( 'Link user names to their author page', 'wp-useronline' )
|
133 |
),
|
134 |
);
|
135 |
|
136 |
-
foreach ( $rows as $row )
|
137 |
-
echo $this->table_row(
|
138 |
-
}
|
139 |
-
|
140 |
?>
|
141 |
<tbody id="default_naming" style="display:none">
|
142 |
-
<?php $this->
|
143 |
</tbody>
|
144 |
|
145 |
<tbody id="current_naming">
|
146 |
-
<?php $this->
|
147 |
</tbody>
|
148 |
|
149 |
</table>
|
150 |
|
151 |
-
<h3><?php _e(
|
152 |
<table class="form-table">
|
153 |
<tbody id="default_template_useronline" style="display:none">
|
154 |
-
<?php $this->
|
155 |
</tbody>
|
156 |
|
157 |
<tbody id="current_template_useronline">
|
158 |
-
<?php $this->
|
159 |
</tbody>
|
160 |
|
161 |
<?php
|
162 |
$templates = array(
|
163 |
-
'browsingsite' => __(
|
164 |
-
'browsingpage' => __(
|
165 |
);
|
166 |
foreach ( $templates as $name => $title ) { ?>
|
167 |
<tbody id="default_template_<?php echo $name; ?>" style="display:none">
|
168 |
-
<?php $this->template_table(
|
169 |
</tbody>
|
170 |
|
171 |
<tbody id="current_template_<?php echo $name; ?>">
|
172 |
-
<?php $this->template_table(
|
173 |
</tbody>
|
174 |
<?php } ?>
|
175 |
</table>
|
176 |
<p class="submit">
|
177 |
-
<input type="submit" name="
|
178 |
</p>
|
179 |
</form>
|
180 |
<?php
|
181 |
}
|
182 |
|
183 |
-
private function naming_table(
|
184 |
?>
|
185 |
<tr>
|
186 |
<td width="30%">
|
187 |
-
<strong><?php _e(
|
188 |
-
<?php _e(
|
189 |
- %COUNT%<br /><br />
|
190 |
-
<input type="button" value="<?php _e(
|
191 |
</td>
|
192 |
<td>
|
193 |
<table class="form-table">
|
194 |
<thead>
|
195 |
<tr>
|
196 |
-
<th><?php _e(
|
197 |
-
<th><?php _e(
|
198 |
</tr>
|
199 |
</thead>
|
200 |
<tbody>
|
201 |
-
<?php
|
202 |
-
foreach ( array(
|
203 |
echo "\n<tr>\n";
|
204 |
-
foreach ( array(
|
205 |
-
echo $this->input(
|
206 |
'type' => 'text',
|
207 |
-
'
|
208 |
'extra' => 'size="30"',
|
209 |
-
'desc' => html(
|
210 |
-
)
|
211 |
}
|
212 |
echo "\n</tr>\n";
|
213 |
}
|
@@ -220,67 +213,67 @@ class UserOnline_Options extends scbAdminPage {
|
|
220 |
<?php
|
221 |
}
|
222 |
|
223 |
-
private function useronline_template_table(
|
224 |
?>
|
225 |
<tr>
|
226 |
<td width="30%">
|
227 |
-
<strong><?php _e(
|
228 |
-
<?php _e(
|
229 |
- %USERS%<br />
|
230 |
- %PAGE_URL%<br />
|
231 |
- %MOSTONLINE_COUNT%<br />
|
232 |
- %MOSTONLINE_DATE%<br /><br />
|
233 |
-
<input type="button" value="<?php _e(
|
234 |
</td>
|
235 |
<td>
|
236 |
-
<?php echo $this->input(
|
237 |
'type' => 'textarea',
|
238 |
-
'
|
239 |
-
)
|
240 |
</td>
|
241 |
</tr>
|
242 |
<?php
|
243 |
}
|
244 |
|
245 |
-
private function template_table(
|
246 |
?>
|
247 |
<tr>
|
248 |
<td width="30%">
|
249 |
<strong><?php echo $title; ?></strong><br /><br />
|
250 |
-
<?php _e(
|
251 |
- %USERS%<br />
|
252 |
- %MEMBERS%<br />
|
253 |
- %MEMBER_NAMES%<br />
|
254 |
-
- %
|
255 |
- %GUESTS%<br />
|
256 |
-
- %
|
257 |
- %BOTS%<br /><br />
|
258 |
-
<input type="button" value="<?php _e(
|
259 |
</td>
|
260 |
<td>
|
261 |
<table class="form-table">
|
262 |
<thead>
|
263 |
<tr>
|
264 |
-
<th><?php _e(
|
265 |
-
<th><?php _e(
|
266 |
-
<th><?php _e(
|
267 |
</tr>
|
268 |
</thead>
|
269 |
<tr>
|
270 |
-
<?php foreach ( array_keys(
|
271 |
-
echo html(
|
272 |
'type' => 'text',
|
273 |
-
'
|
274 |
'extra' => "size='15'",
|
275 |
-
)
|
276 |
} ?>
|
277 |
</tr>
|
278 |
</table>
|
279 |
<br />
|
280 |
-
<?php echo $this->input(
|
281 |
'type' => 'textarea',
|
282 |
-
'
|
283 |
-
)
|
284 |
</td>
|
285 |
</tr>
|
286 |
<?php
|
6 |
$this->textdomain = 'wp-useronline';
|
7 |
|
8 |
$this->args = array(
|
9 |
+
'page_title' => __('Users Online Now', $this->textdomain),
|
10 |
+
'menu_title' => __('WP-UserOnline', $this->textdomain),
|
11 |
'page_slug' => 'useronline',
|
12 |
'parent' => 'index.php',
|
13 |
+
'capability' => 'read',
|
14 |
'action_link' => false,
|
|
|
15 |
);
|
16 |
|
17 |
+
add_action('rightnow_end', array($this, 'rightnow'));
|
18 |
}
|
19 |
|
20 |
function rightnow() {
|
|
|
|
|
|
|
21 |
$total_users = get_users_online_count();
|
22 |
|
23 |
$str = _n(
|
26 |
$total_users, 'wp-useronline'
|
27 |
);
|
28 |
|
29 |
+
echo '<p>';
|
30 |
+
printf($str, add_query_arg('page', $this->args['page_slug'], admin_url('index.php')), number_format_i18n($total_users));
|
|
|
|
|
|
|
31 |
|
32 |
+
echo '<br />';
|
33 |
+
users_browsing_site();
|
34 |
+
echo '.<br />';
|
35 |
+
echo UserOnline_Template::format_most_users();
|
36 |
+
echo '</p>'."\n";
|
37 |
}
|
38 |
|
39 |
function page_content() {
|
40 |
+
echo users_online_page();
|
41 |
}
|
42 |
}
|
43 |
|
48 |
$this->textdomain = 'wp-useronline';
|
49 |
|
50 |
$this->args = array(
|
51 |
+
'page_title' => __('UserOnline Options', $this->textdomain),
|
52 |
+
'menu_title' => __('UserOnline', $this->textdomain),
|
53 |
'page_slug' => 'useronline-settings',
|
54 |
);
|
55 |
+
|
56 |
+
$this->option_name = $this->options->get_key();
|
57 |
}
|
58 |
|
59 |
+
function validate($options) {
|
60 |
+
$options['timeout'] = absint($options['timeout']);
|
61 |
+
$options['url'] = trim($options['url']);
|
62 |
+
$options['names'] = (bool) $options['names'];
|
63 |
|
64 |
foreach ( $options['templates'] as $key => $template )
|
65 |
+
if ( is_array($template) )
|
66 |
+
$options['templates'][$key]['text'] = trim($template['text']);
|
67 |
else
|
68 |
+
$options['templates'][$key] = trim($template);
|
69 |
|
70 |
return $options;
|
71 |
}
|
81 |
|
82 |
<script type="text/javascript">
|
83 |
function useronline_default_naming() {
|
84 |
+
jQuery("#current_naming").html(jQuery("#default_naming").html());
|
85 |
|
86 |
return false;
|
87 |
}
|
88 |
|
89 |
+
function useronline_default_template(template) {
|
90 |
+
jQuery('#current_template_' + template).html(jQuery('#default_template_' + template).html());
|
91 |
|
92 |
return false;
|
93 |
}
|
98 |
function page_content() {
|
99 |
$options = $this->options->get();
|
100 |
$defaults = $this->options->get_defaults();
|
|
|
101 |
?>
|
102 |
+
<form method="post" action="options.php">
|
103 |
+
<?php settings_fields($this->option_name); ?>
|
104 |
+
|
105 |
<table class="form-table">
|
106 |
<?php
|
107 |
$rows = array(
|
108 |
array(
|
109 |
+
'title' => __('Time Out', 'wp-useronline'),
|
110 |
'type' => 'text',
|
111 |
+
'name_tree' => 'timeout',
|
112 |
+
'desc' => '<br />' . __('How long until it will remove the user from the database (In seconds).', 'wp-useronline'),
|
113 |
'extra' => 'size="4"'
|
114 |
),
|
115 |
|
116 |
array(
|
117 |
+
'title' => __('UserOnline URL', 'wp-useronline'),
|
118 |
'type' => 'text',
|
119 |
+
'name_tree' => 'url',
|
120 |
+
'desc' => '<br />' . __('URL To UserOnline Page<br />Example: http://www.yoursite.com/useronline/<br />Example: http://www.yoursite.com/?page_id=2', 'wp-useronline'),
|
121 |
),
|
122 |
|
123 |
array(
|
124 |
+
'title' => __('User Names', 'wp-useronline'),
|
125 |
+
'type' => 'checkbox',
|
126 |
+
'name_tree' => 'names',
|
127 |
+
'desc' => __('Link user names to their author page', 'wp-useronline'),
|
|
|
128 |
),
|
129 |
);
|
130 |
|
131 |
+
foreach ( $rows as $row )
|
132 |
+
echo $this->table_row($row);
|
|
|
|
|
133 |
?>
|
134 |
<tbody id="default_naming" style="display:none">
|
135 |
+
<?php $this->formdata = $defaults; $this->naming_table(); ?>
|
136 |
</tbody>
|
137 |
|
138 |
<tbody id="current_naming">
|
139 |
+
<?php $this->formdata = $options; $this->naming_table(); ?>
|
140 |
</tbody>
|
141 |
|
142 |
</table>
|
143 |
|
144 |
+
<h3><?php _e('Useronline Templates', 'wp-useronline'); ?></h3>
|
145 |
<table class="form-table">
|
146 |
<tbody id="default_template_useronline" style="display:none">
|
147 |
+
<?php $this->formdata = $defaults; $this->useronline_template_table(); ?>
|
148 |
</tbody>
|
149 |
|
150 |
<tbody id="current_template_useronline">
|
151 |
+
<?php $this->formdata = $options; $this->useronline_template_table(); ?>
|
152 |
</tbody>
|
153 |
|
154 |
<?php
|
155 |
$templates = array(
|
156 |
+
'browsingsite' => __('User(s) Browsing Site:', 'wp-useronline'),
|
157 |
+
'browsingpage' => __('User(s) Browsing Page:', 'wp-useronline'),
|
158 |
);
|
159 |
foreach ( $templates as $name => $title ) { ?>
|
160 |
<tbody id="default_template_<?php echo $name; ?>" style="display:none">
|
161 |
+
<?php $this->formdata = $defaults; $this->template_table($title, $name); ?>
|
162 |
</tbody>
|
163 |
|
164 |
<tbody id="current_template_<?php echo $name; ?>">
|
165 |
+
<?php $this->formdata = $options; $this->template_table($title, $name); ?>
|
166 |
</tbody>
|
167 |
<?php } ?>
|
168 |
</table>
|
169 |
<p class="submit">
|
170 |
+
<input type="submit" name="Submit" class="button" value="<?php _e('Save Changes', 'wp-useronline'); ?>" />
|
171 |
</p>
|
172 |
</form>
|
173 |
<?php
|
174 |
}
|
175 |
|
176 |
+
private function naming_table() {
|
177 |
?>
|
178 |
<tr>
|
179 |
<td width="30%">
|
180 |
+
<strong><?php _e('Naming Conventions:', 'wp-useronline'); ?></strong><br /><br />
|
181 |
+
<?php _e('Allowed Variables:', 'wp-useronline'); ?><br />
|
182 |
- %COUNT%<br /><br />
|
183 |
+
<input type="button" value="<?php _e('Restore Defaults', 'wp-useronline'); ?>" onclick="useronline_default_naming();" class="button" />
|
184 |
</td>
|
185 |
<td>
|
186 |
<table class="form-table">
|
187 |
<thead>
|
188 |
<tr>
|
189 |
+
<th><?php _e('Singular Form', 'wp-useronline'); ?></th>
|
190 |
+
<th><?php _e('Plural Form', 'wp-useronline'); ?></th>
|
191 |
</tr>
|
192 |
</thead>
|
193 |
<tbody>
|
194 |
+
<?php
|
195 |
+
foreach ( array('user', 'member', 'guest', 'bot') as $tmp ) {
|
196 |
echo "\n<tr>\n";
|
197 |
+
foreach ( array($tmp, $tmp . 's') as $type ) {
|
198 |
+
echo $this->input(array(
|
199 |
'type' => 'text',
|
200 |
+
'name_tree' => array('naming', $type),
|
201 |
'extra' => 'size="30"',
|
202 |
+
'desc' => html('td', '%input%')
|
203 |
+
));
|
204 |
}
|
205 |
echo "\n</tr>\n";
|
206 |
}
|
213 |
<?php
|
214 |
}
|
215 |
|
216 |
+
private function useronline_template_table() {
|
217 |
?>
|
218 |
<tr>
|
219 |
<td width="30%">
|
220 |
+
<strong><?php _e('User(s) Online:', 'wp-useronline'); ?></strong><br /><br />
|
221 |
+
<?php _e('Allowed Variables:', 'wp-useronline'); ?><br />
|
222 |
- %USERS%<br />
|
223 |
- %PAGE_URL%<br />
|
224 |
- %MOSTONLINE_COUNT%<br />
|
225 |
- %MOSTONLINE_DATE%<br /><br />
|
226 |
+
<input type="button" value="<?php _e('Restore Default Template', 'wp-useronline'); ?>" onclick="useronline_default_template('useronline');" class="button" />
|
227 |
</td>
|
228 |
<td>
|
229 |
+
<?php echo $this->input(array(
|
230 |
'type' => 'textarea',
|
231 |
+
'name_tree' => array('templates', 'useronline'),
|
232 |
+
)); ?>
|
233 |
</td>
|
234 |
</tr>
|
235 |
<?php
|
236 |
}
|
237 |
|
238 |
+
private function template_table($title, $option) {
|
239 |
?>
|
240 |
<tr>
|
241 |
<td width="30%">
|
242 |
<strong><?php echo $title; ?></strong><br /><br />
|
243 |
+
<?php _e('Allowed Variables:', 'wp-useronline'); ?><br />
|
244 |
- %USERS%<br />
|
245 |
- %MEMBERS%<br />
|
246 |
- %MEMBER_NAMES%<br />
|
247 |
+
- %GUESTS_SEPERATOR%<br />
|
248 |
- %GUESTS%<br />
|
249 |
+
- %BOTS_SEPERATOR%<br />
|
250 |
- %BOTS%<br /><br />
|
251 |
+
<input type="button" value="<?php _e('Restore Default Template', 'wp-useronline'); ?>" onclick="useronline_default_template('<?php echo $option; ?>');" class="button" />
|
252 |
</td>
|
253 |
<td>
|
254 |
<table class="form-table">
|
255 |
<thead>
|
256 |
<tr>
|
257 |
+
<th><?php _e('Member Names Separator', 'wp-useronline'); ?></th>
|
258 |
+
<th><?php _e('Guests Separator', 'wp-useronline'); ?></th>
|
259 |
+
<th><?php _e('Bots Separator', 'wp-useronline'); ?></th>
|
260 |
</tr>
|
261 |
</thead>
|
262 |
<tr>
|
263 |
+
<?php foreach ( array_keys($this->options->templates[$option]['separators']) as $type ) {
|
264 |
+
echo html('td', $this->input(array(
|
265 |
'type' => 'text',
|
266 |
+
'name_tree' => array('templates', $option, 'separators', $type),
|
267 |
'extra' => "size='15'",
|
268 |
+
)));
|
269 |
} ?>
|
270 |
</tr>
|
271 |
</table>
|
272 |
<br />
|
273 |
+
<?php echo $this->input(array(
|
274 |
'type' => 'textarea',
|
275 |
+
'name_tree' => array('templates', $option, 'text')
|
276 |
+
)); ?>
|
277 |
</td>
|
278 |
</tr>
|
279 |
<?php
|
bots.php
DELETED
@@ -1,37 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
function useronline_get_bots() {
|
4 |
-
$bots = array(
|
5 |
-
'Google Bot' => 'google',
|
6 |
-
'MSN' => 'msnbot',
|
7 |
-
'BingBot' => 'bingbot',
|
8 |
-
'Alex' => 'ia_archiver',
|
9 |
-
'Lycos' => 'lycos',
|
10 |
-
'Ask Jeeves' => 'jeeves',
|
11 |
-
'Altavista' => 'scooter',
|
12 |
-
'AllTheWeb' => 'fast-webcrawler',
|
13 |
-
'Inktomi' => 'slurp@inktomi',
|
14 |
-
'Turnitin.com' => 'turnitinbot',
|
15 |
-
'Technorati' => 'technorati',
|
16 |
-
'Yahoo' => 'yahoo',
|
17 |
-
'Findexa' => 'findexa',
|
18 |
-
'NextLinks' => 'findlinks',
|
19 |
-
'Gais' => 'gaisbo',
|
20 |
-
'WiseNut' => 'zyborg',
|
21 |
-
'WhoisSource' => 'surveybot',
|
22 |
-
'Bloglines' => 'bloglines',
|
23 |
-
'BlogSearch' => 'blogsearch',
|
24 |
-
'PubSub' => 'pubsub',
|
25 |
-
'Syndic8' => 'syndic8',
|
26 |
-
'RadioUserland' => 'userland',
|
27 |
-
'Gigabot' => 'gigabot',
|
28 |
-
'Become.com' => 'become.com',
|
29 |
-
'Baidu' => 'baidu',
|
30 |
-
'Yandex' => 'yandex',
|
31 |
-
'Amazon' => 'amazonaws.com',
|
32 |
-
'Ahrefs' => 'AhrefsBot'
|
33 |
-
);
|
34 |
-
|
35 |
-
return apply_filters( 'useronline_bots', $bots );
|
36 |
-
}
|
37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
core.php
DELETED
@@ -1,213 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class UserOnline_Core {
|
4 |
-
|
5 |
-
static $add_script = false;
|
6 |
-
|
7 |
-
static $options;
|
8 |
-
static $most;
|
9 |
-
|
10 |
-
private static $useronline;
|
11 |
-
|
12 |
-
static function get_user_online_count() {
|
13 |
-
global $wpdb;
|
14 |
-
|
15 |
-
if ( is_null( self::$useronline ) )
|
16 |
-
self::$useronline = intval( $wpdb->get_var( "SELECT COUNT( * ) FROM $wpdb->useronline" ) );
|
17 |
-
|
18 |
-
return self::$useronline;
|
19 |
-
}
|
20 |
-
|
21 |
-
static function init( $options, $most ) {
|
22 |
-
self::$options = $options;
|
23 |
-
self::$most = $most;
|
24 |
-
|
25 |
-
add_action( 'plugins_loaded', array( __CLASS__, 'wp_stats_integration' ) );
|
26 |
-
|
27 |
-
add_action( 'admin_head', array( __CLASS__, 'record' ) );
|
28 |
-
add_action( 'wp_head', array( __CLASS__, 'record' ) );
|
29 |
-
|
30 |
-
add_action( 'wp_footer', array( __CLASS__, 'scripts' ) );
|
31 |
-
|
32 |
-
add_action( 'wp_ajax_useronline', array( __CLASS__, 'ajax' ) );
|
33 |
-
add_action( 'wp_ajax_nopriv_useronline', array( __CLASS__, 'ajax' ) );
|
34 |
-
|
35 |
-
add_shortcode( 'page_useronline', 'users_online_page' );
|
36 |
-
|
37 |
-
if ( self::$options->names )
|
38 |
-
add_filter( 'useronline_display_user', array( __CLASS__, 'linked_names' ), 10, 2 );
|
39 |
-
}
|
40 |
-
|
41 |
-
static function linked_names( $name, $user ) {
|
42 |
-
if ( !$user->user_id )
|
43 |
-
return $name;
|
44 |
-
|
45 |
-
return html_link( get_author_posts_url( $user->user_id ), $name );
|
46 |
-
}
|
47 |
-
|
48 |
-
function scripts() {
|
49 |
-
if ( !self::$add_script )
|
50 |
-
return;
|
51 |
-
|
52 |
-
$js_dev = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '.dev' : '';
|
53 |
-
|
54 |
-
wp_enqueue_script( 'wp-useronline', plugins_url( "useronline$js_dev.js", __FILE__ ), array( 'jquery' ), '2.80', true );
|
55 |
-
wp_localize_script( 'wp-useronline', 'useronlineL10n', array(
|
56 |
-
'ajax_url' => admin_url( 'admin-ajax.php', ( is_ssl() ? 'https' : 'http' ) ),
|
57 |
-
'timeout' => self::$options->timeout * 1000
|
58 |
-
) );
|
59 |
-
|
60 |
-
scbUtil::do_scripts('wp-useronline');
|
61 |
-
}
|
62 |
-
|
63 |
-
static function record( $page_url = '', $page_title = '' ) {
|
64 |
-
require_once dirname(__FILE__) . '/bots.php';
|
65 |
-
|
66 |
-
global $wpdb;
|
67 |
-
|
68 |
-
if ( empty( $page_url ) )
|
69 |
-
$page_url = $_SERVER['REQUEST_URI'];
|
70 |
-
|
71 |
-
if ( empty( $page_title ) )
|
72 |
-
$page_title = self::get_title();
|
73 |
-
|
74 |
-
if ( isset( $_SERVER['HTTP_REFERER'] ) )
|
75 |
-
$referral = strip_tags( $_SERVER['HTTP_REFERER'] );
|
76 |
-
else
|
77 |
-
$referral = '';
|
78 |
-
|
79 |
-
$user_ip = self::get_ip();
|
80 |
-
|
81 |
-
if ( isset( $_SERVER['HTTP_USER_AGENT'] ) )
|
82 |
-
$user_agent = strip_tags( $_SERVER['HTTP_USER_AGENT'] );
|
83 |
-
else
|
84 |
-
$user_agent = '';
|
85 |
-
|
86 |
-
$current_user = wp_get_current_user();
|
87 |
-
|
88 |
-
// Check For Bot
|
89 |
-
$bots = useronline_get_bots();
|
90 |
-
|
91 |
-
$bot_found = false;
|
92 |
-
foreach ( $bots as $name => $lookfor ) {
|
93 |
-
if ( stristr( $user_agent, $lookfor ) !== false ) {
|
94 |
-
$user_id = 0;
|
95 |
-
$user_name = $name;
|
96 |
-
$username = $lookfor;
|
97 |
-
$user_type = 'bot';
|
98 |
-
$bot_found = true;
|
99 |
-
|
100 |
-
break;
|
101 |
-
}
|
102 |
-
}
|
103 |
-
|
104 |
-
// If No Bot Is Found, Then We Check Members And Guests
|
105 |
-
if ( !$bot_found ) {
|
106 |
-
if ( $current_user->ID ) {
|
107 |
-
// Check For Member
|
108 |
-
$user_id = $current_user->ID;
|
109 |
-
$user_name = $current_user->display_name;
|
110 |
-
$user_type = 'member';
|
111 |
-
$where = $wpdb->prepare( "WHERE user_id = %d", $user_id );
|
112 |
-
} elseif ( !empty( $_COOKIE['comment_author_'.COOKIEHASH] ) ) {
|
113 |
-
// Check For Comment Author ( Guest )
|
114 |
-
$user_id = 0;
|
115 |
-
$user_name = trim( strip_tags( $_COOKIE['comment_author_'.COOKIEHASH] ) );
|
116 |
-
$user_type = 'guest';
|
117 |
-
} else {
|
118 |
-
// Check For Guest
|
119 |
-
$user_id = 0;
|
120 |
-
$user_name = __( 'Guest', 'wp-useronline' );
|
121 |
-
$user_type = 'guest';
|
122 |
-
}
|
123 |
-
}
|
124 |
-
|
125 |
-
// Current GMT Timestamp
|
126 |
-
$timestamp = current_time( 'mysql' );
|
127 |
-
|
128 |
-
// Purge table
|
129 |
-
$wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->useronline WHERE user_ip = %s OR timestamp < DATE_SUB(%s, INTERVAL %d SECOND)", $user_ip, $timestamp, self::$options->timeout ) );
|
130 |
-
|
131 |
-
// Insert Users
|
132 |
-
$data = compact( 'timestamp', 'user_type', 'user_id', 'user_name', 'user_ip', 'user_agent', 'page_title', 'page_url', 'referral' );
|
133 |
-
$data = stripslashes_deep( $data );
|
134 |
-
$wpdb->replace( $wpdb->useronline, $data );
|
135 |
-
|
136 |
-
// Count Users Online
|
137 |
-
self::$useronline = intval( $wpdb->get_var( "SELECT COUNT( * ) FROM $wpdb->useronline" ) );
|
138 |
-
|
139 |
-
// Maybe Update Most User Online
|
140 |
-
if ( self::$useronline > self::$most->count ) {
|
141 |
-
self::$most->update( array(
|
142 |
-
'count' => self::$useronline,
|
143 |
-
'date' => current_time( 'timestamp' )
|
144 |
-
) );
|
145 |
-
}
|
146 |
-
}
|
147 |
-
|
148 |
-
private function clear_table() {
|
149 |
-
global $wpdb;
|
150 |
-
|
151 |
-
$wpdb->query( "DELETE FROM $wpdb->useronline" );
|
152 |
-
}
|
153 |
-
|
154 |
-
static function ajax() {
|
155 |
-
$mode = trim( $_POST['mode'] );
|
156 |
-
|
157 |
-
$page_title = strip_tags( $_POST['page_title'] );
|
158 |
-
|
159 |
-
$page_url = str_replace( get_bloginfo( 'url' ), '', $_POST['page_url'] );
|
160 |
-
|
161 |
-
if ( $page_url != $_POST['page_url'] )
|
162 |
-
self::record( $page_url, $page_title );
|
163 |
-
|
164 |
-
switch( $mode ) {
|
165 |
-
case 'count':
|
166 |
-
users_online();
|
167 |
-
break;
|
168 |
-
case 'browsing-site':
|
169 |
-
users_browsing_site();
|
170 |
-
break;
|
171 |
-
case 'browsing-page':
|
172 |
-
users_browsing_page($page_url);
|
173 |
-
break;
|
174 |
-
case 'details':
|
175 |
-
echo users_online_page();
|
176 |
-
break;
|
177 |
-
}
|
178 |
-
|
179 |
-
die;
|
180 |
-
}
|
181 |
-
|
182 |
-
static function wp_stats_integration() {
|
183 |
-
if ( function_exists( 'stats_page' ) )
|
184 |
-
require_once dirname( __FILE__ ) . '/wp-stats.php';
|
185 |
-
}
|
186 |
-
|
187 |
-
private static function get_title() {
|
188 |
-
if ( is_admin() && function_exists( 'get_admin_page_title' ) ) {
|
189 |
-
$page_title = ' » ' . __( 'Admin', 'wp-useronline' ) . ' » ' . get_admin_page_title();
|
190 |
-
} else {
|
191 |
-
$page_title = wp_title( '»', false );
|
192 |
-
if ( empty( $page_title ) )
|
193 |
-
$page_title = ' » ' . strip_tags( $_SERVER['REQUEST_URI'] );
|
194 |
-
elseif ( is_singular() )
|
195 |
-
$page_title = ' » ' . __( 'Archive', 'wp-useronline' ) . ' ' . $page_title;
|
196 |
-
}
|
197 |
-
$page_title = get_bloginfo( 'name' ) . $page_title;
|
198 |
-
|
199 |
-
return $page_title;
|
200 |
-
}
|
201 |
-
|
202 |
-
private static function get_ip() {
|
203 |
-
if ( isset( $_SERVER["HTTP_X_FORWARDED_FOR"] ) )
|
204 |
-
$ip_address = $_SERVER["HTTP_X_FORWARDED_FOR"];
|
205 |
-
else
|
206 |
-
$ip_address = $_SERVER["REMOTE_ADDR"];
|
207 |
-
|
208 |
-
list( $ip_address ) = explode( ',', $ip_address );
|
209 |
-
|
210 |
-
return $ip_address;
|
211 |
-
}
|
212 |
-
}
|
213 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
deprecated.php
CHANGED
@@ -1,31 +1,31 @@
|
|
1 |
<?php
|
2 |
|
3 |
function useronline_page() {
|
4 |
-
_deprecated_function(
|
5 |
|
6 |
users_online_page();
|
7 |
}
|
8 |
|
9 |
function get_useronline() {
|
10 |
-
_deprecated_function(
|
11 |
|
12 |
users_online();
|
13 |
}
|
14 |
|
15 |
function get_most_useronline() {
|
16 |
-
_deprecated_function(
|
17 |
|
18 |
return get_most_users_online();
|
19 |
}
|
20 |
|
21 |
function get_most_useronline_date() {
|
22 |
-
_deprecated_function(
|
23 |
|
24 |
return get_most_users_online_date();
|
25 |
}
|
26 |
|
27 |
-
function get_useronline_count(
|
28 |
-
_deprecated_function(
|
29 |
|
30 |
if ( !$display )
|
31 |
return get_users_online_count();
|
1 |
<?php
|
2 |
|
3 |
function useronline_page() {
|
4 |
+
_deprecated_function(__FUNCTION__, '2.70', 'users_online_page()');
|
5 |
|
6 |
users_online_page();
|
7 |
}
|
8 |
|
9 |
function get_useronline() {
|
10 |
+
_deprecated_function(__FUNCTION__, '2.70', 'users_online()');
|
11 |
|
12 |
users_online();
|
13 |
}
|
14 |
|
15 |
function get_most_useronline() {
|
16 |
+
_deprecated_function(__FUNCTION__, '2.70', 'get_most_users_online()');
|
17 |
|
18 |
return get_most_users_online();
|
19 |
}
|
20 |
|
21 |
function get_most_useronline_date() {
|
22 |
+
_deprecated_function(__FUNCTION__, '2.70', 'get_most_users_online()');
|
23 |
|
24 |
return get_most_users_online_date();
|
25 |
}
|
26 |
|
27 |
+
function get_useronline_count($display = false) {
|
28 |
+
_deprecated_function(__FUNCTION__, '2.70', 'users_online_count()');
|
29 |
|
30 |
if ( !$display )
|
31 |
return get_users_online_count();
|
lang/wp-useronline-ar.mo
DELETED
Binary file
|
lang/wp-useronline-ar.po
DELETED
@@ -1,385 +0,0 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: WP-UserOnline 2.73\n"
|
4 |
-
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2010-05-08 15:28+0200\n"
|
6 |
-
"PO-Revision-Date: 2010-07-22 12:24+0200\n"
|
7 |
-
"Last-Translator: scribu <scribu@gmail.com>\n"
|
8 |
-
"Language-Team: anas ismail <anas1982@gmail.com>\n"
|
9 |
-
"MIME-Version: 1.0\n"
|
10 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
-
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"X-Poedit-Country: PALESTINIAN TERRITORY, OCCUPIED\n"
|
13 |
-
"X-Poedit-KeywordsList: __;_e;_c;_n:1,2;__ngettext_noop:1,2\n"
|
14 |
-
"X-Poedit-Basepath: .\n"
|
15 |
-
"X-Poedit-Language: Arabic\n"
|
16 |
-
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
17 |
-
"X-Poedit-SearchPath-0: .\n"
|
18 |
-
|
19 |
-
#: admin.php:9
|
20 |
-
msgid "Users Online Now"
|
21 |
-
msgstr "المتواجدين الان"
|
22 |
-
|
23 |
-
#: admin.php:10
|
24 |
-
#: wp-stats.php:14
|
25 |
-
#: wp-stats.php:31
|
26 |
-
msgid "WP-UserOnline"
|
27 |
-
msgstr "WP-UserOnline"
|
28 |
-
|
29 |
-
#: admin.php:24
|
30 |
-
#, php-format
|
31 |
-
msgid "There is <strong><a href='%s'>%s user</a></strong> online now."
|
32 |
-
msgid_plural "There are a total of <strong><a href='%s'>%s users</a></strong> online now."
|
33 |
-
msgstr[0] "يوجد الان ما مجموعه <strong><a href=\"%s\">%s زائر</a></strong> يتصفح الموقع."
|
34 |
-
msgstr[1] "يوجد الان <strong><a href=\"%s\">%s زائر</a></strong> يتصفح الموقع."
|
35 |
-
|
36 |
-
#: admin.php:51
|
37 |
-
msgid "UserOnline Options"
|
38 |
-
msgstr "UserOnline Options"
|
39 |
-
|
40 |
-
#: admin.php:52
|
41 |
-
#: widget.php:6
|
42 |
-
#: widget.php:49
|
43 |
-
msgid "UserOnline"
|
44 |
-
msgstr "UserOnline"
|
45 |
-
|
46 |
-
#: admin.php:109
|
47 |
-
msgid "Time Out"
|
48 |
-
msgstr "انتهت المهلة"
|
49 |
-
|
50 |
-
#: admin.php:112
|
51 |
-
msgid "How long until it will remove the user from the database (In seconds)."
|
52 |
-
msgstr "كم من الوقت تحتاج لازالة الزوار من قاعدة البيانات ( بالثواني)"
|
53 |
-
|
54 |
-
#: admin.php:117
|
55 |
-
msgid "UserOnline URL"
|
56 |
-
msgstr "رابط المتواجدين الان"
|
57 |
-
|
58 |
-
#: admin.php:120
|
59 |
-
msgid "URL To UserOnline Page<br />Example: http://www.yoursite.com/useronline/<br />Example: http://www.yoursite.com/?page_id=2"
|
60 |
-
msgstr "رابط صفحة المتواجدين الان( اتركه فارغا في حال لم ترغب بعرض رابط)<br />مثال: http://www.yoursite.com/blogs/useronline/<br /> مثال : http://www.yoursite.com/blogs/?page_id=2"
|
61 |
-
|
62 |
-
#: admin.php:124
|
63 |
-
msgid "User Names"
|
64 |
-
msgstr "اسماء الزوار"
|
65 |
-
|
66 |
-
#: admin.php:127
|
67 |
-
msgid "Link user names to their author page"
|
68 |
-
msgstr "اربط اسم المستخدم بصفحته الشخصية"
|
69 |
-
|
70 |
-
#: admin.php:144
|
71 |
-
msgid "Useronline Templates"
|
72 |
-
msgstr "قوالب المتواجدين الان"
|
73 |
-
|
74 |
-
#: admin.php:156
|
75 |
-
msgid "User(s) Browsing Site:"
|
76 |
-
msgstr "زائر يتصفح الموقع :"
|
77 |
-
|
78 |
-
#: admin.php:157
|
79 |
-
msgid "User(s) Browsing Page:"
|
80 |
-
msgstr "زائر يتصفح هه الصفحة :"
|
81 |
-
|
82 |
-
#: admin.php:170
|
83 |
-
#: scb/AdminPage.php:180
|
84 |
-
#: scb/AdminPage.php:191
|
85 |
-
msgid "Save Changes"
|
86 |
-
msgstr "احفظ التغييرات"
|
87 |
-
|
88 |
-
#: admin.php:180
|
89 |
-
msgid "Naming Conventions:"
|
90 |
-
msgstr "المصطلحات والتسميات :"
|
91 |
-
|
92 |
-
#: admin.php:181
|
93 |
-
#: admin.php:221
|
94 |
-
#: admin.php:243
|
95 |
-
msgid "Allowed Variables:"
|
96 |
-
msgstr "المتغيرات المسموحة :"
|
97 |
-
|
98 |
-
#: admin.php:183
|
99 |
-
msgid "Restore Defaults"
|
100 |
-
msgstr "استعد القوالب للافتراضيات"
|
101 |
-
|
102 |
-
#: admin.php:189
|
103 |
-
msgid "Singular Form"
|
104 |
-
msgstr "بصيغة المفرد"
|
105 |
-
|
106 |
-
#: admin.php:190
|
107 |
-
msgid "Plural Form"
|
108 |
-
msgstr "بصيغة الجمع"
|
109 |
-
|
110 |
-
#: admin.php:220
|
111 |
-
msgid "User(s) Online:"
|
112 |
-
msgstr "المتواجدون الان"
|
113 |
-
|
114 |
-
#: admin.php:226
|
115 |
-
#: admin.php:251
|
116 |
-
msgid "Restore Default Template"
|
117 |
-
msgstr "استعد القوالب الافتراضية"
|
118 |
-
|
119 |
-
#: admin.php:257
|
120 |
-
msgid "Member Names Separator"
|
121 |
-
msgstr "فواصل اسماء الاعضاء"
|
122 |
-
|
123 |
-
#: admin.php:258
|
124 |
-
msgid "Guests Separator"
|
125 |
-
msgstr "فواصل الضيف"
|
126 |
-
|
127 |
-
#: admin.php:259
|
128 |
-
msgid "Bots Separator"
|
129 |
-
msgstr "فاصل العنكب"
|
130 |
-
|
131 |
-
#: template-tags.php:79
|
132 |
-
#, php-format
|
133 |
-
msgid "There is <strong>%s</strong> online now: <strong>%s</strong>, <strong>%s</strong> and <strong>%s</strong>."
|
134 |
-
msgid_plural "There are a total of <strong>%s</strong> online now: <strong>%s</strong>, <strong>%s</strong> and <strong>%s</strong>."
|
135 |
-
msgstr[0] "يوجد <strong>%s</strong> يتصفح الموقع الان: <strong>%s</strong>, <strong>%s</strong> و <strong>%s</strong>."
|
136 |
-
msgstr[1] "يوجد <strong>%s</strong> يتصفح الموقع الان : <strong>%s</strong>, <strong>%s</strong> و <strong>%s</strong>."
|
137 |
-
|
138 |
-
#: template-tags.php:181
|
139 |
-
msgid "No one is online now."
|
140 |
-
msgstr "لا يوجد متواجدين الان"
|
141 |
-
|
142 |
-
#: template-tags.php:183
|
143 |
-
msgid "on"
|
144 |
-
msgstr "على"
|
145 |
-
|
146 |
-
#: template-tags.php:184
|
147 |
-
msgid "url"
|
148 |
-
msgstr "العنوان"
|
149 |
-
|
150 |
-
#: template-tags.php:185
|
151 |
-
msgid "referral"
|
152 |
-
msgstr "المحيل"
|
153 |
-
|
154 |
-
#: template-tags.php:196
|
155 |
-
msgid "Online Now"
|
156 |
-
msgstr "متواجد الان"
|
157 |
-
|
158 |
-
#: template-tags.php:227
|
159 |
-
#, php-format
|
160 |
-
msgid "%s @ %s"
|
161 |
-
msgstr "%s @ %s"
|
162 |
-
|
163 |
-
#: template-tags.php:247
|
164 |
-
#, php-format
|
165 |
-
msgid "Most users ever online were <strong>%s</strong>, on <strong>%s</strong>"
|
166 |
-
msgstr "اكبر تواجد للزوار في وقت واحد كان <strong>%s</strong>, في <strong>%s</strong>"
|
167 |
-
|
168 |
-
#: widget.php:5
|
169 |
-
msgid "WP-UserOnline users online statistics"
|
170 |
-
msgstr "WP-UserOnline احصائيات الحالة"
|
171 |
-
|
172 |
-
#: widget.php:56
|
173 |
-
msgid "Title:"
|
174 |
-
msgstr "العنوان"
|
175 |
-
|
176 |
-
#: widget.php:59
|
177 |
-
msgid "Statistics Type:"
|
178 |
-
msgstr "نوع الاحصائيات"
|
179 |
-
|
180 |
-
#: widget.php:61
|
181 |
-
msgid "Users Online Count"
|
182 |
-
msgstr "عدد المتواجدين الان"
|
183 |
-
|
184 |
-
#: widget.php:62
|
185 |
-
msgid "Users Browsing Current Page"
|
186 |
-
msgstr "زائر يتصفح هذه الصفحة"
|
187 |
-
|
188 |
-
#: widget.php:63
|
189 |
-
msgid "Users Browsing Site"
|
190 |
-
msgstr "زائر يتصفح الموقع"
|
191 |
-
|
192 |
-
#: widget.php:65
|
193 |
-
msgid "Users Online Count & Users Browsing Current Page"
|
194 |
-
msgstr "عدد المتواجدين الان & عدد المتصفحين لهذه الصفحة"
|
195 |
-
|
196 |
-
#: widget.php:66
|
197 |
-
msgid "Users Online Count & Users Browsing Site"
|
198 |
-
msgstr "عدد المتواجدين الان & عدد المتصفحين للموقع"
|
199 |
-
|
200 |
-
#: wp-stats.php:24
|
201 |
-
#, php-format
|
202 |
-
msgid "<strong>%s</strong> user online now."
|
203 |
-
msgid_plural "<strong>%s</strong> users online now."
|
204 |
-
msgstr[0] "<strong>%s</strong> زائر يتواجد الأن."
|
205 |
-
msgstr[1] "<strong>%s</strong> زائر يتواجد الأن."
|
206 |
-
|
207 |
-
#: wp-useronline.php:83
|
208 |
-
msgid "1 User"
|
209 |
-
msgstr "مستخدم 1"
|
210 |
-
|
211 |
-
#: wp-useronline.php:84
|
212 |
-
msgid "%COUNT% Users"
|
213 |
-
msgstr "%USERONLINE_COUNT% زوار "
|
214 |
-
|
215 |
-
#: wp-useronline.php:85
|
216 |
-
msgid "1 Member"
|
217 |
-
msgstr "عضو 1"
|
218 |
-
|
219 |
-
#: wp-useronline.php:86
|
220 |
-
msgid "%COUNT% Members"
|
221 |
-
msgstr "%USERONLINE_COUNT% اعضاء "
|
222 |
-
|
223 |
-
#: wp-useronline.php:87
|
224 |
-
msgid "1 Guest"
|
225 |
-
msgstr "ضيف 1"
|
226 |
-
|
227 |
-
#: wp-useronline.php:88
|
228 |
-
msgid "%COUNT% Guests"
|
229 |
-
msgstr "%USERONLINE_COUNT% ضيوف "
|
230 |
-
|
231 |
-
#: wp-useronline.php:89
|
232 |
-
msgid "1 Bot"
|
233 |
-
msgstr "عنكب 1"
|
234 |
-
|
235 |
-
#: wp-useronline.php:90
|
236 |
-
msgid "%COUNT% Bots"
|
237 |
-
msgstr "%USERONLINE_COUNT% عنكب"
|
238 |
-
|
239 |
-
#: wp-useronline.php:94
|
240 |
-
msgid "Online"
|
241 |
-
msgstr "متواجد الان"
|
242 |
-
|
243 |
-
#: wp-useronline.php:98
|
244 |
-
#: wp-useronline.php:99
|
245 |
-
#: wp-useronline.php:100
|
246 |
-
#: wp-useronline.php:107
|
247 |
-
#: wp-useronline.php:108
|
248 |
-
#: wp-useronline.php:109
|
249 |
-
msgid ","
|
250 |
-
msgstr ","
|
251 |
-
|
252 |
-
#: wp-useronline.php:111
|
253 |
-
msgid "Browsing This Page."
|
254 |
-
msgstr "يتصفح هذه الصفحة"
|
255 |
-
|
256 |
-
#: wp-useronline.php:210
|
257 |
-
msgid "Guest"
|
258 |
-
msgstr "ضيف"
|
259 |
-
|
260 |
-
#: wp-useronline.php:217
|
261 |
-
msgid "Admin"
|
262 |
-
msgstr "المدير"
|
263 |
-
|
264 |
-
#: wp-useronline.php:223
|
265 |
-
msgid "Archive"
|
266 |
-
msgstr "الارشيف"
|
267 |
-
|
268 |
-
#: scb/AdminPage.php:167
|
269 |
-
msgid "Settings <strong>saved</strong>."
|
270 |
-
msgstr "<strong>تم الحفظ </strong>."
|
271 |
-
|
272 |
-
#: scb/AdminPage.php:377
|
273 |
-
msgid "Settings"
|
274 |
-
msgstr "الاعدادات"
|
275 |
-
|
276 |
-
#~ msgid "Users|Template Element"
|
277 |
-
#~ msgstr "الزوار| عناصر القالب"
|
278 |
-
#~ msgid "Settings updated."
|
279 |
-
#~ msgstr "تم حفظ الاعدادات"
|
280 |
-
#~ msgid "Bots Name/User Agent"
|
281 |
-
#~ msgstr "اسماء العناكب والمسميات العامة"
|
282 |
-
#~ msgid ""
|
283 |
-
#~ "Here are a list of bots and their partial browser agents.<br />On the "
|
284 |
-
#~ "left column will be the <strong>Bot's Name</strong> and on the right "
|
285 |
-
#~ "column will be their <strong>Partial Browser Agent</strong>.<br />Start "
|
286 |
-
#~ "each entry on a new line."
|
287 |
-
#~ msgstr ""
|
288 |
-
#~ "هنا قائمة باسماء العناكب واشهر العملاء المتصفحة للموقع.<br />على العمود "
|
289 |
-
#~ "اليسار تجد <strong>اسماء العناكب</strong> وعلى العمود اليمين تجد "
|
290 |
-
#~ "<strong>عملاء المواقع الشهيرة</strong>.<br />كل ادخال في سطر جديد في حال "
|
291 |
-
#~ "رغبت بالاضافة."
|
292 |
-
#~ msgid "guest"
|
293 |
-
#~ msgstr "ضيف"
|
294 |
-
#~ msgid "User"
|
295 |
-
#~ msgstr "زائر"
|
296 |
-
#~ msgid "Member"
|
297 |
-
#~ msgstr "عضو"
|
298 |
-
#~ msgid "Members"
|
299 |
-
#~ msgstr "اعضاء"
|
300 |
-
#~ msgid "Guests"
|
301 |
-
#~ msgstr "ضيوف"
|
302 |
-
#~ msgid "Bot"
|
303 |
-
#~ msgstr "عنكب"
|
304 |
-
#~ msgid "Bots"
|
305 |
-
#~ msgstr "عناكب"
|
306 |
-
#~ msgid "Useronline Timeout"
|
307 |
-
#~ msgstr "مهلة الحساب"
|
308 |
-
#~ msgid "Useronline Bots"
|
309 |
-
#~ msgstr "العناكب المتواجدة"
|
310 |
-
#~ msgid "Useronline URL"
|
311 |
-
#~ msgstr "روابط المتواجدين الان"
|
312 |
-
#~ msgid "Useronline Naming Conventions"
|
313 |
-
#~ msgstr "مصطلحات التسمية للمتواجدين الان"
|
314 |
-
#~ msgid "User(s) Online Template"
|
315 |
-
#~ msgstr "قوالب المتواجدين الان"
|
316 |
-
#~ msgid "User(s) Browsing Site Template"
|
317 |
-
#~ msgstr "قالب الزوار الذين يتصفحون الموقع"
|
318 |
-
#~ msgid "User(s) Browsing Page Template"
|
319 |
-
#~ msgstr "قالب الزوار الذين يتصفحون هذه الصفحة"
|
320 |
-
#~ msgid "Updated"
|
321 |
-
#~ msgstr "تحديث"
|
322 |
-
#~ msgid "No Useronline Option Updated"
|
323 |
-
#~ msgstr "لا يوجد اعدادات لاضافة المتواجدين الان للتحديث"
|
324 |
-
#~ msgid "UNINSTALL WP-UserOnline"
|
325 |
-
#~ msgstr "ازالة WP-UserOnline"
|
326 |
-
#~ msgid "Table '%s' has been deleted."
|
327 |
-
#~ msgstr " جدول '%s' تم حذفه ."
|
328 |
-
#~ msgid "Setting Key '%s' has been deleted."
|
329 |
-
#~ msgstr "مفتاح الاعداد '%s' تم حذفه ."
|
330 |
-
#~ msgid "Uninstall WP-UserOnline"
|
331 |
-
#~ msgstr "ازالة WP-UserOnline"
|
332 |
-
#~ msgid ""
|
333 |
-
#~ "<a href=\"%s\">Click Here</a> To Finish The Uninstallation And WP-"
|
334 |
-
#~ "UserOnline Will Be Deactivated Automatically."
|
335 |
-
#~ msgstr ""
|
336 |
-
#~ "<a href=\"%s\">اضغط هنا</a> لاكمال ازالة اضافة WP-UserOnline والغاء "
|
337 |
-
#~ "تفعيلها تلقائيا."
|
338 |
-
#~ msgid ""
|
339 |
-
#~ "Deactivating WP-UserOnline plugin does not remove any data that may have "
|
340 |
-
#~ "been created, such as the useronline options. To completely remove this "
|
341 |
-
#~ "plugin, you can uninstall it here."
|
342 |
-
#~ msgstr ""
|
343 |
-
#~ "تعطيل الاضافة يوقف الاضافة عن العمل ولا تظهر خياراتها ولا استعلاماتها في "
|
344 |
-
#~ "الصفحات ولا يتم ايضا حذف جداولها من قاعدة البيانات , ولازالتها نهائيا "
|
345 |
-
#~ "يلزم ان تقوم بازالتها من الخيار في الاسفل"
|
346 |
-
#~ msgid "WARNING:"
|
347 |
-
#~ msgstr "تحذير : "
|
348 |
-
#~ msgid ""
|
349 |
-
#~ "Once uninstalled, this cannot be undone. You should use a Database Backup "
|
350 |
-
#~ "plugin of WordPress to back up all the data first."
|
351 |
-
#~ msgstr ""
|
352 |
-
#~ "بمجرد البدء بعملية الازالة فان اي تغير ناتج لا يمكن عكسه لذلك ننصح باخذ "
|
353 |
-
#~ "نسخة احتياطية من قاعدة البيانات قبل القيام بلك"
|
354 |
-
#~ msgid "The following WordPress Options/Tables will be DELETED:"
|
355 |
-
#~ msgstr "الخيارات والجداول التالية سيتم حذفها من القاعدة :"
|
356 |
-
#~ msgid "WordPress Options"
|
357 |
-
#~ msgstr "خيارات الووردبريس"
|
358 |
-
#~ msgid "WordPress Tables"
|
359 |
-
#~ msgstr "جداول الووردبريس"
|
360 |
-
#~ msgid "Yes"
|
361 |
-
#~ msgstr "نعم"
|
362 |
-
#~ msgid ""
|
363 |
-
#~ "You Are About To Uninstall WP-UserOnline From WordPress.\\nThis Action Is "
|
364 |
-
#~ "Not Reversible.\\n\\n Choose [Cancel] To Stop, [OK] To Uninstall."
|
365 |
-
#~ msgstr ""
|
366 |
-
#~ "انت الان بصدد ازالة WP-UserOnline من موقعك.\\nهذا التصرف غير قابل للعكس."
|
367 |
-
#~ "\\n\\n اختر (الغاء) للتوقف أو , [موافق] للازالة."
|
368 |
-
#~ msgid "No User Is Browsing This Site"
|
369 |
-
#~ msgstr "لا يوجد متصفحين للموقع الان"
|
370 |
-
#~ msgid "No User Is Browsing This Page"
|
371 |
-
#~ msgstr "لا يوجد متصفحين لهذه الصفحة"
|
372 |
-
#~ msgid ""
|
373 |
-
#~ "There are a total of <strong><a href=\"%s\">%s users</a></strong> online "
|
374 |
-
#~ "now."
|
375 |
-
#~ msgstr ""
|
376 |
-
#~ "هناك ما مجموعه <strong><a href=\"%s\">%s زائر</a></strong> يتواجد الان."
|
377 |
-
#~ msgid ""
|
378 |
-
#~ "There are a total of <strong>%s</strong> online now: <strong>%s</strong>, "
|
379 |
-
#~ "<strong>%s</strong> and <strong>%s</strong>."
|
380 |
-
#~ msgstr ""
|
381 |
-
#~ "هناك ما مجموعه <strong>%s</strong> متواجدين الان: <strong>%s</strong>, "
|
382 |
-
#~ "<strong>%s</strong> و <strong>%s</strong>."
|
383 |
-
#~ msgid "On"
|
384 |
-
#~ msgstr "في"
|
385 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lang/wp-useronline-et.mo
DELETED
Binary file
|
lang/wp-useronline-et.po
DELETED
@@ -1,361 +0,0 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: \n"
|
4 |
-
"Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-useronline\n"
|
5 |
-
"POT-Creation-Date: 2010-09-20 15:01+0300\n"
|
6 |
-
"PO-Revision-Date: 2011-03-12 13:40+0200\n"
|
7 |
-
"Last-Translator: illimar <illimartambek@gmail.com>\n"
|
8 |
-
"Language-Team: Illimar Tambek <illimartambek@gmail.com>\n"
|
9 |
-
"MIME-Version: 1.0\n"
|
10 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
-
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"X-Poedit-Country: Estonia\n"
|
13 |
-
"X-Poedit-KeywordsList: __;_e\n"
|
14 |
-
"X-Poedit-Basepath: .\n"
|
15 |
-
"X-Poedit-Language: Estonian\n"
|
16 |
-
"X-Poedit-SearchPath-0: .\n"
|
17 |
-
|
18 |
-
#: admin.php:9
|
19 |
-
msgid "Users Online Now"
|
20 |
-
msgstr "Kasutajate arv lehel"
|
21 |
-
|
22 |
-
#. #-#-#-#-# wp-useronline.pot (WP-UserOnline 2.80) #-#-#-#-#
|
23 |
-
#. Plugin Name of the plugin/theme
|
24 |
-
#: admin.php:10
|
25 |
-
#: wp-stats.php:14
|
26 |
-
#: wp-stats.php:31
|
27 |
-
msgid "WP-UserOnline"
|
28 |
-
msgstr "WP-UserOnline"
|
29 |
-
|
30 |
-
#: admin.php:24
|
31 |
-
#, php-format
|
32 |
-
msgid "There is <strong><a href='%s'>%s user</a></strong> online now."
|
33 |
-
msgstr "Hetkel on lehel <strong><a href='%s'>%s kasutaja</a></strong>."
|
34 |
-
|
35 |
-
#: admin.php:52
|
36 |
-
msgid "UserOnline Options"
|
37 |
-
msgstr "UserOnline valikud"
|
38 |
-
|
39 |
-
#: admin.php:53
|
40 |
-
#: widget.php:6
|
41 |
-
#: widget.php:49
|
42 |
-
msgid "UserOnline"
|
43 |
-
msgstr "UserOnline"
|
44 |
-
|
45 |
-
#: admin.php:110
|
46 |
-
msgid "Time Out"
|
47 |
-
msgstr "Timeout"
|
48 |
-
|
49 |
-
#: admin.php:113
|
50 |
-
msgid "How long until it will remove the user from the database ( In seconds )."
|
51 |
-
msgstr "Kui kaua oodata, enne kui kasutaja eemaldatakse andmebaasist (sekundites)."
|
52 |
-
|
53 |
-
#: admin.php:118
|
54 |
-
msgid "UserOnline URL"
|
55 |
-
msgstr "UserOnline aadress"
|
56 |
-
|
57 |
-
#: admin.php:121
|
58 |
-
msgid "URL To UserOnline Page<br />Example: http://www.yoursite.com/useronline/<br />Example: http://www.yoursite.com/?page_id=2"
|
59 |
-
msgstr "UserOnline lehe aadress<br />Näiteks: http://www.sinuleht.ee/useronline/<br />Näiteks: http://www.sinuleht.ee/?page_id=2"
|
60 |
-
|
61 |
-
#: admin.php:125
|
62 |
-
msgid "User Names"
|
63 |
-
msgstr "Kasutajate nimed"
|
64 |
-
|
65 |
-
#: admin.php:128
|
66 |
-
msgid "Link user names to their author page"
|
67 |
-
msgstr "Kasutajanimed lingivad autori arhiivile"
|
68 |
-
|
69 |
-
#: admin.php:145
|
70 |
-
msgid "Useronline Templates"
|
71 |
-
msgstr "Useronline mallid"
|
72 |
-
|
73 |
-
#: admin.php:157
|
74 |
-
msgid "User(s) Browsing Site:"
|
75 |
-
msgstr "Kasutaja(d), kes on saidil:"
|
76 |
-
|
77 |
-
#: admin.php:158
|
78 |
-
msgid "User(s) Browsing Page:"
|
79 |
-
msgstr "Kasutaja(d), kes vaatavad seda lehte"
|
80 |
-
|
81 |
-
#: admin.php:171
|
82 |
-
#: scb/AdminPage.php:179
|
83 |
-
#: scb/AdminPage.php:189
|
84 |
-
msgid "Save Changes"
|
85 |
-
msgstr "Salvesta muutused"
|
86 |
-
|
87 |
-
#: admin.php:181
|
88 |
-
msgid "Naming Conventions:"
|
89 |
-
msgstr "Nimetamine:"
|
90 |
-
|
91 |
-
#: admin.php:182
|
92 |
-
#: admin.php:222
|
93 |
-
#: admin.php:244
|
94 |
-
msgid "Allowed Variables:"
|
95 |
-
msgstr "Lubatud muutujad:"
|
96 |
-
|
97 |
-
#: admin.php:184
|
98 |
-
msgid "Restore Defaults"
|
99 |
-
msgstr "Taasta algseaded"
|
100 |
-
|
101 |
-
#: admin.php:190
|
102 |
-
msgid "Singular Form"
|
103 |
-
msgstr "Ainsuse vorm"
|
104 |
-
|
105 |
-
#: admin.php:191
|
106 |
-
msgid "Plural Form"
|
107 |
-
msgstr "Mitmuse vorm"
|
108 |
-
|
109 |
-
#: admin.php:221
|
110 |
-
msgid "User(s) Online:"
|
111 |
-
msgstr "Kasutaja(id) lehel:"
|
112 |
-
|
113 |
-
#: admin.php:227
|
114 |
-
#: admin.php:252
|
115 |
-
msgid "Restore Default Template"
|
116 |
-
msgstr "Taasta algne mall"
|
117 |
-
|
118 |
-
#: admin.php:258
|
119 |
-
msgid "Member Names Separator"
|
120 |
-
msgstr "Liikmete nimede eraldaja"
|
121 |
-
|
122 |
-
#: admin.php:259
|
123 |
-
msgid "Guests Separator"
|
124 |
-
msgstr "Külaliste eraldaja"
|
125 |
-
|
126 |
-
#: admin.php:260
|
127 |
-
msgid "Bots Separator"
|
128 |
-
msgstr "Bottide eraldaja"
|
129 |
-
|
130 |
-
#: core.php:109
|
131 |
-
msgid "Guest"
|
132 |
-
msgstr "külaline"
|
133 |
-
|
134 |
-
#: core.php:180
|
135 |
-
msgid "Admin"
|
136 |
-
msgstr "Haldur"
|
137 |
-
|
138 |
-
#: core.php:186
|
139 |
-
msgid "Archive"
|
140 |
-
msgstr "Arhiiv"
|
141 |
-
|
142 |
-
#: scb/AdminPage.php:167
|
143 |
-
msgid "Settings <strong>saved</strong>."
|
144 |
-
msgstr "Seaded <strong>salvestati</strong>."
|
145 |
-
|
146 |
-
#: scb/AdminPage.php:371
|
147 |
-
msgid "Settings"
|
148 |
-
msgstr "Seaded"
|
149 |
-
|
150 |
-
#: template-tags.php:81
|
151 |
-
#, php-format
|
152 |
-
msgid "There is <strong>%s</strong> online now: <strong>%s</strong>, <strong>%s</strong> and <strong>%s</strong>."
|
153 |
-
msgstr "Hetkel on lehel <strong>%s</strong>: <strong>%s</strong>, <strong>%s</strong> and <strong>%s</strong>."
|
154 |
-
|
155 |
-
#: template-tags.php:190
|
156 |
-
msgid "No one is online now."
|
157 |
-
msgstr "Hetkel ei ole lehel kedagi."
|
158 |
-
|
159 |
-
#: template-tags.php:192
|
160 |
-
msgid "on"
|
161 |
-
msgstr " "
|
162 |
-
|
163 |
-
#: template-tags.php:193
|
164 |
-
msgid "url"
|
165 |
-
msgstr "link"
|
166 |
-
|
167 |
-
#: template-tags.php:194
|
168 |
-
msgid "referral"
|
169 |
-
msgstr "viitaja"
|
170 |
-
|
171 |
-
#: template-tags.php:205
|
172 |
-
msgid "Online Now"
|
173 |
-
msgstr "hetkel lehel"
|
174 |
-
|
175 |
-
#: template-tags.php:247
|
176 |
-
#: template-tags.php:249
|
177 |
-
#, php-format
|
178 |
-
msgid "%s @ %s"
|
179 |
-
msgstr "%s kell %s"
|
180 |
-
|
181 |
-
#: template-tags.php:269
|
182 |
-
#, php-format
|
183 |
-
msgid "Most users ever online were <strong>%s</strong>, on <strong>%s</strong>"
|
184 |
-
msgstr "Kõige rohkem kasutajaid (<strong>%s</strong>) oli lehel <strong>%s</strong>"
|
185 |
-
|
186 |
-
#: widget.php:5
|
187 |
-
msgid "WP-UserOnline users online statistics"
|
188 |
-
msgstr "WP-USerOnline kasutajate lehel viibimise statistika"
|
189 |
-
|
190 |
-
#: widget.php:56
|
191 |
-
msgid "Title:"
|
192 |
-
msgstr "Pealkiri:"
|
193 |
-
|
194 |
-
#: widget.php:59
|
195 |
-
msgid "Statistics Type:"
|
196 |
-
msgstr "Statistika:"
|
197 |
-
|
198 |
-
#: widget.php:61
|
199 |
-
msgid "Users Online Count"
|
200 |
-
msgstr "Kasutajate arv lehel"
|
201 |
-
|
202 |
-
#: widget.php:62
|
203 |
-
msgid "Users Browsing Current Page"
|
204 |
-
msgstr "Kasutajad, kes vaatavad seda lehte"
|
205 |
-
|
206 |
-
#: widget.php:63
|
207 |
-
msgid "Users Browsing Site"
|
208 |
-
msgstr "Kasutajaid lehel"
|
209 |
-
|
210 |
-
#: widget.php:65
|
211 |
-
msgid "Users Online Count & Users Browsing Current Page"
|
212 |
-
msgstr "Kasutajaid lehel & Kasutajad sellel lehel"
|
213 |
-
|
214 |
-
#: widget.php:66
|
215 |
-
msgid "Users Online Count & Users Browsing Site"
|
216 |
-
msgstr "Kasutajate arv lehel & Kasutajad, kes vaatavad saiti"
|
217 |
-
|
218 |
-
#: wp-stats.php:24
|
219 |
-
#, php-format
|
220 |
-
msgid "<strong>%s</strong> user online now."
|
221 |
-
msgstr "<strong>%s</strong> kasutaja lehel."
|
222 |
-
|
223 |
-
#: wp-useronline.php:61
|
224 |
-
msgid "1 User"
|
225 |
-
msgstr "1 kasutaja"
|
226 |
-
|
227 |
-
#: wp-useronline.php:62
|
228 |
-
msgid "%COUNT% Users"
|
229 |
-
msgstr "%COUNT% kasutajat"
|
230 |
-
|
231 |
-
#: wp-useronline.php:63
|
232 |
-
msgid "1 Member"
|
233 |
-
msgstr "1 liige"
|
234 |
-
|
235 |
-
#: wp-useronline.php:64
|
236 |
-
msgid "%COUNT% Members"
|
237 |
-
msgstr "%COUNT% liiget"
|
238 |
-
|
239 |
-
#: wp-useronline.php:65
|
240 |
-
msgid "1 Guest"
|
241 |
-
msgstr "1 külastaja"
|
242 |
-
|
243 |
-
#: wp-useronline.php:66
|
244 |
-
msgid "%COUNT% Guests"
|
245 |
-
msgstr "%COUNT% külalist"
|
246 |
-
|
247 |
-
#: wp-useronline.php:67
|
248 |
-
msgid "1 Bot"
|
249 |
-
msgstr "1 bot"
|
250 |
-
|
251 |
-
#: wp-useronline.php:68
|
252 |
-
msgid "%COUNT% Bots"
|
253 |
-
msgstr "%COUNT% botti"
|
254 |
-
|
255 |
-
#: wp-useronline.php:72
|
256 |
-
msgid "Online"
|
257 |
-
msgstr "lehel"
|
258 |
-
|
259 |
-
#: wp-useronline.php:76
|
260 |
-
#: wp-useronline.php:77
|
261 |
-
#: wp-useronline.php:78
|
262 |
-
#: wp-useronline.php:85
|
263 |
-
#: wp-useronline.php:86
|
264 |
-
#: wp-useronline.php:87
|
265 |
-
msgid ","
|
266 |
-
msgstr ","
|
267 |
-
|
268 |
-
#: wp-useronline.php:80
|
269 |
-
#: wp-useronline.php:89
|
270 |
-
msgctxt "Template Element"
|
271 |
-
msgid "Users"
|
272 |
-
msgstr "kasutajat"
|
273 |
-
|
274 |
-
#: wp-useronline.php:89
|
275 |
-
msgid "Browsing This Page."
|
276 |
-
msgstr "vaatavad seda lehte."
|
277 |
-
|
278 |
-
#. Plugin URI of the plugin/theme
|
279 |
-
msgid "http://wordpress.org/extend/plugins/wp-useronline/"
|
280 |
-
msgstr "http://wordpress.org/extend/plugins/wp-useronline/"
|
281 |
-
|
282 |
-
#. Description of the plugin/theme
|
283 |
-
msgid "Enable you to display how many users are online on your Wordpress site"
|
284 |
-
msgstr "Võimaldab näidata, kui palju kasutajaid hetkel sinu Wordpressi lehel viibib"
|
285 |
-
|
286 |
-
#. Author of the plugin/theme
|
287 |
-
msgid "Lester 'GaMerZ' Chan & scribu"
|
288 |
-
msgstr "Lester 'GaMerZ' Chan & scribu"
|
289 |
-
|
290 |
-
#~ msgid "WordPress Options"
|
291 |
-
#~ msgstr "WordPressi seaded"
|
292 |
-
|
293 |
-
#~ msgid "WordPress Tables"
|
294 |
-
#~ msgstr "WordPressi tabelid"
|
295 |
-
|
296 |
-
#~ msgid "Yes"
|
297 |
-
#~ msgstr "Jah"
|
298 |
-
|
299 |
-
#~ msgid "Useronline"
|
300 |
-
#~ msgstr "Useronline"
|
301 |
-
|
302 |
-
#~ msgid "guest"
|
303 |
-
#~ msgstr "külastaja"
|
304 |
-
|
305 |
-
#~ msgid ""
|
306 |
-
#~ "There are a total of <strong><a href=\"%s\">%s users</a></strong> online "
|
307 |
-
#~ "now."
|
308 |
-
#~ msgstr ""
|
309 |
-
#~ "Hetklel on lehel kokku <strong><a href=\"%s\">%s kasutajat</a></strong>."
|
310 |
-
|
311 |
-
#~ msgid "User"
|
312 |
-
#~ msgstr "kasutaja"
|
313 |
-
|
314 |
-
#~ msgid "Member"
|
315 |
-
#~ msgstr "liige"
|
316 |
-
|
317 |
-
#~ msgid "Members"
|
318 |
-
#~ msgstr "liiget"
|
319 |
-
|
320 |
-
#~ msgid "Guests"
|
321 |
-
#~ msgstr "külastajat"
|
322 |
-
|
323 |
-
#~ msgid "Bot"
|
324 |
-
#~ msgstr "bot"
|
325 |
-
|
326 |
-
#~ msgid "Bots"
|
327 |
-
#~ msgstr "botti"
|
328 |
-
|
329 |
-
#~ msgid ""
|
330 |
-
#~ "There are a total of <strong>%s</strong> online now: <strong>%s</strong>, "
|
331 |
-
#~ "<strong>%s</strong> and <strong>%s</strong>."
|
332 |
-
#~ msgstr ""
|
333 |
-
#~ "Hetkel on lehel kokku <strong>%s</strong>: <strong>%s</strong>, <strong>%"
|
334 |
-
#~ "s</strong> ja <strong>%s</strong>."
|
335 |
-
|
336 |
-
#~ msgid "user(s) online now."
|
337 |
-
#~ msgstr "kasutaja(t) lehel"
|
338 |
-
|
339 |
-
#~ msgid "Most users ever online was"
|
340 |
-
#~ msgstr "Kõige rohkem kasutajaid oli lehel korraga"
|
341 |
-
|
342 |
-
#~ msgid "Update Options"
|
343 |
-
#~ msgstr "Uuenda seadeid"
|
344 |
-
|
345 |
-
#~ msgid "Cancel"
|
346 |
-
#~ msgstr "Tühista"
|
347 |
-
|
348 |
-
#~ msgid "There is"
|
349 |
-
#~ msgstr "Hetkel on"
|
350 |
-
|
351 |
-
#~ msgid "There are a total of"
|
352 |
-
#~ msgstr "Lehel on"
|
353 |
-
|
354 |
-
#~ msgid "online now"
|
355 |
-
#~ msgstr " "
|
356 |
-
|
357 |
-
#~ msgid "and"
|
358 |
-
#~ msgstr "ja"
|
359 |
-
|
360 |
-
#~ msgid "Most users ever online were"
|
361 |
-
#~ msgstr "Kõige rohkem kasutajaid oli lehel"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lang/wp-useronline-he_IL.mo
CHANGED
Binary file
|
lang/wp-useronline-he_IL.po
CHANGED
@@ -9,341 +9,420 @@ msgstr ""
|
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
13 |
-
"X-Poedit-Language: English\n"
|
14 |
"X-Poedit-Country: SINGAPORE\n"
|
15 |
-
"X-Poedit-
|
16 |
-
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
|
17 |
"X-Poedit-Basepath: .\n"
|
18 |
-
"X-Poedit-
|
19 |
"X-Poedit-SearchPath-0: .\n"
|
20 |
-
"X-Textdomain-Support: yes"
|
21 |
|
22 |
-
#:
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
msgid "Online"
|
25 |
-
msgstr "
|
26 |
|
27 |
-
#:
|
28 |
-
|
29 |
msgid "1 User"
|
30 |
-
msgstr "גולש
|
|
|
|
|
|
|
|
|
|
|
31 |
|
32 |
-
#:
|
33 |
-
|
34 |
msgid "1 Member"
|
35 |
-
msgstr "חבר
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
-
#:
|
38 |
-
|
39 |
msgid "1 Guest"
|
40 |
-
msgstr "אורח
|
41 |
|
42 |
-
#:
|
43 |
-
|
|
|
|
|
|
|
|
|
|
|
44 |
msgid "1 Bot"
|
45 |
-
msgstr "בוט
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
|
47 |
-
#:
|
48 |
-
|
49 |
msgid "Browsing This Page."
|
50 |
msgstr "צופים בדף זה."
|
51 |
|
52 |
-
#:
|
53 |
-
|
|
|
|
|
|
|
|
|
54 |
msgid "Time Out"
|
55 |
msgstr "פסק זמן"
|
56 |
|
57 |
-
#:
|
58 |
-
|
|
|
|
|
|
|
59 |
msgid "UserOnline URL"
|
60 |
-
msgstr "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
|
62 |
-
#:
|
63 |
-
|
|
|
|
|
|
|
64 |
msgid "Naming Conventions:"
|
65 |
-
msgstr "
|
66 |
|
67 |
-
#:
|
68 |
-
#:
|
69 |
-
#:
|
70 |
-
|
71 |
msgid "Allowed Variables:"
|
72 |
msgstr "משתנים מותרים:"
|
73 |
|
74 |
-
#:
|
75 |
-
#:
|
76 |
-
|
|
|
77 |
msgid "Restore Default Template"
|
78 |
-
msgstr "שחזר
|
79 |
|
80 |
-
#:
|
81 |
-
#@ wp-useronline
|
82 |
msgid "Singular Form"
|
83 |
msgstr "טופס יחיד"
|
84 |
|
85 |
-
#:
|
86 |
-
#@ wp-useronline
|
87 |
msgid "Plural Form"
|
88 |
msgstr "טופס רבים"
|
89 |
|
90 |
-
#:
|
91 |
-
#@ wp-useronline
|
92 |
msgid "Useronline Templates"
|
93 |
-
msgstr "
|
94 |
|
95 |
-
#:
|
96 |
-
#@ wp-useronline
|
97 |
msgid "User(s) Online:"
|
98 |
-
msgstr "
|
99 |
|
100 |
-
#:
|
101 |
-
#@ wp-useronline
|
102 |
msgid "User(s) Browsing Site:"
|
103 |
-
msgstr "
|
104 |
|
105 |
-
#:
|
106 |
-
|
107 |
msgid "Member Names Separator"
|
108 |
msgstr "מפריד שמות חברים"
|
109 |
|
110 |
-
#:
|
111 |
-
|
112 |
msgid "Guests Separator"
|
113 |
msgstr "מפריד אורחים"
|
114 |
|
115 |
-
#:
|
116 |
-
|
117 |
msgid "Bots Separator"
|
118 |
msgstr "מפריד בוטים"
|
119 |
|
120 |
-
#:
|
121 |
-
#@ wp-useronline
|
122 |
msgid "User(s) Browsing Page:"
|
123 |
-
msgstr "
|
124 |
|
125 |
-
#:
|
126 |
-
#: scb/AdminPage.php:178
|
127 |
-
#: scb/AdminPage.php:189
|
128 |
-
#@ wp-useronline
|
129 |
msgid "Save Changes"
|
130 |
msgstr "שמור שינויים"
|
131 |
|
132 |
-
#:
|
133 |
-
|
134 |
-
|
135 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
msgid "UserOnline"
|
137 |
-
msgstr "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
|
139 |
-
#:
|
140 |
-
|
141 |
-
|
142 |
-
|
|
|
|
|
|
|
|
|
143 |
msgid "WP-UserOnline"
|
144 |
-
msgstr "
|
145 |
|
146 |
-
#:
|
147 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
148 |
msgid "Guest"
|
149 |
msgstr "אורח"
|
150 |
|
151 |
-
#:
|
152 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
#, php-format
|
154 |
-
#@ wp-useronline
|
155 |
msgid "%s @ %s"
|
156 |
msgstr "%s @ %s"
|
157 |
|
158 |
-
#:
|
159 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
msgid "Users Online Now"
|
161 |
-
msgstr "גולשים
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
162 |
|
163 |
-
#:
|
|
|
164 |
#, php-format
|
165 |
-
#@ wp-useronline
|
166 |
msgid "Most users ever online were <strong>%s</strong>, on <strong>%s</strong>"
|
167 |
-
msgstr "הכי הרבה גולשים
|
168 |
|
169 |
-
#:
|
170 |
-
|
171 |
-
|
172 |
-
msgstr "מקוונים כעת"
|
173 |
|
174 |
-
#:
|
175 |
-
|
176 |
-
|
177 |
-
msgstr "הפניה"
|
178 |
|
179 |
-
#:
|
180 |
-
|
181 |
-
|
182 |
-
msgstr "ב"
|
183 |
|
184 |
-
#:
|
185 |
-
|
186 |
-
|
187 |
-
msgstr "כתובת URL"
|
188 |
|
189 |
-
#:
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
msgstr
|
196 |
-
|
197 |
-
#:
|
198 |
-
#@ wp-useronline
|
199 |
-
msgid "UserOnline Options"
|
200 |
-
msgstr "אפשרויות גולשש מקוון"
|
201 |
-
|
202 |
-
#: admin.php:116
|
203 |
-
#@ wp-useronline
|
204 |
-
msgid "How long until it will remove the user from the database (in seconds)."
|
205 |
-
msgstr "כמה זמן עד שהגולש יוסר ממסד הנתונים (בשניות)."
|
206 |
-
|
207 |
-
#: admin.php:124
|
208 |
-
#@ wp-useronline
|
209 |
-
msgid "URL To UserOnline Page<br />Example: http://www.yoursite.com/useronline/<br />Example: http://www.yoursite.com/?page_id=2"
|
210 |
-
msgstr "כתובת URL לדף UserOnline <br />דוגמה: http://www.yoursite.com/useronline/<br />דוגמה: http://www.yoursite.com/?page_id=2"
|
211 |
-
|
212 |
-
#: admin.php:128
|
213 |
-
#@ wp-useronline
|
214 |
-
msgid "User Names"
|
215 |
-
msgstr "שמות משתמש"
|
216 |
-
|
217 |
-
#: admin.php:131
|
218 |
-
#@ wp-useronline
|
219 |
-
msgid "Link user names to their author page"
|
220 |
-
msgstr "קשר שמות משתמשים לדף שמות המחבר שלהם"
|
221 |
-
|
222 |
-
#: admin.php:189
|
223 |
-
#@ wp-useronline
|
224 |
-
msgid "Restore Defaults"
|
225 |
-
msgstr "שחזר לברירות המחדל"
|
226 |
-
|
227 |
-
#: core.php:211
|
228 |
-
#@ wp-useronline
|
229 |
-
msgid "Admin"
|
230 |
-
msgstr "ניהול"
|
231 |
-
|
232 |
-
#: core.php:217
|
233 |
-
#@ wp-useronline
|
234 |
-
msgid "Archive"
|
235 |
-
msgstr "ארכיון"
|
236 |
-
|
237 |
-
#: scb/AdminPage.php:165
|
238 |
-
#@ wp-useronline
|
239 |
-
msgid "Settings <strong>saved</strong>."
|
240 |
-
msgstr "ההגדרות <strong>נשמרו</strong>."
|
241 |
-
|
242 |
-
#: scb/AdminPage.php:350
|
243 |
-
#@ wp-useronline
|
244 |
-
msgid "Settings"
|
245 |
-
msgstr "הגדרות"
|
246 |
-
|
247 |
-
#. gettext fix: identical singular and plural forms found, that may be ambiguous! Please check the code!
|
248 |
-
#: template-tags.php:81
|
249 |
#, php-format
|
250 |
-
#@ wp-useronline
|
251 |
msgid "There is <strong>%s</strong> online now: <strong>%s</strong>, <strong>%s</strong> and <strong>%s</strong>."
|
252 |
-
|
253 |
-
msgstr[0] "יש <strong>%s</strong> מקוונים כעת: <strong>%s</strong>, <strong>%s</strong> ו <strong>%s</strong>."
|
254 |
-
msgstr[1] "יש בסך הכל <strong>%s</strong> מקוונים כעת: <strong>%s</strong>, <strong>%s</strong> ו <strong>%s</strong>."
|
255 |
-
|
256 |
-
#: template-tags.php:190
|
257 |
-
#@ wp-useronline
|
258 |
-
msgid "No one is online now."
|
259 |
-
msgstr "אין אף אחד מקוון כעת."
|
260 |
-
|
261 |
-
#: widget.php:5
|
262 |
-
#@ wp-useronline
|
263 |
-
msgid "WP-UserOnline users online statistics"
|
264 |
-
msgstr "סטטיסטיקת גולשים מקוונים של תוסף WP-UserOnline"
|
265 |
-
|
266 |
-
#: widget.php:56
|
267 |
-
#@ wp-useronline
|
268 |
-
msgid "Title:"
|
269 |
-
msgstr "כותרת:"
|
270 |
-
|
271 |
-
#: widget.php:59
|
272 |
-
#@ wp-useronline
|
273 |
-
msgid "Statistics Type:"
|
274 |
-
msgstr "סוג סטטיסטיקה:"
|
275 |
-
|
276 |
-
#: widget.php:61
|
277 |
-
#@ wp-useronline
|
278 |
-
msgid "Users Online Count"
|
279 |
-
msgstr "מונה גולשים מקוונים"
|
280 |
-
|
281 |
-
#: widget.php:62
|
282 |
-
#@ wp-useronline
|
283 |
-
msgid "Users Browsing Current Page"
|
284 |
-
msgstr "גולשים הנמצאים בדף זה"
|
285 |
-
|
286 |
-
#: widget.php:63
|
287 |
-
#@ wp-useronline
|
288 |
-
msgid "Users Browsing Site"
|
289 |
-
msgstr "גולשים הנמצאים באתר"
|
290 |
-
|
291 |
-
#: widget.php:65
|
292 |
-
#@ wp-useronline
|
293 |
-
msgid "Users Online Count & Users Browsing Current Page"
|
294 |
-
msgstr "מונה גולשים מקוונים וגם גולשים הנמצאים בדף זה"
|
295 |
-
|
296 |
-
#: widget.php:66
|
297 |
-
#@ wp-useronline
|
298 |
-
msgid "Users Online Count & Users Browsing Site"
|
299 |
-
msgstr "מונה גולשים מקוונים וגם גולשים באתר"
|
300 |
-
|
301 |
-
#: wp-stats.php:24
|
302 |
-
#, php-format
|
303 |
-
#@ wp-useronline
|
304 |
-
msgid "<strong>%s</strong> user online now."
|
305 |
-
msgid_plural "<strong>%s</strong> users online now."
|
306 |
-
msgstr[0] "<strong>%s</strong> גולש מקוון כעת."
|
307 |
-
msgstr[1] "<strong>%s</strong> גולשים מקוונים כעת."
|
308 |
|
309 |
-
#: wp-useronline.php:
|
310 |
#, php-format
|
311 |
-
|
312 |
-
|
313 |
-
msgstr "%COUNT% משתמשים"
|
314 |
|
315 |
-
#: wp-useronline.php:
|
316 |
-
|
317 |
-
|
318 |
-
msgid "
|
319 |
-
msgstr "
|
320 |
|
321 |
-
#: wp-useronline.php:
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
msgstr "%COUNT% אורחים"
|
326 |
|
327 |
-
#: wp-useronline.php:
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
|
|
|
|
332 |
|
333 |
-
#: wp-useronline.php:
|
334 |
-
#: wp-useronline.php:
|
335 |
-
#: wp-useronline.php:
|
336 |
-
#: wp-useronline.php:
|
337 |
-
#: wp-useronline.php:
|
338 |
-
|
339 |
-
|
340 |
-
msgid ","
|
341 |
-
msgstr ","
|
342 |
|
343 |
-
#: wp-useronline.php:
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
349 |
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
|
|
|
|
12 |
"X-Poedit-Country: SINGAPORE\n"
|
13 |
+
"X-Poedit-KeywordsList: __;_e\n"
|
|
|
14 |
"X-Poedit-Basepath: .\n"
|
15 |
+
"X-Poedit-Language: English\n"
|
16 |
"X-Poedit-SearchPath-0: .\n"
|
|
|
17 |
|
18 |
+
#: useronline-options.php:63
|
19 |
+
msgid "Useronline Timeout"
|
20 |
+
msgstr "פסק זמן גולשים און ליין"
|
21 |
+
|
22 |
+
#: useronline-options.php:64
|
23 |
+
msgid "Useronline Bots"
|
24 |
+
msgstr "בוטים און ליין"
|
25 |
+
|
26 |
+
#: useronline-options.php:65
|
27 |
+
msgid "Useronline URL"
|
28 |
+
msgstr "קישור לגולשים און ליין"
|
29 |
+
|
30 |
+
#: useronline-options.php:66
|
31 |
+
msgid "Useronline Naming Conventions"
|
32 |
+
msgstr "ועידת שמות גולשים און ליין"
|
33 |
+
|
34 |
+
#: useronline-options.php:67
|
35 |
+
msgid "User(s) Online Template"
|
36 |
+
msgstr "תבנית גולשים און ליין"
|
37 |
+
|
38 |
+
#: useronline-options.php:68
|
39 |
+
msgid "User(s) Browsing Site Template"
|
40 |
+
msgstr "תבנית של אתר לגולשים צופים"
|
41 |
+
|
42 |
+
#: useronline-options.php:69
|
43 |
+
msgid "User(s) Browsing Page Template"
|
44 |
+
msgstr "תבנית של עמוד לגולשים צופים"
|
45 |
+
|
46 |
+
#: useronline-options.php:74
|
47 |
+
msgid "Updated"
|
48 |
+
msgstr "עדכונים"
|
49 |
+
|
50 |
+
#: useronline-options.php:79
|
51 |
+
msgid "No Useronline Option Updated"
|
52 |
+
msgstr "לא עודכנו אפשרויות גולשים און ליין"
|
53 |
+
|
54 |
+
#: useronline-options.php:85
|
55 |
+
#: useronline-options.php:379
|
56 |
+
msgid "UNINSTALL WP-UserOnline"
|
57 |
+
msgstr "תבנית של עמוד לגולשים צופים"
|
58 |
+
|
59 |
+
#: useronline-options.php:92
|
60 |
+
#, php-format
|
61 |
+
msgid "Table '%s' has been deleted."
|
62 |
+
msgstr "הטבלה '%s' נמחקה."
|
63 |
+
|
64 |
+
#: useronline-options.php:101
|
65 |
+
#, php-format
|
66 |
+
msgid "Setting Key '%s' has been deleted."
|
67 |
+
msgstr "מפתח האפשרויות '%s' נמחק."
|
68 |
+
|
69 |
+
#: useronline-options.php:105
|
70 |
+
#, php-format
|
71 |
+
msgid "Error deleting Setting Key '%s'."
|
72 |
+
msgstr "טעות במחיקת מפתח האפשרויות '%s'."
|
73 |
+
|
74 |
+
#: useronline-options.php:127
|
75 |
+
#: useronline-options.php:337
|
76 |
+
msgid "Uninstall WP-UserOnline"
|
77 |
+
msgstr "הסר התקנה של וורדספרס גולשים און ליין"
|
78 |
+
|
79 |
+
#: useronline-options.php:128
|
80 |
+
#, php-format
|
81 |
+
msgid "<a href=\"%s\">Click Here</a> To Finish The Uninstallation And WP-UserOnline Will Be Deactivated Automatically."
|
82 |
+
msgstr "<a href=\"%s\">לחץ כאן</a> לסיום ההסרה והפסקה אוטומטית של וורדפרס גולשים און ליין."
|
83 |
+
|
84 |
+
#: useronline-options.php:153
|
85 |
+
#: wp-useronline.php:917
|
86 |
msgid "Online"
|
87 |
+
msgstr "און ליין"
|
88 |
|
89 |
+
#: useronline-options.php:160
|
90 |
+
#: wp-useronline.php:916
|
91 |
msgid "1 User"
|
92 |
+
msgstr "1 גולש"
|
93 |
+
|
94 |
+
#: useronline-options.php:161
|
95 |
+
#: wp-useronline.php:916
|
96 |
+
msgid "%USERONLINE_COUNT% Users"
|
97 |
+
msgstr "%USERONLINE_COUNT% גולשים"
|
98 |
|
99 |
+
#: useronline-options.php:162
|
100 |
+
#: wp-useronline.php:916
|
101 |
msgid "1 Member"
|
102 |
+
msgstr "1 חבר"
|
103 |
+
|
104 |
+
#: useronline-options.php:163
|
105 |
+
#: wp-useronline.php:916
|
106 |
+
msgid "%USERONLINE_COUNT% Members"
|
107 |
+
msgstr "%USERONLINE_COUNT% חברים"
|
108 |
|
109 |
+
#: useronline-options.php:164
|
110 |
+
#: wp-useronline.php:916
|
111 |
msgid "1 Guest"
|
112 |
+
msgstr "1 אורח"
|
113 |
|
114 |
+
#: useronline-options.php:165
|
115 |
+
#: wp-useronline.php:916
|
116 |
+
msgid "%USERONLINE_COUNT% Guests"
|
117 |
+
msgstr "%USERONLINE_COUNT% אורחים"
|
118 |
+
|
119 |
+
#: useronline-options.php:166
|
120 |
+
#: wp-useronline.php:916
|
121 |
msgid "1 Bot"
|
122 |
+
msgstr "1 בוט"
|
123 |
+
|
124 |
+
#: useronline-options.php:167
|
125 |
+
#: wp-useronline.php:916
|
126 |
+
msgid "%USERONLINE_COUNT% Bots"
|
127 |
+
msgstr "%USERONLINE_COUNT% בוטים"
|
128 |
+
|
129 |
+
#: useronline-options.php:173
|
130 |
+
#: useronline-options.php:179
|
131 |
+
#: wp-useronline.php:698
|
132 |
+
#: wp-useronline.php:918
|
133 |
+
#: wp-useronline.php:919
|
134 |
+
msgid "Users"
|
135 |
+
msgstr "גולשים"
|
136 |
|
137 |
+
#: useronline-options.php:179
|
138 |
+
#: wp-useronline.php:919
|
139 |
msgid "Browsing This Page."
|
140 |
msgstr "צופים בדף זה."
|
141 |
|
142 |
+
#: useronline-options.php:185
|
143 |
+
#: useronline-options.php:186
|
144 |
+
msgid "Useronline Options"
|
145 |
+
msgstr "אפשרויות גולשים און ליין"
|
146 |
+
|
147 |
+
#: useronline-options.php:189
|
148 |
msgid "Time Out"
|
149 |
msgstr "פסק זמן"
|
150 |
|
151 |
+
#: useronline-options.php:191
|
152 |
+
msgid "How long till it will remove the user from the database (In seconds)."
|
153 |
+
msgstr "כמה זמן עד שיוסר משתמש ממסד הנתונים (בשניות)"
|
154 |
+
|
155 |
+
#: useronline-options.php:195
|
156 |
msgid "UserOnline URL"
|
157 |
+
msgstr "קישור לגולשים און ליין"
|
158 |
+
|
159 |
+
#: useronline-options.php:197
|
160 |
+
msgid "URL To UserOnline Page (leave blank if you do not want to link it to the UserOnline Page)<br />Example: http://www.yoursite.com/blogs/useronline/<br />Example: http://www.yoursite.com/blogs/?page_id=2"
|
161 |
+
msgstr "כתובת של העמוד גולשים און ליין באתר שלך (תשאיר ריק על מנת לקשר לעמוד וורדפרס גולשים און ליין)<br />דוגמא: http://www.yoursite.com/blogs/useronline/<br />דוגמא: http://www.yoursite.com/blogs/?page_id=2"
|
162 |
+
|
163 |
+
#: useronline-options.php:201
|
164 |
+
msgid "Bots Name/User Agent"
|
165 |
+
msgstr "שמות של סוכני בוטים"
|
166 |
|
167 |
+
#: useronline-options.php:203
|
168 |
+
msgid "Here are a list of bots and their partial browser agents.<br />On the left column will be the <strong>Bot's Name</strong> and on the right column will be their <strong>Partial Browser Agent</strong>.<br />Start each entry on a new line."
|
169 |
+
msgstr "הנה רשימה של בוטים וסוכן דפדפן חלקי <br /> ובטור השמאלי יופיע <strong>שם הבוט</strong> ובטור הימני יופיע<strong> סוכן דפדפן חלקי </strong>.<br />הכנס כל ערך בשורה נפרדת."
|
170 |
+
|
171 |
+
#: useronline-options.php:211
|
172 |
msgid "Naming Conventions:"
|
173 |
+
msgstr "ועידת שמות:"
|
174 |
|
175 |
+
#: useronline-options.php:212
|
176 |
+
#: useronline-options.php:253
|
177 |
+
#: useronline-options.php:265
|
178 |
+
#: useronline-options.php:297
|
179 |
msgid "Allowed Variables:"
|
180 |
msgstr "משתנים מותרים:"
|
181 |
|
182 |
+
#: useronline-options.php:214
|
183 |
+
#: useronline-options.php:258
|
184 |
+
#: useronline-options.php:273
|
185 |
+
#: useronline-options.php:305
|
186 |
msgid "Restore Default Template"
|
187 |
+
msgstr "שחזר תבנית ברירת מחדל"
|
188 |
|
189 |
+
#: useronline-options.php:220
|
|
|
190 |
msgid "Singular Form"
|
191 |
msgstr "טופס יחיד"
|
192 |
|
193 |
+
#: useronline-options.php:221
|
|
|
194 |
msgid "Plural Form"
|
195 |
msgstr "טופס רבים"
|
196 |
|
197 |
+
#: useronline-options.php:248
|
|
|
198 |
msgid "Useronline Templates"
|
199 |
+
msgstr "תבנית גולשים און ליין"
|
200 |
|
201 |
+
#: useronline-options.php:252
|
|
|
202 |
msgid "User(s) Online:"
|
203 |
+
msgstr "גולש(ים) און ליין:"
|
204 |
|
205 |
+
#: useronline-options.php:264
|
|
|
206 |
msgid "User(s) Browsing Site:"
|
207 |
+
msgstr "גולש(ים) צופים באתר און ליין:"
|
208 |
|
209 |
+
#: useronline-options.php:279
|
210 |
+
#: useronline-options.php:311
|
211 |
msgid "Member Names Separator"
|
212 |
msgstr "מפריד שמות חברים"
|
213 |
|
214 |
+
#: useronline-options.php:280
|
215 |
+
#: useronline-options.php:312
|
216 |
msgid "Guests Separator"
|
217 |
msgstr "מפריד אורחים"
|
218 |
|
219 |
+
#: useronline-options.php:281
|
220 |
+
#: useronline-options.php:313
|
221 |
msgid "Bots Separator"
|
222 |
msgstr "מפריד בוטים"
|
223 |
|
224 |
+
#: useronline-options.php:296
|
|
|
225 |
msgid "User(s) Browsing Page:"
|
226 |
+
msgstr "גולש(ים) צופים בעמוד זה:"
|
227 |
|
228 |
+
#: useronline-options.php:328
|
|
|
|
|
|
|
229 |
msgid "Save Changes"
|
230 |
msgstr "שמור שינויים"
|
231 |
|
232 |
+
#: useronline-options.php:339
|
233 |
+
msgid "Deactivating WP-UserOnline plugin does not remove any data that may have been created, such as the useronline options. To completely remove this plugin, you can uninstall it here."
|
234 |
+
msgstr "הפסקת הפלאג אין גולשים און ליין אינה מסירה את המידע שיצרת, לדוגמא אפשרויות גולשים און ליין. על מנת להסיר לחלוטין את הפלאג אין, אתה יכול להסיר אותו כאן."
|
235 |
+
|
236 |
+
#: useronline-options.php:342
|
237 |
+
msgid "WARNING:"
|
238 |
+
msgstr "אזהרה:"
|
239 |
+
|
240 |
+
#: useronline-options.php:343
|
241 |
+
msgid "Once uninstalled, this cannot be undone. You should use a Database Backup plugin of WordPress to back up all the data first."
|
242 |
+
msgstr "ברגע שהסרת את ההתקנה, לא ניתן לחזור לאחור. עליך להשתמש בפלאג אין גיבוי של וורדפרס על מנת לגבות את המידע לפני"
|
243 |
+
|
244 |
+
#: useronline-options.php:346
|
245 |
+
msgid "The following WordPress Options/Tables will be DELETED:"
|
246 |
+
msgstr "האפשרויות והטבלאות הבאות של וורדפרס ימחקו:"
|
247 |
+
|
248 |
+
#: useronline-options.php:351
|
249 |
+
msgid "WordPress Options"
|
250 |
+
msgstr "אפשריות וורדפרס"
|
251 |
+
|
252 |
+
#: useronline-options.php:352
|
253 |
+
msgid "WordPress Tables"
|
254 |
+
msgstr "טבלאות וורדפרס"
|
255 |
+
|
256 |
+
#: useronline-options.php:378
|
257 |
+
#: wp-useronline-widget.php:73
|
258 |
+
msgid "Yes"
|
259 |
+
msgstr "כן"
|
260 |
+
|
261 |
+
#: useronline-options.php:379
|
262 |
+
msgid ""
|
263 |
+
"You Are About To Uninstall WP-UserOnline From WordPress.\\n"
|
264 |
+
"This Action Is Not Reversible.\\n"
|
265 |
+
"\\n"
|
266 |
+
" Choose [Cancel] To Stop, [OK] To Uninstall."
|
267 |
+
msgstr ""
|
268 |
+
"אתה עומד להסיר את וורדפרס גולשים און ליין מוורדפרס. \\n"
|
269 |
+
"פעולה זו בלתי הפיכה.\\n"
|
270 |
+
"\\n"
|
271 |
+
" בחר [Cancel] להפסיק, [OK] להסיר."
|
272 |
+
|
273 |
+
#: wp-useronline-widget.php:62
|
274 |
msgid "UserOnline"
|
275 |
+
msgstr "UserOnline"
|
276 |
+
|
277 |
+
#: wp-useronline-widget.php:69
|
278 |
+
msgid "Widget Title"
|
279 |
+
msgstr "כותרת ה Widget "
|
280 |
+
|
281 |
+
#: wp-useronline-widget.php:70
|
282 |
+
msgid "Display Users Browsing Site Under Users Online Count?"
|
283 |
+
msgstr "להציג גולשים שצופים באתר תחת מונה גולשים און ליין?"
|
284 |
|
285 |
+
#: wp-useronline-widget.php:75
|
286 |
+
msgid "No"
|
287 |
+
msgstr "לא"
|
288 |
+
|
289 |
+
#: wp-useronline.php:77
|
290 |
+
#: wp-useronline.php:848
|
291 |
+
#: wp-useronline.php:850
|
292 |
+
#: wp-useronline.php:860
|
293 |
msgid "WP-UserOnline"
|
294 |
+
msgstr "WP-UserOnline"
|
295 |
|
296 |
+
#: wp-useronline.php:80
|
297 |
+
msgid "Useronline"
|
298 |
+
msgstr "WP-UserOnline"
|
299 |
+
|
300 |
+
#: wp-useronline.php:145
|
301 |
+
msgid "guest"
|
302 |
+
msgstr "אורח"
|
303 |
+
|
304 |
+
#: wp-useronline.php:151
|
305 |
+
#: wp-useronline.php:711
|
306 |
msgid "Guest"
|
307 |
msgstr "אורח"
|
308 |
|
309 |
+
#: wp-useronline.php:166
|
310 |
+
msgid "Blog Archive"
|
311 |
+
msgstr "ארכיון הבלוג"
|
312 |
+
|
313 |
+
#: wp-useronline.php:247
|
314 |
+
#: wp-useronline.php:278
|
315 |
+
#: wp-useronline.php:746
|
316 |
+
#: wp-useronline.php:748
|
317 |
+
#: wp-useronline.php:766
|
318 |
+
#: wp-useronline.php:768
|
319 |
+
#: wp-useronline.php:781
|
320 |
#, php-format
|
|
|
321 |
msgid "%s @ %s"
|
322 |
msgstr "%s @ %s"
|
323 |
|
324 |
+
#: wp-useronline.php:411
|
325 |
+
msgid "No User Is Browsing This Site"
|
326 |
+
msgstr "אין גולשים שצופים באתר הזה"
|
327 |
+
|
328 |
+
#: wp-useronline.php:549
|
329 |
+
msgid "No User Is Browsing This Page"
|
330 |
+
msgstr "אין גולשים שצופים בדף זה"
|
331 |
+
|
332 |
+
#: wp-useronline.php:613
|
333 |
msgid "Users Online Now"
|
334 |
+
msgstr "גולשים און ליין"
|
335 |
+
|
336 |
+
#: wp-useronline.php:625
|
337 |
+
#, php-format
|
338 |
+
msgid "There is <strong><a href=\"%s\">%s user</a></strong> online now."
|
339 |
+
msgstr "ישנם <strong><a href=\"%s\">%s גולשים</a></strong> און ליין."
|
340 |
+
|
341 |
+
#: wp-useronline.php:627
|
342 |
+
#, php-format
|
343 |
+
msgid "There are a total of <strong><a href=\"%s\">%s users</a></strong> online now."
|
344 |
+
msgstr "סה\"כ <strong><a href=\"%s\">%s גולשים</a></strong> און ליין."
|
345 |
|
346 |
+
#: wp-useronline.php:632
|
347 |
+
#: wp-useronline.php:733
|
348 |
#, php-format
|
|
|
349 |
msgid "Most users ever online were <strong>%s</strong>, on <strong>%s</strong>"
|
350 |
+
msgstr "הכי הרבה גולשים און ליין <strong>%s</strong>, ב <strong>%s</strong>"
|
351 |
|
352 |
+
#: wp-useronline.php:696
|
353 |
+
msgid "User"
|
354 |
+
msgstr "גולש"
|
|
|
355 |
|
356 |
+
#: wp-useronline.php:703
|
357 |
+
msgid "Member"
|
358 |
+
msgstr "חבר"
|
|
|
359 |
|
360 |
+
#: wp-useronline.php:705
|
361 |
+
msgid "Members"
|
362 |
+
msgstr "חברים"
|
|
|
363 |
|
364 |
+
#: wp-useronline.php:713
|
365 |
+
msgid "Guests"
|
366 |
+
msgstr "אורחים"
|
|
|
367 |
|
368 |
+
#: wp-useronline.php:718
|
369 |
+
msgid "Bot"
|
370 |
+
msgstr "בוט"
|
371 |
+
|
372 |
+
#: wp-useronline.php:720
|
373 |
+
msgid "Bots"
|
374 |
+
msgstr "בוטים"
|
375 |
+
|
376 |
+
#: wp-useronline.php:729
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
377 |
#, php-format
|
|
|
378 |
msgid "There is <strong>%s</strong> online now: <strong>%s</strong>, <strong>%s</strong> and <strong>%s</strong>."
|
379 |
+
msgstr "כרגע באתר <strong>%s</strong> און ליין: <strong>%s</strong>, <strong>%s</strong> ו <strong>%s</strong>."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
380 |
|
381 |
+
#: wp-useronline.php:731
|
382 |
#, php-format
|
383 |
+
msgid "There are a total of <strong>%s</strong> online now: <strong>%s</strong>, <strong>%s</strong> and <strong>%s</strong>."
|
384 |
+
msgstr "כרגע באתר יש סה''כ <strong>%s</strong> און ליין: <strong>%s</strong>, <strong>%s</strong> ו <strong>%s</strong>."
|
|
|
385 |
|
386 |
+
#: wp-useronline.php:736
|
387 |
+
#: wp-useronline.php:756
|
388 |
+
#: wp-useronline.php:776
|
389 |
+
msgid "Online Now"
|
390 |
+
msgstr "און ליין"
|
391 |
|
392 |
+
#: wp-useronline.php:743
|
393 |
+
#: wp-useronline.php:763
|
394 |
+
msgid "referral"
|
395 |
+
msgstr "מפנה"
|
|
|
396 |
|
397 |
+
#: wp-useronline.php:746
|
398 |
+
#: wp-useronline.php:748
|
399 |
+
#: wp-useronline.php:766
|
400 |
+
#: wp-useronline.php:768
|
401 |
+
#: wp-useronline.php:781
|
402 |
+
msgid "on"
|
403 |
+
msgstr "ב"
|
404 |
|
405 |
+
#: wp-useronline.php:746
|
406 |
+
#: wp-useronline.php:748
|
407 |
+
#: wp-useronline.php:766
|
408 |
+
#: wp-useronline.php:768
|
409 |
+
#: wp-useronline.php:781
|
410 |
+
msgid "url"
|
411 |
+
msgstr "כתובת"
|
|
|
|
|
412 |
|
413 |
+
#: wp-useronline.php:788
|
414 |
+
msgid "No One Is Online Now"
|
415 |
+
msgstr "אין גולשים באתר"
|
416 |
+
|
417 |
+
#: wp-useronline.php:862
|
418 |
+
msgid "user(s) online now."
|
419 |
+
msgstr "גולש(ים) און ליין"
|
420 |
+
|
421 |
+
#: wp-useronline.php:863
|
422 |
+
msgid "Most users ever online was"
|
423 |
+
msgstr "הכי הרבה גולשים און ליין"
|
424 |
+
|
425 |
+
#: wp-useronline.php:864
|
426 |
+
msgid "On"
|
427 |
+
msgstr "ב"
|
428 |
|
lang/wp-useronline-hu_HU.mo
CHANGED
Binary file
|
lang/wp-useronline-hu_HU.po
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
-
"Project-Id-Version: WP-UserOnline 2.
|
4 |
-
"Report-Msgid-Bugs-To: http://wordpress.org/tag/
|
5 |
-
"POT-Creation-Date:
|
6 |
"PO-Revision-Date: \n"
|
7 |
-
"Last-Translator: FYGureout <webmester@
|
8 |
-
"Language-Team: FYGureout <webmester@
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -14,307 +14,338 @@ msgstr ""
|
|
14 |
"X-Poedit-Country: HUNGARY\n"
|
15 |
"X-Poedit-SourceCharset: utf-8\n"
|
16 |
|
17 |
-
#:
|
18 |
-
msgid "
|
19 |
-
msgstr "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
-
#:
|
22 |
-
#:
|
23 |
-
#:
|
24 |
msgid "UserOnline"
|
25 |
-
msgstr "
|
26 |
|
27 |
-
#:
|
28 |
-
|
29 |
-
|
|
|
30 |
|
31 |
-
#:
|
32 |
-
|
33 |
-
|
|
|
34 |
|
35 |
-
#:
|
36 |
-
|
37 |
-
|
|
|
38 |
|
39 |
-
#:
|
40 |
-
|
41 |
-
|
|
|
42 |
|
43 |
-
#:
|
44 |
-
|
45 |
-
|
|
|
46 |
|
47 |
-
#:
|
48 |
-
|
49 |
-
|
|
|
50 |
|
51 |
-
#:
|
52 |
-
|
53 |
-
|
|
|
54 |
|
55 |
-
#: admin.php:
|
56 |
-
|
57 |
-
|
|
|
58 |
|
59 |
-
#: admin.php:
|
60 |
-
#: wp-
|
61 |
-
|
62 |
-
|
63 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
|
65 |
-
#: admin.php:
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
|
|
70 |
|
71 |
-
#: admin.php:
|
72 |
-
|
73 |
-
|
|
|
|
|
|
|
|
|
|
|
74 |
|
75 |
-
#: admin.php:
|
76 |
msgid "Time Out"
|
77 |
msgstr "Időtúllépés"
|
78 |
|
79 |
-
#: admin.php:
|
80 |
-
msgid "How long
|
81 |
-
msgstr "Mennyi idő múlva
|
82 |
|
83 |
-
#: admin.php:
|
84 |
msgid "UserOnline URL"
|
85 |
msgstr "UserOnline URL"
|
86 |
|
87 |
-
#: admin.php:
|
88 |
-
msgid "URL To UserOnline Page<br />Example: http://www.yoursite.com/useronline/<br />Example: http://www.yoursite.com/?page_id=2"
|
89 |
-
msgstr "URL az UserOnline oldalhoz<br />Például: http://www.teoldalad.hu/useronline/<br />Például: http://www.yoursite.com/?page_id=2"
|
90 |
-
|
91 |
-
#: admin.php:129
|
92 |
-
msgid "User Names"
|
93 |
-
msgstr "Látogató neve"
|
94 |
-
|
95 |
-
#: admin.php:132
|
96 |
-
msgid "Link user names to their author page"
|
97 |
-
msgstr "A felhasználó nevéhez link a honlapjához"
|
98 |
-
|
99 |
-
#: admin.php:151
|
100 |
-
msgid "Useronline Templates"
|
101 |
-
msgstr "UserOnline sablon"
|
102 |
-
|
103 |
-
#: admin.php:163
|
104 |
-
msgid "User(s) Browsing Site:"
|
105 |
-
msgstr "Látogató böngészi a lapot:"
|
106 |
|
107 |
-
#: admin.php:
|
108 |
-
msgid "User
|
109 |
-
msgstr "
|
110 |
|
111 |
-
#: admin.php:
|
112 |
-
|
113 |
-
|
114 |
-
msgid "Save Changes"
|
115 |
-
msgstr "Változások mentése"
|
116 |
|
117 |
-
#: admin.php:
|
118 |
msgid "Naming Conventions:"
|
119 |
msgstr "Elnevezési szabályok:"
|
120 |
|
121 |
-
#: admin.php:
|
122 |
-
#: admin.php:
|
123 |
-
#: admin.php:
|
124 |
msgid "Allowed Variables:"
|
125 |
msgstr "Engedélyezett variációk:"
|
126 |
|
127 |
-
#: admin.php:
|
128 |
-
|
129 |
-
|
|
|
|
|
130 |
|
131 |
-
#: admin.php:
|
132 |
msgid "Singular Form"
|
133 |
msgstr "Egyes számú forma"
|
134 |
|
135 |
-
#: admin.php:
|
136 |
msgid "Plural Form"
|
137 |
msgstr "Többes számú forma"
|
138 |
|
139 |
-
#: admin.php:
|
|
|
|
|
|
|
|
|
140 |
msgid "User(s) Online:"
|
141 |
msgstr "Látogató(k) online:"
|
142 |
|
143 |
-
#: admin.php:
|
144 |
-
|
145 |
-
|
146 |
-
|
|
|
|
|
|
|
147 |
|
148 |
-
#: admin.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
msgid "Member Names Separator"
|
150 |
msgstr "Tagnév elválasztó"
|
151 |
|
152 |
-
#: admin.php:
|
153 |
msgid "Guests Separator"
|
154 |
msgstr "Vendég elválasztó"
|
155 |
|
156 |
-
#: admin.php:
|
157 |
msgid "Bots Separator"
|
158 |
msgstr "Robot elválasztó"
|
159 |
|
160 |
-
#:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
161 |
msgid "<strong>%s</strong> user online now."
|
162 |
msgid_plural "<strong>%s</strong> users online now."
|
163 |
-
msgstr[0] "<strong>%s</strong> látogató online."
|
164 |
-
msgstr[1] "<strong>%s</strong> látogató online."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
165 |
|
166 |
-
#:
|
|
|
167 |
msgid "There is <strong>%s</strong> online now: <strong>%s</strong>, <strong>%s</strong> and <strong>%s</strong>."
|
168 |
msgid_plural "There are a total of <strong>%s</strong> online now: <strong>%s</strong>, <strong>%s</strong> and <strong>%s</strong>."
|
169 |
-
msgstr[0] "<strong>%s</strong> látogató online: <strong>%s</strong>, <strong>%s</strong>, és <strong>%s</strong>."
|
170 |
-
msgstr[1] "<strong>%s</strong> látogató online: <strong>%s</strong>, <strong>%s</strong>, és <strong>%s</strong>"
|
171 |
|
172 |
-
#:
|
173 |
-
msgid "No
|
174 |
-
msgstr "
|
175 |
|
176 |
-
#:
|
177 |
msgid "on"
|
178 |
msgstr " - "
|
179 |
|
180 |
-
#:
|
181 |
msgid "url"
|
182 |
msgstr "url"
|
183 |
|
184 |
-
#:
|
185 |
msgid "referral"
|
186 |
msgstr "azonosítva"
|
187 |
|
188 |
-
#:
|
189 |
msgid "Online Now"
|
190 |
-
msgstr "online"
|
191 |
|
192 |
-
#:
|
193 |
-
|
194 |
msgid "%s @ %s"
|
195 |
msgstr "%s - %s"
|
196 |
|
197 |
-
#:
|
|
|
198 |
msgid "Most users ever online were <strong>%s</strong>, on <strong>%s</strong>"
|
199 |
-
msgstr "A legtöbb látógató egyidőben <strong>%s</strong> volt, <strong>%s</strong
|
200 |
-
|
201 |
-
#: core.php:137
|
202 |
-
msgid "Guest"
|
203 |
-
msgstr "Vendég"
|
204 |
-
|
205 |
-
#: core.php:208
|
206 |
-
msgid "Admin"
|
207 |
-
msgstr "Admin"
|
208 |
-
|
209 |
-
#: core.php:214
|
210 |
-
msgid "Archive"
|
211 |
-
msgstr "Archívum"
|
212 |
|
213 |
-
#: wp-useronline.php:
|
214 |
-
msgid "
|
215 |
-
msgstr "
|
216 |
-
|
217 |
-
#: wp-useronline.php:62
|
218 |
-
msgid "%COUNT% Users"
|
219 |
-
msgstr "%COUNT% látogató"
|
220 |
-
|
221 |
-
#: wp-useronline.php:63
|
222 |
-
msgid "1 Member"
|
223 |
-
msgstr "1 tag"
|
224 |
|
225 |
-
#: wp-useronline.php:
|
226 |
-
msgid "
|
227 |
-
msgstr "
|
228 |
|
229 |
-
#: wp-useronline.php:
|
230 |
-
msgid "
|
231 |
-
msgstr "
|
232 |
|
233 |
-
#: wp-useronline.php:
|
234 |
-
msgid "
|
235 |
-
msgstr "
|
236 |
|
237 |
-
#: wp-useronline.php:
|
238 |
-
msgid "
|
239 |
-
msgstr "
|
240 |
|
241 |
-
#: wp-useronline.php:
|
242 |
-
msgid "
|
243 |
-
msgstr "
|
244 |
|
245 |
-
#: wp-useronline.php:
|
246 |
-
msgid "Online"
|
247 |
-
msgstr "online"
|
248 |
|
249 |
-
#: wp-useronline.php:
|
250 |
-
|
251 |
-
|
252 |
-
#: wp-useronline.php:85
|
253 |
-
#: wp-useronline.php:86
|
254 |
-
#: wp-useronline.php:87
|
255 |
-
msgid ","
|
256 |
-
msgstr ","
|
257 |
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
msgid "Users"
|
262 |
-
msgstr "Látogató"
|
263 |
|
264 |
-
|
265 |
-
msgid "
|
266 |
-
msgstr "
|
267 |
|
268 |
-
|
269 |
-
msgid "
|
270 |
-
msgstr "
|
271 |
|
272 |
-
|
273 |
-
msgid "
|
274 |
-
msgstr "
|
275 |
|
276 |
-
#~ msgid "http://wordpress.org/extend/plugins/wp-useronline/"
|
277 |
-
#~ msgstr "http://wordpress.org/extend/plugins/wp-useronline/"
|
278 |
-
#~ msgid ""
|
279 |
-
#~ "Enable you to display how many users are online on your Wordpress site"
|
280 |
-
#~ msgstr ""
|
281 |
-
#~ "Megjeleníti a WordPress-alapú honlapon éppen jelenlévő látogatók számát."
|
282 |
-
#~ msgid "Lester 'GaMerZ' Chan & scribu"
|
283 |
-
#~ msgstr "Lester 'GaMerZ' Chan & scribu"
|
284 |
-
#~ msgid "Users|Template Element"
|
285 |
-
#~ msgstr "Felhasználó|Sablon elem"
|
286 |
-
#~ msgid "Settings updated."
|
287 |
-
#~ msgstr "Beállítások frissítve"
|
288 |
-
#~ msgid "Bots Name/User Agent"
|
289 |
-
#~ msgstr "Robot neve/Robotként bejelentkező"
|
290 |
-
#~ msgid ""
|
291 |
-
#~ "Here are a list of bots and their partial browser agents.<br />On the "
|
292 |
-
#~ "left column will be the <strong>Bot's Name</strong> and on the right "
|
293 |
-
#~ "column will be their <strong>Partial Browser Agent</strong>.<br />Start "
|
294 |
-
#~ "each entry on a new line."
|
295 |
-
#~ msgstr ""
|
296 |
-
#~ "Itt egy lista a robotokról, és az ő részleges kereső ügynökeiről.<br />A "
|
297 |
-
#~ "bal oldali oszlopban a <strong>Robot neve</strong>, és a jobb oldaliban "
|
298 |
-
#~ "az ő <strong>Részleges kereső ügynöke</strong><br />Mindegyiket új sorban "
|
299 |
-
#~ "kell kezdeni."
|
300 |
-
#~ msgid "guest"
|
301 |
-
#~ msgstr "vendég"
|
302 |
-
#~ msgid "User"
|
303 |
-
#~ msgstr "látogató"
|
304 |
-
#~ msgid "Member"
|
305 |
-
#~ msgstr "tag"
|
306 |
-
#~ msgid "Members"
|
307 |
-
#~ msgstr "tag"
|
308 |
-
#~ msgid "Guests"
|
309 |
-
#~ msgstr "vendég"
|
310 |
-
#~ msgid "Bot"
|
311 |
-
#~ msgstr "robot"
|
312 |
-
#~ msgid "Bots"
|
313 |
-
#~ msgstr "robot"
|
314 |
-
#~ msgid "http://lesterchan.net"
|
315 |
-
#~ msgstr "http://lesterchan.net"
|
316 |
-
#~ msgid "http://lesterchan.net/portfolio/programming/php/"
|
317 |
-
#~ msgstr "http://lesterchan.net/portfolio/programming/php/"
|
318 |
#~ msgid "Useronline Timeout"
|
319 |
#~ msgstr "Useronline időtúllépés"
|
320 |
#~ msgid "Useronline Bots"
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
+
"Project-Id-Version: WP-UserOnline 2.60 HU\n"
|
4 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-useronline\n"
|
5 |
+
"POT-Creation-Date: 2010-02-12 01:21+0000\n"
|
6 |
"PO-Revision-Date: \n"
|
7 |
+
"Last-Translator: FYGureout <webmester@sakraft.hu>\n"
|
8 |
+
"Language-Team: FYGureout <webmester@sakraft.hu>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
14 |
"X-Poedit-Country: HUNGARY\n"
|
15 |
"X-Poedit-SourceCharset: utf-8\n"
|
16 |
|
17 |
+
#: admin.php:8
|
18 |
+
msgid "Users Online Now"
|
19 |
+
msgstr "Jelenlegi látogató"
|
20 |
+
|
21 |
+
#. #-#-#-#-# plugin.pot (WP-UserOnline 2.60rc) #-#-#-#-#
|
22 |
+
#. Plugin Name of an extension
|
23 |
+
#: admin.php:9
|
24 |
+
#: wp-stats.php:21
|
25 |
+
#: wp-stats.php:38
|
26 |
+
msgid "WP-UserOnline"
|
27 |
+
msgstr "WP-UserOnline"
|
28 |
+
|
29 |
+
#: admin.php:22
|
30 |
+
#, php-format
|
31 |
+
msgid "There is <strong><a href=\"%s\">%s user</a></strong> online now."
|
32 |
+
msgid_plural "There are a total of <strong><a href=\"%s\">%s users</a></strong> online now."
|
33 |
+
msgstr[0] "Jelenleg <strong><a href=\"%s\">%s látogató</a></strong> online"
|
34 |
+
msgstr[1] "Jelenleg <strong><a href=\"%s\">%s látogató</a></strong> online"
|
35 |
+
|
36 |
+
#: admin.php:47
|
37 |
+
msgid "UserOnline Options"
|
38 |
+
msgstr "UserOnline lehetőségek"
|
39 |
|
40 |
+
#: admin.php:48
|
41 |
+
#: wp-useronline.php:518
|
42 |
+
#: wp-useronline.php:575
|
43 |
msgid "UserOnline"
|
44 |
+
msgstr "UserOnline"
|
45 |
|
46 |
+
#: admin.php:58
|
47 |
+
#: wp-useronline.php:73
|
48 |
+
msgid "Online"
|
49 |
+
msgstr "online"
|
50 |
|
51 |
+
#: admin.php:64
|
52 |
+
#: wp-useronline.php:63
|
53 |
+
msgid "1 User"
|
54 |
+
msgstr "1 látogató"
|
55 |
|
56 |
+
#: admin.php:65
|
57 |
+
#: wp-useronline.php:64
|
58 |
+
msgid "%USERONLINE_COUNT% Users"
|
59 |
+
msgstr "%USERONLINE_COUNT% látogató"
|
60 |
|
61 |
+
#: admin.php:66
|
62 |
+
#: wp-useronline.php:65
|
63 |
+
msgid "1 Member"
|
64 |
+
msgstr "1 tag"
|
65 |
|
66 |
+
#: admin.php:67
|
67 |
+
#: wp-useronline.php:66
|
68 |
+
msgid "%USERONLINE_COUNT% Members"
|
69 |
+
msgstr "%USERONLINE_COUNT% tag"
|
70 |
|
71 |
+
#: admin.php:68
|
72 |
+
#: wp-useronline.php:67
|
73 |
+
msgid "1 Guest"
|
74 |
+
msgstr "1 vendég"
|
75 |
|
76 |
+
#: admin.php:69
|
77 |
+
#: wp-useronline.php:68
|
78 |
+
msgid "%USERONLINE_COUNT% Guests"
|
79 |
+
msgstr "%USERONLINE_COUNT% vendég"
|
80 |
|
81 |
+
#: admin.php:70
|
82 |
+
#: wp-useronline.php:69
|
83 |
+
msgid "1 Bot"
|
84 |
+
msgstr "1 robot"
|
85 |
|
86 |
+
#: admin.php:71
|
87 |
+
#: wp-useronline.php:70
|
88 |
+
msgid "%USERONLINE_COUNT% Bots"
|
89 |
+
msgstr "%USERONLINE_COUNT% robot"
|
90 |
+
|
91 |
+
#: admin.php:74
|
92 |
+
#: admin.php:75
|
93 |
+
#: admin.php:76
|
94 |
+
#: admin.php:80
|
95 |
+
#: admin.php:81
|
96 |
+
#: admin.php:82
|
97 |
+
#: wp-useronline.php:76
|
98 |
+
#: wp-useronline.php:77
|
99 |
+
#: wp-useronline.php:78
|
100 |
+
#: wp-useronline.php:83
|
101 |
+
#: wp-useronline.php:84
|
102 |
+
#: wp-useronline.php:85
|
103 |
+
msgid ","
|
104 |
+
msgstr ", "
|
105 |
|
106 |
+
#: admin.php:77
|
107 |
+
#: admin.php:83
|
108 |
+
#: wp-useronline.php:79
|
109 |
+
#: wp-useronline.php:86
|
110 |
+
msgid "Users|Template Element"
|
111 |
+
msgstr "Felhasználó|Sablon elem"
|
112 |
|
113 |
+
#: admin.php:83
|
114 |
+
#: wp-useronline.php:86
|
115 |
+
msgid "Browsing This Page."
|
116 |
+
msgstr "böngészi ezt az oldalt"
|
117 |
+
|
118 |
+
#: admin.php:127
|
119 |
+
msgid "Settings updated."
|
120 |
+
msgstr "Beállítások frissítve"
|
121 |
|
122 |
+
#: admin.php:140
|
123 |
msgid "Time Out"
|
124 |
msgstr "Időtúllépés"
|
125 |
|
126 |
+
#: admin.php:142
|
127 |
+
msgid "How long till it will remove the user from the database (In seconds)."
|
128 |
+
msgstr "Mennyi idő múlva távolítja el a felhasználót az adatbázisból (másodpercben)"
|
129 |
|
130 |
+
#: admin.php:146
|
131 |
msgid "UserOnline URL"
|
132 |
msgstr "UserOnline URL"
|
133 |
|
134 |
+
#: admin.php:148
|
135 |
+
msgid "URL To UserOnline Page (leave blank if you do not want to link it to the UserOnline Page)<br />Example: http://www.yoursite.com/blogs/useronline/<br />Example: http://www.yoursite.com/blogs/?page_id=2"
|
136 |
+
msgstr "URL az UserOnline oldalhoz (üresen kell hagyni, ha nem akarjuk linkelni az UserOnline oldalhoz)<br />Például: http://www.teoldalad.hu/blogs/useronline/<br />Például: http://www.yoursite.com/blogs/?page_id=2"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
|
138 |
+
#: admin.php:152
|
139 |
+
msgid "Bots Name/User Agent"
|
140 |
+
msgstr "Robot neve/Robotként bejelentkező"
|
141 |
|
142 |
+
#: admin.php:154
|
143 |
+
msgid "Here are a list of bots and their partial browser agents.<br />On the left column will be the <strong>Bot's Name</strong> and on the right column will be their <strong>Partial Browser Agent</strong>.<br />Start each entry on a new line."
|
144 |
+
msgstr "Itt egy lista a robotokról, és az ő részleges kereső ügynökeiről.<br />A bal oldali oszlopban a <strong>Robot neve</strong>, és a jobb oldaliban az ő <strong>Részleges kereső ügynöke</strong><br />Mindegyiket új sorban kell kezdeni."
|
|
|
|
|
145 |
|
146 |
+
#: admin.php:162
|
147 |
msgid "Naming Conventions:"
|
148 |
msgstr "Elnevezési szabályok:"
|
149 |
|
150 |
+
#: admin.php:163
|
151 |
+
#: admin.php:197
|
152 |
+
#: admin.php:222
|
153 |
msgid "Allowed Variables:"
|
154 |
msgstr "Engedélyezett variációk:"
|
155 |
|
156 |
+
#: admin.php:165
|
157 |
+
#: admin.php:202
|
158 |
+
#: admin.php:230
|
159 |
+
msgid "Restore Default Template"
|
160 |
+
msgstr "Alapsablon visszaállítása"
|
161 |
|
162 |
+
#: admin.php:171
|
163 |
msgid "Singular Form"
|
164 |
msgstr "Egyes számú forma"
|
165 |
|
166 |
+
#: admin.php:172
|
167 |
msgid "Plural Form"
|
168 |
msgstr "Többes számú forma"
|
169 |
|
170 |
+
#: admin.php:192
|
171 |
+
msgid "Useronline Templates"
|
172 |
+
msgstr "UserOnline sablon"
|
173 |
+
|
174 |
+
#: admin.php:196
|
175 |
msgid "User(s) Online:"
|
176 |
msgstr "Látogató(k) online:"
|
177 |
|
178 |
+
#: admin.php:206
|
179 |
+
msgid "User(s) Browsing Site:"
|
180 |
+
msgstr "Látogató böngészi a lapot:"
|
181 |
+
|
182 |
+
#: admin.php:207
|
183 |
+
msgid "User(s) Browsing Page:"
|
184 |
+
msgstr "Látogató böngészi az oldalt:"
|
185 |
|
186 |
+
#: admin.php:210
|
187 |
+
#: scb/AdminPage.php:119
|
188 |
+
#: scb/AdminPage.php:130
|
189 |
+
msgid "Save Changes"
|
190 |
+
msgstr "Változások mentése"
|
191 |
+
|
192 |
+
#: admin.php:236
|
193 |
msgid "Member Names Separator"
|
194 |
msgstr "Tagnév elválasztó"
|
195 |
|
196 |
+
#: admin.php:237
|
197 |
msgid "Guests Separator"
|
198 |
msgstr "Vendég elválasztó"
|
199 |
|
200 |
+
#: admin.php:238
|
201 |
msgid "Bots Separator"
|
202 |
msgstr "Robot elválasztó"
|
203 |
|
204 |
+
#: scb/AdminPage.php:108
|
205 |
+
msgid "Settings <strong>saved</strong>."
|
206 |
+
msgstr "A beállítások <strong>elmentve</strong>!"
|
207 |
+
|
208 |
+
#: scb/AdminPage.php:284
|
209 |
+
msgid "Settings"
|
210 |
+
msgstr "Beállítások"
|
211 |
+
|
212 |
+
#: wp-stats.php:31
|
213 |
+
#, php-format
|
214 |
msgid "<strong>%s</strong> user online now."
|
215 |
msgid_plural "<strong>%s</strong> users online now."
|
216 |
+
msgstr[0] "Jelenleg <strong>%s</strong> látogató online."
|
217 |
+
msgstr[1] "Jelenleg <strong>%s</strong> látogató online."
|
218 |
+
|
219 |
+
#: wp-useronline.php:151
|
220 |
+
msgid "guest"
|
221 |
+
msgstr "vendég"
|
222 |
+
|
223 |
+
#: wp-useronline.php:157
|
224 |
+
#: wp-useronline.php:349
|
225 |
+
msgid "Guest"
|
226 |
+
msgstr "Vendég"
|
227 |
+
|
228 |
+
#: wp-useronline.php:166
|
229 |
+
msgid "Admin"
|
230 |
+
msgstr "Admin"
|
231 |
+
|
232 |
+
#: wp-useronline.php:172
|
233 |
+
msgid "Archive"
|
234 |
+
msgstr "Archívum"
|
235 |
+
|
236 |
+
#: wp-useronline.php:347
|
237 |
+
msgid "User"
|
238 |
+
msgstr "látogató"
|
239 |
+
|
240 |
+
#: wp-useronline.php:347
|
241 |
+
msgid "Users"
|
242 |
+
msgstr "látogató"
|
243 |
+
|
244 |
+
#: wp-useronline.php:348
|
245 |
+
msgid "Member"
|
246 |
+
msgstr "tag"
|
247 |
+
|
248 |
+
#: wp-useronline.php:348
|
249 |
+
msgid "Members"
|
250 |
+
msgstr "tag"
|
251 |
+
|
252 |
+
#: wp-useronline.php:349
|
253 |
+
msgid "Guests"
|
254 |
+
msgstr "vendég"
|
255 |
+
|
256 |
+
#: wp-useronline.php:350
|
257 |
+
msgid "Bot"
|
258 |
+
msgstr "robot"
|
259 |
+
|
260 |
+
#: wp-useronline.php:350
|
261 |
+
msgid "Bots"
|
262 |
+
msgstr "robot"
|
263 |
|
264 |
+
#: wp-useronline.php:358
|
265 |
+
#, php-format
|
266 |
msgid "There is <strong>%s</strong> online now: <strong>%s</strong>, <strong>%s</strong> and <strong>%s</strong>."
|
267 |
msgid_plural "There are a total of <strong>%s</strong> online now: <strong>%s</strong>, <strong>%s</strong> and <strong>%s</strong>."
|
268 |
+
msgstr[0] "Jelenleg <strong>%s</strong> látogató online: <strong>%s</strong>, <strong>%s</strong>, és <strong>%s</strong>."
|
269 |
+
msgstr[1] "Jelenleg <strong>%s</strong> látogató online: <strong>%s</strong>, <strong>%s</strong>, és <strong>%s</strong>"
|
270 |
|
271 |
+
#: wp-useronline.php:434
|
272 |
+
msgid "No One Is Online Now"
|
273 |
+
msgstr "Senki nincs most online"
|
274 |
|
275 |
+
#: wp-useronline.php:436
|
276 |
msgid "on"
|
277 |
msgstr " - "
|
278 |
|
279 |
+
#: wp-useronline.php:437
|
280 |
msgid "url"
|
281 |
msgstr "url"
|
282 |
|
283 |
+
#: wp-useronline.php:438
|
284 |
msgid "referral"
|
285 |
msgstr "azonosítva"
|
286 |
|
287 |
+
#: wp-useronline.php:449
|
288 |
msgid "Online Now"
|
289 |
+
msgstr "Jelenleg online"
|
290 |
|
291 |
+
#: wp-useronline.php:480
|
292 |
+
#, php-format
|
293 |
msgid "%s @ %s"
|
294 |
msgstr "%s - %s"
|
295 |
|
296 |
+
#: wp-useronline.php:499
|
297 |
+
#, php-format
|
298 |
msgid "Most users ever online were <strong>%s</strong>, on <strong>%s</strong>"
|
299 |
+
msgstr "A legtöbb látógató egyidőben <strong>%s</strong> volt, <strong>%s</strong>. napján."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
300 |
|
301 |
+
#: wp-useronline.php:517
|
302 |
+
msgid "WP-UserOnline users online statistics"
|
303 |
+
msgstr "WP-UserOnline látogató online statisztika"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
304 |
|
305 |
+
#: wp-useronline.php:582
|
306 |
+
msgid "Title:"
|
307 |
+
msgstr "Cím"
|
308 |
|
309 |
+
#: wp-useronline.php:585
|
310 |
+
msgid "Statistics Type:"
|
311 |
+
msgstr "Statisztika típusa:"
|
312 |
|
313 |
+
#: wp-useronline.php:587
|
314 |
+
msgid "Users Online Count"
|
315 |
+
msgstr "Látogató online szám"
|
316 |
|
317 |
+
#: wp-useronline.php:588
|
318 |
+
msgid "Users Browsing Current Page"
|
319 |
+
msgstr "Látogató böngészi az aktuális oldalt"
|
320 |
|
321 |
+
#: wp-useronline.php:589
|
322 |
+
msgid "Users Browsing Site"
|
323 |
+
msgstr "Látogató böngészi a lapot"
|
324 |
|
325 |
+
#: wp-useronline.php:591
|
326 |
+
msgid "Users Online Count & Users Browsing Current Page"
|
327 |
+
msgstr "Látogató online & Látogató böngészi az aktuális oldalt"
|
328 |
|
329 |
+
#: wp-useronline.php:592
|
330 |
+
msgid "Users Online Count & Users Browsing Site"
|
331 |
+
msgstr "Látogató online szám & Látogató böngészi a lapot"
|
|
|
|
|
|
|
|
|
|
|
332 |
|
333 |
+
#. Plugin URI of an extension
|
334 |
+
msgid "http://lesterchan.net/portfolio/programming/php/"
|
335 |
+
msgstr "http://lesterchan.net/portfolio/programming/php/"
|
|
|
|
|
336 |
|
337 |
+
#. Description of an extension
|
338 |
+
msgid "Enable you to display how many users are online on your Wordpress blog with detailed statistics of where they are and who there are(Members/Guests/Search Bots)."
|
339 |
+
msgstr "Megjeleníti a WordPress-alapú honlapon éppen jelenlévő látogatók számát, részletes statisztikával, hogy honnan érkeztek és kik ők (tagok / vendégek /keresőrobotok)."
|
340 |
|
341 |
+
#. Author of an extension
|
342 |
+
msgid "Lester 'GaMerZ' Chan"
|
343 |
+
msgstr "Lester 'GaMerZ' Chan"
|
344 |
|
345 |
+
#. Author URI of an extension
|
346 |
+
msgid "http://lesterchan.net"
|
347 |
+
msgstr "http://lesterchan.net"
|
348 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
349 |
#~ msgid "Useronline Timeout"
|
350 |
#~ msgstr "Useronline időtúllépés"
|
351 |
#~ msgid "Useronline Bots"
|
lang/wp-useronline-nl_NL.mo
CHANGED
Binary file
|
lang/wp-useronline-nl_NL.po
CHANGED
@@ -4,7 +4,7 @@ msgstr ""
|
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
"POT-Creation-Date: 2008-12-12 01:10+0800\n"
|
6 |
"PO-Revision-Date: \n"
|
7 |
-
"Last-Translator:
|
8 |
"Language-Team: Frans Davina <reg@frandre.net>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
@@ -49,7 +49,7 @@ msgstr "Bijgewerkt"
|
|
49 |
|
50 |
#: useronline-options.php:79
|
51 |
msgid "No Useronline Option Updated"
|
52 |
-
msgstr "Geen Useronline
|
53 |
|
54 |
#: useronline-options.php:85
|
55 |
#: useronline-options.php:380
|
@@ -140,12 +140,12 @@ msgstr ""
|
|
140 |
#: useronline-options.php:179
|
141 |
#: wp-useronline.php:916
|
142 |
msgid "Browsing This Page."
|
143 |
-
msgstr "Bezoeken
|
144 |
|
145 |
#: useronline-options.php:186
|
146 |
#: useronline-options.php:187
|
147 |
msgid "Useronline Options"
|
148 |
-
msgstr "Useronline
|
149 |
|
150 |
#: useronline-options.php:190
|
151 |
msgid "Time Out"
|
@@ -153,7 +153,7 @@ msgstr "Time Out"
|
|
153 |
|
154 |
#: useronline-options.php:192
|
155 |
msgid "How long till it will remove the user from the database (In seconds)."
|
156 |
-
msgstr "
|
157 |
|
158 |
#: useronline-options.php:196
|
159 |
msgid "UserOnline URL"
|
@@ -161,7 +161,7 @@ msgstr "UserOnline URL"
|
|
161 |
|
162 |
#: useronline-options.php:198
|
163 |
msgid "URL To UserOnline Page (leave blank if you do not want to link it to the UserOnline Page)<br />Example: http://www.yoursite.com/blogs/useronline/<br />Example: http://www.yoursite.com/blogs/?page_id=2"
|
164 |
-
msgstr "URL
|
165 |
|
166 |
#: useronline-options.php:202
|
167 |
msgid "Bots Name/User Agent"
|
@@ -169,33 +169,33 @@ msgstr "Bots Naam/User Agent"
|
|
169 |
|
170 |
#: useronline-options.php:204
|
171 |
msgid "Here are a list of bots and their partial browser agents.<br />On the left column will be the <strong>Bot's Name</strong> and on the right column will be their <strong>Partial Browser Agent</strong>.<br />Start each entry on a new line."
|
172 |
-
msgstr "Hier is een lijst met
|
173 |
|
174 |
#: useronline-options.php:212
|
175 |
msgid "Naming Conventions:"
|
176 |
-
msgstr "Naamgeving
|
177 |
|
178 |
#: useronline-options.php:213
|
179 |
#: useronline-options.php:254
|
180 |
#: useronline-options.php:266
|
181 |
#: useronline-options.php:298
|
182 |
msgid "Allowed Variables:"
|
183 |
-
msgstr "
|
184 |
|
185 |
#: useronline-options.php:215
|
186 |
#: useronline-options.php:259
|
187 |
#: useronline-options.php:274
|
188 |
#: useronline-options.php:306
|
189 |
msgid "Restore Default Template"
|
190 |
-
msgstr "Herstel
|
191 |
|
192 |
#: useronline-options.php:221
|
193 |
msgid "Singular Form"
|
194 |
-
msgstr "
|
195 |
|
196 |
#: useronline-options.php:222
|
197 |
msgid "Plural Form"
|
198 |
-
msgstr "
|
199 |
|
200 |
#: useronline-options.php:249
|
201 |
msgid "Useronline Templates"
|
@@ -203,38 +203,38 @@ msgstr "Useronline Templates"
|
|
203 |
|
204 |
#: useronline-options.php:253
|
205 |
msgid "User(s) Online:"
|
206 |
-
msgstr "Bezoeker(s)
|
207 |
|
208 |
#: useronline-options.php:265
|
209 |
msgid "User(s) Browsing Site:"
|
210 |
-
msgstr "Bezoeker(s)
|
211 |
|
212 |
#: useronline-options.php:280
|
213 |
#: useronline-options.php:312
|
214 |
msgid "Member Names Separator"
|
215 |
-
msgstr "
|
216 |
|
217 |
#: useronline-options.php:281
|
218 |
#: useronline-options.php:313
|
219 |
msgid "Guests Separator"
|
220 |
-
msgstr "Gasten
|
221 |
|
222 |
#: useronline-options.php:282
|
223 |
#: useronline-options.php:314
|
224 |
msgid "Bots Separator"
|
225 |
-
msgstr "
|
226 |
|
227 |
#: useronline-options.php:297
|
228 |
msgid "User(s) Browsing Page:"
|
229 |
-
msgstr "Bezoeker(s)
|
230 |
|
231 |
#: useronline-options.php:329
|
232 |
msgid "Save Changes"
|
233 |
-
msgstr "Wijzigingen
|
234 |
|
235 |
#: useronline-options.php:340
|
236 |
msgid "Deactivating WP-UserOnline plugin does not remove any data that may have been created, such as the useronline options. To completely remove this plugin, you can uninstall it here."
|
237 |
-
msgstr "Deactiveren van WP-UserONline verwijdert niet de gegevens die zijn
|
238 |
|
239 |
#: useronline-options.php:343
|
240 |
msgid "WARNING:"
|
@@ -250,11 +250,11 @@ msgstr "De volgende WordPress Opties/Tabellen zullen worden VERWIJDERD:"
|
|
250 |
|
251 |
#: useronline-options.php:352
|
252 |
msgid "WordPress Options"
|
253 |
-
msgstr "WordPress
|
254 |
|
255 |
#: useronline-options.php:353
|
256 |
msgid "WordPress Tables"
|
257 |
-
msgstr "WordPress
|
258 |
|
259 |
#: useronline-options.php:379
|
260 |
#: wp-useronline-widget.php:73
|
@@ -279,11 +279,11 @@ msgstr "UserOnline"
|
|
279 |
|
280 |
#: wp-useronline-widget.php:69
|
281 |
msgid "Widget Title"
|
282 |
-
msgstr "Widget
|
283 |
|
284 |
#: wp-useronline-widget.php:70
|
285 |
msgid "Display Users Browsing Site Under Users Online Count?"
|
286 |
-
msgstr "Weergeven
|
287 |
|
288 |
#: wp-useronline-widget.php:75
|
289 |
msgid "No"
|
@@ -326,15 +326,15 @@ msgstr "%s @ %s"
|
|
326 |
|
327 |
#: wp-useronline.php:396
|
328 |
msgid "No User Is Browsing This Site"
|
329 |
-
msgstr "
|
330 |
|
331 |
#: wp-useronline.php:538
|
332 |
msgid "No User Is Browsing This Page"
|
333 |
-
msgstr "
|
334 |
|
335 |
#: wp-useronline.php:609
|
336 |
msgid "Users Online Now"
|
337 |
-
msgstr "Bezoekers
|
338 |
|
339 |
#: wp-useronline.php:621
|
340 |
#, php-format
|
@@ -350,11 +350,11 @@ msgstr "Er zijn nu totaal <strong><a href=\"%s\">%s bezoekers</a></strong> onlin
|
|
350 |
#: wp-useronline.php:729
|
351 |
#, php-format
|
352 |
msgid "Most users ever online were <strong>%s</strong>, on <strong>%s</strong>"
|
353 |
-
msgstr "De meeste bezoekers
|
354 |
|
355 |
#: wp-useronline.php:692
|
356 |
msgid "User"
|
357 |
-
msgstr "
|
358 |
|
359 |
#: wp-useronline.php:694
|
360 |
msgid "Users"
|
@@ -374,11 +374,11 @@ msgstr "Gasten"
|
|
374 |
|
375 |
#: wp-useronline.php:714
|
376 |
msgid "Bot"
|
377 |
-
msgstr "
|
378 |
|
379 |
#: wp-useronline.php:716
|
380 |
msgid "Bots"
|
381 |
-
msgstr "
|
382 |
|
383 |
#: wp-useronline.php:725
|
384 |
#, php-format
|
@@ -394,7 +394,7 @@ msgstr "Er zijn nu <strong>%s</strong> online: <strong>%s</strong>, <strong>%s</
|
|
394 |
#: wp-useronline.php:752
|
395 |
#: wp-useronline.php:772
|
396 |
msgid "Online Now"
|
397 |
-
msgstr "
|
398 |
|
399 |
#: wp-useronline.php:739
|
400 |
#: wp-useronline.php:759
|
@@ -419,7 +419,7 @@ msgstr "url"
|
|
419 |
|
420 |
#: wp-useronline.php:784
|
421 |
msgid "No One Is Online Now"
|
422 |
-
msgstr "Er is nu
|
423 |
|
424 |
#: wp-useronline.php:860
|
425 |
msgid "On"
|
@@ -427,6 +427,6 @@ msgstr "Op"
|
|
427 |
|
428 |
#~ msgid "user(s) online now."
|
429 |
#~ msgstr "gebruiker(s) nu online."
|
430 |
-
|
431 |
#~ msgid "Most users ever online was"
|
432 |
#~ msgstr "Meeste gebruikers ooit online was"
|
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
"POT-Creation-Date: 2008-12-12 01:10+0800\n"
|
6 |
"PO-Revision-Date: \n"
|
7 |
+
"Last-Translator: Lester Chan <lesterchan@gmail.com>\n"
|
8 |
"Language-Team: Frans Davina <reg@frandre.net>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
49 |
|
50 |
#: useronline-options.php:79
|
51 |
msgid "No Useronline Option Updated"
|
52 |
+
msgstr "Geen Useronline Optie Bijgewerkt"
|
53 |
|
54 |
#: useronline-options.php:85
|
55 |
#: useronline-options.php:380
|
140 |
#: useronline-options.php:179
|
141 |
#: wp-useronline.php:916
|
142 |
msgid "Browsing This Page."
|
143 |
+
msgstr "Bezoeken Deze Pagina."
|
144 |
|
145 |
#: useronline-options.php:186
|
146 |
#: useronline-options.php:187
|
147 |
msgid "Useronline Options"
|
148 |
+
msgstr "Useronline Opties"
|
149 |
|
150 |
#: useronline-options.php:190
|
151 |
msgid "Time Out"
|
153 |
|
154 |
#: useronline-options.php:192
|
155 |
msgid "How long till it will remove the user from the database (In seconds)."
|
156 |
+
msgstr "Hoe lang voordat de gebruiker uit de database wordt verwijderd (In Seconden)"
|
157 |
|
158 |
#: useronline-options.php:196
|
159 |
msgid "UserOnline URL"
|
161 |
|
162 |
#: useronline-options.php:198
|
163 |
msgid "URL To UserOnline Page (leave blank if you do not want to link it to the UserOnline Page)<br />Example: http://www.yoursite.com/blogs/useronline/<br />Example: http://www.yoursite.com/blogs/?page_id=2"
|
164 |
+
msgstr "URL Naar UserOnline Pagina (laat leeg als u niet naar de UserOnline Pagina wilt linken)<br />Voorbeeld: http://www.jouwsite.nl/blogs/useronline/<br />Voorbeeld: http://www.jouwsite.nl/blogs/?page_id=2"
|
165 |
|
166 |
#: useronline-options.php:202
|
167 |
msgid "Bots Name/User Agent"
|
169 |
|
170 |
#: useronline-options.php:204
|
171 |
msgid "Here are a list of bots and their partial browser agents.<br />On the left column will be the <strong>Bot's Name</strong> and on the right column will be their <strong>Partial Browser Agent</strong>.<br />Start each entry on a new line."
|
172 |
+
msgstr "Hier is een lijst met bots en hun gedeeltelijke browser agents.<br />In de linker kolom staat de <strong>Bots naam</strong> en in de rechter kolom de bijbehorende <strong> Gedeeltelijke Browser Agent</strong>.<br />Start iedere invoer op een nieuwe regel."
|
173 |
|
174 |
#: useronline-options.php:212
|
175 |
msgid "Naming Conventions:"
|
176 |
+
msgstr "Naamgeving Regels:"
|
177 |
|
178 |
#: useronline-options.php:213
|
179 |
#: useronline-options.php:254
|
180 |
#: useronline-options.php:266
|
181 |
#: useronline-options.php:298
|
182 |
msgid "Allowed Variables:"
|
183 |
+
msgstr "Toegestand Variabelen:"
|
184 |
|
185 |
#: useronline-options.php:215
|
186 |
#: useronline-options.php:259
|
187 |
#: useronline-options.php:274
|
188 |
#: useronline-options.php:306
|
189 |
msgid "Restore Default Template"
|
190 |
+
msgstr "Herstel Standaard Template"
|
191 |
|
192 |
#: useronline-options.php:221
|
193 |
msgid "Singular Form"
|
194 |
+
msgstr "Enkelvoudige vorm"
|
195 |
|
196 |
#: useronline-options.php:222
|
197 |
msgid "Plural Form"
|
198 |
+
msgstr "Meervoudige vorm"
|
199 |
|
200 |
#: useronline-options.php:249
|
201 |
msgid "Useronline Templates"
|
203 |
|
204 |
#: useronline-options.php:253
|
205 |
msgid "User(s) Online:"
|
206 |
+
msgstr "Bezoeker(s) Online:"
|
207 |
|
208 |
#: useronline-options.php:265
|
209 |
msgid "User(s) Browsing Site:"
|
210 |
+
msgstr "Bezoeker(s) Op De Site:"
|
211 |
|
212 |
#: useronline-options.php:280
|
213 |
#: useronline-options.php:312
|
214 |
msgid "Member Names Separator"
|
215 |
+
msgstr "Ledennaam Scheiden Met"
|
216 |
|
217 |
#: useronline-options.php:281
|
218 |
#: useronline-options.php:313
|
219 |
msgid "Guests Separator"
|
220 |
+
msgstr "Gasten Scheiden Met"
|
221 |
|
222 |
#: useronline-options.php:282
|
223 |
#: useronline-options.php:314
|
224 |
msgid "Bots Separator"
|
225 |
+
msgstr "Bots Scheiden Met"
|
226 |
|
227 |
#: useronline-options.php:297
|
228 |
msgid "User(s) Browsing Page:"
|
229 |
+
msgstr "Bezoeker(s) Op Deze Pagina:"
|
230 |
|
231 |
#: useronline-options.php:329
|
232 |
msgid "Save Changes"
|
233 |
+
msgstr "Wijzigingen Opslaan"
|
234 |
|
235 |
#: useronline-options.php:340
|
236 |
msgid "Deactivating WP-UserOnline plugin does not remove any data that may have been created, such as the useronline options. To completely remove this plugin, you can uninstall it here."
|
237 |
+
msgstr "Deactiveren van WP-UserONline verwijdert niet de gegevens die zijn gecreeert, zoals de UserOnline opties. Het compleet verwijderen van de plugin, doe je door hier te de\"installeren."
|
238 |
|
239 |
#: useronline-options.php:343
|
240 |
msgid "WARNING:"
|
250 |
|
251 |
#: useronline-options.php:352
|
252 |
msgid "WordPress Options"
|
253 |
+
msgstr "WordPress Opties:"
|
254 |
|
255 |
#: useronline-options.php:353
|
256 |
msgid "WordPress Tables"
|
257 |
+
msgstr "WordPress Tabellen"
|
258 |
|
259 |
#: useronline-options.php:379
|
260 |
#: wp-useronline-widget.php:73
|
279 |
|
280 |
#: wp-useronline-widget.php:69
|
281 |
msgid "Widget Title"
|
282 |
+
msgstr "Widget Titel"
|
283 |
|
284 |
#: wp-useronline-widget.php:70
|
285 |
msgid "Display Users Browsing Site Under Users Online Count?"
|
286 |
+
msgstr "Weergeven Bezoekers Onder Bezoekers Online Aantal?"
|
287 |
|
288 |
#: wp-useronline-widget.php:75
|
289 |
msgid "No"
|
326 |
|
327 |
#: wp-useronline.php:396
|
328 |
msgid "No User Is Browsing This Site"
|
329 |
+
msgstr "Geen bezoeker is op de Site"
|
330 |
|
331 |
#: wp-useronline.php:538
|
332 |
msgid "No User Is Browsing This Page"
|
333 |
+
msgstr "Geen bezoeker is op deze Pagina"
|
334 |
|
335 |
#: wp-useronline.php:609
|
336 |
msgid "Users Online Now"
|
337 |
+
msgstr "Bezoekers Nu Online"
|
338 |
|
339 |
#: wp-useronline.php:621
|
340 |
#, php-format
|
350 |
#: wp-useronline.php:729
|
351 |
#, php-format
|
352 |
msgid "Most users ever online were <strong>%s</strong>, on <strong>%s</strong>"
|
353 |
+
msgstr "De meeste bezoekers waren <strong>%s</strong>, op <strong>%s</strong>"
|
354 |
|
355 |
#: wp-useronline.php:692
|
356 |
msgid "User"
|
357 |
+
msgstr "BEzoeker"
|
358 |
|
359 |
#: wp-useronline.php:694
|
360 |
msgid "Users"
|
374 |
|
375 |
#: wp-useronline.php:714
|
376 |
msgid "Bot"
|
377 |
+
msgstr "Bot"
|
378 |
|
379 |
#: wp-useronline.php:716
|
380 |
msgid "Bots"
|
381 |
+
msgstr "Bots"
|
382 |
|
383 |
#: wp-useronline.php:725
|
384 |
#, php-format
|
394 |
#: wp-useronline.php:752
|
395 |
#: wp-useronline.php:772
|
396 |
msgid "Online Now"
|
397 |
+
msgstr "Nu Online"
|
398 |
|
399 |
#: wp-useronline.php:739
|
400 |
#: wp-useronline.php:759
|
419 |
|
420 |
#: wp-useronline.php:784
|
421 |
msgid "No One Is Online Now"
|
422 |
+
msgstr "Er is nu Niemand online"
|
423 |
|
424 |
#: wp-useronline.php:860
|
425 |
msgid "On"
|
427 |
|
428 |
#~ msgid "user(s) online now."
|
429 |
#~ msgstr "gebruiker(s) nu online."
|
|
|
430 |
#~ msgid "Most users ever online was"
|
431 |
#~ msgstr "Meeste gebruikers ooit online was"
|
432 |
+
|
lang/wp-useronline-pt_PT.mo
CHANGED
Binary file
|
lang/wp-useronline-pt_PT.po
CHANGED
@@ -4,7 +4,7 @@ msgstr ""
|
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
"POT-Creation-Date: 2008-12-12 01:10+0800\n"
|
6 |
"PO-Revision-Date: \n"
|
7 |
-
"Last-Translator:
|
8 |
"Language-Team: BlogTuga <geral@blogtuga.org>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
@@ -18,31 +18,31 @@ msgstr ""
|
|
18 |
|
19 |
#: useronline-options.php:63
|
20 |
msgid "Useronline Timeout"
|
21 |
-
msgstr "Timeout
|
22 |
|
23 |
#: useronline-options.php:64
|
24 |
msgid "Useronline Bots"
|
25 |
-
msgstr "
|
26 |
|
27 |
#: useronline-options.php:65
|
28 |
msgid "Useronline URL"
|
29 |
-
msgstr "URL
|
30 |
|
31 |
#: useronline-options.php:66
|
32 |
msgid "Useronline Naming Conventions"
|
33 |
-
msgstr "Nome das convenções
|
34 |
|
35 |
#: useronline-options.php:67
|
36 |
msgid "User(s) Online Template"
|
37 |
-
msgstr "Template
|
38 |
|
39 |
#: useronline-options.php:68
|
40 |
msgid "User(s) Browsing Site Template"
|
41 |
-
msgstr "Template dos
|
42 |
|
43 |
#: useronline-options.php:69
|
44 |
msgid "User(s) Browsing Page Template"
|
45 |
-
msgstr "Template dos
|
46 |
|
47 |
#: useronline-options.php:74
|
48 |
msgid "Updated"
|
@@ -60,17 +60,17 @@ msgstr "Desinstalar o plugin WP-UserOnline"
|
|
60 |
#: useronline-options.php:92
|
61 |
#, php-format
|
62 |
msgid "Table '%s' has been deleted."
|
63 |
-
msgstr "
|
64 |
|
65 |
#: useronline-options.php:101
|
66 |
#, php-format
|
67 |
msgid "Setting Key '%s' has been deleted."
|
68 |
-
msgstr "
|
69 |
|
70 |
#: useronline-options.php:105
|
71 |
#, php-format
|
72 |
msgid "Error deleting Setting Key '%s'."
|
73 |
-
msgstr "Erro a apagar
|
74 |
|
75 |
#: useronline-options.php:127
|
76 |
#: useronline-options.php:338
|
@@ -80,7 +80,7 @@ msgstr "Desinstalar o plugin WP-UserOnline"
|
|
80 |
#: useronline-options.php:128
|
81 |
#, php-format
|
82 |
msgid "<a href=\"%s\">Click Here</a> To Finish The Uninstallation And WP-UserOnline Will Be Deactivated Automatically."
|
83 |
-
msgstr "<a href=\"%s\">Clique aqui</a> para
|
84 |
|
85 |
#: useronline-options.php:153
|
86 |
#: wp-useronline.php:914
|
@@ -90,12 +90,12 @@ msgstr "Online"
|
|
90 |
#: useronline-options.php:160
|
91 |
#: wp-useronline.php:913
|
92 |
msgid "1 User"
|
93 |
-
msgstr "1
|
94 |
|
95 |
#: useronline-options.php:161
|
96 |
#: wp-useronline.php:913
|
97 |
msgid "%USERONLINE_COUNT% Users"
|
98 |
-
msgstr "%USERONLINE_COUNT%
|
99 |
|
100 |
#: useronline-options.php:162
|
101 |
#: wp-useronline.php:913
|
@@ -158,23 +158,23 @@ msgstr "Quanto tempo até se retirar o utilizador da base de dados (segundos)."
|
|
158 |
|
159 |
#: useronline-options.php:196
|
160 |
msgid "UserOnline URL"
|
161 |
-
msgstr "URL dos
|
162 |
|
163 |
#: useronline-options.php:198
|
164 |
msgid "URL To UserOnline Page (leave blank if you do not want to link it to the UserOnline Page)<br />Example: http://www.yoursite.com/blogs/useronline/<br />Example: http://www.yoursite.com/blogs/?page_id=2"
|
165 |
-
msgstr "URL da página
|
166 |
|
167 |
#: useronline-options.php:202
|
168 |
msgid "Bots Name/User Agent"
|
169 |
-
msgstr "Nome dos
|
170 |
|
171 |
#: useronline-options.php:204
|
172 |
msgid "Here are a list of bots and their partial browser agents.<br />On the left column will be the <strong>Bot's Name</strong> and on the right column will be their <strong>Partial Browser Agent</strong>.<br />Start each entry on a new line."
|
173 |
-
msgstr "
|
174 |
|
175 |
#: useronline-options.php:212
|
176 |
msgid "Naming Conventions:"
|
177 |
-
msgstr "Nome da
|
178 |
|
179 |
#: useronline-options.php:213
|
180 |
#: useronline-options.php:254
|
@@ -188,46 +188,46 @@ msgstr "Variáveis permitidas:"
|
|
188 |
#: useronline-options.php:274
|
189 |
#: useronline-options.php:306
|
190 |
msgid "Restore Default Template"
|
191 |
-
msgstr "Restaurar
|
192 |
|
193 |
#: useronline-options.php:221
|
194 |
msgid "Singular Form"
|
195 |
-
msgstr "Formulário
|
196 |
|
197 |
#: useronline-options.php:222
|
198 |
msgid "Plural Form"
|
199 |
-
msgstr "Formulário
|
200 |
|
201 |
#: useronline-options.php:249
|
202 |
msgid "Useronline Templates"
|
203 |
-
msgstr "Templates dos
|
204 |
|
205 |
#: useronline-options.php:253
|
206 |
msgid "User(s) Online:"
|
207 |
-
msgstr "
|
208 |
|
209 |
#: useronline-options.php:265
|
210 |
msgid "User(s) Browsing Site:"
|
211 |
-
msgstr "
|
212 |
|
213 |
#: useronline-options.php:280
|
214 |
#: useronline-options.php:312
|
215 |
msgid "Member Names Separator"
|
216 |
-
msgstr "Separador
|
217 |
|
218 |
#: useronline-options.php:281
|
219 |
#: useronline-options.php:313
|
220 |
msgid "Guests Separator"
|
221 |
-
msgstr "Separador dos
|
222 |
|
223 |
#: useronline-options.php:282
|
224 |
#: useronline-options.php:314
|
225 |
msgid "Bots Separator"
|
226 |
-
msgstr "Separador dos
|
227 |
|
228 |
#: useronline-options.php:297
|
229 |
msgid "User(s) Browsing Page:"
|
230 |
-
msgstr "
|
231 |
|
232 |
#: useronline-options.php:329
|
233 |
msgid "Save Changes"
|
@@ -235,7 +235,7 @@ msgstr "Guardar alterações"
|
|
235 |
|
236 |
#: useronline-options.php:340
|
237 |
msgid "Deactivating WP-UserOnline plugin does not remove any data that may have been created, such as the useronline options. To completely remove this plugin, you can uninstall it here."
|
238 |
-
msgstr "Ao desactivar o plugin WP-UserOnline, não serão removidas quaisquer
|
239 |
|
240 |
#: useronline-options.php:343
|
241 |
msgid "WARNING:"
|
@@ -243,11 +243,11 @@ msgstr "AVISO:"
|
|
243 |
|
244 |
#: useronline-options.php:344
|
245 |
msgid "Once uninstalled, this cannot be undone. You should use a Database Backup plugin of WordPress to back up all the data first."
|
246 |
-
msgstr "Uma
|
247 |
|
248 |
#: useronline-options.php:347
|
249 |
msgid "The following WordPress Options/Tables will be DELETED:"
|
250 |
-
msgstr "As seguintes Opções/Tabelas
|
251 |
|
252 |
#: useronline-options.php:352
|
253 |
msgid "WordPress Options"
|
@@ -269,14 +269,14 @@ msgid ""
|
|
269 |
"\\n"
|
270 |
" Choose [Cancel] To Stop, [OK] To Uninstall."
|
271 |
msgstr ""
|
272 |
-
"Está prestes a desinstalar o plugin WP-UserOnline do seu
|
273 |
"Está acção não é reversível.\\n"
|
274 |
"\\n"
|
275 |
"Escolha [Cancelar] para Parar, [Ok] para continuar."
|
276 |
|
277 |
#: wp-useronline-widget.php:62
|
278 |
msgid "UserOnline"
|
279 |
-
msgstr "
|
280 |
|
281 |
#: wp-useronline-widget.php:69
|
282 |
msgid "Widget Title"
|
@@ -284,7 +284,7 @@ msgstr "Título do Widget"
|
|
284 |
|
285 |
#: wp-useronline-widget.php:70
|
286 |
msgid "Display Users Browsing Site Under Users Online Count?"
|
287 |
-
msgstr "Mostrar
|
288 |
|
289 |
#: wp-useronline-widget.php:75
|
290 |
msgid "No"
|
@@ -295,11 +295,11 @@ msgstr "Não"
|
|
295 |
#: wp-useronline.php:846
|
296 |
#: wp-useronline.php:856
|
297 |
msgid "WP-UserOnline"
|
298 |
-
msgstr "
|
299 |
|
300 |
#: wp-useronline.php:61
|
301 |
msgid "Useronline"
|
302 |
-
msgstr "
|
303 |
|
304 |
#: wp-useronline.php:126
|
305 |
msgid "guest"
|
@@ -327,39 +327,39 @@ msgstr "%s @ %s"
|
|
327 |
|
328 |
#: wp-useronline.php:396
|
329 |
msgid "No User Is Browsing This Site"
|
330 |
-
msgstr "
|
331 |
|
332 |
#: wp-useronline.php:538
|
333 |
msgid "No User Is Browsing This Page"
|
334 |
-
msgstr "
|
335 |
|
336 |
#: wp-useronline.php:609
|
337 |
msgid "Users Online Now"
|
338 |
-
msgstr "
|
339 |
|
340 |
#: wp-useronline.php:621
|
341 |
#, php-format
|
342 |
msgid "There is <strong><a href=\"%s\">%s user</a></strong> online now."
|
343 |
-
msgstr "
|
344 |
|
345 |
#: wp-useronline.php:623
|
346 |
#, php-format
|
347 |
msgid "There are a total of <strong><a href=\"%s\">%s users</a></strong> online now."
|
348 |
-
msgstr "
|
349 |
|
350 |
#: wp-useronline.php:628
|
351 |
#: wp-useronline.php:729
|
352 |
#, php-format
|
353 |
msgid "Most users ever online were <strong>%s</strong>, on <strong>%s</strong>"
|
354 |
-
msgstr "Maior número de
|
355 |
|
356 |
#: wp-useronline.php:692
|
357 |
msgid "User"
|
358 |
-
msgstr "
|
359 |
|
360 |
#: wp-useronline.php:694
|
361 |
msgid "Users"
|
362 |
-
msgstr "
|
363 |
|
364 |
#: wp-useronline.php:699
|
365 |
msgid "Member"
|
@@ -379,17 +379,17 @@ msgstr "Bot"
|
|
379 |
|
380 |
#: wp-useronline.php:716
|
381 |
msgid "Bots"
|
382 |
-
msgstr "
|
383 |
|
384 |
#: wp-useronline.php:725
|
385 |
#, php-format
|
386 |
msgid "There is <strong>%s</strong> online now: <strong>%s</strong>, <strong>%s</strong> and <strong>%s</strong>."
|
387 |
-
msgstr "
|
388 |
|
389 |
#: wp-useronline.php:727
|
390 |
#, php-format
|
391 |
msgid "There are a total of <strong>%s</strong> online now: <strong>%s</strong>, <strong>%s</strong> and <strong>%s</strong>."
|
392 |
-
msgstr "
|
393 |
|
394 |
#: wp-useronline.php:732
|
395 |
#: wp-useronline.php:752
|
@@ -420,7 +420,7 @@ msgstr "url"
|
|
420 |
|
421 |
#: wp-useronline.php:784
|
422 |
msgid "No One Is Online Now"
|
423 |
-
msgstr "
|
424 |
|
425 |
#: wp-useronline.php:860
|
426 |
msgid "On"
|
@@ -428,6 +428,6 @@ msgstr "Ligado"
|
|
428 |
|
429 |
#~ msgid "user(s) online now."
|
430 |
#~ msgstr "usuário(s) online agora"
|
431 |
-
|
432 |
#~ msgid "Most users ever online was"
|
433 |
#~ msgstr "Maior número de usuários online de sempre foi de"
|
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
"POT-Creation-Date: 2008-12-12 01:10+0800\n"
|
6 |
"PO-Revision-Date: \n"
|
7 |
+
"Last-Translator: Lester Chan <lesterchan@gmail.com>\n"
|
8 |
"Language-Team: BlogTuga <geral@blogtuga.org>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
18 |
|
19 |
#: useronline-options.php:63
|
20 |
msgid "Useronline Timeout"
|
21 |
+
msgstr "Timeout usuário online"
|
22 |
|
23 |
#: useronline-options.php:64
|
24 |
msgid "Useronline Bots"
|
25 |
+
msgstr "Bost online"
|
26 |
|
27 |
#: useronline-options.php:65
|
28 |
msgid "Useronline URL"
|
29 |
+
msgstr "URL usuário online"
|
30 |
|
31 |
#: useronline-options.php:66
|
32 |
msgid "Useronline Naming Conventions"
|
33 |
+
msgstr "Nome das convenções do usuário online"
|
34 |
|
35 |
#: useronline-options.php:67
|
36 |
msgid "User(s) Online Template"
|
37 |
+
msgstr "Template Usuário(s) online"
|
38 |
|
39 |
#: useronline-options.php:68
|
40 |
msgid "User(s) Browsing Site Template"
|
41 |
+
msgstr "Template dos usuários(s) a navegar no website "
|
42 |
|
43 |
#: useronline-options.php:69
|
44 |
msgid "User(s) Browsing Page Template"
|
45 |
+
msgstr "Template dos usuários(s) a navegar na página "
|
46 |
|
47 |
#: useronline-options.php:74
|
48 |
msgid "Updated"
|
60 |
#: useronline-options.php:92
|
61 |
#, php-format
|
62 |
msgid "Table '%s' has been deleted."
|
63 |
+
msgstr "Tabela '%s' foi apagado."
|
64 |
|
65 |
#: useronline-options.php:101
|
66 |
#, php-format
|
67 |
msgid "Setting Key '%s' has been deleted."
|
68 |
+
msgstr "Chave das definições '%s' foi apagada."
|
69 |
|
70 |
#: useronline-options.php:105
|
71 |
#, php-format
|
72 |
msgid "Error deleting Setting Key '%s'."
|
73 |
+
msgstr "Erro a apagar chave de definições '%s'."
|
74 |
|
75 |
#: useronline-options.php:127
|
76 |
#: useronline-options.php:338
|
80 |
#: useronline-options.php:128
|
81 |
#, php-format
|
82 |
msgid "<a href=\"%s\">Click Here</a> To Finish The Uninstallation And WP-UserOnline Will Be Deactivated Automatically."
|
83 |
+
msgstr "<a href=\"%s\">Clique aqui</a> para finalizar a desinstalação e o plugin ser desactivado."
|
84 |
|
85 |
#: useronline-options.php:153
|
86 |
#: wp-useronline.php:914
|
90 |
#: useronline-options.php:160
|
91 |
#: wp-useronline.php:913
|
92 |
msgid "1 User"
|
93 |
+
msgstr "1 Usuário"
|
94 |
|
95 |
#: useronline-options.php:161
|
96 |
#: wp-useronline.php:913
|
97 |
msgid "%USERONLINE_COUNT% Users"
|
98 |
+
msgstr "%USERONLINE_COUNT% Usuários"
|
99 |
|
100 |
#: useronline-options.php:162
|
101 |
#: wp-useronline.php:913
|
158 |
|
159 |
#: useronline-options.php:196
|
160 |
msgid "UserOnline URL"
|
161 |
+
msgstr "URL dos Usuários Online"
|
162 |
|
163 |
#: useronline-options.php:198
|
164 |
msgid "URL To UserOnline Page (leave blank if you do not want to link it to the UserOnline Page)<br />Example: http://www.yoursite.com/blogs/useronline/<br />Example: http://www.yoursite.com/blogs/?page_id=2"
|
165 |
+
msgstr "URL da página dos usuários online (deixe em branco se não quiser ter esta página)<br />Exemplo: http://www.oseusite.com/blogs/useronline/<br />Exemplo: http://www.oseusite.com/blogs/?page_id=2"
|
166 |
|
167 |
#: useronline-options.php:202
|
168 |
msgid "Bots Name/User Agent"
|
169 |
+
msgstr "Nome dos bots/Agente do usuário"
|
170 |
|
171 |
#: useronline-options.php:204
|
172 |
msgid "Here are a list of bots and their partial browser agents.<br />On the left column will be the <strong>Bot's Name</strong> and on the right column will be their <strong>Partial Browser Agent</strong>.<br />Start each entry on a new line."
|
173 |
+
msgstr "Aqui tem uma lista dos bots e dos agentes parciais do browser.<br />Na coluna da esquerda estão os <strong>Nome dos bots</strong> e na coluna da direita estão os seus<strong>Agentes parciais do drowser</strong>.<br />Inicie cada entrada num novo ficheiro."
|
174 |
|
175 |
#: useronline-options.php:212
|
176 |
msgid "Naming Conventions:"
|
177 |
+
msgstr "Nome da convenção:"
|
178 |
|
179 |
#: useronline-options.php:213
|
180 |
#: useronline-options.php:254
|
188 |
#: useronline-options.php:274
|
189 |
#: useronline-options.php:306
|
190 |
msgid "Restore Default Template"
|
191 |
+
msgstr "Restaurar Template por defeito"
|
192 |
|
193 |
#: useronline-options.php:221
|
194 |
msgid "Singular Form"
|
195 |
+
msgstr "Formulário singular"
|
196 |
|
197 |
#: useronline-options.php:222
|
198 |
msgid "Plural Form"
|
199 |
+
msgstr "Formulário plural"
|
200 |
|
201 |
#: useronline-options.php:249
|
202 |
msgid "Useronline Templates"
|
203 |
+
msgstr "Templates dos usuários online"
|
204 |
|
205 |
#: useronline-options.php:253
|
206 |
msgid "User(s) Online:"
|
207 |
+
msgstr "Usuário(s) Online:"
|
208 |
|
209 |
#: useronline-options.php:265
|
210 |
msgid "User(s) Browsing Site:"
|
211 |
+
msgstr "Usuário(s) a navegar o website:"
|
212 |
|
213 |
#: useronline-options.php:280
|
214 |
#: useronline-options.php:312
|
215 |
msgid "Member Names Separator"
|
216 |
+
msgstr "Separador do nome dos membros"
|
217 |
|
218 |
#: useronline-options.php:281
|
219 |
#: useronline-options.php:313
|
220 |
msgid "Guests Separator"
|
221 |
+
msgstr "Separador dos visitantes"
|
222 |
|
223 |
#: useronline-options.php:282
|
224 |
#: useronline-options.php:314
|
225 |
msgid "Bots Separator"
|
226 |
+
msgstr "Separador dos bots"
|
227 |
|
228 |
#: useronline-options.php:297
|
229 |
msgid "User(s) Browsing Page:"
|
230 |
+
msgstr "Usuário(s) a navegar está página:"
|
231 |
|
232 |
#: useronline-options.php:329
|
233 |
msgid "Save Changes"
|
235 |
|
236 |
#: useronline-options.php:340
|
237 |
msgid "Deactivating WP-UserOnline plugin does not remove any data that may have been created, such as the useronline options. To completely remove this plugin, you can uninstall it here."
|
238 |
+
msgstr "Ao desactivar o plugin WP-UserOnline, não serão removidas quaisquer base de dados, assim como as opções dos usuários online. Para completar a remoção deste plugin, pode desinstala-lo aqui."
|
239 |
|
240 |
#: useronline-options.php:343
|
241 |
msgid "WARNING:"
|
243 |
|
244 |
#: useronline-options.php:344
|
245 |
msgid "Once uninstalled, this cannot be undone. You should use a Database Backup plugin of WordPress to back up all the data first."
|
246 |
+
msgstr "Uma vez desinstalado, isto não pode ser refeito. Pode usar um Backup da Base de Dados do seu Wordpress."
|
247 |
|
248 |
#: useronline-options.php:347
|
249 |
msgid "The following WordPress Options/Tables will be DELETED:"
|
250 |
+
msgstr "As seguintes Opções/Tabelas Wordpress serão APAGADAS:"
|
251 |
|
252 |
#: useronline-options.php:352
|
253 |
msgid "WordPress Options"
|
269 |
"\\n"
|
270 |
" Choose [Cancel] To Stop, [OK] To Uninstall."
|
271 |
msgstr ""
|
272 |
+
"Está prestes a desinstalar o plugin WP-UserOnline do seu Wordpress.\\n"
|
273 |
"Está acção não é reversível.\\n"
|
274 |
"\\n"
|
275 |
"Escolha [Cancelar] para Parar, [Ok] para continuar."
|
276 |
|
277 |
#: wp-useronline-widget.php:62
|
278 |
msgid "UserOnline"
|
279 |
+
msgstr "Usuários Online"
|
280 |
|
281 |
#: wp-useronline-widget.php:69
|
282 |
msgid "Widget Title"
|
284 |
|
285 |
#: wp-useronline-widget.php:70
|
286 |
msgid "Display Users Browsing Site Under Users Online Count?"
|
287 |
+
msgstr "Mostrar usuários a navegar no website por debaixo da contagem dos usuários online?"
|
288 |
|
289 |
#: wp-useronline-widget.php:75
|
290 |
msgid "No"
|
295 |
#: wp-useronline.php:846
|
296 |
#: wp-useronline.php:856
|
297 |
msgid "WP-UserOnline"
|
298 |
+
msgstr "WP-UserOnline"
|
299 |
|
300 |
#: wp-useronline.php:61
|
301 |
msgid "Useronline"
|
302 |
+
msgstr "Usuários Online"
|
303 |
|
304 |
#: wp-useronline.php:126
|
305 |
msgid "guest"
|
327 |
|
328 |
#: wp-useronline.php:396
|
329 |
msgid "No User Is Browsing This Site"
|
330 |
+
msgstr "Sem usuários a navegar neste website"
|
331 |
|
332 |
#: wp-useronline.php:538
|
333 |
msgid "No User Is Browsing This Page"
|
334 |
+
msgstr "Sem usuários a navegar nesta página"
|
335 |
|
336 |
#: wp-useronline.php:609
|
337 |
msgid "Users Online Now"
|
338 |
+
msgstr "Usuários online agora"
|
339 |
|
340 |
#: wp-useronline.php:621
|
341 |
#, php-format
|
342 |
msgid "There is <strong><a href=\"%s\">%s user</a></strong> online now."
|
343 |
+
msgstr "Estes são os <strong><a href=\"%s\">%s usuários</a></strong> online agora."
|
344 |
|
345 |
#: wp-useronline.php:623
|
346 |
#, php-format
|
347 |
msgid "There are a total of <strong><a href=\"%s\">%s users</a></strong> online now."
|
348 |
+
msgstr "Estes são o total de <strong><a href=\"%s\">%s usuários</a></strong> online agora."
|
349 |
|
350 |
#: wp-useronline.php:628
|
351 |
#: wp-useronline.php:729
|
352 |
#, php-format
|
353 |
msgid "Most users ever online were <strong>%s</strong>, on <strong>%s</strong>"
|
354 |
+
msgstr "Maior número de usuários online de sempre <strong>%s</strong>, em <strong>%s</strong>"
|
355 |
|
356 |
#: wp-useronline.php:692
|
357 |
msgid "User"
|
358 |
+
msgstr "Usuário"
|
359 |
|
360 |
#: wp-useronline.php:694
|
361 |
msgid "Users"
|
362 |
+
msgstr "Usuários"
|
363 |
|
364 |
#: wp-useronline.php:699
|
365 |
msgid "Member"
|
379 |
|
380 |
#: wp-useronline.php:716
|
381 |
msgid "Bots"
|
382 |
+
msgstr "Bost"
|
383 |
|
384 |
#: wp-useronline.php:725
|
385 |
#, php-format
|
386 |
msgid "There is <strong>%s</strong> online now: <strong>%s</strong>, <strong>%s</strong> and <strong>%s</strong>."
|
387 |
+
msgstr "Estão <strong>%s</strong> online agora: <strong>%s</strong>, <strong>%s</strong> e <strong>%s</strong>."
|
388 |
|
389 |
#: wp-useronline.php:727
|
390 |
#, php-format
|
391 |
msgid "There are a total of <strong>%s</strong> online now: <strong>%s</strong>, <strong>%s</strong> and <strong>%s</strong>."
|
392 |
+
msgstr "Estão num total de <strong>%s</strong> online agora: <strong>%s</strong>, <strong>%s</strong> e <strong>%s</strong>."
|
393 |
|
394 |
#: wp-useronline.php:732
|
395 |
#: wp-useronline.php:752
|
420 |
|
421 |
#: wp-useronline.php:784
|
422 |
msgid "No One Is Online Now"
|
423 |
+
msgstr "Ninguém online"
|
424 |
|
425 |
#: wp-useronline.php:860
|
426 |
msgid "On"
|
428 |
|
429 |
#~ msgid "user(s) online now."
|
430 |
#~ msgstr "usuário(s) online agora"
|
|
|
431 |
#~ msgid "Most users ever online was"
|
432 |
#~ msgstr "Maior número de usuários online de sempre foi de"
|
433 |
+
|
lang/wp-useronline-ro_RO.mo
CHANGED
Binary file
|
lang/wp-useronline-ro_RO.po
CHANGED
@@ -1,12 +1,11 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: WP-UserOnline 2.70\n"
|
4 |
-
"Report-Msgid-Bugs-To: http://wordpress.org/tag/
|
5 |
-
"POT-Creation-Date:
|
6 |
"PO-Revision-Date: \n"
|
7 |
-
"Last-Translator: scribu <
|
8 |
"Language-Team: scribu <scribu@gmail.com>\n"
|
9 |
-
"Language: \n"
|
10 |
"MIME-Version: 1.0\n"
|
11 |
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -14,271 +13,280 @@ msgstr ""
|
|
14 |
"X-Poedit-Language: Romanian\n"
|
15 |
"X-Poedit-Country: ROMANIA\n"
|
16 |
|
17 |
-
#: widget.php:5
|
18 |
-
msgid "WP-UserOnline users online statistics"
|
19 |
-
msgstr "WP-UserOnline statistica utilizatorilor conectați"
|
20 |
-
|
21 |
-
#: widget.php:6
|
22 |
-
#: widget.php:49
|
23 |
-
#: admin.php:56
|
24 |
-
msgid "UserOnline"
|
25 |
-
msgstr "UtilizatoriOnline"
|
26 |
-
|
27 |
-
#: widget.php:56
|
28 |
-
msgid "Title:"
|
29 |
-
msgstr "Titlu:"
|
30 |
-
|
31 |
-
#: widget.php:59
|
32 |
-
msgid "Statistics Type:"
|
33 |
-
msgstr "Tip statistică:"
|
34 |
-
|
35 |
-
#: widget.php:61
|
36 |
-
msgid "Users Online Count"
|
37 |
-
msgstr "Numărul de utilizatori conectați"
|
38 |
-
|
39 |
-
#: widget.php:62
|
40 |
-
msgid "Users Browsing Current Page"
|
41 |
-
msgstr "Utilizatori navigând pagina curentă"
|
42 |
-
|
43 |
-
#: widget.php:63
|
44 |
-
msgid "Users Browsing Site"
|
45 |
-
msgstr "Utilizatori navigând site-ul"
|
46 |
-
|
47 |
-
#: widget.php:65
|
48 |
-
msgid "Users Online Count & Users Browsing Current Page"
|
49 |
-
msgstr "Utilizatori conectați & Utilizatori navigând pagina curentă"
|
50 |
-
|
51 |
-
#: widget.php:66
|
52 |
-
msgid "Users Online Count & Users Browsing Site"
|
53 |
-
msgstr "Utilizatori conectați & Utilizatori navigând site-ul"
|
54 |
-
|
55 |
#: admin.php:9
|
56 |
msgid "Users Online Now"
|
57 |
-
msgstr "
|
58 |
|
|
|
|
|
59 |
#: admin.php:10
|
60 |
#: wp-stats.php:14
|
61 |
#: wp-stats.php:31
|
62 |
msgid "WP-UserOnline"
|
63 |
-
msgstr "
|
64 |
|
65 |
-
#: admin.php:
|
|
|
66 |
msgid "There is <strong><a href='%s'>%s user</a></strong> online now."
|
67 |
msgid_plural "There are a total of <strong><a href='%s'>%s users</a></strong> online now."
|
68 |
-
msgstr[0] "
|
69 |
-
msgstr[1] "
|
70 |
|
71 |
-
#: admin.php:
|
72 |
msgid "UserOnline Options"
|
73 |
-
msgstr "
|
74 |
|
75 |
-
#: admin.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
msgid "Time Out"
|
77 |
-
msgstr "
|
78 |
|
79 |
-
#: admin.php:
|
80 |
-
msgid "How long until it will remove the user from the database (
|
81 |
-
msgstr "
|
82 |
|
83 |
-
#: admin.php:
|
84 |
msgid "UserOnline URL"
|
85 |
-
msgstr "
|
86 |
|
87 |
-
#: admin.php:
|
88 |
msgid "URL To UserOnline Page<br />Example: http://www.yoursite.com/useronline/<br />Example: http://www.yoursite.com/?page_id=2"
|
89 |
-
msgstr "
|
90 |
|
91 |
-
#: admin.php:
|
92 |
msgid "User Names"
|
93 |
-
msgstr "
|
94 |
|
95 |
-
#: admin.php:
|
96 |
msgid "Link user names to their author page"
|
97 |
-
msgstr "
|
98 |
|
99 |
-
#: admin.php:
|
100 |
msgid "Useronline Templates"
|
101 |
-
msgstr "
|
102 |
|
103 |
-
#: admin.php:
|
104 |
msgid "User(s) Browsing Site:"
|
105 |
-
msgstr "
|
106 |
|
107 |
-
#: admin.php:
|
108 |
msgid "User(s) Browsing Page:"
|
109 |
-
msgstr "
|
110 |
|
111 |
-
#: admin.php:
|
112 |
-
#: scb/AdminPage.php:
|
113 |
-
#: scb/AdminPage.php:
|
114 |
msgid "Save Changes"
|
115 |
-
msgstr "
|
116 |
|
117 |
-
#: admin.php:
|
118 |
msgid "Naming Conventions:"
|
119 |
-
msgstr "
|
120 |
|
121 |
-
#: admin.php:
|
122 |
-
#: admin.php:
|
123 |
-
#: admin.php:
|
124 |
msgid "Allowed Variables:"
|
125 |
-
msgstr "
|
126 |
|
127 |
-
#: admin.php:
|
128 |
msgid "Restore Defaults"
|
129 |
-
msgstr "
|
130 |
|
131 |
-
#: admin.php:
|
132 |
msgid "Singular Form"
|
133 |
-
msgstr "
|
134 |
|
135 |
-
#: admin.php:
|
136 |
msgid "Plural Form"
|
137 |
-
msgstr "
|
138 |
|
139 |
-
#: admin.php:
|
140 |
msgid "User(s) Online:"
|
141 |
-
msgstr "
|
142 |
|
143 |
-
#: admin.php:
|
144 |
-
#: admin.php:
|
145 |
msgid "Restore Default Template"
|
146 |
-
msgstr "
|
147 |
|
148 |
-
#: admin.php:
|
149 |
msgid "Member Names Separator"
|
150 |
-
msgstr "
|
151 |
|
152 |
-
#: admin.php:
|
153 |
msgid "Guests Separator"
|
154 |
-
msgstr "
|
155 |
|
156 |
-
#: admin.php:
|
157 |
msgid "Bots Separator"
|
158 |
-
msgstr "
|
159 |
|
160 |
-
#:
|
161 |
-
msgid "<strong
|
162 |
-
|
163 |
-
|
164 |
-
|
|
|
|
|
165 |
|
166 |
-
#: template-tags.php:
|
|
|
167 |
msgid "There is <strong>%s</strong> online now: <strong>%s</strong>, <strong>%s</strong> and <strong>%s</strong>."
|
168 |
msgid_plural "There are a total of <strong>%s</strong> online now: <strong>%s</strong>, <strong>%s</strong> and <strong>%s</strong>."
|
169 |
-
msgstr[0] "
|
170 |
-
msgstr[1] "
|
171 |
|
172 |
-
#: template-tags.php:
|
173 |
msgid "No one is online now."
|
174 |
-
msgstr "
|
175 |
|
176 |
-
#: template-tags.php:
|
177 |
msgid "on"
|
178 |
-
msgstr "
|
179 |
|
180 |
-
#: template-tags.php:
|
181 |
msgid "url"
|
182 |
-
msgstr "
|
183 |
|
184 |
-
#: template-tags.php:
|
185 |
msgid "referral"
|
186 |
-
msgstr "
|
187 |
|
188 |
-
#: template-tags.php:
|
189 |
msgid "Online Now"
|
190 |
-
msgstr "
|
191 |
|
192 |
-
#: template-tags.php:
|
193 |
-
|
194 |
msgid "%s @ %s"
|
195 |
-
msgstr "
|
196 |
|
197 |
-
#: template-tags.php:
|
|
|
198 |
msgid "Most users ever online were <strong>%s</strong>, on <strong>%s</strong>"
|
199 |
-
msgstr "
|
200 |
|
201 |
-
#:
|
202 |
-
msgid "
|
203 |
-
msgstr "
|
204 |
|
205 |
-
#:
|
206 |
-
msgid "
|
207 |
-
msgstr "
|
208 |
|
209 |
-
#:
|
210 |
-
msgid "
|
211 |
-
msgstr "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
212 |
|
213 |
-
#:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
214 |
msgid "1 User"
|
215 |
msgstr "1 utilizator"
|
216 |
|
217 |
-
#: wp-useronline.php:
|
218 |
msgid "%COUNT% Users"
|
219 |
msgstr "%COUNT% utilizatori"
|
220 |
|
221 |
-
#: wp-useronline.php:
|
222 |
msgid "1 Member"
|
223 |
msgstr "1 membru"
|
224 |
|
225 |
-
#: wp-useronline.php:
|
226 |
msgid "%COUNT% Members"
|
227 |
msgstr "%COUNT% membri"
|
228 |
|
229 |
-
#: wp-useronline.php:
|
230 |
msgid "1 Guest"
|
231 |
msgstr "1 musafir"
|
232 |
|
233 |
-
#: wp-useronline.php:
|
234 |
msgid "%COUNT% Guests"
|
235 |
msgstr "%COUNT% musafiri"
|
236 |
|
237 |
-
#: wp-useronline.php:
|
238 |
msgid "1 Bot"
|
239 |
msgstr "1 bot"
|
240 |
|
241 |
-
#: wp-useronline.php:
|
242 |
msgid "%COUNT% Bots"
|
243 |
msgstr "%COUNT% boți"
|
244 |
|
245 |
-
#: wp-useronline.php:
|
246 |
msgid "Online"
|
247 |
-
msgstr "
|
248 |
-
|
249 |
-
#: wp-useronline.php:
|
250 |
-
#: wp-useronline.php:
|
251 |
-
#: wp-useronline.php:
|
252 |
-
#: wp-useronline.php:
|
253 |
-
#: wp-useronline.php:
|
254 |
-
#: wp-useronline.php:
|
255 |
msgid ","
|
256 |
msgstr ","
|
257 |
|
258 |
-
#: wp-useronline.php:
|
259 |
-
#: wp-useronline.php:
|
260 |
msgctxt "Template Element"
|
261 |
msgid "Users"
|
262 |
-
msgstr "
|
263 |
|
264 |
-
#: wp-useronline.php:
|
265 |
msgid "Browsing This Page."
|
266 |
-
msgstr "
|
267 |
|
268 |
-
#:
|
269 |
-
msgid "
|
270 |
-
msgstr "
|
271 |
|
272 |
-
#:
|
273 |
-
msgid "
|
274 |
-
msgstr "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
275 |
|
276 |
-
|
277 |
-
|
|
|
278 |
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
|
283 |
-
#~ msgid "Lester 'GaMerZ' Chan & scribu"
|
284 |
-
#~ msgstr "Lester 'GaMerZ' Chan & scribu"
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: WP-UserOnline 2.70\n"
|
4 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-useronline\n"
|
5 |
+
"POT-Creation-Date: 2010-05-07 16:14+0300\n"
|
6 |
"PO-Revision-Date: \n"
|
7 |
+
"Last-Translator: scribu <scribu@gmail.com>\n"
|
8 |
"Language-Team: scribu <scribu@gmail.com>\n"
|
|
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
13 |
"X-Poedit-Language: Romanian\n"
|
14 |
"X-Poedit-Country: ROMANIA\n"
|
15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
#: admin.php:9
|
17 |
msgid "Users Online Now"
|
18 |
+
msgstr ""
|
19 |
|
20 |
+
#. #-#-#-#-# wp-useronline.pot (WP-UserOnline 2.70-beta) #-#-#-#-#
|
21 |
+
#. Plugin Name of the plugin/theme
|
22 |
#: admin.php:10
|
23 |
#: wp-stats.php:14
|
24 |
#: wp-stats.php:31
|
25 |
msgid "WP-UserOnline"
|
26 |
+
msgstr ""
|
27 |
|
28 |
+
#: admin.php:24
|
29 |
+
#, php-format
|
30 |
msgid "There is <strong><a href='%s'>%s user</a></strong> online now."
|
31 |
msgid_plural "There are a total of <strong><a href='%s'>%s users</a></strong> online now."
|
32 |
+
msgstr[0] ""
|
33 |
+
msgstr[1] ""
|
34 |
|
35 |
+
#: admin.php:51
|
36 |
msgid "UserOnline Options"
|
37 |
+
msgstr ""
|
38 |
|
39 |
+
#: admin.php:52
|
40 |
+
#: widget.php:6
|
41 |
+
#: widget.php:49
|
42 |
+
msgid "UserOnline"
|
43 |
+
msgstr ""
|
44 |
+
|
45 |
+
#: admin.php:107
|
46 |
msgid "Time Out"
|
47 |
+
msgstr ""
|
48 |
|
49 |
+
#: admin.php:110
|
50 |
+
msgid "How long until it will remove the user from the database (In seconds)."
|
51 |
+
msgstr ""
|
52 |
|
53 |
+
#: admin.php:115
|
54 |
msgid "UserOnline URL"
|
55 |
+
msgstr ""
|
56 |
|
57 |
+
#: admin.php:118
|
58 |
msgid "URL To UserOnline Page<br />Example: http://www.yoursite.com/useronline/<br />Example: http://www.yoursite.com/?page_id=2"
|
59 |
+
msgstr ""
|
60 |
|
61 |
+
#: admin.php:122
|
62 |
msgid "User Names"
|
63 |
+
msgstr ""
|
64 |
|
65 |
+
#: admin.php:125
|
66 |
msgid "Link user names to their author page"
|
67 |
+
msgstr ""
|
68 |
|
69 |
+
#: admin.php:142
|
70 |
msgid "Useronline Templates"
|
71 |
+
msgstr ""
|
72 |
|
73 |
+
#: admin.php:154
|
74 |
msgid "User(s) Browsing Site:"
|
75 |
+
msgstr ""
|
76 |
|
77 |
+
#: admin.php:155
|
78 |
msgid "User(s) Browsing Page:"
|
79 |
+
msgstr ""
|
80 |
|
81 |
+
#: admin.php:168
|
82 |
+
#: scb/AdminPage.php:179
|
83 |
+
#: scb/AdminPage.php:190
|
84 |
msgid "Save Changes"
|
85 |
+
msgstr ""
|
86 |
|
87 |
+
#: admin.php:178
|
88 |
msgid "Naming Conventions:"
|
89 |
+
msgstr ""
|
90 |
|
91 |
+
#: admin.php:179
|
92 |
+
#: admin.php:219
|
93 |
+
#: admin.php:241
|
94 |
msgid "Allowed Variables:"
|
95 |
+
msgstr ""
|
96 |
|
97 |
+
#: admin.php:181
|
98 |
msgid "Restore Defaults"
|
99 |
+
msgstr ""
|
100 |
|
101 |
+
#: admin.php:187
|
102 |
msgid "Singular Form"
|
103 |
+
msgstr ""
|
104 |
|
105 |
+
#: admin.php:188
|
106 |
msgid "Plural Form"
|
107 |
+
msgstr ""
|
108 |
|
109 |
+
#: admin.php:218
|
110 |
msgid "User(s) Online:"
|
111 |
+
msgstr ""
|
112 |
|
113 |
+
#: admin.php:224
|
114 |
+
#: admin.php:249
|
115 |
msgid "Restore Default Template"
|
116 |
+
msgstr ""
|
117 |
|
118 |
+
#: admin.php:255
|
119 |
msgid "Member Names Separator"
|
120 |
+
msgstr ""
|
121 |
|
122 |
+
#: admin.php:256
|
123 |
msgid "Guests Separator"
|
124 |
+
msgstr ""
|
125 |
|
126 |
+
#: admin.php:257
|
127 |
msgid "Bots Separator"
|
128 |
+
msgstr ""
|
129 |
|
130 |
+
#: scb/AdminPage.php:166
|
131 |
+
msgid "Settings <strong>saved</strong>."
|
132 |
+
msgstr ""
|
133 |
+
|
134 |
+
#: scb/AdminPage.php:376
|
135 |
+
msgid "Settings"
|
136 |
+
msgstr ""
|
137 |
|
138 |
+
#: template-tags.php:79
|
139 |
+
#, php-format
|
140 |
msgid "There is <strong>%s</strong> online now: <strong>%s</strong>, <strong>%s</strong> and <strong>%s</strong>."
|
141 |
msgid_plural "There are a total of <strong>%s</strong> online now: <strong>%s</strong>, <strong>%s</strong> and <strong>%s</strong>."
|
142 |
+
msgstr[0] ""
|
143 |
+
msgstr[1] ""
|
144 |
|
145 |
+
#: template-tags.php:181
|
146 |
msgid "No one is online now."
|
147 |
+
msgstr "Nimeni nu este online acum."
|
148 |
|
149 |
+
#: template-tags.php:183
|
150 |
msgid "on"
|
151 |
+
msgstr ""
|
152 |
|
153 |
+
#: template-tags.php:184
|
154 |
msgid "url"
|
155 |
+
msgstr ""
|
156 |
|
157 |
+
#: template-tags.php:185
|
158 |
msgid "referral"
|
159 |
+
msgstr ""
|
160 |
|
161 |
+
#: template-tags.php:196
|
162 |
msgid "Online Now"
|
163 |
+
msgstr ""
|
164 |
|
165 |
+
#: template-tags.php:227
|
166 |
+
#, php-format
|
167 |
msgid "%s @ %s"
|
168 |
+
msgstr ""
|
169 |
|
170 |
+
#: template-tags.php:247
|
171 |
+
#, php-format
|
172 |
msgid "Most users ever online were <strong>%s</strong>, on <strong>%s</strong>"
|
173 |
+
msgstr ""
|
174 |
|
175 |
+
#: widget.php:5
|
176 |
+
msgid "WP-UserOnline users online statistics"
|
177 |
+
msgstr ""
|
178 |
|
179 |
+
#: widget.php:56
|
180 |
+
msgid "Title:"
|
181 |
+
msgstr ""
|
182 |
|
183 |
+
#: widget.php:59
|
184 |
+
msgid "Statistics Type:"
|
185 |
+
msgstr ""
|
186 |
+
|
187 |
+
#: widget.php:61
|
188 |
+
msgid "Users Online Count"
|
189 |
+
msgstr ""
|
190 |
+
|
191 |
+
#: widget.php:62
|
192 |
+
msgid "Users Browsing Current Page"
|
193 |
+
msgstr ""
|
194 |
+
|
195 |
+
#: widget.php:63
|
196 |
+
msgid "Users Browsing Site"
|
197 |
+
msgstr ""
|
198 |
|
199 |
+
#: widget.php:65
|
200 |
+
msgid "Users Online Count & Users Browsing Current Page"
|
201 |
+
msgstr ""
|
202 |
+
|
203 |
+
#: widget.php:66
|
204 |
+
msgid "Users Online Count & Users Browsing Site"
|
205 |
+
msgstr ""
|
206 |
+
|
207 |
+
#: wp-stats.php:24
|
208 |
+
#, php-format
|
209 |
+
msgid "<strong>%s</strong> user online now."
|
210 |
+
msgid_plural "<strong>%s</strong> users online now."
|
211 |
+
msgstr[0] ""
|
212 |
+
msgstr[1] ""
|
213 |
+
|
214 |
+
#: wp-useronline.php:83
|
215 |
msgid "1 User"
|
216 |
msgstr "1 utilizator"
|
217 |
|
218 |
+
#: wp-useronline.php:84
|
219 |
msgid "%COUNT% Users"
|
220 |
msgstr "%COUNT% utilizatori"
|
221 |
|
222 |
+
#: wp-useronline.php:85
|
223 |
msgid "1 Member"
|
224 |
msgstr "1 membru"
|
225 |
|
226 |
+
#: wp-useronline.php:86
|
227 |
msgid "%COUNT% Members"
|
228 |
msgstr "%COUNT% membri"
|
229 |
|
230 |
+
#: wp-useronline.php:87
|
231 |
msgid "1 Guest"
|
232 |
msgstr "1 musafir"
|
233 |
|
234 |
+
#: wp-useronline.php:88
|
235 |
msgid "%COUNT% Guests"
|
236 |
msgstr "%COUNT% musafiri"
|
237 |
|
238 |
+
#: wp-useronline.php:89
|
239 |
msgid "1 Bot"
|
240 |
msgstr "1 bot"
|
241 |
|
242 |
+
#: wp-useronline.php:90
|
243 |
msgid "%COUNT% Bots"
|
244 |
msgstr "%COUNT% boți"
|
245 |
|
246 |
+
#: wp-useronline.php:94
|
247 |
msgid "Online"
|
248 |
+
msgstr "Online"
|
249 |
+
|
250 |
+
#: wp-useronline.php:98
|
251 |
+
#: wp-useronline.php:99
|
252 |
+
#: wp-useronline.php:100
|
253 |
+
#: wp-useronline.php:107
|
254 |
+
#: wp-useronline.php:108
|
255 |
+
#: wp-useronline.php:109
|
256 |
msgid ","
|
257 |
msgstr ","
|
258 |
|
259 |
+
#: wp-useronline.php:102
|
260 |
+
#: wp-useronline.php:111
|
261 |
msgctxt "Template Element"
|
262 |
msgid "Users"
|
263 |
+
msgstr "utilizatori"
|
264 |
|
265 |
+
#: wp-useronline.php:111
|
266 |
msgid "Browsing This Page."
|
267 |
+
msgstr ""
|
268 |
|
269 |
+
#: wp-useronline.php:210
|
270 |
+
msgid "Guest"
|
271 |
+
msgstr ""
|
272 |
|
273 |
+
#: wp-useronline.php:217
|
274 |
+
msgid "Admin"
|
275 |
+
msgstr ""
|
276 |
+
|
277 |
+
#: wp-useronline.php:223
|
278 |
+
msgid "Archive"
|
279 |
+
msgstr "Arhivă"
|
280 |
+
|
281 |
+
#. Plugin URI of the plugin/theme
|
282 |
+
msgid "http://wordpress.org/extend/plugins/wp-useronline/"
|
283 |
+
msgstr ""
|
284 |
|
285 |
+
#. Description of the plugin/theme
|
286 |
+
msgid "Enable you to display how many users are online on your Wordpress blog with detailed statistics of where they are and who there are(Members/Guests/Search Bots)."
|
287 |
+
msgstr ""
|
288 |
|
289 |
+
#. Author of the plugin/theme
|
290 |
+
msgid "Lester 'GaMerZ' Chan & scribu"
|
291 |
+
msgstr "Lester 'GaMerZ' Chan & scribu"
|
292 |
|
|
|
|
lang/wp-useronline-vi_VN.mo
DELETED
Binary file
|
lang/wp-useronline-vi_VN.po
DELETED
@@ -1,275 +0,0 @@
|
|
1 |
-
# Copyright (C) 2010
|
2 |
-
# This file is distributed under the same license as the package.
|
3 |
-
msgid ""
|
4 |
-
msgstr ""
|
5 |
-
"Project-Id-Version: WP-UserOnline\n"
|
6 |
-
"Report-Msgid-Bugs-To: http://wordpress.org/tag/wpu\n"
|
7 |
-
"POT-Creation-Date: 2011-06-02 20:04:14+00:00\n"
|
8 |
-
"MIME-Version: 1.0\n"
|
9 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
-
"Content-Transfer-Encoding: 8bit\n"
|
11 |
-
"PO-Revision-Date: 2012-04-14 11:54+0700\n"
|
12 |
-
"Last-Translator: solitary1510 <solitary1510@gmail.com>\n"
|
13 |
-
"Language-Team: DLTVP <solitary1510@gmail.com>\n"
|
14 |
-
"Plural-Forms: nplurals=1; plural=0;\n"
|
15 |
-
"X-Poedit-Language: Vietnamese\n"
|
16 |
-
"X-Poedit-Country: VIET NAM\n"
|
17 |
-
"X-Poedit-Basepath: .\n"
|
18 |
-
"X-Poedit-SearchPath-0: .\n"
|
19 |
-
|
20 |
-
#: widget.php:5
|
21 |
-
msgid "WP-UserOnline users online statistics"
|
22 |
-
msgstr "Hiển thị thông tin thành viên trực tuyến"
|
23 |
-
|
24 |
-
#: widget.php:6
|
25 |
-
#: widget.php:49
|
26 |
-
#: admin.php:56
|
27 |
-
msgid "UserOnline"
|
28 |
-
msgstr "Thành Viên Trực Tuyến"
|
29 |
-
|
30 |
-
#: widget.php:56
|
31 |
-
msgid "Title:"
|
32 |
-
msgstr "Tiêu đề:"
|
33 |
-
|
34 |
-
#: widget.php:59
|
35 |
-
msgid "Statistics Type:"
|
36 |
-
msgstr "Kiểu Hiển Thị"
|
37 |
-
|
38 |
-
#: widget.php:61
|
39 |
-
msgid "Users Online Count"
|
40 |
-
msgstr "Số người trực tuyến"
|
41 |
-
|
42 |
-
#: widget.php:62
|
43 |
-
msgid "Users Browsing Current Page"
|
44 |
-
msgstr "Người đang xem trang hiện tại"
|
45 |
-
|
46 |
-
#: widget.php:63
|
47 |
-
msgid "Users Browsing Site"
|
48 |
-
msgstr "Chi tiết người đang trực tuyến"
|
49 |
-
|
50 |
-
#: widget.php:65
|
51 |
-
msgid "Users Online Count & Users Browsing Current Page"
|
52 |
-
msgstr "Số người trực tuyến & Người đang xem trang hiện tại"
|
53 |
-
|
54 |
-
#: widget.php:66
|
55 |
-
msgid "Users Online Count & Users Browsing Site"
|
56 |
-
msgstr "Số người trực tuyến & Chi tiết người đang trực tuyến"
|
57 |
-
|
58 |
-
#: admin.php:9
|
59 |
-
msgid "Users Online Now"
|
60 |
-
msgstr "Người Đang Trực Tuyến"
|
61 |
-
|
62 |
-
#: admin.php:10
|
63 |
-
#: wp-stats.php:14
|
64 |
-
#: wp-stats.php:31
|
65 |
-
msgid "WP-UserOnline"
|
66 |
-
msgstr "WP-UserOnline"
|
67 |
-
|
68 |
-
#: admin.php:26
|
69 |
-
msgid "There is <strong><a href='%s'>%s user</a></strong> online now."
|
70 |
-
msgid_plural "There are a total of <strong><a href='%s'>%s users</a></strong> online now."
|
71 |
-
msgstr[0] "Hiện có <strong><a href='%s'>%s Người</a></strong> đang trực tuyến."
|
72 |
-
|
73 |
-
#: admin.php:55
|
74 |
-
msgid "UserOnline Options"
|
75 |
-
msgstr "Thiết Lập UserOnline"
|
76 |
-
|
77 |
-
#: admin.php:114
|
78 |
-
msgid "Time Out"
|
79 |
-
msgstr "Time Out"
|
80 |
-
|
81 |
-
#: admin.php:117
|
82 |
-
msgid "How long until it will remove the user from the database (in seconds)."
|
83 |
-
msgstr "Thời gian sau khi người dùng ngoại tuyến thì loại khỏi danh sách đang trực tuyến (theo giây)."
|
84 |
-
|
85 |
-
#: admin.php:122
|
86 |
-
msgid "UserOnline URL"
|
87 |
-
msgstr "Địa chỉ trang UserOnline"
|
88 |
-
|
89 |
-
#: admin.php:125
|
90 |
-
msgid "URL To UserOnline Page<br />Example: http://www.yoursite.com/useronline/<br />Example: http://www.yoursite.com/?page_id=2"
|
91 |
-
msgstr "Địa chỉ đến trang ai đang trực tuyến của bạn<br />Example: http://www.yoursite.com/useronline/<br />Example: http://www.yoursite.com/?page_id=2"
|
92 |
-
|
93 |
-
#: admin.php:129
|
94 |
-
msgid "User Names"
|
95 |
-
msgstr "Tên Thành Viên"
|
96 |
-
|
97 |
-
#: admin.php:132
|
98 |
-
msgid "Link user names to their author page"
|
99 |
-
msgstr "Tên thành viên sẽ dẫn đến trang chứa bài của họ"
|
100 |
-
|
101 |
-
#: admin.php:151
|
102 |
-
msgid "Useronline Templates"
|
103 |
-
msgstr "Cấu trúc Useronline"
|
104 |
-
|
105 |
-
#: admin.php:163
|
106 |
-
msgid "User(s) Browsing Site:"
|
107 |
-
msgstr "Thành viên đang trực tuyến:"
|
108 |
-
|
109 |
-
#: admin.php:164
|
110 |
-
msgid "User(s) Browsing Page:"
|
111 |
-
msgstr "Thành viên đang xem trang hiện tại:"
|
112 |
-
|
113 |
-
#: admin.php:177
|
114 |
-
#: scb/AdminPage.php:177
|
115 |
-
#: scb/AdminPage.php:187
|
116 |
-
msgid "Save Changes"
|
117 |
-
msgstr "Lưu Thay Đổi"
|
118 |
-
|
119 |
-
#: admin.php:187
|
120 |
-
msgid "Naming Conventions:"
|
121 |
-
msgstr "Quy ước Tên:"
|
122 |
-
|
123 |
-
#: admin.php:188
|
124 |
-
#: admin.php:228
|
125 |
-
#: admin.php:250
|
126 |
-
msgid "Allowed Variables:"
|
127 |
-
msgstr "Trường cho phép:"
|
128 |
-
|
129 |
-
#: admin.php:190
|
130 |
-
msgid "Restore Defaults"
|
131 |
-
msgstr "Khôi phục mặc định"
|
132 |
-
|
133 |
-
#: admin.php:196
|
134 |
-
msgid "Singular Form"
|
135 |
-
msgstr "Số Ít"
|
136 |
-
|
137 |
-
#: admin.php:197
|
138 |
-
msgid "Plural Form"
|
139 |
-
msgstr "Số Nhiều"
|
140 |
-
|
141 |
-
#: admin.php:227
|
142 |
-
msgid "User(s) Online:"
|
143 |
-
msgstr "Số Người Trực Tuyến:"
|
144 |
-
|
145 |
-
#: admin.php:233
|
146 |
-
#: admin.php:258
|
147 |
-
msgid "Restore Default Template"
|
148 |
-
msgstr "Khôi phục mặc định"
|
149 |
-
|
150 |
-
#: admin.php:264
|
151 |
-
msgid "Member Names Separator"
|
152 |
-
msgstr "Dấu phân cách thành viên"
|
153 |
-
|
154 |
-
#: admin.php:265
|
155 |
-
msgid "Guests Separator"
|
156 |
-
msgstr "Dấu phân cách khách"
|
157 |
-
|
158 |
-
#: admin.php:266
|
159 |
-
msgid "Bots Separator"
|
160 |
-
msgstr "Dấu phân cách Bot"
|
161 |
-
|
162 |
-
#: wp-stats.php:23
|
163 |
-
msgid "<strong>%s</strong> user online now."
|
164 |
-
msgid_plural "<strong>%s</strong> users online now."
|
165 |
-
msgstr[0] "<strong>%s</strong> người trực tuyến."
|
166 |
-
|
167 |
-
#: template-tags.php:80
|
168 |
-
msgid "There is <strong>%s</strong> online now: <strong>%s</strong>, <strong>%s</strong> and <strong>%s</strong>."
|
169 |
-
msgid_plural "There are a total of <strong>%s</strong> online now: <strong>%s</strong>, <strong>%s</strong> and <strong>%s</strong>."
|
170 |
-
msgstr[0] "Hiện có <strong>%s</strong> trực tuyến: <strong>%s</strong>, <strong>%s</strong> và <strong>%s</strong>."
|
171 |
-
|
172 |
-
#: template-tags.php:190
|
173 |
-
msgid "No one is online now."
|
174 |
-
msgstr "Không có ai trực tuyến."
|
175 |
-
|
176 |
-
#: template-tags.php:192
|
177 |
-
msgid "on"
|
178 |
-
msgstr "ngày"
|
179 |
-
|
180 |
-
#: template-tags.php:193
|
181 |
-
msgid "url"
|
182 |
-
msgstr "URL"
|
183 |
-
|
184 |
-
#: template-tags.php:194
|
185 |
-
msgid "referral"
|
186 |
-
msgstr "Referral"
|
187 |
-
|
188 |
-
#: template-tags.php:205
|
189 |
-
msgid "Online Now"
|
190 |
-
msgstr "Đang Trực Tuyến"
|
191 |
-
|
192 |
-
#: template-tags.php:247
|
193 |
-
#: template-tags.php:249
|
194 |
-
msgid "%s @ %s"
|
195 |
-
msgstr "%s - %s"
|
196 |
-
|
197 |
-
#: template-tags.php:269
|
198 |
-
msgid "Most users ever online were <strong>%s</strong>, on <strong>%s</strong>"
|
199 |
-
msgstr "Kỉ lục trực tuyến là <strong>%s</strong> người vào ngày <strong>%s</strong>"
|
200 |
-
|
201 |
-
#: core.php:137
|
202 |
-
msgid "Guest"
|
203 |
-
msgstr "Khách"
|
204 |
-
|
205 |
-
#: core.php:208
|
206 |
-
msgid "Admin"
|
207 |
-
msgstr "Quản Trị"
|
208 |
-
|
209 |
-
#: core.php:214
|
210 |
-
msgid "Archive"
|
211 |
-
msgstr "Trang"
|
212 |
-
|
213 |
-
#: wp-useronline.php:61
|
214 |
-
msgid "1 User"
|
215 |
-
msgstr "1 Người"
|
216 |
-
|
217 |
-
#: wp-useronline.php:62
|
218 |
-
msgid "%COUNT% Users"
|
219 |
-
msgstr "%COUNT% Người"
|
220 |
-
|
221 |
-
#: wp-useronline.php:63
|
222 |
-
msgid "1 Member"
|
223 |
-
msgstr "1 Thành Viên"
|
224 |
-
|
225 |
-
#: wp-useronline.php:64
|
226 |
-
msgid "%COUNT% Members"
|
227 |
-
msgstr "%COUNT% Thành Viên"
|
228 |
-
|
229 |
-
#: wp-useronline.php:65
|
230 |
-
msgid "1 Guest"
|
231 |
-
msgstr "1 Khách"
|
232 |
-
|
233 |
-
#: wp-useronline.php:66
|
234 |
-
msgid "%COUNT% Guests"
|
235 |
-
msgstr "%COUNT% Khách"
|
236 |
-
|
237 |
-
#: wp-useronline.php:67
|
238 |
-
msgid "1 Bot"
|
239 |
-
msgstr "1 Bot"
|
240 |
-
|
241 |
-
#: wp-useronline.php:68
|
242 |
-
msgid "%COUNT% Bots"
|
243 |
-
msgstr "%COUNT% Bot"
|
244 |
-
|
245 |
-
#: wp-useronline.php:72
|
246 |
-
msgid "Online"
|
247 |
-
msgstr "Trực Tuyến"
|
248 |
-
|
249 |
-
#: wp-useronline.php:76
|
250 |
-
#: wp-useronline.php:77
|
251 |
-
#: wp-useronline.php:78
|
252 |
-
#: wp-useronline.php:85
|
253 |
-
#: wp-useronline.php:86
|
254 |
-
#: wp-useronline.php:87
|
255 |
-
msgid ","
|
256 |
-
msgstr ","
|
257 |
-
|
258 |
-
#: wp-useronline.php:80
|
259 |
-
#: wp-useronline.php:89
|
260 |
-
msgctxt "Template Element"
|
261 |
-
msgid "Users"
|
262 |
-
msgstr "Người"
|
263 |
-
|
264 |
-
#: wp-useronline.php:89
|
265 |
-
msgid "Browsing This Page."
|
266 |
-
msgstr "Đang Xem Trang Này."
|
267 |
-
|
268 |
-
#: scb/AdminPage.php:165
|
269 |
-
msgid "Settings <strong>saved</strong>."
|
270 |
-
msgstr "Thiết Lập <strong>đã lưu</strong>."
|
271 |
-
|
272 |
-
#: scb/AdminPage.php:369
|
273 |
-
msgid "Settings"
|
274 |
-
msgstr "Thiết Lập"
|
275 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lang/wp-useronline-zh_TW.mo
DELETED
Binary file
|
lang/wp-useronline-zh_TW.po
DELETED
@@ -1,292 +0,0 @@
|
|
1 |
-
# Translation of the WordPress plugin WP-UserOnline 2.80 by Lester 'GaMerZ' Chan & scribu.
|
2 |
-
# Copyright (C) 2010 Lester 'GaMerZ' Chan & scribu
|
3 |
-
# This file is distributed under the same license as the WP-UserOnline package.
|
4 |
-
# FIRST AUTHOR <joy.ueng@gmail.com>, 2011.
|
5 |
-
#
|
6 |
-
#, fuzzy
|
7 |
-
msgid ""
|
8 |
-
msgstr ""
|
9 |
-
"Project-Id-Version: WP-UserOnline 2.80\n"
|
10 |
-
"Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-useronline\n"
|
11 |
-
"POT-Creation-Date: 2010-09-20 15:01+0300\n"
|
12 |
-
"PO-Revision-Date: 2010-MO-DA HO:MI+ZONE\n"
|
13 |
-
"Last-Translator: Joey Weng <joy.ueng@gmail.com>\n"
|
14 |
-
"Language-Team: LANGUAGE <LL@li.org>\n"
|
15 |
-
"MIME-Version: 1.0\n"
|
16 |
-
"Content-Type: text/plain; charset=utf-8\n"
|
17 |
-
"Content-Transfer-Encoding: 8bit\n"
|
18 |
-
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
19 |
-
|
20 |
-
#: admin.php:9
|
21 |
-
msgid "Users Online Now"
|
22 |
-
msgstr "目前線上使用者"
|
23 |
-
|
24 |
-
#. #-#-#-#-# wp-useronline.pot (WP-UserOnline 2.80) #-#-#-#-#
|
25 |
-
#. Plugin Name of the plugin/theme
|
26 |
-
#: admin.php:10 wp-stats.php:14 wp-stats.php:31
|
27 |
-
msgid "WP-UserOnline"
|
28 |
-
msgstr "線上使用者"
|
29 |
-
|
30 |
-
#: admin.php:24
|
31 |
-
#, php-format
|
32 |
-
msgid "There is <strong><a href='%s'>%s user</a></strong> online now."
|
33 |
-
msgid_plural ""
|
34 |
-
"There are a total of <strong><a href='%s'>%s users</a></strong> online now."
|
35 |
-
msgstr[0] "目前共有 <strong><a href='%s'>%s 位使用者</a></strong>在線上。"
|
36 |
-
msgstr[1] "目前共有 <strong><a href='%s'>%s 位使用者</a></strong>在線上。"
|
37 |
-
|
38 |
-
#: admin.php:52
|
39 |
-
msgid "UserOnline Options"
|
40 |
-
msgstr "線上使用者設定選項"
|
41 |
-
|
42 |
-
#: admin.php:53 widget.php:6 widget.php:49
|
43 |
-
msgid "UserOnline"
|
44 |
-
msgstr "線上使用者"
|
45 |
-
|
46 |
-
#: admin.php:110
|
47 |
-
msgid "Time Out"
|
48 |
-
msgstr "逾時時間"
|
49 |
-
|
50 |
-
#: admin.php:113
|
51 |
-
msgid ""
|
52 |
-
"How long until it will remove the user from the database ( In seconds )."
|
53 |
-
msgstr "決定多久之後將使用者從資料庫中移除(以秒為單位)。"
|
54 |
-
|
55 |
-
#: admin.php:118
|
56 |
-
msgid "UserOnline URL"
|
57 |
-
msgstr "線上使用者網址"
|
58 |
-
|
59 |
-
#: admin.php:121
|
60 |
-
msgid ""
|
61 |
-
"URL To UserOnline Page<br />Example: http://www.yoursite.com/useronline/<br /"
|
62 |
-
">Example: http://www.yoursite.com/?page_id=2"
|
63 |
-
msgstr "線上使用者網頁的位址<br />範例一:http://www.yoursite.com/useronline/<br /"
|
64 |
-
">範例二:http://www.yoursite.com/?page_id=2"
|
65 |
-
|
66 |
-
#: admin.php:125
|
67 |
-
msgid "User Names"
|
68 |
-
msgstr "使用者名稱"
|
69 |
-
|
70 |
-
#: admin.php:128
|
71 |
-
msgid "Link user names to their author page"
|
72 |
-
msgstr "連結使用者名稱與其作者資訊網頁"
|
73 |
-
|
74 |
-
#: admin.php:145
|
75 |
-
msgid "Useronline Templates"
|
76 |
-
msgstr "線上使用者樣版"
|
77 |
-
|
78 |
-
#: admin.php:157
|
79 |
-
msgid "User(s) Browsing Site:"
|
80 |
-
msgstr "站台瀏覽"
|
81 |
-
|
82 |
-
#: admin.php:158
|
83 |
-
msgid "User(s) Browsing Page:"
|
84 |
-
msgstr "頁面瀏覽"
|
85 |
-
|
86 |
-
#: admin.php:171 scb/AdminPage.php:179 scb/AdminPage.php:189
|
87 |
-
msgid "Save Changes"
|
88 |
-
msgstr "儲存更新"
|
89 |
-
|
90 |
-
#: admin.php:181
|
91 |
-
msgid "Naming Conventions:"
|
92 |
-
msgstr "命名方式"
|
93 |
-
|
94 |
-
#: admin.php:182 admin.php:222 admin.php:244
|
95 |
-
msgid "Allowed Variables:"
|
96 |
-
msgstr "可使用變數"
|
97 |
-
|
98 |
-
#: admin.php:184
|
99 |
-
msgid "Restore Defaults"
|
100 |
-
msgstr "恢復預設值"
|
101 |
-
|
102 |
-
#: admin.php:190
|
103 |
-
msgid "Singular Form"
|
104 |
-
msgstr "單數格式"
|
105 |
-
|
106 |
-
#: admin.php:191
|
107 |
-
msgid "Plural Form"
|
108 |
-
msgstr "複數格式"
|
109 |
-
|
110 |
-
#: admin.php:221
|
111 |
-
msgid "User(s) Online:"
|
112 |
-
msgstr "線上使用者"
|
113 |
-
|
114 |
-
#: admin.php:227 admin.php:252
|
115 |
-
msgid "Restore Default Template"
|
116 |
-
msgstr "恢復預設樣版"
|
117 |
-
|
118 |
-
#: admin.php:258
|
119 |
-
msgid "Member Names Separator"
|
120 |
-
msgstr "會員名稱區隔字元"
|
121 |
-
|
122 |
-
#: admin.php:259
|
123 |
-
msgid "Guests Separator"
|
124 |
-
msgstr "訪客區隔字元"
|
125 |
-
|
126 |
-
#: admin.php:260
|
127 |
-
msgid "Bots Separator"
|
128 |
-
msgstr "機器人區隔字元"
|
129 |
-
|
130 |
-
#: core.php:109
|
131 |
-
msgid "Guest"
|
132 |
-
msgstr "訪客"
|
133 |
-
|
134 |
-
#: core.php:180
|
135 |
-
msgid "Admin"
|
136 |
-
msgstr "管理員"
|
137 |
-
|
138 |
-
#: core.php:186
|
139 |
-
msgid "Archive"
|
140 |
-
msgstr "彙整"
|
141 |
-
|
142 |
-
#: scb/AdminPage.php:167
|
143 |
-
msgid "Settings <strong>saved</strong>."
|
144 |
-
msgstr "設定<strong>已儲存</strong>。"
|
145 |
-
|
146 |
-
#: scb/AdminPage.php:371
|
147 |
-
msgid "Settings"
|
148 |
-
msgstr "設定"
|
149 |
-
|
150 |
-
#: template-tags.php:81
|
151 |
-
#, php-format
|
152 |
-
msgid ""
|
153 |
-
"There is <strong>%s</strong> online now: <strong>%s</strong>, <strong>%s</"
|
154 |
-
"strong> and <strong>%s</strong>."
|
155 |
-
msgid_plural ""
|
156 |
-
"There are a total of <strong>%s</strong> online now: <strong>%s</strong>, "
|
157 |
-
"<strong>%s</strong> and <strong>%s</strong>."
|
158 |
-
msgstr[0] "目前共有 <strong>%s</strong> 正在線上:<strong>%s</strong>,<strong>%s</"
|
159 |
-
"strong>與 <strong>%s</strong>。"
|
160 |
-
msgstr[1] "目前共有 <strong>%s</strong> 正在線上:<strong>%s</strong>,<strong>%s</"
|
161 |
-
"strong>與 <strong>%s</strong>。"
|
162 |
-
|
163 |
-
#: template-tags.php:190
|
164 |
-
msgid "No one is online now."
|
165 |
-
msgstr "目前沒有任何使用者在線上。"
|
166 |
-
|
167 |
-
#: template-tags.php:192
|
168 |
-
msgid "on"
|
169 |
-
msgstr "在"
|
170 |
-
|
171 |
-
#: template-tags.php:193
|
172 |
-
msgid "url"
|
173 |
-
msgstr "網址"
|
174 |
-
|
175 |
-
#: template-tags.php:194
|
176 |
-
msgid "referral"
|
177 |
-
msgstr "參照網址"
|
178 |
-
|
179 |
-
#: template-tags.php:205
|
180 |
-
msgid "Online Now"
|
181 |
-
msgstr "正在線上"
|
182 |
-
|
183 |
-
#: template-tags.php:247 template-tags.php:249
|
184 |
-
#, php-format
|
185 |
-
msgid "%s @ %s"
|
186 |
-
msgstr ""
|
187 |
-
|
188 |
-
#: template-tags.php:269
|
189 |
-
#, php-format
|
190 |
-
msgid "Most users ever online were <strong>%s</strong>, on <strong>%s</strong>"
|
191 |
-
msgstr "線上同時最多使用者數量:<strong>%s</strong>,在 <strong>%s</strong>"
|
192 |
-
|
193 |
-
#: widget.php:5
|
194 |
-
msgid "WP-UserOnline users online statistics"
|
195 |
-
msgstr "WP-UserOnline 線上使用者統計"
|
196 |
-
|
197 |
-
#: widget.php:56
|
198 |
-
msgid "Title:"
|
199 |
-
msgstr "標題"
|
200 |
-
|
201 |
-
#: widget.php:59
|
202 |
-
msgid "Statistics Type:"
|
203 |
-
msgstr "統計種類:"
|
204 |
-
|
205 |
-
#: widget.php:61
|
206 |
-
msgid "Users Online Count"
|
207 |
-
msgstr "線上使用者人數"
|
208 |
-
|
209 |
-
#: widget.php:62
|
210 |
-
msgid "Users Browsing Current Page"
|
211 |
-
msgstr "使用者正在瀏覽目前頁面"
|
212 |
-
|
213 |
-
#: widget.php:63
|
214 |
-
msgid "Users Browsing Site"
|
215 |
-
msgstr "使用者正在瀏覽網站"
|
216 |
-
|
217 |
-
#: widget.php:65
|
218 |
-
msgid "Users Online Count & Users Browsing Current Page"
|
219 |
-
msgstr "線上使用者人數與正在瀏覽目前頁面"
|
220 |
-
|
221 |
-
#: widget.php:66
|
222 |
-
msgid "Users Online Count & Users Browsing Site"
|
223 |
-
msgstr "線上使用者人數與正在瀏覽網站"
|
224 |
-
|
225 |
-
#: wp-stats.php:24
|
226 |
-
#, php-format
|
227 |
-
msgid "<strong>%s</strong> user online now."
|
228 |
-
msgid_plural "<strong>%s</strong> users online now."
|
229 |
-
msgstr[0] "<strong>%s</strong> 名使用者正在線上。"
|
230 |
-
msgstr[1] "<strong>%s</strong> 名使用者正在線上。"
|
231 |
-
|
232 |
-
#: wp-useronline.php:61
|
233 |
-
msgid "1 User"
|
234 |
-
msgstr "1 位使用者"
|
235 |
-
|
236 |
-
#: wp-useronline.php:62
|
237 |
-
msgid "%COUNT% Users"
|
238 |
-
msgstr "%COUNT% 位使用者"
|
239 |
-
|
240 |
-
#: wp-useronline.php:63
|
241 |
-
msgid "1 Member"
|
242 |
-
msgstr "1 位會員"
|
243 |
-
|
244 |
-
#: wp-useronline.php:64
|
245 |
-
msgid "%COUNT% Members"
|
246 |
-
msgstr "%COUNT% 位會員"
|
247 |
-
|
248 |
-
#: wp-useronline.php:65
|
249 |
-
msgid "1 Guest"
|
250 |
-
msgstr "1 位訪客"
|
251 |
-
|
252 |
-
#: wp-useronline.php:66
|
253 |
-
msgid "%COUNT% Guests"
|
254 |
-
msgstr "%COUNT% 位訪客"
|
255 |
-
|
256 |
-
#: wp-useronline.php:67
|
257 |
-
msgid "1 Bot"
|
258 |
-
msgstr "1 個機器人"
|
259 |
-
|
260 |
-
#: wp-useronline.php:68
|
261 |
-
msgid "%COUNT% Bots"
|
262 |
-
msgstr "%COUNT% 個機器人"
|
263 |
-
|
264 |
-
#: wp-useronline.php:72
|
265 |
-
msgid "Online"
|
266 |
-
msgstr "正在線上"
|
267 |
-
|
268 |
-
#: wp-useronline.php:76 wp-useronline.php:77 wp-useronline.php:78
|
269 |
-
#: wp-useronline.php:85 wp-useronline.php:86 wp-useronline.php:87
|
270 |
-
msgid ","
|
271 |
-
msgstr ""
|
272 |
-
|
273 |
-
#: wp-useronline.php:80 wp-useronline.php:89
|
274 |
-
msgctxt "Template Element"
|
275 |
-
msgid "Users"
|
276 |
-
msgstr "使用者"
|
277 |
-
|
278 |
-
#: wp-useronline.php:89
|
279 |
-
msgid "Browsing This Page."
|
280 |
-
msgstr "正在瀏覽此頁。"
|
281 |
-
|
282 |
-
#. Plugin URI of the plugin/theme
|
283 |
-
msgid "http://wordpress.org/extend/plugins/wp-useronline/"
|
284 |
-
msgstr ""
|
285 |
-
|
286 |
-
#. Description of the plugin/theme
|
287 |
-
msgid "Enable you to display how many users are online on your Wordpress site"
|
288 |
-
msgstr "顯示目前網站中有多少使用者正在線上"
|
289 |
-
|
290 |
-
#. Author of the plugin/theme
|
291 |
-
msgid "Lester 'GaMerZ' Chan & scribu"
|
292 |
-
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lang/wp-useronline.pot
CHANGED
@@ -1,161 +1,140 @@
|
|
1 |
-
#
|
2 |
-
#
|
|
|
|
|
|
|
|
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version:
|
6 |
-
"Report-Msgid-Bugs-To: http://wordpress.org/tag/
|
7 |
-
"POT-Creation-Date:
|
8 |
-
"MIME-Version: 1.0\n"
|
9 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
-
"Content-Transfer-Encoding: 8bit\n"
|
11 |
"PO-Revision-Date: 2010-MO-DA HO:MI+ZONE\n"
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
#: widget.php:6 widget.php:49 admin.php:56
|
20 |
-
msgid "UserOnline"
|
21 |
-
msgstr ""
|
22 |
-
|
23 |
-
#: widget.php:56
|
24 |
-
msgid "Title:"
|
25 |
-
msgstr ""
|
26 |
-
|
27 |
-
#: widget.php:59
|
28 |
-
msgid "Statistics Type:"
|
29 |
-
msgstr ""
|
30 |
-
|
31 |
-
#: widget.php:61
|
32 |
-
msgid "Users Online Count"
|
33 |
-
msgstr ""
|
34 |
-
|
35 |
-
#: widget.php:62
|
36 |
-
msgid "Users Browsing Current Page"
|
37 |
-
msgstr ""
|
38 |
-
|
39 |
-
#: widget.php:63
|
40 |
-
msgid "Users Browsing Site"
|
41 |
-
msgstr ""
|
42 |
-
|
43 |
-
#: widget.php:65
|
44 |
-
msgid "Users Online Count & Users Browsing Current Page"
|
45 |
-
msgstr ""
|
46 |
-
|
47 |
-
#: widget.php:66
|
48 |
-
msgid "Users Online Count & Users Browsing Site"
|
49 |
-
msgstr ""
|
50 |
|
51 |
#: admin.php:9
|
52 |
msgid "Users Online Now"
|
53 |
msgstr ""
|
54 |
|
|
|
|
|
55 |
#: admin.php:10 wp-stats.php:14 wp-stats.php:31
|
56 |
msgid "WP-UserOnline"
|
57 |
msgstr ""
|
58 |
|
59 |
-
#: admin.php:
|
|
|
60 |
msgid "There is <strong><a href='%s'>%s user</a></strong> online now."
|
61 |
msgid_plural ""
|
62 |
"There are a total of <strong><a href='%s'>%s users</a></strong> online now."
|
63 |
msgstr[0] ""
|
64 |
msgstr[1] ""
|
65 |
|
66 |
-
#: admin.php:
|
67 |
msgid "UserOnline Options"
|
68 |
msgstr ""
|
69 |
|
70 |
-
#: admin.php:
|
|
|
|
|
|
|
|
|
71 |
msgid "Time Out"
|
72 |
msgstr ""
|
73 |
|
74 |
-
#: admin.php:
|
75 |
-
msgid "How long until it will remove the user from the database (
|
76 |
msgstr ""
|
77 |
|
78 |
-
#: admin.php:
|
79 |
msgid "UserOnline URL"
|
80 |
msgstr ""
|
81 |
|
82 |
-
#: admin.php:
|
83 |
msgid ""
|
84 |
"URL To UserOnline Page<br />Example: http://www.yoursite.com/useronline/<br /"
|
85 |
">Example: http://www.yoursite.com/?page_id=2"
|
86 |
msgstr ""
|
87 |
|
88 |
-
#: admin.php:
|
89 |
msgid "User Names"
|
90 |
msgstr ""
|
91 |
|
92 |
-
#: admin.php:
|
93 |
msgid "Link user names to their author page"
|
94 |
msgstr ""
|
95 |
|
96 |
-
#: admin.php:
|
97 |
msgid "Useronline Templates"
|
98 |
msgstr ""
|
99 |
|
100 |
-
#: admin.php:
|
101 |
msgid "User(s) Browsing Site:"
|
102 |
msgstr ""
|
103 |
|
104 |
-
#: admin.php:
|
105 |
msgid "User(s) Browsing Page:"
|
106 |
msgstr ""
|
107 |
|
108 |
-
#: admin.php:
|
109 |
msgid "Save Changes"
|
110 |
msgstr ""
|
111 |
|
112 |
-
#: admin.php:
|
113 |
msgid "Naming Conventions:"
|
114 |
msgstr ""
|
115 |
|
116 |
-
#: admin.php:
|
117 |
msgid "Allowed Variables:"
|
118 |
msgstr ""
|
119 |
|
120 |
-
#: admin.php:
|
121 |
msgid "Restore Defaults"
|
122 |
msgstr ""
|
123 |
|
124 |
-
#: admin.php:
|
125 |
msgid "Singular Form"
|
126 |
msgstr ""
|
127 |
|
128 |
-
#: admin.php:
|
129 |
msgid "Plural Form"
|
130 |
msgstr ""
|
131 |
|
132 |
-
#: admin.php:
|
133 |
msgid "User(s) Online:"
|
134 |
msgstr ""
|
135 |
|
136 |
-
#: admin.php:
|
137 |
msgid "Restore Default Template"
|
138 |
msgstr ""
|
139 |
|
140 |
-
#: admin.php:
|
141 |
msgid "Member Names Separator"
|
142 |
msgstr ""
|
143 |
|
144 |
-
#: admin.php:
|
145 |
msgid "Guests Separator"
|
146 |
msgstr ""
|
147 |
|
148 |
-
#: admin.php:
|
149 |
msgid "Bots Separator"
|
150 |
msgstr ""
|
151 |
|
152 |
-
#:
|
153 |
-
msgid "<strong
|
154 |
-
|
155 |
-
msgstr[0] ""
|
156 |
-
msgstr[1] ""
|
157 |
|
158 |
-
#:
|
|
|
|
|
|
|
|
|
|
|
159 |
msgid ""
|
160 |
"There is <strong>%s</strong> online now: <strong>%s</strong>, <strong>%s</"
|
161 |
"strong> and <strong>%s</strong>."
|
@@ -165,100 +144,148 @@ msgid_plural ""
|
|
165 |
msgstr[0] ""
|
166 |
msgstr[1] ""
|
167 |
|
168 |
-
#: template-tags.php:
|
169 |
msgid "No one is online now."
|
170 |
msgstr ""
|
171 |
|
172 |
-
#: template-tags.php:
|
173 |
msgid "on"
|
174 |
msgstr ""
|
175 |
|
176 |
-
#: template-tags.php:
|
177 |
msgid "url"
|
178 |
msgstr ""
|
179 |
|
180 |
-
#: template-tags.php:
|
181 |
msgid "referral"
|
182 |
msgstr ""
|
183 |
|
184 |
-
#: template-tags.php:
|
185 |
msgid "Online Now"
|
186 |
msgstr ""
|
187 |
|
188 |
-
#: template-tags.php:
|
|
|
189 |
msgid "%s @ %s"
|
190 |
msgstr ""
|
191 |
|
192 |
-
#: template-tags.php:
|
|
|
193 |
msgid "Most users ever online were <strong>%s</strong>, on <strong>%s</strong>"
|
194 |
msgstr ""
|
195 |
|
196 |
-
#:
|
197 |
-
msgid "
|
198 |
msgstr ""
|
199 |
|
200 |
-
#:
|
201 |
-
msgid "
|
202 |
msgstr ""
|
203 |
|
204 |
-
#:
|
205 |
-
msgid "
|
206 |
msgstr ""
|
207 |
|
208 |
-
#:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
209 |
msgid "1 User"
|
210 |
msgstr ""
|
211 |
|
212 |
-
#: wp-useronline.php:
|
213 |
msgid "%COUNT% Users"
|
214 |
msgstr ""
|
215 |
|
216 |
-
#: wp-useronline.php:
|
217 |
msgid "1 Member"
|
218 |
msgstr ""
|
219 |
|
220 |
-
#: wp-useronline.php:
|
221 |
msgid "%COUNT% Members"
|
222 |
msgstr ""
|
223 |
|
224 |
-
#: wp-useronline.php:
|
225 |
msgid "1 Guest"
|
226 |
msgstr ""
|
227 |
|
228 |
-
#: wp-useronline.php:
|
229 |
msgid "%COUNT% Guests"
|
230 |
msgstr ""
|
231 |
|
232 |
-
#: wp-useronline.php:
|
233 |
msgid "1 Bot"
|
234 |
msgstr ""
|
235 |
|
236 |
-
#: wp-useronline.php:
|
237 |
msgid "%COUNT% Bots"
|
238 |
msgstr ""
|
239 |
|
240 |
-
#: wp-useronline.php:
|
241 |
msgid "Online"
|
242 |
msgstr ""
|
243 |
|
244 |
-
#: wp-useronline.php:
|
245 |
-
#: wp-useronline.php:
|
246 |
msgid ","
|
247 |
msgstr ""
|
248 |
|
249 |
-
#: wp-useronline.php:
|
250 |
msgctxt "Template Element"
|
251 |
msgid "Users"
|
252 |
msgstr ""
|
253 |
|
254 |
-
#: wp-useronline.php:
|
255 |
msgid "Browsing This Page."
|
256 |
msgstr ""
|
257 |
|
258 |
-
#:
|
259 |
-
msgid "
|
260 |
msgstr ""
|
261 |
|
262 |
-
#:
|
263 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
264 |
msgstr ""
|
1 |
+
# Translation of the WordPress plugin WP-UserOnline 2.70-beta by Lester 'GaMerZ' Chan & scribu.
|
2 |
+
# Copyright (C) 2010 Lester 'GaMerZ' Chan & scribu
|
3 |
+
# This file is distributed under the same license as the WP-UserOnline package.
|
4 |
+
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
5 |
+
#
|
6 |
+
#, fuzzy
|
7 |
msgid ""
|
8 |
msgstr ""
|
9 |
+
"Project-Id-Version: WP-UserOnline 2.70-beta\n"
|
10 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-useronline\n"
|
11 |
+
"POT-Creation-Date: 2010-05-07 16:14+0300\n"
|
|
|
|
|
|
|
12 |
"PO-Revision-Date: 2010-MO-DA HO:MI+ZONE\n"
|
13 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
14 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
15 |
+
"MIME-Version: 1.0\n"
|
16 |
+
"Content-Type: text/plain; charset=utf-8\n"
|
17 |
+
"Content-Transfer-Encoding: 8bit\n"
|
18 |
+
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
#: admin.php:9
|
21 |
msgid "Users Online Now"
|
22 |
msgstr ""
|
23 |
|
24 |
+
#. #-#-#-#-# wp-useronline.pot (WP-UserOnline 2.70-beta) #-#-#-#-#
|
25 |
+
#. Plugin Name of the plugin/theme
|
26 |
#: admin.php:10 wp-stats.php:14 wp-stats.php:31
|
27 |
msgid "WP-UserOnline"
|
28 |
msgstr ""
|
29 |
|
30 |
+
#: admin.php:24
|
31 |
+
#, php-format
|
32 |
msgid "There is <strong><a href='%s'>%s user</a></strong> online now."
|
33 |
msgid_plural ""
|
34 |
"There are a total of <strong><a href='%s'>%s users</a></strong> online now."
|
35 |
msgstr[0] ""
|
36 |
msgstr[1] ""
|
37 |
|
38 |
+
#: admin.php:51
|
39 |
msgid "UserOnline Options"
|
40 |
msgstr ""
|
41 |
|
42 |
+
#: admin.php:52 widget.php:6 widget.php:49
|
43 |
+
msgid "UserOnline"
|
44 |
+
msgstr ""
|
45 |
+
|
46 |
+
#: admin.php:107
|
47 |
msgid "Time Out"
|
48 |
msgstr ""
|
49 |
|
50 |
+
#: admin.php:110
|
51 |
+
msgid "How long until it will remove the user from the database (In seconds)."
|
52 |
msgstr ""
|
53 |
|
54 |
+
#: admin.php:115
|
55 |
msgid "UserOnline URL"
|
56 |
msgstr ""
|
57 |
|
58 |
+
#: admin.php:118
|
59 |
msgid ""
|
60 |
"URL To UserOnline Page<br />Example: http://www.yoursite.com/useronline/<br /"
|
61 |
">Example: http://www.yoursite.com/?page_id=2"
|
62 |
msgstr ""
|
63 |
|
64 |
+
#: admin.php:122
|
65 |
msgid "User Names"
|
66 |
msgstr ""
|
67 |
|
68 |
+
#: admin.php:125
|
69 |
msgid "Link user names to their author page"
|
70 |
msgstr ""
|
71 |
|
72 |
+
#: admin.php:142
|
73 |
msgid "Useronline Templates"
|
74 |
msgstr ""
|
75 |
|
76 |
+
#: admin.php:154
|
77 |
msgid "User(s) Browsing Site:"
|
78 |
msgstr ""
|
79 |
|
80 |
+
#: admin.php:155
|
81 |
msgid "User(s) Browsing Page:"
|
82 |
msgstr ""
|
83 |
|
84 |
+
#: admin.php:168 scb/AdminPage.php:179 scb/AdminPage.php:190
|
85 |
msgid "Save Changes"
|
86 |
msgstr ""
|
87 |
|
88 |
+
#: admin.php:178
|
89 |
msgid "Naming Conventions:"
|
90 |
msgstr ""
|
91 |
|
92 |
+
#: admin.php:179 admin.php:219 admin.php:241
|
93 |
msgid "Allowed Variables:"
|
94 |
msgstr ""
|
95 |
|
96 |
+
#: admin.php:181
|
97 |
msgid "Restore Defaults"
|
98 |
msgstr ""
|
99 |
|
100 |
+
#: admin.php:187
|
101 |
msgid "Singular Form"
|
102 |
msgstr ""
|
103 |
|
104 |
+
#: admin.php:188
|
105 |
msgid "Plural Form"
|
106 |
msgstr ""
|
107 |
|
108 |
+
#: admin.php:218
|
109 |
msgid "User(s) Online:"
|
110 |
msgstr ""
|
111 |
|
112 |
+
#: admin.php:224 admin.php:249
|
113 |
msgid "Restore Default Template"
|
114 |
msgstr ""
|
115 |
|
116 |
+
#: admin.php:255
|
117 |
msgid "Member Names Separator"
|
118 |
msgstr ""
|
119 |
|
120 |
+
#: admin.php:256
|
121 |
msgid "Guests Separator"
|
122 |
msgstr ""
|
123 |
|
124 |
+
#: admin.php:257
|
125 |
msgid "Bots Separator"
|
126 |
msgstr ""
|
127 |
|
128 |
+
#: scb/AdminPage.php:166
|
129 |
+
msgid "Settings <strong>saved</strong>."
|
130 |
+
msgstr ""
|
|
|
|
|
131 |
|
132 |
+
#: scb/AdminPage.php:376
|
133 |
+
msgid "Settings"
|
134 |
+
msgstr ""
|
135 |
+
|
136 |
+
#: template-tags.php:79
|
137 |
+
#, php-format
|
138 |
msgid ""
|
139 |
"There is <strong>%s</strong> online now: <strong>%s</strong>, <strong>%s</"
|
140 |
"strong> and <strong>%s</strong>."
|
144 |
msgstr[0] ""
|
145 |
msgstr[1] ""
|
146 |
|
147 |
+
#: template-tags.php:181
|
148 |
msgid "No one is online now."
|
149 |
msgstr ""
|
150 |
|
151 |
+
#: template-tags.php:183
|
152 |
msgid "on"
|
153 |
msgstr ""
|
154 |
|
155 |
+
#: template-tags.php:184
|
156 |
msgid "url"
|
157 |
msgstr ""
|
158 |
|
159 |
+
#: template-tags.php:185
|
160 |
msgid "referral"
|
161 |
msgstr ""
|
162 |
|
163 |
+
#: template-tags.php:196
|
164 |
msgid "Online Now"
|
165 |
msgstr ""
|
166 |
|
167 |
+
#: template-tags.php:227
|
168 |
+
#, php-format
|
169 |
msgid "%s @ %s"
|
170 |
msgstr ""
|
171 |
|
172 |
+
#: template-tags.php:247
|
173 |
+
#, php-format
|
174 |
msgid "Most users ever online were <strong>%s</strong>, on <strong>%s</strong>"
|
175 |
msgstr ""
|
176 |
|
177 |
+
#: widget.php:5
|
178 |
+
msgid "WP-UserOnline users online statistics"
|
179 |
msgstr ""
|
180 |
|
181 |
+
#: widget.php:56
|
182 |
+
msgid "Title:"
|
183 |
msgstr ""
|
184 |
|
185 |
+
#: widget.php:59
|
186 |
+
msgid "Statistics Type:"
|
187 |
msgstr ""
|
188 |
|
189 |
+
#: widget.php:61
|
190 |
+
msgid "Users Online Count"
|
191 |
+
msgstr ""
|
192 |
+
|
193 |
+
#: widget.php:62
|
194 |
+
msgid "Users Browsing Current Page"
|
195 |
+
msgstr ""
|
196 |
+
|
197 |
+
#: widget.php:63
|
198 |
+
msgid "Users Browsing Site"
|
199 |
+
msgstr ""
|
200 |
+
|
201 |
+
#: widget.php:65
|
202 |
+
msgid "Users Online Count & Users Browsing Current Page"
|
203 |
+
msgstr ""
|
204 |
+
|
205 |
+
#: widget.php:66
|
206 |
+
msgid "Users Online Count & Users Browsing Site"
|
207 |
+
msgstr ""
|
208 |
+
|
209 |
+
#: wp-stats.php:24
|
210 |
+
#, php-format
|
211 |
+
msgid "<strong>%s</strong> user online now."
|
212 |
+
msgid_plural "<strong>%s</strong> users online now."
|
213 |
+
msgstr[0] ""
|
214 |
+
msgstr[1] ""
|
215 |
+
|
216 |
+
#: wp-useronline.php:83
|
217 |
msgid "1 User"
|
218 |
msgstr ""
|
219 |
|
220 |
+
#: wp-useronline.php:84
|
221 |
msgid "%COUNT% Users"
|
222 |
msgstr ""
|
223 |
|
224 |
+
#: wp-useronline.php:85
|
225 |
msgid "1 Member"
|
226 |
msgstr ""
|
227 |
|
228 |
+
#: wp-useronline.php:86
|
229 |
msgid "%COUNT% Members"
|
230 |
msgstr ""
|
231 |
|
232 |
+
#: wp-useronline.php:87
|
233 |
msgid "1 Guest"
|
234 |
msgstr ""
|
235 |
|
236 |
+
#: wp-useronline.php:88
|
237 |
msgid "%COUNT% Guests"
|
238 |
msgstr ""
|
239 |
|
240 |
+
#: wp-useronline.php:89
|
241 |
msgid "1 Bot"
|
242 |
msgstr ""
|
243 |
|
244 |
+
#: wp-useronline.php:90
|
245 |
msgid "%COUNT% Bots"
|
246 |
msgstr ""
|
247 |
|
248 |
+
#: wp-useronline.php:94
|
249 |
msgid "Online"
|
250 |
msgstr ""
|
251 |
|
252 |
+
#: wp-useronline.php:98 wp-useronline.php:99 wp-useronline.php:100
|
253 |
+
#: wp-useronline.php:107 wp-useronline.php:108 wp-useronline.php:109
|
254 |
msgid ","
|
255 |
msgstr ""
|
256 |
|
257 |
+
#: wp-useronline.php:102 wp-useronline.php:111
|
258 |
msgctxt "Template Element"
|
259 |
msgid "Users"
|
260 |
msgstr ""
|
261 |
|
262 |
+
#: wp-useronline.php:111
|
263 |
msgid "Browsing This Page."
|
264 |
msgstr ""
|
265 |
|
266 |
+
#: wp-useronline.php:210
|
267 |
+
msgid "Guest"
|
268 |
msgstr ""
|
269 |
|
270 |
+
#: wp-useronline.php:217
|
271 |
+
msgid "Admin"
|
272 |
+
msgstr ""
|
273 |
+
|
274 |
+
#: wp-useronline.php:223
|
275 |
+
msgid "Archive"
|
276 |
+
msgstr ""
|
277 |
+
|
278 |
+
#. Plugin URI of the plugin/theme
|
279 |
+
msgid "http://wordpress.org/extend/plugins/wp-useronline/"
|
280 |
+
msgstr ""
|
281 |
+
|
282 |
+
#. Description of the plugin/theme
|
283 |
+
msgid ""
|
284 |
+
"Enable you to display how many users are online on your Wordpress blog with "
|
285 |
+
"detailed statistics of where they are and who there are(Members/Guests/"
|
286 |
+
"Search Bots)."
|
287 |
+
msgstr ""
|
288 |
+
|
289 |
+
#. Author of the plugin/theme
|
290 |
+
msgid "Lester 'GaMerZ' Chan & scribu"
|
291 |
msgstr ""
|
readme.txt
CHANGED
@@ -1,20 +1,20 @@
|
|
1 |
=== WP-UserOnline ===
|
2 |
-
Contributors: GamerZ, scribu
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
10 |
Enable you to display how many users are online on your Wordpress blog with detailed statistics.
|
11 |
|
12 |
== Description ==
|
13 |
|
|
|
|
|
14 |
This plugin enables you to display how many users are online on your Wordpress site, with detailed statistics of where they are and who they are (Members/Guests/Search Bots).
|
15 |
|
16 |
-
|
17 |
-
* [https://github.com/lesterchan/wp-useronline](https://github.com/lesterchan/wp-useronline "https://github.com/lesterchan/wp-useronline")
|
18 |
|
19 |
== Installation ==
|
20 |
|
@@ -23,13 +23,18 @@ You can either install it automatically from the WordPress admin, or do it manua
|
|
23 |
1. Unzip the archive and put the `wp-useronline` folder into your plugins folder (/wp-content/plugins/).
|
24 |
1. Activate the plugin from the Plugins menu.
|
25 |
|
26 |
-
=
|
|
|
|
|
|
|
27 |
1. Go to `WP-Admin -> Appearance -> Widgets`
|
28 |
1. The widget name is <strong>UserOnline</strong>.
|
29 |
1. Scroll down for instructions on how to create a *UserOnline Page*.
|
30 |
|
31 |
-
|
32 |
-
|
|
|
|
|
33 |
|
34 |
`
|
35 |
<?php if (function_exists('users_online')): ?>
|
@@ -37,83 +42,59 @@ You can either install it automatically from the WordPress admin, or do it manua
|
|
37 |
<?php endif; ?>
|
38 |
`
|
39 |
|
40 |
-
|
|
|
41 |
1. Go to `WP-Admin -> Pages -> Add New`
|
42 |
1. Type any title you like in the post's title area
|
43 |
-
1. If you ARE using nice permalinks, after typing the title, WordPress will generate the permalink to the page. You will see an 'Edit' link just beside the permalink.
|
44 |
1. Click 'Edit' and type in `useronline` in the text field and click 'Save'.
|
45 |
1. Type `[page_useronline]` in the post's content area
|
46 |
1. Click 'Publish'
|
47 |
|
48 |
-
If you ARE NOT using nice permalinks, you need to go to `WP-Admin -> Settings -> UserOnline` and under 'UserOnline URL', you need to fill in the URL to the UserOnline Page you created above.
|
49 |
|
50 |
-
|
51 |
|
52 |
-
|
53 |
-
2. Admin page
|
54 |
-
3. Settings page
|
55 |
-
|
56 |
-
== Frequently Asked Questions ==
|
57 |
|
58 |
-
= To Display Most Number Of Users Online =
|
59 |
-
* Use:
|
60 |
`
|
61 |
<?php if (function_exists('get_most_users_online')): ?>
|
62 |
<p>Most Users Ever Online Is <?php echo get_most_users_online(); ?> On <?php echo get_most_users_online_date(); ?></p>
|
63 |
<?php endif; ?>
|
64 |
`
|
65 |
|
66 |
-
|
67 |
-
|
68 |
`
|
69 |
<?php if (function_exists('get_users_browsing_site')): ?>
|
70 |
<div id="useronline-browsing-site"><?php echo get_users_browsing_site(); ?></div>
|
71 |
<?php endif; ?>
|
72 |
`
|
73 |
|
74 |
-
|
75 |
-
|
76 |
`
|
77 |
<?php if (function_exists('get_users_browsing_page')): ?>
|
78 |
<div id="useronline-browsing-page"><?php echo get_users_browsing_page(); ?></div>
|
79 |
<?php endif; ?>
|
80 |
`
|
81 |
|
82 |
-
|
83 |
-
|
84 |
-
Make sure your host is running PHP 5. The only foolproof way to do this is to add this line to wp-config.php (after the opening `<?php` tag):
|
85 |
-
|
86 |
-
`var_dump(PHP_VERSION);`
|
87 |
-
|
88 |
-
== Changelog ==
|
89 |
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
* Fixed 'Strict Standards: Non-static method' warnings
|
94 |
-
* Update scb Framework
|
95 |
|
96 |
-
|
97 |
-
* show most recent visitors first
|
98 |
-
* fix duplicate entry errors
|
99 |
-
* fix ajax requests for SSL
|
100 |
|
101 |
-
=
|
102 |
-
* fixed settings page
|
103 |
-
* fixed "Return to default" buttons
|
104 |
-
* show user list in admin only to users with 'manage_options' capability
|
105 |
-
* added 'useronline_bots' filter
|
106 |
|
107 |
-
|
108 |
-
* don't show url and referral links for users in the admin area
|
109 |
-
* smarter detection via ajax requests
|
110 |
-
* fix SQL errors
|
111 |
|
112 |
-
|
113 |
-
|
114 |
|
115 |
-
|
116 |
-
* fix %USERONLINE_COUNT% problem
|
117 |
|
118 |
= 2.70 =
|
119 |
* added option to link user names to their author page
|
@@ -240,3 +221,4 @@ Make sure your host is running PHP 5. The only foolproof way to do this is to ad
|
|
240 |
* new: Page Title Added To wp-useronline.php
|
241 |
* new: Added Extra Bots, Credit To Greg Perry (http://www.gregrperry.com/)
|
242 |
* fixed: Cleaner Codes
|
|
1 |
=== WP-UserOnline ===
|
2 |
+
Contributors: GamerZ, scribu
|
3 |
+
Donate link: http://lesterchan.net/wordpress
|
4 |
+
Tags: useronline, usersonline, wp-useronline, online, users, user, ajax, widget
|
5 |
+
Requires at least: 2.9
|
6 |
+
Tested up to: 3.0
|
7 |
+
Stable tag: 2.70
|
|
|
8 |
|
9 |
Enable you to display how many users are online on your Wordpress blog with detailed statistics.
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
+
**PHP 5 is required since version 2.60.**
|
14 |
+
|
15 |
This plugin enables you to display how many users are online on your Wordpress site, with detailed statistics of where they are and who they are (Members/Guests/Search Bots).
|
16 |
|
17 |
+
[Translations](http://scribu.net/wordpress/translating-plugins.html)
|
|
|
18 |
|
19 |
== Installation ==
|
20 |
|
23 |
1. Unzip the archive and put the `wp-useronline` folder into your plugins folder (/wp-content/plugins/).
|
24 |
1. Activate the plugin from the Plugins menu.
|
25 |
|
26 |
+
= Usage =
|
27 |
+
|
28 |
+
**General Usage (With Widget)**
|
29 |
+
|
30 |
1. Go to `WP-Admin -> Appearance -> Widgets`
|
31 |
1. The widget name is <strong>UserOnline</strong>.
|
32 |
1. Scroll down for instructions on how to create a *UserOnline Page*.
|
33 |
|
34 |
+
|
35 |
+
**General Usage (Without Widget)**
|
36 |
+
|
37 |
+
Open `wp-content/themes/<YOUR THEME NAME>/sidebar.php` and add Anywhere:
|
38 |
|
39 |
`
|
40 |
<?php if (function_exists('users_online')): ?>
|
42 |
<?php endif; ?>
|
43 |
`
|
44 |
|
45 |
+
**UserOnline Page**
|
46 |
+
|
47 |
1. Go to `WP-Admin -> Pages -> Add New`
|
48 |
1. Type any title you like in the post's title area
|
49 |
+
1. If you **ARE** using nice permalinks, after typing the title, WordPress will generate the permalink to the page. You will see an 'Edit' link just beside the permalink.
|
50 |
1. Click 'Edit' and type in `useronline` in the text field and click 'Save'.
|
51 |
1. Type `[page_useronline]` in the post's content area
|
52 |
1. Click 'Publish'
|
53 |
|
54 |
+
If you **ARE NOT** using nice permalinks, you need to go to `WP-Admin -> Settings -> UserOnline` and under 'UserOnline URL', you need to fill in the URL to the UserOnline Page you created above.
|
55 |
|
56 |
+
**UserOnline Stats (Outside WP Loop)**
|
57 |
|
58 |
+
To Display *Most Number Of Users Online* use:
|
|
|
|
|
|
|
|
|
59 |
|
|
|
|
|
60 |
`
|
61 |
<?php if (function_exists('get_most_users_online')): ?>
|
62 |
<p>Most Users Ever Online Is <?php echo get_most_users_online(); ?> On <?php echo get_most_users_online_date(); ?></p>
|
63 |
<?php endif; ?>
|
64 |
`
|
65 |
|
66 |
+
To Display *Users Browsing Site* use:
|
67 |
+
|
68 |
`
|
69 |
<?php if (function_exists('get_users_browsing_site')): ?>
|
70 |
<div id="useronline-browsing-site"><?php echo get_users_browsing_site(); ?></div>
|
71 |
<?php endif; ?>
|
72 |
`
|
73 |
|
74 |
+
To Display *Users Browsing A Page* use:
|
75 |
+
|
76 |
`
|
77 |
<?php if (function_exists('get_users_browsing_page')): ?>
|
78 |
<div id="useronline-browsing-page"><?php echo get_users_browsing_page(); ?></div>
|
79 |
<?php endif; ?>
|
80 |
`
|
81 |
|
82 |
+
== Screenshots ==
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
|
84 |
+
1. Right Now text
|
85 |
+
2. Admin page
|
86 |
+
3. Settings page
|
|
|
|
|
87 |
|
88 |
+
== Frequently Asked Questions ==
|
|
|
|
|
|
|
89 |
|
90 |
+
= Error on activation: "Parse error: syntax error, unexpected..." =
|
|
|
|
|
|
|
|
|
91 |
|
92 |
+
Make sure your host is running PHP 5. The only foolproof way to do this is to add this line to wp-config.php:
|
|
|
|
|
|
|
93 |
|
94 |
+
`var_dump(PHP_VERSION);`
|
95 |
+
<br>
|
96 |
|
97 |
+
== Changelog ==
|
|
|
98 |
|
99 |
= 2.70 =
|
100 |
* added option to link user names to their author page
|
221 |
* new: Page Title Added To wp-useronline.php
|
222 |
* new: Added Extra Bots, Credit To Greg Perry (http://www.gregrperry.com/)
|
223 |
* fixed: Cleaner Codes
|
224 |
+
|
scb/AdminPage.php
CHANGED
@@ -1,23 +1,22 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
|
|
|
|
|
|
|
6 |
abstract class scbAdminPage {
|
7 |
/** Page args
|
8 |
-
* $
|
9 |
-
* $
|
10 |
-
* $
|
11 |
-
* $
|
12 |
-
* $
|
13 |
-
* $
|
14 |
-
* $
|
15 |
-
* - $icon_url (string) URL to an icon for the top level menu
|
16 |
-
* - $position (int) Position of the toplevel menu (caution!)
|
17 |
-
* $screen_icon (string) The icon type to use in the screen header
|
18 |
* $nonce string (default: $page_slug)
|
19 |
-
* $action_link
|
20 |
-
* $admin_action_priority int The priority that the admin_menu action should be executed at (default: 10)
|
21 |
*/
|
22 |
protected $args;
|
23 |
|
@@ -36,481 +35,431 @@ abstract class scbAdminPage {
|
|
36 |
// l10n
|
37 |
protected $textdomain;
|
38 |
|
|
|
|
|
|
|
39 |
|
40 |
// ____________REGISTRATION COMPONENT____________
|
41 |
|
42 |
|
43 |
private static $registered = array();
|
44 |
|
45 |
-
|
46 |
-
|
47 |
-
* @param string $file
|
48 |
-
* @param scbOptions $options
|
49 |
-
*
|
50 |
-
* @return bool
|
51 |
-
*/
|
52 |
-
static function register( $class, $file, $options = null ) {
|
53 |
-
if ( isset( self::$registered[$class] ) )
|
54 |
return false;
|
55 |
|
56 |
-
self::$registered[$class] = array(
|
57 |
|
58 |
-
add_action(
|
59 |
|
60 |
return true;
|
61 |
}
|
62 |
|
63 |
-
|
64 |
-
|
65 |
-
* @param string $new_class
|
66 |
-
*
|
67 |
-
* @return bool
|
68 |
-
*/
|
69 |
-
static function replace( $old_class, $new_class ) {
|
70 |
-
if ( ! isset( self::$registered[$old_class] ) )
|
71 |
return false;
|
72 |
|
73 |
self::$registered[$new_class] = self::$registered[$old_class];
|
74 |
-
unset(
|
75 |
|
76 |
return true;
|
77 |
}
|
78 |
|
79 |
-
|
80 |
-
|
81 |
-
*
|
82 |
-
* @return bool
|
83 |
-
*/
|
84 |
-
static function remove( $class ) {
|
85 |
-
if ( ! isset( self::$registered[$class] ) )
|
86 |
return false;
|
87 |
|
88 |
-
unset(
|
89 |
|
90 |
return true;
|
91 |
}
|
92 |
|
93 |
static function _pages_init() {
|
94 |
foreach ( self::$registered as $class => $args )
|
95 |
-
new $class(
|
96 |
}
|
97 |
|
98 |
|
99 |
// ____________MAIN METHODS____________
|
100 |
|
101 |
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
* @param string|bool $file
|
106 |
-
* @param scbOptions $options
|
107 |
-
*/
|
108 |
-
function __construct( $file = false, $options = null ) {
|
109 |
-
if ( is_a( $options, 'scbOptions' ) )
|
110 |
$this->options = $options;
|
|
|
|
|
|
|
|
|
|
|
111 |
|
112 |
$this->setup();
|
113 |
$this->check_args();
|
114 |
|
115 |
-
if ( isset(
|
116 |
-
add_action(
|
117 |
-
|
|
|
118 |
}
|
119 |
|
120 |
-
add_action(
|
121 |
-
add_filter(
|
122 |
-
|
123 |
-
if ( $file ) {
|
124 |
-
$this->file = $file;
|
125 |
-
$this->plugin_url = plugin_dir_url( $file );
|
126 |
|
127 |
-
|
128 |
-
|
129 |
-
}
|
130 |
}
|
131 |
|
132 |
-
|
133 |
-
* This is where all the page args can be set
|
134 |
-
*/
|
135 |
function setup(){}
|
136 |
|
137 |
-
|
138 |
-
|
139 |
-
*
|
140 |
-
* Useful for calling $screen->add_help_tab() etc.
|
141 |
-
*/
|
142 |
-
function page_loaded() {
|
143 |
-
$this->form_handler();
|
144 |
-
}
|
145 |
-
|
146 |
-
/**
|
147 |
-
* This is where the css and js go
|
148 |
-
* Both wp_enqueue_*() and inline code can be added
|
149 |
-
*/
|
150 |
function page_head(){}
|
151 |
|
152 |
-
|
153 |
-
|
154 |
-
* @return string
|
155 |
-
*/
|
156 |
function page_help(){}
|
157 |
|
158 |
-
|
159 |
-
* A generic page header
|
160 |
-
*/
|
161 |
function page_header() {
|
162 |
echo "<div class='wrap'>\n";
|
163 |
-
screen_icon(
|
164 |
-
echo
|
165 |
}
|
166 |
|
167 |
-
|
168 |
-
* This is where the page content goes
|
169 |
-
*/
|
170 |
abstract function page_content();
|
171 |
|
172 |
-
|
173 |
-
* A generic page footer
|
174 |
-
*/
|
175 |
function page_footer() {
|
176 |
echo "</div>\n";
|
177 |
}
|
178 |
|
179 |
-
|
180 |
-
|
181 |
-
*
|
182 |
-
* @param array $new_data
|
183 |
-
* @param array $old_data
|
184 |
-
*
|
185 |
-
* @return array
|
186 |
-
*/
|
187 |
-
function validate( $new_data, $old_data ) {
|
188 |
return $new_data;
|
189 |
}
|
190 |
|
191 |
-
|
192 |
-
* Manually handle option saving ( use Settings API instead )
|
193 |
-
*
|
194 |
-
* @return bool
|
195 |
-
*/
|
196 |
function form_handler() {
|
197 |
-
if ( empty(
|
198 |
-
return false;
|
199 |
-
|
200 |
-
check_admin_referer( $this->nonce );
|
201 |
-
|
202 |
-
if ( !isset($this->options) ) {
|
203 |
-
trigger_error( 'options handler not set', E_USER_WARNING );
|
204 |
return false;
|
205 |
-
}
|
206 |
|
207 |
-
|
208 |
|
209 |
-
$new_data =
|
|
|
|
|
210 |
|
211 |
-
$new_data =
|
212 |
|
213 |
-
$this->
|
214 |
|
215 |
-
|
|
|
216 |
|
217 |
-
|
218 |
}
|
219 |
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
* @param string $class
|
225 |
-
*/
|
226 |
-
function admin_msg( $msg = '', $class = 'updated' ) {
|
227 |
-
if ( empty( $msg ) )
|
228 |
-
$msg = __( 'Settings <strong>saved</strong>.', $this->textdomain );
|
229 |
|
230 |
-
echo
|
231 |
}
|
232 |
|
233 |
|
234 |
// ____________UTILITIES____________
|
235 |
|
236 |
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
function submit_button( $value = '', $action = 'submit', $class = 'button' ) {
|
247 |
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
254 |
|
255 |
-
return
|
256 |
}
|
257 |
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
*
|
276 |
-
* @return string
|
277 |
-
*/
|
278 |
-
function form_wrap( $content, $submit_button = true ) {
|
279 |
-
if ( is_array( $submit_button ) ) {
|
280 |
-
$content .= $this->submit_button( $submit_button );
|
281 |
} elseif ( true === $submit_button ) {
|
282 |
$content .= $this->submit_button();
|
283 |
-
} elseif ( false !== strpos(
|
284 |
-
$content .= $submit_button;
|
285 |
-
} elseif ( false !== strpos( $submit_button, '<button' ) ) {
|
286 |
$content .= $submit_button;
|
287 |
} elseif ( false !== $submit_button ) {
|
288 |
-
$button_args = array_slice(
|
289 |
-
$content
|
290 |
}
|
291 |
|
292 |
-
return scbForms::form_wrap(
|
293 |
}
|
294 |
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
*/
|
303 |
-
function form_table( $rows, $formdata = false ) {
|
304 |
$output = '';
|
305 |
foreach ( $rows as $row )
|
306 |
-
$output .= $this->table_row(
|
307 |
|
308 |
-
$output = $this->form_table_wrap(
|
309 |
|
310 |
return $output;
|
311 |
}
|
312 |
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
*
|
318 |
-
* @return string
|
319 |
-
*/
|
320 |
-
function form_table_wrap( $content ) {
|
321 |
-
$output = $this->table_wrap( $content );
|
322 |
-
$output = $this->form_wrap( $output );
|
323 |
|
324 |
return $output;
|
325 |
}
|
326 |
|
327 |
-
|
328 |
-
|
329 |
-
*
|
330 |
-
* @param array $rows
|
331 |
-
* @param array|boolean $formdata
|
332 |
-
*
|
333 |
-
* @return string
|
334 |
-
*/
|
335 |
-
function table( $rows, $formdata = false ) {
|
336 |
$output = '';
|
337 |
foreach ( $rows as $row )
|
338 |
-
$output .= $this->table_row(
|
339 |
|
340 |
-
$output = $this->table_wrap(
|
341 |
|
342 |
return $output;
|
343 |
}
|
344 |
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
* @param array $args
|
349 |
-
* @param array|boolean $formdata
|
350 |
-
*
|
351 |
-
* @return string
|
352 |
-
*/
|
353 |
-
function table_row( $args, $formdata = false ) {
|
354 |
-
return $this->row_wrap( $args['title'], $this->input( $args, $formdata ) );
|
355 |
}
|
356 |
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
* @param string $method
|
363 |
-
* @param array $args
|
364 |
-
*
|
365 |
-
* @return mixed
|
366 |
-
*/
|
367 |
-
function __call( $method, $args ) {
|
368 |
-
if ( in_array( $method, array( 'input', 'form' ) ) ) {
|
369 |
-
if ( empty( $args[1] ) && isset( $this->options ) )
|
370 |
-
$args[1] = $this->options->get();
|
371 |
|
372 |
-
|
373 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
374 |
}
|
375 |
|
376 |
-
return
|
377 |
}
|
378 |
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
* @param string $string
|
383 |
-
*
|
384 |
-
* @return string
|
385 |
-
*/
|
386 |
-
function js_wrap( $string ) {
|
387 |
-
return html( "script type='text/javascript'", $string );
|
388 |
}
|
389 |
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
return html( "style type='text/css'", $string );
|
399 |
}
|
400 |
|
401 |
|
402 |
// ____________INTERNAL METHODS____________
|
403 |
|
404 |
|
405 |
-
|
406 |
-
* Registers a page
|
407 |
-
*/
|
408 |
function page_init() {
|
|
|
409 |
|
410 |
-
if ( ! $
|
411 |
-
$this->pagehook = add_submenu_page(
|
412 |
-
$this->args['parent'],
|
413 |
-
$this->args['page_title'],
|
414 |
-
$this->args['menu_title'],
|
415 |
-
$this->args['capability'],
|
416 |
-
$this->args['page_slug'],
|
417 |
-
array( $this, '_page_content_hook' )
|
418 |
-
);
|
419 |
} else {
|
420 |
-
$func = 'add_' . $
|
421 |
-
$this->pagehook = $func(
|
422 |
-
$this->args['page_title'],
|
423 |
-
$this->args['menu_title'],
|
424 |
-
$this->args['capability'],
|
425 |
-
$this->args['page_slug'],
|
426 |
-
null,
|
427 |
-
$this->args['icon_url'],
|
428 |
-
$this->args['position']
|
429 |
-
);
|
430 |
-
|
431 |
-
add_submenu_page(
|
432 |
-
$this->args['page_slug'],
|
433 |
-
$this->args['page_title'],
|
434 |
-
$this->args['submenu_title'],
|
435 |
-
$this->args['capability'],
|
436 |
-
$this->args['page_slug'],
|
437 |
-
array( $this, '_page_content_hook' )
|
438 |
-
);
|
439 |
}
|
440 |
|
441 |
if ( ! $this->pagehook )
|
442 |
return;
|
443 |
|
444 |
-
|
|
|
|
|
|
|
445 |
|
446 |
-
add_action(
|
447 |
}
|
448 |
|
449 |
function option_init() {
|
450 |
-
register_setting(
|
451 |
}
|
452 |
|
453 |
private function check_args() {
|
454 |
-
if ( empty(
|
455 |
-
trigger_error(
|
456 |
-
|
457 |
-
$this->args = wp_parse_args(
|
458 |
-
'toplevel'
|
459 |
-
'
|
460 |
-
'
|
461 |
-
'
|
462 |
-
'
|
463 |
-
'
|
464 |
-
'
|
465 |
-
'
|
466 |
-
'
|
467 |
-
|
468 |
-
|
469 |
-
) )
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
if ( empty( $this->args['page_slug'] ) )
|
475 |
-
$this->args['page_slug'] = sanitize_title_with_dashes( $this->args['menu_title'] );
|
476 |
-
|
477 |
-
if ( empty( $this->args['nonce'] ) )
|
478 |
$this->nonce = $this->args['page_slug'];
|
479 |
}
|
480 |
|
481 |
-
|
482 |
-
|
483 |
-
* @param string|object $screen
|
484 |
-
*
|
485 |
-
* @return string
|
486 |
-
*/
|
487 |
-
function _contextual_help( $help, $screen ) {
|
488 |
-
if ( is_object( $screen ) )
|
489 |
$screen = $screen->id;
|
490 |
|
491 |
-
$actual_help = $this->page_help()
|
492 |
-
|
493 |
-
if ( $screen == $this->pagehook && $actual_help )
|
494 |
return $actual_help;
|
495 |
|
496 |
return $help;
|
497 |
}
|
498 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
499 |
function _page_content_hook() {
|
|
|
|
|
500 |
$this->page_header();
|
501 |
$this->page_content();
|
502 |
$this->page_footer();
|
503 |
}
|
504 |
|
505 |
-
|
506 |
-
|
507 |
-
*
|
508 |
-
* @return array
|
509 |
-
*/
|
510 |
-
function _action_link( $links ) {
|
511 |
-
$url = add_query_arg( 'page', $this->args['page_slug'], admin_url( $this->args['parent'] ) );
|
512 |
|
513 |
-
$links[] = html_link(
|
514 |
|
515 |
return $links;
|
516 |
}
|
1 |
<?php
|
2 |
|
3 |
+
/*
|
4 |
+
Creates an admin page
|
5 |
+
|
6 |
+
You must set $this->args and define the page_content() method
|
7 |
+
*/
|
8 |
+
|
9 |
abstract class scbAdminPage {
|
10 |
/** Page args
|
11 |
+
* $toplevel string If not empty, will create a new top level menu
|
12 |
+
* $icon string Path to an icon for the top level menu
|
13 |
+
* $parent string (default: options-general.php)
|
14 |
+
* $capability string (default: 'manage_options')
|
15 |
+
* $page_title string (mandatory)
|
16 |
+
* $menu_title string (default: $page_title)
|
17 |
+
* $page_slug string (default: sanitized $page_title)
|
|
|
|
|
|
|
18 |
* $nonce string (default: $page_slug)
|
19 |
+
* $action_link string|bool Text of the action link on the Plugins page (default: 'Settings')
|
|
|
20 |
*/
|
21 |
protected $args;
|
22 |
|
35 |
// l10n
|
36 |
protected $textdomain;
|
37 |
|
38 |
+
// Formdata used for filling the form elements
|
39 |
+
protected $formdata = array();
|
40 |
+
|
41 |
|
42 |
// ____________REGISTRATION COMPONENT____________
|
43 |
|
44 |
|
45 |
private static $registered = array();
|
46 |
|
47 |
+
static function register($class, $file, $options = null) {
|
48 |
+
if ( isset(self::$registered[$class]) )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
return false;
|
50 |
|
51 |
+
self::$registered[$class] = array($file, $options);
|
52 |
|
53 |
+
add_action('_admin_menu', array(__CLASS__, '_pages_init'));
|
54 |
|
55 |
return true;
|
56 |
}
|
57 |
|
58 |
+
static function replace($old_class, $new_class) {
|
59 |
+
if ( ! isset(self::$registered[$old_class]) )
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
return false;
|
61 |
|
62 |
self::$registered[$new_class] = self::$registered[$old_class];
|
63 |
+
unset(self::$registered[$old_class]);
|
64 |
|
65 |
return true;
|
66 |
}
|
67 |
|
68 |
+
static function remove($class) {
|
69 |
+
if ( ! isset(self::$registered[$class]) )
|
|
|
|
|
|
|
|
|
|
|
70 |
return false;
|
71 |
|
72 |
+
unset(self::$registered[$class]);
|
73 |
|
74 |
return true;
|
75 |
}
|
76 |
|
77 |
static function _pages_init() {
|
78 |
foreach ( self::$registered as $class => $args )
|
79 |
+
new $class($args[0], $args[1]);
|
80 |
}
|
81 |
|
82 |
|
83 |
// ____________MAIN METHODS____________
|
84 |
|
85 |
|
86 |
+
// Constructor
|
87 |
+
function __construct($file, $options = NULL) {
|
88 |
+
if ( NULL !== $options ) {
|
|
|
|
|
|
|
|
|
|
|
89 |
$this->options = $options;
|
90 |
+
$this->formdata = $this->options->get();
|
91 |
+
}
|
92 |
+
|
93 |
+
$this->file = $file;
|
94 |
+
$this->plugin_url = plugin_dir_url($file);
|
95 |
|
96 |
$this->setup();
|
97 |
$this->check_args();
|
98 |
|
99 |
+
if ( isset($this->option_name) ) {
|
100 |
+
add_action('admin_init', array($this, 'option_init'));
|
101 |
+
if ( function_exists('settings_errors') )
|
102 |
+
add_action('admin_notices', 'settings_errors');
|
103 |
}
|
104 |
|
105 |
+
add_action('admin_menu', array($this, 'page_init'));
|
106 |
+
add_filter('contextual_help', array($this, '_contextual_help'), 10, 2);
|
|
|
|
|
|
|
|
|
107 |
|
108 |
+
if ( $this->args['action_link'] )
|
109 |
+
add_filter('plugin_action_links_' . plugin_basename($file), array($this, '_action_link'));
|
|
|
110 |
}
|
111 |
|
112 |
+
// This is where all the page args can be set
|
|
|
|
|
113 |
function setup(){}
|
114 |
|
115 |
+
// This is where the css and js go
|
116 |
+
// Both wp_enqueue_*() and inline code can be added
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
function page_head(){}
|
118 |
|
119 |
+
// This is where the contextual help goes
|
120 |
+
// @return string
|
|
|
|
|
121 |
function page_help(){}
|
122 |
|
123 |
+
// A generic page header
|
|
|
|
|
124 |
function page_header() {
|
125 |
echo "<div class='wrap'>\n";
|
126 |
+
screen_icon();
|
127 |
+
echo "<h2>" . $this->args['page_title'] . "</h2>\n";
|
128 |
}
|
129 |
|
130 |
+
// This is where the page content goes
|
|
|
|
|
131 |
abstract function page_content();
|
132 |
|
133 |
+
// A generic page footer
|
|
|
|
|
134 |
function page_footer() {
|
135 |
echo "</div>\n";
|
136 |
}
|
137 |
|
138 |
+
// This is where the form data should be validated
|
139 |
+
function validate($new_data, $old_data) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
140 |
return $new_data;
|
141 |
}
|
142 |
|
143 |
+
// Manually handle option saving (use Settings API instead)
|
|
|
|
|
|
|
|
|
144 |
function form_handler() {
|
145 |
+
if ( empty($_POST['action']) )
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
return false;
|
|
|
147 |
|
148 |
+
check_admin_referer($this->nonce);
|
149 |
|
150 |
+
$new_data = array();
|
151 |
+
foreach ( array_keys($this->formdata) as $key )
|
152 |
+
$new_data[$key] = @$_POST[$key];
|
153 |
|
154 |
+
$new_data = stripslashes_deep($new_data);
|
155 |
|
156 |
+
$this->formdata = $this->validate($new_data, $this->formdata);
|
157 |
|
158 |
+
if ( isset($this->options) )
|
159 |
+
$this->options->update($this->formdata);
|
160 |
|
161 |
+
$this->admin_msg();
|
162 |
}
|
163 |
|
164 |
+
// Manually generate a standard admin notice (use Settings API instead)
|
165 |
+
function admin_msg($msg = '', $class = "updated") {
|
166 |
+
if ( empty($msg) )
|
167 |
+
$msg = __('Settings <strong>saved</strong>.', $this->textdomain);
|
|
|
|
|
|
|
|
|
|
|
168 |
|
169 |
+
echo "<div class='$class fade'><p>$msg</p></div>\n";
|
170 |
}
|
171 |
|
172 |
|
173 |
// ____________UTILITIES____________
|
174 |
|
175 |
|
176 |
+
// Generates a form submit button
|
177 |
+
function submit_button($value = '', $action = 'action', $class = "button") {
|
178 |
+
if ( is_array($value) ) {
|
179 |
+
extract(wp_parse_args($value, array(
|
180 |
+
'value' => __('Save Changes', $this->textdomain),
|
181 |
+
'action' => 'action',
|
182 |
+
'class' => 'button',
|
183 |
+
'ajax' => true
|
184 |
+
)));
|
|
|
185 |
|
186 |
+
if ( ! $ajax )
|
187 |
+
$class .= ' no-ajax';
|
188 |
+
}
|
189 |
+
else {
|
190 |
+
if ( empty($value) )
|
191 |
+
$value = __('Save Changes', $this->textdomain);
|
192 |
+
}
|
193 |
+
|
194 |
+
$input_args = array(
|
195 |
+
'type' => 'submit',
|
196 |
+
'names' => $action,
|
197 |
+
'values' => $value,
|
198 |
+
'extra' => '',
|
199 |
+
'desc' => false
|
200 |
+
);
|
201 |
+
|
202 |
+
if ( ! empty($class) )
|
203 |
+
$input_args['extra'] = "class='{$class}'";
|
204 |
+
|
205 |
+
$output = "<p class='submit'>\n" . scbForms::input($input_args) . "</p>\n";
|
206 |
|
207 |
+
return $output;
|
208 |
}
|
209 |
|
210 |
+
/*
|
211 |
+
Mimics scbForms::form_wrap()
|
212 |
+
|
213 |
+
$this->form_wrap($content); // generates a form with a default submit button
|
214 |
+
|
215 |
+
$this->form_wrap($content, false); // generates a form with no submit button
|
216 |
+
|
217 |
+
// the second argument is sent to submit_button()
|
218 |
+
$this->form_wrap($content, array(
|
219 |
+
'text' => 'Save changes',
|
220 |
+
'name' => 'action',
|
221 |
+
'ajax' => true,
|
222 |
+
));
|
223 |
+
*/
|
224 |
+
function form_wrap($content, $submit_button = true) {
|
225 |
+
if ( is_array($submit_button) ) {
|
226 |
+
$content .= call_user_func(array($this, 'submit_button'), $submit_button);
|
|
|
|
|
|
|
|
|
|
|
|
|
227 |
} elseif ( true === $submit_button ) {
|
228 |
$content .= $this->submit_button();
|
229 |
+
} elseif ( false !== strpos($submit_button, '<input') ) {
|
|
|
|
|
230 |
$content .= $submit_button;
|
231 |
} elseif ( false !== $submit_button ) {
|
232 |
+
$button_args = array_slice(func_get_args(), 1);
|
233 |
+
$content .= call_user_func_array(array($this, 'submit_button'), $button_args);
|
234 |
}
|
235 |
|
236 |
+
return scbForms::form_wrap($content, $this->nonce);
|
237 |
}
|
238 |
|
239 |
+
// See scbForms::form()
|
240 |
+
function form($rows, $formdata = array()) {
|
241 |
+
return scbForms::form($rows, $formdata, $this->nonce);
|
242 |
+
}
|
243 |
+
|
244 |
+
// Generates a table wrapped in a form
|
245 |
+
function form_table($rows, $formdata = array()) {
|
|
|
|
|
246 |
$output = '';
|
247 |
foreach ( $rows as $row )
|
248 |
+
$output .= $this->table_row($row, $formdata);
|
249 |
|
250 |
+
$output = $this->form_table_wrap($output);
|
251 |
|
252 |
return $output;
|
253 |
}
|
254 |
|
255 |
+
// Wraps the given content in a <form><table>
|
256 |
+
function form_table_wrap($content) {
|
257 |
+
$output = $this->table_wrap($content);
|
258 |
+
$output = $this->form_wrap($output, $this->nonce);
|
|
|
|
|
|
|
|
|
|
|
|
|
259 |
|
260 |
return $output;
|
261 |
}
|
262 |
|
263 |
+
// Generates a form table
|
264 |
+
function table($rows, $formdata = array()) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
265 |
$output = '';
|
266 |
foreach ( $rows as $row )
|
267 |
+
$output .= $this->table_row($row, $formdata);
|
268 |
|
269 |
+
$output = $this->table_wrap($output);
|
270 |
|
271 |
return $output;
|
272 |
}
|
273 |
|
274 |
+
// Generates a table row
|
275 |
+
function table_row($args, $formdata = array()) {
|
276 |
+
return $this->row_wrap($args['title'], $this->input($args, $formdata));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
277 |
}
|
278 |
|
279 |
+
// Wraps the given content in a <table>
|
280 |
+
function table_wrap($content) {
|
281 |
+
return
|
282 |
+
html('table class="form-table"', $content);
|
283 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
284 |
|
285 |
+
// Wraps the given content in a <tr><td>
|
286 |
+
function row_wrap($title, $content) {
|
287 |
+
return
|
288 |
+
html('tr',
|
289 |
+
html('th scope="row"', $title)
|
290 |
+
.html('td', $content)
|
291 |
+
);
|
292 |
+
}
|
293 |
+
|
294 |
+
function input($args, $formdata = array()) {
|
295 |
+
if ( empty($formdata) )
|
296 |
+
$formdata = $this->formdata;
|
297 |
+
|
298 |
+
if ( isset($args['name_tree']) ) {
|
299 |
+
$tree = (array) $args['name_tree'];
|
300 |
+
unset($args['name_tree']);
|
301 |
+
|
302 |
+
$value = $formdata;
|
303 |
+
$name = $this->option_name;
|
304 |
+
foreach ( $tree as $key ) {
|
305 |
+
$value = $value[$key];
|
306 |
+
$name .= '[' . $key . ']';
|
307 |
+
}
|
308 |
+
|
309 |
+
$args['name'] = $name;
|
310 |
+
unset($args['names']);
|
311 |
+
|
312 |
+
unset($args['values']);
|
313 |
+
|
314 |
+
$formdata = array($name => $value);
|
315 |
}
|
316 |
|
317 |
+
return scbForms::input($args, $formdata);
|
318 |
}
|
319 |
|
320 |
+
// Mimic scbForms inheritance
|
321 |
+
function __call($method, $args) {
|
322 |
+
return call_user_func_array(array('scbForms', $method), $args);
|
|
|
|
|
|
|
|
|
|
|
|
|
323 |
}
|
324 |
|
325 |
+
// Wraps a string in a <script> tag
|
326 |
+
function js_wrap($string) {
|
327 |
+
return "\n<script type='text/javascript'>\n" . $string . "\n</script>\n";
|
328 |
+
}
|
329 |
+
|
330 |
+
// Wraps a string in a <style> tag
|
331 |
+
function css_wrap($string) {
|
332 |
+
return "\n<style type='text/css'>\n" . $string . "\n</style>\n";
|
|
|
333 |
}
|
334 |
|
335 |
|
336 |
// ____________INTERNAL METHODS____________
|
337 |
|
338 |
|
339 |
+
// Registers a page
|
|
|
|
|
340 |
function page_init() {
|
341 |
+
extract($this->args);
|
342 |
|
343 |
+
if ( ! $toplevel ) {
|
344 |
+
$this->pagehook = add_submenu_page($parent, $page_title, $menu_title, $capability, $page_slug, array($this, '_page_content_hook'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
345 |
} else {
|
346 |
+
$func = 'add_' . $toplevel . '_page';
|
347 |
+
$this->pagehook = $func($page_title, $menu_title, $capability, $page_slug, array($this, '_page_content_hook'), $icon_url);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
348 |
}
|
349 |
|
350 |
if ( ! $this->pagehook )
|
351 |
return;
|
352 |
|
353 |
+
if ( $ajax_submit ) {
|
354 |
+
$this->ajax_response();
|
355 |
+
add_action('admin_footer', array($this, 'ajax_submit'), 20);
|
356 |
+
}
|
357 |
|
358 |
+
add_action('admin_print_styles-' . $this->pagehook, array($this, 'page_head'));
|
359 |
}
|
360 |
|
361 |
function option_init() {
|
362 |
+
register_setting($this->option_name, $this->option_name, array($this, 'validate'));
|
363 |
}
|
364 |
|
365 |
private function check_args() {
|
366 |
+
if ( empty($this->args['page_title']) )
|
367 |
+
trigger_error('Page title cannot be empty', E_USER_WARNING);
|
368 |
+
|
369 |
+
$this->args = wp_parse_args($this->args, array(
|
370 |
+
'toplevel' => '',
|
371 |
+
'icon' => '',
|
372 |
+
'parent' => 'options-general.php',
|
373 |
+
'capability' => 'manage_options',
|
374 |
+
'menu_title' => $this->args['page_title'],
|
375 |
+
'page_slug' => '',
|
376 |
+
'nonce' => '',
|
377 |
+
'action_link' => __('Settings', $this->textdomain),
|
378 |
+
'ajax_submit' => false,
|
379 |
+
));
|
380 |
+
|
381 |
+
if ( empty($this->args['page_slug']) )
|
382 |
+
$this->args['page_slug'] = sanitize_title_with_dashes($this->args['menu_title']);
|
383 |
+
|
384 |
+
if ( empty($this->args['nonce']) )
|
|
|
|
|
|
|
|
|
|
|
385 |
$this->nonce = $this->args['page_slug'];
|
386 |
}
|
387 |
|
388 |
+
function _contextual_help($help, $screen) {
|
389 |
+
if ( is_object($screen) )
|
|
|
|
|
|
|
|
|
|
|
|
|
390 |
$screen = $screen->id;
|
391 |
|
392 |
+
if ( $screen == $this->pagehook && $actual_help = $this->page_help() )
|
|
|
|
|
393 |
return $actual_help;
|
394 |
|
395 |
return $help;
|
396 |
}
|
397 |
|
398 |
+
function ajax_response() {
|
399 |
+
if ( ! isset($_POST['_ajax_submit']) || $_POST['_ajax_submit'] != $this->pagehook )
|
400 |
+
return;
|
401 |
+
|
402 |
+
$this->form_handler();
|
403 |
+
die;
|
404 |
+
}
|
405 |
+
|
406 |
+
function ajax_submit() {
|
407 |
+
global $page_hook;
|
408 |
+
|
409 |
+
if ( $page_hook != $this->pagehook )
|
410 |
+
return;
|
411 |
+
?>
|
412 |
+
<script type="text/javascript">
|
413 |
+
jQuery(document).ready(function($){
|
414 |
+
var $spinner = $(new Image()).attr('src', '<?php echo admin_url("images/wpspin_light.gif"); ?>');
|
415 |
+
|
416 |
+
$(':submit').click(function(ev){
|
417 |
+
var $submit = $(this);
|
418 |
+
var $form = $submit.parents('form');
|
419 |
+
|
420 |
+
if ( $submit.hasClass('no-ajax') || $form.attr('method').toLowerCase() != 'post' )
|
421 |
+
return true;
|
422 |
+
|
423 |
+
var $this_spinner = $spinner.clone();
|
424 |
+
|
425 |
+
$submit.before($this_spinner).hide();
|
426 |
+
|
427 |
+
var data = $form.serializeArray();
|
428 |
+
data.push({name: $submit.attr('name'), value: $submit.val()});
|
429 |
+
data.push({name: '_ajax_submit', value: '<?php echo $this->pagehook; ?>'});
|
430 |
+
|
431 |
+
$.post(location.href, data, function(response){
|
432 |
+
var $prev = $('.wrap > .updated, .wrap > .error');
|
433 |
+
var $msg = $(response).hide().insertAfter($('.wrap h2'));
|
434 |
+
if ( $prev.length > 0 )
|
435 |
+
$prev.fadeOut('slow', function(){ $msg.fadeIn('slow'); });
|
436 |
+
else
|
437 |
+
$msg.fadeIn('slow');
|
438 |
+
|
439 |
+
$this_spinner.hide();
|
440 |
+
$submit.show();
|
441 |
+
});
|
442 |
+
|
443 |
+
ev.stopPropagation();
|
444 |
+
ev.preventDefault();
|
445 |
+
});
|
446 |
+
});
|
447 |
+
</script>
|
448 |
+
<?php
|
449 |
+
}
|
450 |
+
|
451 |
function _page_content_hook() {
|
452 |
+
$this->form_handler();
|
453 |
+
|
454 |
$this->page_header();
|
455 |
$this->page_content();
|
456 |
$this->page_footer();
|
457 |
}
|
458 |
|
459 |
+
function _action_link($links) {
|
460 |
+
$url = add_query_arg('page', $this->args['page_slug'], admin_url($this->args['parent']));
|
|
|
|
|
|
|
|
|
|
|
461 |
|
462 |
+
$links[] = html_link($url, $this->args['action_link']);
|
463 |
|
464 |
return $links;
|
465 |
}
|
scb/BoxesPage.php
DELETED
@@ -1,260 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// Admin screen with metaboxes base class
|
4 |
-
|
5 |
-
abstract class scbBoxesPage extends scbAdminPage {
|
6 |
-
/*
|
7 |
-
A box definition looks like this:
|
8 |
-
array( $slug, $title, $column );
|
9 |
-
|
10 |
-
Available columns: normal, side, column3, column4
|
11 |
-
*/
|
12 |
-
protected $boxes = array();
|
13 |
-
|
14 |
-
function __construct( $file = false, $options = null ) {
|
15 |
-
parent::__construct( $file, $options );
|
16 |
-
|
17 |
-
scbUtil::add_uninstall_hook( $this->file, array( $this, 'uninstall' ) );
|
18 |
-
}
|
19 |
-
|
20 |
-
function page_init() {
|
21 |
-
if ( !isset( $this->args['columns'] ) )
|
22 |
-
$this->args['columns'] = 2;
|
23 |
-
|
24 |
-
parent::page_init();
|
25 |
-
|
26 |
-
add_action( 'load-' . $this->pagehook, array( $this, 'boxes_init' ) );
|
27 |
-
}
|
28 |
-
|
29 |
-
function default_css() {
|
30 |
-
?>
|
31 |
-
<style type="text/css">
|
32 |
-
.postbox-container + .postbox-container {
|
33 |
-
margin-left: 18px;
|
34 |
-
}
|
35 |
-
.postbox-container {
|
36 |
-
padding-right: 0;
|
37 |
-
}
|
38 |
-
.inside {
|
39 |
-
clear: both;
|
40 |
-
overflow: hidden;
|
41 |
-
}
|
42 |
-
.inside table {
|
43 |
-
margin: 0 !important;
|
44 |
-
padding: 0 !important;
|
45 |
-
}
|
46 |
-
.inside table td {
|
47 |
-
vertical-align: middle !important;
|
48 |
-
}
|
49 |
-
.inside table .regular-text {
|
50 |
-
width: 100% !important;
|
51 |
-
}
|
52 |
-
.inside .form-table th {
|
53 |
-
width: 30%;
|
54 |
-
max-width: 200px;
|
55 |
-
padding: 10px 0 !important;
|
56 |
-
}
|
57 |
-
.inside .widefat .check-column {
|
58 |
-
padding-bottom: 7px !important;
|
59 |
-
}
|
60 |
-
.inside p,
|
61 |
-
.inside table {
|
62 |
-
margin: 0 0 10px !important;
|
63 |
-
}
|
64 |
-
.inside p.submit {
|
65 |
-
float: left !important;
|
66 |
-
padding: 0 !important;
|
67 |
-
margin-bottom: 0 !important;
|
68 |
-
}
|
69 |
-
</style>
|
70 |
-
<?php
|
71 |
-
}
|
72 |
-
|
73 |
-
function page_content() {
|
74 |
-
$this->default_css();
|
75 |
-
|
76 |
-
global $screen_layout_columns;
|
77 |
-
|
78 |
-
if ( isset( $screen_layout_columns ) ) {
|
79 |
-
$hide2 = $hide3 = $hide4 = '';
|
80 |
-
switch ( $screen_layout_columns ) {
|
81 |
-
case 4:
|
82 |
-
if( !isset( $this->args['column_widths'] ) )
|
83 |
-
$this->args['column_widths'] = array( 24.5, 24.5, 24.5, 24.5 );
|
84 |
-
break;
|
85 |
-
case 3:
|
86 |
-
if( !isset( $this->args['column_widths'] ) )
|
87 |
-
$this->args['column_widths'] = array( 32.67, 32.67, 32.67 );
|
88 |
-
$hide4 = 'display:none;';
|
89 |
-
break;
|
90 |
-
case 2:
|
91 |
-
if( !isset( $this->args['column_widths'] ) )
|
92 |
-
$this->args['column_widths'] = array( 49, 49 );
|
93 |
-
$hide3 = $hide4 = 'display:none;';
|
94 |
-
break;
|
95 |
-
default:
|
96 |
-
if( !isset( $this->args['column_widths'] ) )
|
97 |
-
$this->args['column_widths'] = array( 98 );
|
98 |
-
$hide2 = $hide3 = $hide4 = 'display:none;';
|
99 |
-
}
|
100 |
-
|
101 |
-
$this->args['column_widths'] = array_pad( $this->args['column_widths'], 4, 0 );
|
102 |
-
}
|
103 |
-
?>
|
104 |
-
<div id='<?php echo $this->pagehook ?>-widgets' class='metabox-holder'>
|
105 |
-
<?php
|
106 |
-
echo "\t<div class='postbox-container' style='width:{$this->args['column_widths'][0]}%'>\n";
|
107 |
-
do_meta_boxes( $this->pagehook, 'normal', '' );
|
108 |
-
|
109 |
-
echo "\t</div><div class='postbox-container' style='width:{$hide2}{$this->args['column_widths'][1]}%'>\n";
|
110 |
-
do_meta_boxes( $this->pagehook, 'side', '' );
|
111 |
-
|
112 |
-
echo "\t</div><div class='postbox-container' style='width:{$hide3}{$this->args['column_widths'][2]}%'>\n";
|
113 |
-
do_meta_boxes( $this->pagehook, 'column3', '' );
|
114 |
-
|
115 |
-
echo "\t</div><div class='postbox-container' style='width:{$hide4}{$this->args['column_widths'][3]}%'>\n";
|
116 |
-
do_meta_boxes( $this->pagehook, 'column4', '' );
|
117 |
-
?>
|
118 |
-
</div></div>
|
119 |
-
<?php
|
120 |
-
}
|
121 |
-
|
122 |
-
function page_footer() {
|
123 |
-
parent::page_footer();
|
124 |
-
$this->_boxes_js_init();
|
125 |
-
}
|
126 |
-
|
127 |
-
function form_handler() {
|
128 |
-
if ( empty( $_POST ) )
|
129 |
-
return;
|
130 |
-
|
131 |
-
check_admin_referer( $this->nonce );
|
132 |
-
|
133 |
-
// Box handler
|
134 |
-
foreach ( $this->boxes as $box ) {
|
135 |
-
$args = isset( $box[4] ) ? $box[4] : array();
|
136 |
-
|
137 |
-
$handler = $box[0] . '_handler';
|
138 |
-
|
139 |
-
if ( method_exists( $this, $handler ) )
|
140 |
-
call_user_func_array( array( $this, $handler ), $args );
|
141 |
-
}
|
142 |
-
}
|
143 |
-
|
144 |
-
function uninstall() {
|
145 |
-
global $wpdb;
|
146 |
-
|
147 |
-
$hook = str_replace( '-', '', $this->pagehook );
|
148 |
-
|
149 |
-
foreach ( array( 'metaboxhidden', 'closedpostboxes', 'wp_metaboxorder', 'screen_layout' ) as $option )
|
150 |
-
$keys[] = "'{$option}_{$hook}'";
|
151 |
-
|
152 |
-
$keys = '( ' . implode( ', ', $keys ) . ' )';
|
153 |
-
|
154 |
-
$wpdb->query( "
|
155 |
-
DELETE FROM {$wpdb->usermeta}
|
156 |
-
WHERE meta_key IN {$keys}
|
157 |
-
" );
|
158 |
-
}
|
159 |
-
|
160 |
-
function boxes_init() {
|
161 |
-
wp_enqueue_script( 'postbox' );
|
162 |
-
|
163 |
-
add_screen_option( 'layout_columns', array(
|
164 |
-
'max' => $this->args['columns'],
|
165 |
-
'default' => $this->args['columns']
|
166 |
-
) );
|
167 |
-
|
168 |
-
$registered = array();
|
169 |
-
|
170 |
-
foreach ( $this->boxes as $box_args ) {
|
171 |
-
$box_args = self::numeric_to_assoc( $box_args, array( 'name', 'title', 'context', 'priority', 'args' ) );
|
172 |
-
|
173 |
-
$defaults = array(
|
174 |
-
'title' => ucfirst( $box_args['name'] ),
|
175 |
-
'context' => 'normal',
|
176 |
-
'priority' => 'default',
|
177 |
-
'args' => array()
|
178 |
-
);
|
179 |
-
$box_args = array_merge( $defaults, $box_args );
|
180 |
-
|
181 |
-
$name = $box_args['name'];
|
182 |
-
|
183 |
-
if ( isset( $registered[ $name ] ) ) {
|
184 |
-
if ( empty( $box_args['args'] ) ) {
|
185 |
-
trigger_error( "Duplicate box name: $name", E_USER_NOTICE );
|
186 |
-
}
|
187 |
-
|
188 |
-
$name = $this->_increment( $name );
|
189 |
-
} else {
|
190 |
-
$registered[ $name ] = true;
|
191 |
-
}
|
192 |
-
|
193 |
-
add_meta_box(
|
194 |
-
$name,
|
195 |
-
$box_args['title'],
|
196 |
-
array( $this, '_intermediate_callback' ),
|
197 |
-
$this->pagehook,
|
198 |
-
$box_args['context'],
|
199 |
-
$box_args['priority'],
|
200 |
-
$box_args['args']
|
201 |
-
);
|
202 |
-
}
|
203 |
-
}
|
204 |
-
|
205 |
-
private static function numeric_to_assoc( $argv, $keys ) {
|
206 |
-
$args = array();
|
207 |
-
|
208 |
-
foreach ( $keys as $i => $key ) {
|
209 |
-
if ( isset( $argv[ $i ] ) )
|
210 |
-
$args[ $key ] = $argv[ $i ];
|
211 |
-
}
|
212 |
-
|
213 |
-
return $args;
|
214 |
-
}
|
215 |
-
|
216 |
-
// Since we don't pass an object to do_meta_boxes(),
|
217 |
-
// pass $box['args'] directly to each method.
|
218 |
-
function _intermediate_callback( $_, $box ) {
|
219 |
-
list( $name ) = explode( '-', $box['id'] );
|
220 |
-
|
221 |
-
call_user_func_array( array( $this, $name . '_box' ), $box['args'] );
|
222 |
-
}
|
223 |
-
|
224 |
-
private function _increment( $name ) {
|
225 |
-
$parts = explode( '-', $name );
|
226 |
-
if ( isset( $parts[1] ) )
|
227 |
-
$parts[1]++;
|
228 |
-
else
|
229 |
-
$parts[1] = 2;
|
230 |
-
|
231 |
-
return implode( '-', $parts );
|
232 |
-
}
|
233 |
-
|
234 |
-
// Adds necesary code for JS to work
|
235 |
-
function _boxes_js_init() {
|
236 |
-
echo $this->js_wrap( <<<EOT
|
237 |
-
jQuery( document ).ready( function( $ ){
|
238 |
-
// close postboxes that should be closed
|
239 |
-
$( '.if-js-closed' ).removeClass( 'if-js-closed' ).addClass( 'closed' );
|
240 |
-
// postboxes setup
|
241 |
-
postboxes.add_postbox_toggles( '$this->pagehook' );
|
242 |
-
} );
|
243 |
-
EOT
|
244 |
-
);
|
245 |
-
?>
|
246 |
-
|
247 |
-
<form style='display: none' method='get' action=''>
|
248 |
-
<p>
|
249 |
-
<?php
|
250 |
-
wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
|
251 |
-
wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false );
|
252 |
-
?>
|
253 |
-
</p>
|
254 |
-
</form>
|
255 |
-
<?php
|
256 |
-
}
|
257 |
-
}
|
258 |
-
|
259 |
-
|
260 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
scb/Cron.php
DELETED
@@ -1,184 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* wp-cron job container
|
5 |
-
*/
|
6 |
-
class scbCron {
|
7 |
-
protected $schedule;
|
8 |
-
protected $interval;
|
9 |
-
protected $time;
|
10 |
-
|
11 |
-
protected $hook;
|
12 |
-
protected $callback_args = array();
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Create a new cron job
|
16 |
-
*
|
17 |
-
* @param string|bool $file Reference to main plugin file
|
18 |
-
* @param array $args List of args:
|
19 |
-
* string $action OR callback $callback
|
20 |
-
* string $schedule OR number $interval
|
21 |
-
* array $callback_args (optional)
|
22 |
-
*/
|
23 |
-
function __construct( $file = false, $args ) {
|
24 |
-
|
25 |
-
// Set time & schedule
|
26 |
-
if ( isset( $args['time'] ) )
|
27 |
-
$this->time = $args['time'];
|
28 |
-
|
29 |
-
if ( isset( $args['interval'] ) ) {
|
30 |
-
$this->schedule = $args['interval'] . 'secs';
|
31 |
-
$this->interval = $args['interval'];
|
32 |
-
} elseif ( isset( $args['schedule'] ) ) {
|
33 |
-
$this->schedule = $args['schedule'];
|
34 |
-
}
|
35 |
-
|
36 |
-
// Set hook
|
37 |
-
if ( isset( $args['action'] ) ) {
|
38 |
-
$this->hook = $args['action'];
|
39 |
-
} elseif ( isset( $args['callback'] ) ) {
|
40 |
-
$this->hook = self::_callback_to_string( $args['callback'] );
|
41 |
-
add_action( $this->hook, $args['callback'] );
|
42 |
-
} elseif ( method_exists( $this, 'callback' ) ) {
|
43 |
-
$this->hook = self::_callback_to_string( array( $this, 'callback' ) );
|
44 |
-
add_action( $this->hook, $args['callback'] );
|
45 |
-
} else {
|
46 |
-
trigger_error( '$action OR $callback not set', E_USER_WARNING );
|
47 |
-
}
|
48 |
-
|
49 |
-
if ( isset( $args['callback_args'] ) )
|
50 |
-
$this->callback_args = (array) $args['callback_args'];
|
51 |
-
|
52 |
-
if ( $file && $this->schedule ) {
|
53 |
-
scbUtil::add_activation_hook( $file, array( $this, 'reset' ) );
|
54 |
-
register_deactivation_hook( $file, array( $this, 'unschedule' ) );
|
55 |
-
}
|
56 |
-
|
57 |
-
add_filter( 'cron_schedules', array( $this, '_add_timing' ) );
|
58 |
-
}
|
59 |
-
|
60 |
-
/**
|
61 |
-
* Change the interval of the cron job
|
62 |
-
*
|
63 |
-
* @param array $args List of args:
|
64 |
-
* string $schedule OR number $interval
|
65 |
-
* timestamp $time ( optional )
|
66 |
-
*/
|
67 |
-
function reschedule( $args ) {
|
68 |
-
|
69 |
-
if ( $args['schedule'] && $this->schedule != $args['schedule'] ) {
|
70 |
-
$this->schedule = $args['schedule'];
|
71 |
-
} elseif ( $args['interval'] && $this->interval != $args['interval'] ) {
|
72 |
-
$this->schedule = $args['interval'] . 'secs';
|
73 |
-
$this->interval = $args['interval'];
|
74 |
-
}
|
75 |
-
|
76 |
-
$this->time = $args['time'];
|
77 |
-
|
78 |
-
$this->reset();
|
79 |
-
}
|
80 |
-
|
81 |
-
/**
|
82 |
-
* Reset the schedule
|
83 |
-
*/
|
84 |
-
function reset() {
|
85 |
-
$this->unschedule();
|
86 |
-
$this->schedule();
|
87 |
-
}
|
88 |
-
|
89 |
-
/**
|
90 |
-
* Clear the cron job
|
91 |
-
*/
|
92 |
-
function unschedule() {
|
93 |
-
# wp_clear_scheduled_hook( $this->hook, $this->callback_args );
|
94 |
-
self::really_clear_scheduled_hook( $this->hook );
|
95 |
-
}
|
96 |
-
|
97 |
-
/**
|
98 |
-
* Execute the job now
|
99 |
-
* @param array $args List of arguments to pass to the callback
|
100 |
-
*/
|
101 |
-
function do_now( $args = null ) {
|
102 |
-
if ( is_null( $args ) )
|
103 |
-
$args = $this->callback_args;
|
104 |
-
|
105 |
-
do_action_ref_array( $this->hook, $args );
|
106 |
-
}
|
107 |
-
|
108 |
-
/**
|
109 |
-
* Execute the job with a given delay
|
110 |
-
* @param int $delay in seconds
|
111 |
-
* @param array $args List of arguments to pass to the callback
|
112 |
-
*/
|
113 |
-
function do_once( $delay = 0, $args = null ) {
|
114 |
-
if ( is_null( $args ) )
|
115 |
-
$args = $this->callback_args;
|
116 |
-
|
117 |
-
wp_clear_scheduled_hook( $this->hook, $args );
|
118 |
-
wp_schedule_single_event( time() + $delay, $this->hook, $args );
|
119 |
-
}
|
120 |
-
|
121 |
-
|
122 |
-
//_____INTERNAL METHODS_____
|
123 |
-
|
124 |
-
/**
|
125 |
-
* @param array $schedules
|
126 |
-
*
|
127 |
-
* @return array
|
128 |
-
*/
|
129 |
-
function _add_timing( $schedules ) {
|
130 |
-
if ( isset( $schedules[$this->schedule] ) )
|
131 |
-
return $schedules;
|
132 |
-
|
133 |
-
$schedules[$this->schedule] = array(
|
134 |
-
'interval' => $this->interval,
|
135 |
-
'display' => $this->interval . ' seconds',
|
136 |
-
);
|
137 |
-
|
138 |
-
return $schedules;
|
139 |
-
}
|
140 |
-
|
141 |
-
protected function schedule() {
|
142 |
-
if ( ! $this->time )
|
143 |
-
$this->time = time();
|
144 |
-
|
145 |
-
wp_schedule_event( $this->time, $this->schedule, $this->hook, $this->callback_args );
|
146 |
-
}
|
147 |
-
|
148 |
-
/**
|
149 |
-
* @param string $name
|
150 |
-
*/
|
151 |
-
protected static function really_clear_scheduled_hook( $name ) {
|
152 |
-
$crons = _get_cron_array();
|
153 |
-
|
154 |
-
foreach ( $crons as $timestamp => $hooks ) {
|
155 |
-
foreach ( $hooks as $hook => $args )
|
156 |
-
if ( $hook == $name )
|
157 |
-
unset( $crons[$timestamp][$hook] );
|
158 |
-
|
159 |
-
if ( empty( $crons[$timestamp] ) )
|
160 |
-
unset( $crons[$timestamp] );
|
161 |
-
}
|
162 |
-
|
163 |
-
_set_cron_array( $crons );
|
164 |
-
}
|
165 |
-
|
166 |
-
/**
|
167 |
-
* @param callback $callback
|
168 |
-
*
|
169 |
-
* @return string
|
170 |
-
*/
|
171 |
-
protected static function _callback_to_string( $callback ) {
|
172 |
-
if ( ! is_array( $callback ) )
|
173 |
-
$str = $callback;
|
174 |
-
elseif ( ! is_string( $callback[0] ) )
|
175 |
-
$str = get_class( $callback[0] ) . '_' . $callback[1];
|
176 |
-
else
|
177 |
-
$str = $callback[0] . '::' . $callback[1];
|
178 |
-
|
179 |
-
$str .= '_hook';
|
180 |
-
|
181 |
-
return $str;
|
182 |
-
}
|
183 |
-
}
|
184 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
scb/Forms.php
CHANGED
@@ -1,929 +1,366 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
*/
|
6 |
class scbForms {
|
7 |
|
8 |
-
const
|
9 |
|
10 |
-
|
11 |
-
|
12 |
-
* @param mixed $value
|
13 |
-
*
|
14 |
-
* @return string
|
15 |
-
*/
|
16 |
-
static function input_with_value( $args, $value ) {
|
17 |
-
$field = scbFormField::create( $args );
|
18 |
|
19 |
-
|
20 |
-
|
21 |
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
*
|
26 |
-
* @return string
|
27 |
-
*/
|
28 |
-
static function input( $args, $formdata = null ) {
|
29 |
-
$field = scbFormField::create( $args );
|
30 |
|
31 |
-
|
32 |
-
|
|
|
|
|
|
|
33 |
|
34 |
-
|
35 |
-
|
36 |
-
*
|
37 |
-
* @param array $rows
|
38 |
-
* @param array $formdata
|
39 |
-
*
|
40 |
-
* @return string
|
41 |
-
*/
|
42 |
-
static function form_table( $rows, $formdata = null ) {
|
43 |
-
$output = '';
|
44 |
-
foreach ( $rows as $row )
|
45 |
-
$output .= self::table_row( $row, $formdata );
|
46 |
|
47 |
-
|
|
|
48 |
|
49 |
-
|
|
|
|
|
|
|
50 |
}
|
51 |
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
* @param array $inputs
|
56 |
-
* @param array $formdata
|
57 |
-
* @param string $nonce
|
58 |
-
*
|
59 |
-
* @return string
|
60 |
-
*/
|
61 |
-
static function form( $inputs, $formdata = null, $nonce ) {
|
62 |
$output = '';
|
63 |
foreach ( $inputs as $input )
|
64 |
-
$output .= self::input(
|
65 |
|
66 |
-
$output = self::form_wrap(
|
67 |
|
68 |
return $output;
|
69 |
}
|
70 |
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
* @return string
|
78 |
-
*/
|
79 |
-
static function table( $rows, $formdata = null ) {
|
80 |
-
$output = '';
|
81 |
-
foreach ( $rows as $row )
|
82 |
-
$output .= self::table_row( $row, $formdata );
|
83 |
-
|
84 |
-
$output = self::table_wrap( $output );
|
85 |
|
86 |
return $output;
|
87 |
}
|
88 |
|
89 |
-
/**
|
90 |
-
* Generates a table row
|
91 |
-
*
|
92 |
-
* @param array $args
|
93 |
-
* @param array $formdata
|
94 |
-
*
|
95 |
-
* @return string
|
96 |
-
*/
|
97 |
-
static function table_row( $args, $formdata = null ) {
|
98 |
-
return self::row_wrap( $args['title'], self::input( $args, $formdata ) );
|
99 |
-
}
|
100 |
|
|
|
101 |
|
102 |
-
// ____________WRAPPERS____________
|
103 |
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
* @return string
|
109 |
-
*/
|
110 |
-
static function form_table_wrap( $content, $nonce = 'update_options' ) {
|
111 |
-
return self::form_wrap( self::table_wrap( $content ), $nonce );
|
112 |
-
}
|
113 |
|
114 |
-
|
115 |
-
|
116 |
-
* @param string $nonce
|
117 |
-
*
|
118 |
-
* @return string
|
119 |
-
*/
|
120 |
-
static function form_wrap( $content, $nonce = 'update_options' ) {
|
121 |
-
return html( "form method='post' action=''",
|
122 |
-
$content,
|
123 |
-
wp_nonce_field( $nonce, '_wpnonce', $referer = true, $echo = false )
|
124 |
-
);
|
125 |
-
}
|
126 |
|
127 |
-
|
128 |
-
|
129 |
-
*
|
130 |
-
* @return string
|
131 |
-
*/
|
132 |
-
static function table_wrap( $content ) {
|
133 |
-
return html( "table class='form-table'", $content );
|
134 |
-
}
|
135 |
|
136 |
-
|
137 |
-
* @param string $title
|
138 |
-
* @param string $content
|
139 |
-
*
|
140 |
-
* @return string
|
141 |
-
*/
|
142 |
-
static function row_wrap( $title, $content ) {
|
143 |
-
return html( 'tr',
|
144 |
-
html( "th scope='row'", $title ),
|
145 |
-
html( 'td', $content )
|
146 |
-
);
|
147 |
}
|
148 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
|
150 |
-
|
|
|
|
|
151 |
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
|
153 |
-
//
|
154 |
-
|
155 |
-
|
156 |
-
/**
|
157 |
-
* Generates the proper string for a name attribute.
|
158 |
-
*
|
159 |
-
* @param array|string $name The raw name
|
160 |
-
*
|
161 |
-
* @return string
|
162 |
-
*/
|
163 |
-
static function get_name( $name ) {
|
164 |
-
$name = (array) $name;
|
165 |
-
|
166 |
-
$name_str = array_shift( $name );
|
167 |
-
|
168 |
-
foreach ( $name as $key ) {
|
169 |
-
$name_str .= '[' . esc_attr( $key ) . ']';
|
170 |
}
|
171 |
-
|
172 |
-
|
173 |
-
}
|
174 |
-
|
175 |
-
/**
|
176 |
-
* Traverses the formdata and retrieves the correct value.
|
177 |
-
*
|
178 |
-
* @param string $name The name of the value
|
179 |
-
* @param array $value The data that will be traversed
|
180 |
-
* @param mixed $fallback The value returned when the key is not found
|
181 |
-
*
|
182 |
-
* @return mixed
|
183 |
-
*/
|
184 |
-
static function get_value( $name, $value, $fallback = null ) {
|
185 |
-
foreach ( (array) $name as $key ) {
|
186 |
-
if ( !isset( $value[ $key ] ) )
|
187 |
-
return $fallback;
|
188 |
-
|
189 |
-
$value = $value[$key];
|
190 |
}
|
191 |
-
|
192 |
-
|
193 |
-
}
|
194 |
-
|
195 |
-
/**
|
196 |
-
* Given a list of fields, validate some data.
|
197 |
-
*
|
198 |
-
* @param array $fields List of args that would be sent to scbForms::input()
|
199 |
-
* @param array $data The data to validate. Defaults to $_POST
|
200 |
-
* @param array $to_update Existing data to populate. Necessary for nested values
|
201 |
-
*
|
202 |
-
* @return array
|
203 |
-
*/
|
204 |
-
static function validate_post_data( $fields, $data = null, $to_update = array() ) {
|
205 |
-
if ( null === $data ) {
|
206 |
-
$data = stripslashes_deep( $_POST );
|
207 |
}
|
208 |
-
|
209 |
-
|
210 |
-
$value = scbForms::get_value( $field['name'], $data );
|
211 |
-
|
212 |
-
$fieldObj = scbFormField::create( $field );
|
213 |
-
|
214 |
-
$value = $fieldObj->validate( $value );
|
215 |
-
|
216 |
-
if ( null !== $value )
|
217 |
-
self::set_value( $to_update, $field['name'], $value );
|
218 |
}
|
219 |
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
* @param string $meta_type
|
231 |
-
*
|
232 |
-
* @return string
|
233 |
-
*/
|
234 |
-
static function input_from_meta( $args, $object_id, $meta_type = 'post' ) {
|
235 |
-
$single = ( 'checkbox' != $args['type'] );
|
236 |
-
|
237 |
-
$key = (array) $args['name'];
|
238 |
-
$key = end( $key );
|
239 |
-
|
240 |
-
$value = get_metadata( $meta_type, $object_id, $key, $single );
|
241 |
-
|
242 |
-
return self::input_with_value( $args, $value );
|
243 |
-
}
|
244 |
-
|
245 |
-
/**
|
246 |
-
* @param array $fields
|
247 |
-
* @param array $data
|
248 |
-
* @param int $object_id
|
249 |
-
* @param string $meta_type
|
250 |
-
*/
|
251 |
-
static function update_meta( $fields, $data, $object_id, $meta_type = 'post' ) {
|
252 |
-
foreach ( $fields as $field_args ) {
|
253 |
-
$key = $field_args['name'];
|
254 |
-
|
255 |
-
if ( 'checkbox' == $field_args['type'] ) {
|
256 |
-
$new_values = isset( $data[$key] ) ? $data[$key] : array();
|
257 |
-
|
258 |
-
$old_values = get_metadata( $meta_type, $object_id, $key );
|
259 |
-
|
260 |
-
foreach ( array_diff( $new_values, $old_values ) as $value )
|
261 |
-
add_metadata( $meta_type, $object_id, $key, $value );
|
262 |
-
|
263 |
-
foreach ( array_diff( $old_values, $new_values ) as $value )
|
264 |
-
delete_metadata( $meta_type, $object_id, $key, $value );
|
265 |
-
} else {
|
266 |
-
$value = isset( $data[$key] ) ? $data[$key] : '';
|
267 |
-
|
268 |
-
if ( '' === $value )
|
269 |
-
delete_metadata( $meta_type, $object_id, $key );
|
270 |
-
else
|
271 |
-
update_metadata( $meta_type, $object_id, $key, $value );
|
272 |
}
|
273 |
}
|
274 |
-
}
|
275 |
-
|
276 |
-
/**
|
277 |
-
* @param array $arr
|
278 |
-
* @param string $name
|
279 |
-
* @param mixed $value
|
280 |
-
*/
|
281 |
-
private static function set_value( &$arr, $name, $value ) {
|
282 |
-
$name = (array) $name;
|
283 |
-
|
284 |
-
$final_key = array_pop( $name );
|
285 |
-
|
286 |
-
while ( !empty( $name ) ) {
|
287 |
-
$key = array_shift( $name );
|
288 |
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
$
|
|
|
|
|
|
|
293 |
}
|
294 |
|
295 |
-
$
|
296 |
-
|
297 |
-
|
298 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
299 |
|
300 |
-
|
301 |
-
* A wrapper for scbForms, containing the formdata
|
302 |
-
*/
|
303 |
-
class scbForm {
|
304 |
-
protected $data = array();
|
305 |
-
protected $prefix = array();
|
306 |
|
307 |
-
|
308 |
-
|
309 |
-
* @param string|boolean $prefix
|
310 |
-
*/
|
311 |
-
function __construct( $data, $prefix = false ) {
|
312 |
-
if ( is_array( $data ) )
|
313 |
-
$this->data = $data;
|
314 |
|
315 |
-
|
316 |
-
$this->prefix = (array) $prefix;
|
317 |
}
|
318 |
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
|
|
|
|
|
|
326 |
|
327 |
-
|
|
|
|
|
328 |
|
329 |
-
|
330 |
-
|
331 |
|
332 |
-
|
333 |
-
|
334 |
-
*
|
335 |
-
* @return string
|
336 |
-
*/
|
337 |
-
function input( $args ) {
|
338 |
-
$value = scbForms::get_value( $args['name'], $this->data );
|
339 |
|
340 |
-
if ( !
|
341 |
-
$
|
342 |
-
}
|
343 |
|
344 |
-
return
|
345 |
}
|
346 |
-
}
|
347 |
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
*
|
356 |
-
* @param mixed $value The value to use
|
357 |
-
*
|
358 |
-
* @return string
|
359 |
-
*/
|
360 |
-
function render( $value = null );
|
361 |
-
|
362 |
-
/**
|
363 |
-
* Validates a value against a field.
|
364 |
-
*
|
365 |
-
* @param mixed $value The value to check
|
366 |
-
*
|
367 |
-
* @return mixed null if the validation failed, sanitized value otherwise.
|
368 |
-
*/
|
369 |
-
function validate( $value );
|
370 |
-
}
|
371 |
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
abstract class scbFormField implements scbFormField_I {
|
376 |
|
377 |
-
|
|
|
378 |
|
379 |
-
|
380 |
-
|
381 |
-
*
|
382 |
-
* @return mixed false on failure or instance of form class
|
383 |
-
*/
|
384 |
-
public static function create( $args ) {
|
385 |
-
if ( is_a( $args, 'scbFormField_I' ) )
|
386 |
-
return $args;
|
387 |
|
388 |
-
|
389 |
-
|
390 |
-
|
|
|
|
|
|
|
|
|
|
|
391 |
|
392 |
-
|
393 |
-
$args['choices'] = $args['value'];
|
394 |
-
unset( $args['value'] );
|
395 |
-
}
|
396 |
|
397 |
-
if (
|
398 |
-
$
|
399 |
-
|
400 |
}
|
401 |
-
|
402 |
-
|
403 |
-
$
|
404 |
-
|
405 |
-
$args = wp_parse_args( $args, array(
|
406 |
-
'desc' => '',
|
407 |
-
'desc_pos' => 'after',
|
408 |
-
'wrap' => scbForms::TOKEN,
|
409 |
-
'wrap_each' => scbForms::TOKEN,
|
410 |
-
) );
|
411 |
-
|
412 |
-
// depends on $args['desc']
|
413 |
-
if ( isset( $args['choices'] ) )
|
414 |
-
self::_expand_choices( $args );
|
415 |
-
|
416 |
-
switch ( $args['type'] ) {
|
417 |
-
case 'radio':
|
418 |
-
return new scbRadiosField( $args );
|
419 |
-
case 'select':
|
420 |
-
return new scbSelectField( $args );
|
421 |
-
case 'checkbox':
|
422 |
-
if ( isset( $args['choices'] ) )
|
423 |
-
return new scbMultipleChoiceField( $args );
|
424 |
-
else
|
425 |
-
return new scbSingleCheckboxField( $args );
|
426 |
-
case 'custom':
|
427 |
-
return new scbCustomField( $args );
|
428 |
-
default:
|
429 |
-
return new scbTextField( $args );
|
430 |
}
|
431 |
-
}
|
432 |
-
|
433 |
-
/**
|
434 |
-
* @param array $args
|
435 |
-
*/
|
436 |
-
protected function __construct( $args ) {
|
437 |
-
$this->args = $args;
|
438 |
-
}
|
439 |
-
|
440 |
-
/**
|
441 |
-
* @param string $key
|
442 |
-
*
|
443 |
-
* @return mixed
|
444 |
-
*/
|
445 |
-
public function __get( $key ) {
|
446 |
-
return $this->args[ $key ];
|
447 |
-
}
|
448 |
|
449 |
-
|
450 |
-
* @param string $key
|
451 |
-
*
|
452 |
-
* @return bool
|
453 |
-
*/
|
454 |
-
public function __isset( $key ) {
|
455 |
-
return isset( $this->args[ $key ] );
|
456 |
}
|
457 |
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
|
|
468 |
|
469 |
-
if (
|
470 |
-
$
|
471 |
|
472 |
-
|
|
|
473 |
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
/**
|
478 |
-
* Mutate the field arguments so that the value passed is rendered.
|
479 |
-
*
|
480 |
-
* @param array $args
|
481 |
-
* @param mixed $value
|
482 |
-
*/
|
483 |
-
abstract protected function _set_value( &$args, $value );
|
484 |
-
|
485 |
-
/**
|
486 |
-
* The actual rendering
|
487 |
-
*
|
488 |
-
* @param array $args
|
489 |
-
*/
|
490 |
-
abstract protected function _render( $args );
|
491 |
-
|
492 |
-
/**
|
493 |
-
* Handle args for a single checkbox or radio input
|
494 |
-
*
|
495 |
-
* @param array $args
|
496 |
-
*
|
497 |
-
* @return string
|
498 |
-
*/
|
499 |
-
protected static function _checkbox( $args ) {
|
500 |
-
$args = wp_parse_args( $args, array(
|
501 |
-
'value' => true,
|
502 |
-
'desc' => null,
|
503 |
-
'checked' => false,
|
504 |
-
'extra' => array(),
|
505 |
-
) );
|
506 |
-
|
507 |
-
$args['extra']['checked'] = $args['checked'];
|
508 |
-
|
509 |
-
if ( is_null( $args['desc'] ) && ! is_bool( $args['value'] ) )
|
510 |
-
$args['desc'] = str_replace( '[]', '', $args['value'] );
|
511 |
-
|
512 |
-
return self::_input_gen( $args );
|
513 |
-
}
|
514 |
-
|
515 |
-
/**
|
516 |
-
* Generate html with the final args
|
517 |
-
*
|
518 |
-
* @param array $args
|
519 |
-
*
|
520 |
-
* @return string
|
521 |
-
*/
|
522 |
-
protected static function _input_gen( $args ) {
|
523 |
-
$args = wp_parse_args( $args, array(
|
524 |
-
'value' => null,
|
525 |
-
'desc' => null,
|
526 |
-
'extra' => array(),
|
527 |
-
) );
|
528 |
|
529 |
-
|
|
|
|
|
|
|
530 |
|
531 |
-
if (
|
532 |
-
$
|
533 |
} else {
|
534 |
-
$
|
535 |
-
$
|
536 |
-
|
|
|
537 |
}
|
538 |
|
539 |
-
|
540 |
-
|
|
|
541 |
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
* @param string $desc_pos
|
546 |
-
*
|
547 |
-
* @return string
|
548 |
-
*/
|
549 |
-
protected static function add_label( $input, $desc, $desc_pos ) {
|
550 |
-
return html( 'label', self::add_desc( $input, $desc, $desc_pos ) ) . "\n";
|
551 |
-
}
|
552 |
|
553 |
-
|
554 |
-
* @param string $input
|
555 |
-
* @param string $desc
|
556 |
-
* @param string $desc_pos
|
557 |
-
*
|
558 |
-
* @return string
|
559 |
-
*/
|
560 |
-
protected static function add_desc( $input, $desc, $desc_pos ) {
|
561 |
-
if ( empty( $desc ) )
|
562 |
-
return $input;
|
563 |
-
|
564 |
-
if ( 'before' == $desc_pos )
|
565 |
-
return $desc . ' ' . $input;
|
566 |
-
else
|
567 |
-
return $input . ' ' . $desc;
|
568 |
-
}
|
569 |
|
570 |
-
|
571 |
-
* @param array $args
|
572 |
-
*/
|
573 |
-
private static function _expand_choices( &$args ) {
|
574 |
-
$choices =& $args['choices'];
|
575 |
-
|
576 |
-
if ( !empty( $choices ) && !self::is_associative( $choices ) ) {
|
577 |
-
if ( is_array( $args['desc'] ) ) {
|
578 |
-
$choices = array_combine( $choices, $args['desc'] ); // back-compat
|
579 |
-
$args['desc'] = false;
|
580 |
-
} elseif ( !isset( $args['numeric'] ) || !$args['numeric'] ) {
|
581 |
-
$choices = array_combine( $choices, $choices );
|
582 |
-
}
|
583 |
}
|
584 |
-
}
|
585 |
-
|
586 |
-
/**
|
587 |
-
* @param array $array
|
588 |
-
*
|
589 |
-
* @return bool
|
590 |
-
*/
|
591 |
-
private static function is_associative( $array ) {
|
592 |
-
$keys = array_keys( $array );
|
593 |
-
return array_keys( $keys ) !== $keys;
|
594 |
-
}
|
595 |
-
}
|
596 |
|
597 |
-
|
598 |
-
* Text form field.
|
599 |
-
*/
|
600 |
-
class scbTextField extends scbFormField {
|
601 |
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
* @return string
|
606 |
-
*/
|
607 |
-
public function validate( $value ) {
|
608 |
-
$sanitize = isset( $this->sanitize ) ? $this->sanitize : 'wp_kses_data';
|
609 |
-
|
610 |
-
return call_user_func( $sanitize, $value, $this );
|
611 |
}
|
612 |
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
* @return string
|
617 |
-
*/
|
618 |
-
protected function _render( $args ) {
|
619 |
-
$args = wp_parse_args( $args, array(
|
620 |
-
'value' => '',
|
621 |
-
'desc_pos' => 'after',
|
622 |
-
'extra' => array( 'class' => 'regular-text' ),
|
623 |
-
) );
|
624 |
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
/**
|
632 |
-
* @param array $args
|
633 |
-
* @param string $value
|
634 |
-
*/
|
635 |
-
protected function _set_value( &$args, $value ) {
|
636 |
-
$args['value'] = $value;
|
637 |
-
}
|
638 |
-
}
|
639 |
-
|
640 |
-
/**
|
641 |
-
* Base class for form fields with single choice.
|
642 |
-
*/
|
643 |
-
abstract class scbSingleChoiceField extends scbFormField {
|
644 |
-
|
645 |
-
/**
|
646 |
-
* @param mixed $value
|
647 |
-
*
|
648 |
-
* @return mixed|null
|
649 |
-
*/
|
650 |
-
public function validate( $value ) {
|
651 |
-
if ( isset( $this->choices[ $value ] ) )
|
652 |
-
return $value;
|
653 |
-
|
654 |
-
return null;
|
655 |
-
}
|
656 |
-
|
657 |
-
/**
|
658 |
-
* @param array $args
|
659 |
-
*
|
660 |
-
* @return string
|
661 |
-
*/
|
662 |
-
protected function _render( $args ) {
|
663 |
-
$args = wp_parse_args( $args, array(
|
664 |
-
'numeric' => false, // use numeric array instead of associative
|
665 |
-
) );
|
666 |
-
|
667 |
-
if ( isset( $args['selected'] ) ) {
|
668 |
-
$args['selected'] = (string) $args['selected'];
|
669 |
} else {
|
670 |
-
$
|
671 |
}
|
672 |
|
673 |
-
|
674 |
-
}
|
675 |
-
|
676 |
-
/**
|
677 |
-
* @param array $args
|
678 |
-
* @param mixed $value
|
679 |
-
*/
|
680 |
-
protected function _set_value( &$args, $value ) {
|
681 |
-
$args['selected'] = $value;
|
682 |
-
}
|
683 |
-
|
684 |
-
/**
|
685 |
-
* @param array $args
|
686 |
-
*
|
687 |
-
* @return string
|
688 |
-
*/
|
689 |
-
abstract protected function _render_specific( $args );
|
690 |
-
}
|
691 |
-
|
692 |
-
/**
|
693 |
-
* Dropdown field.
|
694 |
-
*/
|
695 |
-
class scbSelectField extends scbSingleChoiceField {
|
696 |
-
|
697 |
-
/**
|
698 |
-
* @param array $args
|
699 |
-
*
|
700 |
-
* @return string
|
701 |
-
*/
|
702 |
-
protected function _render_specific( $args ) {
|
703 |
-
$args = wp_parse_args( $args, array(
|
704 |
-
'text' => false,
|
705 |
-
'extra' => array(),
|
706 |
-
) );
|
707 |
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
$
|
712 |
-
'value' => '',
|
713 |
-
'selected' => ( $args['selected'] === array( 'foo' ) ),
|
714 |
-
'title' => $args['text'],
|
715 |
-
);
|
716 |
-
}
|
717 |
-
|
718 |
-
foreach ( $args['choices'] as $value => $title ) {
|
719 |
-
$value = (string) $value;
|
720 |
-
|
721 |
-
$options[] = array(
|
722 |
-
'value' => $value,
|
723 |
-
'selected' => ( $value == $args['selected'] ),
|
724 |
-
'title' => $title,
|
725 |
-
);
|
726 |
-
}
|
727 |
-
|
728 |
-
$opts = '';
|
729 |
-
foreach ( $options as $option ) {
|
730 |
-
$opts .= html( 'option', array( 'value' => $option['value'], 'selected' => $option['selected'] ), $option['title'] );
|
731 |
-
}
|
732 |
-
|
733 |
-
$args['extra']['name'] = $args['name'];
|
734 |
-
|
735 |
-
$input = html( 'select', $args['extra'], $opts );
|
736 |
|
737 |
-
return
|
738 |
}
|
739 |
-
}
|
740 |
-
|
741 |
-
/**
|
742 |
-
* Radio field.
|
743 |
-
*/
|
744 |
-
class scbRadiosField extends scbSelectField {
|
745 |
-
|
746 |
-
/**
|
747 |
-
* @param array $args
|
748 |
-
*
|
749 |
-
* @return string
|
750 |
-
*/
|
751 |
-
protected function _render_specific( $args ) {
|
752 |
-
|
753 |
-
if ( array( 'foo' ) === $args['selected'] ) {
|
754 |
-
// radio buttons should always have one option selected
|
755 |
-
$args['selected'] = key( $args['choices'] );
|
756 |
-
}
|
757 |
-
|
758 |
-
$opts = '';
|
759 |
-
foreach ( $args['choices'] as $value => $title ) {
|
760 |
-
$value = (string) $value;
|
761 |
-
|
762 |
-
$single_input = scbFormField::_checkbox( array(
|
763 |
-
'name' => $args['name'],
|
764 |
-
'type' => 'radio',
|
765 |
-
'value' => $value,
|
766 |
-
'checked' => ( $value == $args['selected'] ),
|
767 |
-
'desc' => $title,
|
768 |
-
'desc_pos' => 'after',
|
769 |
-
) );
|
770 |
|
771 |
-
|
772 |
-
|
|
|
773 |
|
774 |
-
|
775 |
-
|
776 |
-
}
|
777 |
|
778 |
-
|
779 |
-
* Checkbox field with multiple choices.
|
780 |
-
*/
|
781 |
-
class scbMultipleChoiceField extends scbFormField {
|
782 |
-
|
783 |
-
/**
|
784 |
-
* @param mixed $value
|
785 |
-
*
|
786 |
-
* @return array
|
787 |
-
*/
|
788 |
-
public function validate( $value ) {
|
789 |
-
return array_intersect( array_keys( $this->choices ), (array) $value );
|
790 |
}
|
791 |
|
792 |
-
|
793 |
-
* @param array $args
|
794 |
-
*
|
795 |
-
* @return string
|
796 |
-
*/
|
797 |
-
protected function _render( $args ) {
|
798 |
-
$args = wp_parse_args( $args, array(
|
799 |
-
'numeric' => false, // use numeric array instead of associative
|
800 |
-
'checked' => null,
|
801 |
-
) );
|
802 |
-
|
803 |
-
if ( ! is_array( $args['checked'] ) )
|
804 |
-
$args['checked'] = array();
|
805 |
-
|
806 |
-
$opts = '';
|
807 |
-
foreach ( $args['choices'] as $value => $title ) {
|
808 |
-
$single_input = scbFormField::_checkbox( array(
|
809 |
-
'name' => $args['name'] . '[]',
|
810 |
-
'type' => 'checkbox',
|
811 |
-
'value' => $value,
|
812 |
-
'checked' => in_array( $value, $args['checked'] ),
|
813 |
-
'desc' => $title,
|
814 |
-
'desc_pos' => 'after',
|
815 |
-
) );
|
816 |
-
|
817 |
-
$opts .= str_replace( scbForms::TOKEN, $single_input, $args['wrap_each'] );
|
818 |
-
}
|
819 |
|
820 |
-
|
821 |
-
|
|
|
822 |
|
823 |
-
|
824 |
-
* @param array $args
|
825 |
-
* @param mixed $value
|
826 |
-
*/
|
827 |
-
protected function _set_value( &$args, $value ) {
|
828 |
-
$args['checked'] = (array) $value;
|
829 |
-
}
|
830 |
-
}
|
831 |
|
832 |
-
|
833 |
-
* Checkbox field.
|
834 |
-
*/
|
835 |
-
class scbSingleCheckboxField extends scbFormField {
|
836 |
-
|
837 |
-
/**
|
838 |
-
* @param mixed $value
|
839 |
-
*
|
840 |
-
* @return boolean
|
841 |
-
*/
|
842 |
-
public function validate( $value ) {
|
843 |
-
return (bool) $value;
|
844 |
}
|
845 |
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
protected function _render( $args ) {
|
852 |
-
$args = wp_parse_args( $args, array(
|
853 |
-
'value' => true,
|
854 |
-
'desc' => null,
|
855 |
-
'checked' => false,
|
856 |
-
'extra' => array(),
|
857 |
-
) );
|
858 |
-
|
859 |
-
$args['extra']['checked'] = $args['checked'];
|
860 |
-
|
861 |
-
if ( is_null( $args['desc'] ) && ! is_bool( $args['value'] ) )
|
862 |
-
$args['desc'] = str_replace( '[]', '', $args['value'] );
|
863 |
-
|
864 |
-
return scbFormField::_input_gen( $args );
|
865 |
-
}
|
866 |
|
867 |
-
|
868 |
-
* @param array $args
|
869 |
-
* @param mixed $value
|
870 |
-
*/
|
871 |
-
protected function _set_value( &$args, $value ) {
|
872 |
-
$args['checked'] = ( $value || ( isset( $args['value'] ) && $value == $args['value'] ) );
|
873 |
}
|
874 |
}
|
875 |
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
protected $args;
|
882 |
-
|
883 |
-
/**
|
884 |
-
* @param array $args
|
885 |
-
*/
|
886 |
-
function __construct( $args ) {
|
887 |
-
$this->args = wp_parse_args( $args, array(
|
888 |
-
'render' => 'var_dump',
|
889 |
-
'sanitize' => 'wp_filter_kses',
|
890 |
-
) );
|
891 |
-
}
|
892 |
-
|
893 |
-
/**
|
894 |
-
* @param string $key
|
895 |
-
*
|
896 |
-
* @return mixed
|
897 |
-
*/
|
898 |
-
public function __get( $key ) {
|
899 |
-
return $this->args[ $key ];
|
900 |
-
}
|
901 |
-
|
902 |
-
/**
|
903 |
-
* @param string $key
|
904 |
-
*
|
905 |
-
* @return boolean
|
906 |
-
*/
|
907 |
-
public function __isset( $key ) {
|
908 |
-
return isset( $this->args[ $key ] );
|
909 |
-
}
|
910 |
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
* @return string
|
915 |
-
*/
|
916 |
-
public function render( $value = null ) {
|
917 |
-
return call_user_func( $this->render, $value, $this );
|
918 |
-
}
|
919 |
|
920 |
-
|
921 |
-
* @param mixed $value
|
922 |
-
*
|
923 |
-
* @return mixed
|
924 |
-
*/
|
925 |
-
public function validate( $value ) {
|
926 |
-
return call_user_func( $this->sanitize, $value, $this );
|
927 |
-
}
|
928 |
}
|
|
|
929 |
|
1 |
<?php
|
2 |
|
3 |
+
// Documentation: http://scribu.net/wordpress/scb-framework/scb-forms.html
|
4 |
+
|
|
|
5 |
class scbForms {
|
6 |
|
7 |
+
const token = '%input%';
|
8 |
|
9 |
+
protected static $args;
|
10 |
+
protected static $formdata = array();
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
+
static function input($args, $formdata = array()) {
|
13 |
+
$args = self::validate_data($args);
|
14 |
|
15 |
+
$error = false;
|
16 |
+
foreach ( array('name', 'value') as $key ) {
|
17 |
+
$old = $key . 's';
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
+
if ( isset($args[$old]) ) {
|
20 |
+
$args[$key] = $args[$old];
|
21 |
+
unset($args[$old]);
|
22 |
+
}
|
23 |
+
}
|
24 |
|
25 |
+
if ( empty($args['name']) )
|
26 |
+
return trigger_error('Empty name', E_USER_WARNING);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
|
28 |
+
self::$args = $args;
|
29 |
+
self::$formdata = self::validate_data($formdata);
|
30 |
|
31 |
+
if ( 'select' == $args['type'] )
|
32 |
+
return self::_select();
|
33 |
+
else
|
34 |
+
return self::_input();
|
35 |
}
|
36 |
|
37 |
+
|
38 |
+
// Generates a form
|
39 |
+
static function form($inputs, $formdata = NULL, $nonce) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
$output = '';
|
41 |
foreach ( $inputs as $input )
|
42 |
+
$output .= self::input($input, $formdata);
|
43 |
|
44 |
+
$output = self::form_wrap($output, $nonce);
|
45 |
|
46 |
return $output;
|
47 |
}
|
48 |
|
49 |
+
// Wraps the given content in a <form> tag
|
50 |
+
static function form_wrap($content, $nonce = 'update_options') {
|
51 |
+
$output = "\n<form method='post' action=''>\n";
|
52 |
+
$output .= $content;
|
53 |
+
$output .= wp_nonce_field($action = $nonce, $name = "_wpnonce", $referer = true , $echo = false);
|
54 |
+
$output .= "\n</form>\n";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
|
56 |
return $output;
|
57 |
}
|
58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
|
60 |
+
// ____________PRIVATE METHODS____________
|
61 |
|
|
|
62 |
|
63 |
+
// Recursivly transform empty arrays to ''
|
64 |
+
private static function validate_data($data) {
|
65 |
+
if ( !is_array($data) )
|
66 |
+
return $data;
|
|
|
|
|
|
|
|
|
|
|
67 |
|
68 |
+
if ( empty($data) )
|
69 |
+
return '';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
|
71 |
+
foreach ( $data as $key => &$value )
|
72 |
+
$value = self::validate_data($value);
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
|
74 |
+
return $data;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
}
|
76 |
|
77 |
+
// From multiple inputs to single inputs
|
78 |
+
private static function _input() {
|
79 |
+
extract(wp_parse_args(self::$args, array(
|
80 |
+
'name' => NULL,
|
81 |
+
'value' => NULL,
|
82 |
+
'desc' => NULL,
|
83 |
+
'checked' => NULL,
|
84 |
+
)));
|
85 |
|
86 |
+
$m_name = is_array($name);
|
87 |
+
$m_value = is_array($value);
|
88 |
+
$m_desc = is_array($desc);
|
89 |
|
90 |
+
// Correct name
|
91 |
+
if ( !$m_name && $m_value
|
92 |
+
&& 'checkbox' == $type
|
93 |
+
&& false === strpos($name, '[')
|
94 |
+
)
|
95 |
+
$args['name'] = $name = $name . '[]';
|
96 |
|
97 |
+
// Expand names or values
|
98 |
+
if ( !$m_name && !$m_value ) {
|
99 |
+
$a = array($name => $value);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
}
|
101 |
+
elseif ( $m_name && !$m_value ) {
|
102 |
+
$a = array_fill_keys($name, $value);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
}
|
104 |
+
elseif ( !$m_name && $m_value ) {
|
105 |
+
$a = array_fill_keys($value, $name);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
}
|
107 |
+
else {
|
108 |
+
$a = array_combine($name, $value);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
}
|
110 |
|
111 |
+
// Correct descriptions
|
112 |
+
$_after = '';
|
113 |
+
if ( isset($desc) && !$m_desc && false === strpos($desc, self::token) ) {
|
114 |
+
if ( $m_value ) {
|
115 |
+
$_after = $desc;
|
116 |
+
$args['desc'] = $desc = $value;
|
117 |
+
}
|
118 |
+
elseif ( $m_name ) {
|
119 |
+
$_after = $desc;
|
120 |
+
$args['desc'] = $desc = $name;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
}
|
122 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
|
124 |
+
// Determine what goes where
|
125 |
+
if ( !$m_name && $m_value ) {
|
126 |
+
$i1 = 'val';
|
127 |
+
$i2 = 'name';
|
128 |
+
} else {
|
129 |
+
$i1 = 'name';
|
130 |
+
$i2 = 'val';
|
131 |
}
|
132 |
|
133 |
+
$func = in_array($type, array('checkbox', 'radio')) ? '_checkbox_single' : '_input_single';
|
134 |
+
|
135 |
+
// Set constant args
|
136 |
+
$const_args = self::array_extract(self::$args, array('type', 'desc_pos', 'checked'));
|
137 |
+
if ( isset($extra) )
|
138 |
+
$const_args['extra'] = explode(' ', $extra);
|
139 |
+
|
140 |
+
$i = 0;
|
141 |
+
foreach ( $a as $name => $val ) {
|
142 |
+
$cur_args = $const_args;
|
143 |
+
|
144 |
+
if ( $$i1 !== NULL )
|
145 |
+
$cur_args['name'] = $$i1;
|
146 |
+
|
147 |
+
if ( $$i2 !== NULL )
|
148 |
+
$cur_args['value'] = $$i2;
|
149 |
+
|
150 |
+
// Set desc
|
151 |
+
if ( is_array($desc) )
|
152 |
+
$cur_args['desc'] = $desc[$i];
|
153 |
+
elseif ( isset($desc) )
|
154 |
+
$cur_args['desc'] = $desc;
|
155 |
+
|
156 |
+
// Find relevant formdata
|
157 |
+
$match = NULL;
|
158 |
+
if ( $checked === NULL ) {
|
159 |
+
$match = @self::$formdata[str_replace('[]', '', $$i1)];
|
160 |
+
if ( is_array($match) ) {
|
161 |
+
$match = $match[$i];
|
162 |
+
}
|
163 |
+
} else if ( is_array($checked) ) {
|
164 |
+
$cur_args['checked'] = isset($checked[$i]) && $checked[$i];
|
165 |
+
}
|
166 |
|
167 |
+
$output[] = self::$func($cur_args, $match);
|
|
|
|
|
|
|
|
|
|
|
168 |
|
169 |
+
$i++;
|
170 |
+
}
|
|
|
|
|
|
|
|
|
|
|
171 |
|
172 |
+
return implode("\n", $output) . $_after;
|
|
|
173 |
}
|
174 |
|
175 |
+
// Handle args for checkboxes and radio inputs
|
176 |
+
private static function _checkbox_single($args, $data) {
|
177 |
+
$args = wp_parse_args($args, array(
|
178 |
+
'name' => NULL,
|
179 |
+
'value' => true,
|
180 |
+
'desc_pos' => 'after',
|
181 |
+
'desc' => NULL,
|
182 |
+
'checked' => NULL,
|
183 |
+
'extra' => array(),
|
184 |
+
));
|
185 |
|
186 |
+
foreach ( $args as $key => &$val )
|
187 |
+
$$key = &$val;
|
188 |
+
unset($val);
|
189 |
|
190 |
+
if ( $checked === NULL && $value == $data )
|
191 |
+
$checked = true;
|
192 |
|
193 |
+
if ( $checked )
|
194 |
+
$extra[] = 'checked="checked"';
|
|
|
|
|
|
|
|
|
|
|
195 |
|
196 |
+
if ( $desc === NULL && !is_bool($value) )
|
197 |
+
$desc = str_replace('[]', '', $value);
|
|
|
198 |
|
199 |
+
return self::_input_gen($args);
|
200 |
}
|
|
|
201 |
|
202 |
+
// Handle args for text inputs
|
203 |
+
private static function _input_single($args, $data) {
|
204 |
+
$args = wp_parse_args($args, array(
|
205 |
+
'value' => $data,
|
206 |
+
'desc_pos' => 'after',
|
207 |
+
'extra' => array('class="regular-text"'),
|
208 |
+
));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
209 |
|
210 |
+
foreach ( $args as $key => &$val )
|
211 |
+
$$key = &$val;
|
212 |
+
unset($val);
|
|
|
213 |
|
214 |
+
if ( FALSE === strpos($name, '[') )
|
215 |
+
$extra[] = "id='{$name}'";
|
216 |
|
217 |
+
return self::_input_gen($args);
|
218 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
219 |
|
220 |
+
// Generate html with the final args
|
221 |
+
private static function _input_gen($args) {
|
222 |
+
extract(wp_parse_args($args, array(
|
223 |
+
'name' => NULL,
|
224 |
+
'value' => NULL,
|
225 |
+
'desc' => NULL,
|
226 |
+
'extra' => array()
|
227 |
+
)));
|
228 |
|
229 |
+
$extra = self::validate_extra($extra, $name);
|
|
|
|
|
|
|
230 |
|
231 |
+
if ( 'textarea' == $type ) {
|
232 |
+
$value = esc_html($value);
|
233 |
+
$input = "<textarea name='{$name}'{$extra}>\n{$value}\n</textarea>\n";
|
234 |
}
|
235 |
+
else {
|
236 |
+
$value = esc_attr($value);
|
237 |
+
$input = "<input name='{$name}' value='{$value}' type='{$type}'{$extra} /> ";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
238 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
239 |
|
240 |
+
return self::add_label($input, $desc, $desc_pos);
|
|
|
|
|
|
|
|
|
|
|
|
|
241 |
}
|
242 |
|
243 |
+
private static function _select() {
|
244 |
+
extract(wp_parse_args(self::$args, array(
|
245 |
+
'name' => '',
|
246 |
+
'value' => array(),
|
247 |
+
'text' => '',
|
248 |
+
'selected' => array('foo'), // hack to make default blank
|
249 |
+
'extra' => '',
|
250 |
+
'numeric' => false, // use numeric array instead of associative
|
251 |
+
'desc' => '',
|
252 |
+
'desc_pos' => '',
|
253 |
+
)), EXTR_SKIP);
|
254 |
|
255 |
+
if ( empty($value) )
|
256 |
+
$value = array('' => '');
|
257 |
|
258 |
+
if ( !is_array($value) )
|
259 |
+
return trigger_error("'value' argument is expected to be an array", E_USER_WARNING);
|
260 |
|
261 |
+
if ( !self::is_associative($value) && !$numeric )
|
262 |
+
$value = array_combine($value, $value);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
263 |
|
264 |
+
if ( isset(self::$formdata[$name]) )
|
265 |
+
$cur_val = self::$formdata[$name];
|
266 |
+
else
|
267 |
+
$cur_val = $selected;
|
268 |
|
269 |
+
if ( false === $text ) {
|
270 |
+
$opts = '';
|
271 |
} else {
|
272 |
+
$opts = "\t<option value=''";
|
273 |
+
if ( $cur_val === array('foo') )
|
274 |
+
$opts .= " selected='selected'";
|
275 |
+
$opts .= ">{$text}</option>\n";
|
276 |
}
|
277 |
|
278 |
+
foreach ( $value as $key => $value ) {
|
279 |
+
if ( empty($key) || empty($value) )
|
280 |
+
continue;
|
281 |
|
282 |
+
$cur_extra = array();
|
283 |
+
if ( (string) $key == (string) $cur_val )
|
284 |
+
$cur_extra[] = "selected='selected'";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
285 |
|
286 |
+
$cur_extra = self::validate_extra($cur_extra, $key);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
287 |
|
288 |
+
$opts .= "\t<option value='{$key}'{$cur_extra}>{$value}</option>\n";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
289 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
290 |
|
291 |
+
$extra = self::validate_extra($extra, $name);
|
|
|
|
|
|
|
292 |
|
293 |
+
$input = "<select name='{$name}'$extra>\n{$opts}</select>";
|
294 |
+
|
295 |
+
return self::add_label($input, $desc, $desc_pos);
|
|
|
|
|
|
|
|
|
|
|
|
|
296 |
}
|
297 |
|
298 |
+
private static function add_label($input, $desc, $desc_pos) {
|
299 |
+
if ( empty($desc_pos) )
|
300 |
+
$desc_pos = 'after';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
301 |
|
302 |
+
$label = '';
|
303 |
+
if ( false === strpos($desc, self::token) ) {
|
304 |
+
switch ($desc_pos) {
|
305 |
+
case 'before': $label = $desc . ' ' . self::token; break;
|
306 |
+
case 'after': $label = self::token . ' ' . $desc;
|
307 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
308 |
} else {
|
309 |
+
$label = $desc;
|
310 |
}
|
311 |
|
312 |
+
$label = trim(str_replace(self::token, $input, $label));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
313 |
|
314 |
+
if ( empty($desc) )
|
315 |
+
$output = $input . "\n";
|
316 |
+
else
|
317 |
+
$output = "<label>{$label}</label>\n";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
318 |
|
319 |
+
return $output;
|
320 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
321 |
|
322 |
+
private static function validate_extra($extra, $name, $implode = true) {
|
323 |
+
if ( !is_array($extra) )
|
324 |
+
$extra = explode(' ', $extra);
|
325 |
|
326 |
+
if ( empty($extra) )
|
327 |
+
return '';
|
|
|
328 |
|
329 |
+
return ' ' . ltrim(implode(' ', $extra));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
330 |
}
|
331 |
|
332 |
+
// Utilities
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
333 |
|
334 |
+
private static function is_associative($array) {
|
335 |
+
if ( !is_array($array) || empty($array) )
|
336 |
+
return false;
|
337 |
|
338 |
+
$keys = array_keys($array);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
339 |
|
340 |
+
return array_keys($keys) !== $keys;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
341 |
}
|
342 |
|
343 |
+
private static function array_extract($array, $keys) {
|
344 |
+
$r = array();
|
345 |
+
foreach ( $keys as $key )
|
346 |
+
if ( isset($array[$key]) )
|
347 |
+
$r[$key] = $array[$key];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
348 |
|
349 |
+
return $r;
|
|
|
|
|
|
|
|
|
|
|
350 |
}
|
351 |
}
|
352 |
|
353 |
+
// PHP < 5.2
|
354 |
+
if ( !function_exists('array_fill_keys') ) :
|
355 |
+
function array_fill_keys($keys, $value) {
|
356 |
+
if ( !is_array($keys) )
|
357 |
+
trigger_error('First argument is expected to be an array.' . gettype($keys) . 'given', E_USER_WARNING);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
358 |
|
359 |
+
$r = array();
|
360 |
+
foreach ( $keys as $key )
|
361 |
+
$r[$key] = $value;
|
|
|
|
|
|
|
|
|
|
|
362 |
|
363 |
+
return $r;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
364 |
}
|
365 |
+
endif;
|
366 |
|
scb/Hooks.php
DELETED
@@ -1,72 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class scbHooks {
|
4 |
-
private static $mangle_name;
|
5 |
-
|
6 |
-
public static function add( $class ) {
|
7 |
-
self::_do( 'add_filter', $class );
|
8 |
-
}
|
9 |
-
|
10 |
-
public static function remove( $class ) {
|
11 |
-
self::_do( 'remove_filter', $class );
|
12 |
-
}
|
13 |
-
|
14 |
-
public static function debug( $class, $mangle_name = false ) {
|
15 |
-
self::$mangle_name = $mangle_name;
|
16 |
-
|
17 |
-
echo "<pre>";
|
18 |
-
self::_do( array( __CLASS__, '_print' ), $class );
|
19 |
-
echo "</pre>";
|
20 |
-
}
|
21 |
-
|
22 |
-
private static function _print( $tag, $callback, $prio, $argc ) {
|
23 |
-
$static = !is_object( $callback[0] );
|
24 |
-
|
25 |
-
if ( self::$mangle_name )
|
26 |
-
$class = $static ? '__CLASS__' : '$this';
|
27 |
-
else if ( $static )
|
28 |
-
$class = "'" . $callback[0] . "'";
|
29 |
-
else
|
30 |
-
$class = '$' . get_class( $callback[0] );
|
31 |
-
|
32 |
-
$func = "array( $class, '$callback[1]' )";
|
33 |
-
|
34 |
-
echo "add_filter( '$tag', $func";
|
35 |
-
|
36 |
-
if ( $prio != 10 || $argc > 1 ) {
|
37 |
-
echo ", $prio";
|
38 |
-
|
39 |
-
if ( $argc > 1 )
|
40 |
-
echo ", $argc";
|
41 |
-
}
|
42 |
-
|
43 |
-
echo " );\n";
|
44 |
-
}
|
45 |
-
|
46 |
-
private static function _do( $action, $class ) {
|
47 |
-
$reflection = new ReflectionClass( $class );
|
48 |
-
|
49 |
-
foreach ( $reflection->getMethods() as $method ) {
|
50 |
-
if ( $method->isPublic() && !$method->isConstructor() ) {
|
51 |
-
$comment = $method->getDocComment();
|
52 |
-
|
53 |
-
if ( preg_match( '/@nohook[ \t\*\n]+/', $comment ) ) {
|
54 |
-
continue;
|
55 |
-
}
|
56 |
-
|
57 |
-
preg_match_all( '/@hook:?\s+([^\s]+)/', $comment, $matches ) ? $matches[1] : $method->name;
|
58 |
-
if ( empty( $matches[1] ) )
|
59 |
-
$hooks = array( $method->name );
|
60 |
-
else
|
61 |
-
$hooks = $matches[1];
|
62 |
-
|
63 |
-
$priority = preg_match( '/@priority:?\s+(\d+)/', $comment, $matches ) ? $matches[1] : 10;
|
64 |
-
|
65 |
-
foreach ( $hooks as $hook ) {
|
66 |
-
call_user_func( $action, $hook, array( $class, $method->name ), $priority, $method->getNumberOfParameters() );
|
67 |
-
}
|
68 |
-
}
|
69 |
-
}
|
70 |
-
}
|
71 |
-
}
|
72 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
scb/Options.php
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
//
|
4 |
|
5 |
class scbOptions {
|
6 |
|
7 |
-
protected $key;
|
8 |
|
9 |
-
protected $defaults; // the default
|
10 |
|
11 |
public $wp_filter_id; // used by WP hooks
|
12 |
|
@@ -17,14 +17,14 @@ class scbOptions {
|
|
17 |
* @param string $file Reference to main plugin file
|
18 |
* @param array $defaults An associative array of default values (optional)
|
19 |
*/
|
20 |
-
public function __construct(
|
21 |
$this->key = $key;
|
22 |
$this->defaults = $defaults;
|
23 |
|
24 |
-
if ( $
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
}
|
29 |
|
30 |
/**
|
@@ -35,41 +35,44 @@ class scbOptions {
|
|
35 |
}
|
36 |
|
37 |
/**
|
38 |
-
* Get option values for one or all fields
|
39 |
*
|
40 |
-
* @param string|array $field The field to get
|
41 |
* @return mixed Whatever is in those fields
|
42 |
*/
|
43 |
-
public function get(
|
44 |
-
$data =
|
45 |
|
46 |
-
|
|
|
|
|
|
|
47 |
}
|
48 |
|
49 |
/**
|
50 |
-
* Get default values for one or all fields
|
51 |
*
|
52 |
-
* @param string|array $field The field to get
|
53 |
* @return mixed Whatever is in those fields
|
54 |
*/
|
55 |
-
public function get_defaults(
|
56 |
-
return
|
57 |
}
|
58 |
|
59 |
/**
|
60 |
* Set all data fields, certain fields or a single field
|
61 |
*
|
62 |
* @param string|array $field The field to update or an associative array
|
63 |
-
* @param mixed $value The new value (
|
64 |
* @return null
|
65 |
*/
|
66 |
-
public function set(
|
67 |
-
if ( is_array(
|
68 |
$newdata = $field;
|
69 |
else
|
70 |
-
$newdata = array(
|
71 |
|
72 |
-
$this->update(
|
73 |
}
|
74 |
|
75 |
/**
|
@@ -78,7 +81,7 @@ class scbOptions {
|
|
78 |
* @return null
|
79 |
*/
|
80 |
public function reset() {
|
81 |
-
$this->update(
|
82 |
}
|
83 |
|
84 |
/**
|
@@ -87,7 +90,7 @@ class scbOptions {
|
|
87 |
* @return bool
|
88 |
*/
|
89 |
public function cleanup() {
|
90 |
-
$this->update(
|
91 |
}
|
92 |
|
93 |
/**
|
@@ -97,11 +100,11 @@ class scbOptions {
|
|
97 |
* @param bool $clean wether to remove unrecognized keys or not
|
98 |
* @return null
|
99 |
*/
|
100 |
-
public function update(
|
101 |
if ( $clean )
|
102 |
-
$newdata = $this->_clean(
|
103 |
|
104 |
-
update_option(
|
105 |
}
|
106 |
|
107 |
/**
|
@@ -110,40 +113,58 @@ class scbOptions {
|
|
110 |
* @return null
|
111 |
*/
|
112 |
public function delete() {
|
113 |
-
delete_option(
|
114 |
}
|
115 |
|
116 |
|
117 |
//_____INTERNAL METHODS_____
|
118 |
|
119 |
|
120 |
-
//
|
121 |
-
function
|
122 |
-
|
123 |
}
|
124 |
|
125 |
-
|
126 |
-
|
127 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
}
|
129 |
|
130 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
}
|
132 |
|
133 |
// Magic method: $options->field
|
134 |
-
function __get(
|
135 |
-
return $this->get(
|
136 |
}
|
137 |
|
138 |
// Magic method: $options->field = $value
|
139 |
-
function __set(
|
140 |
-
$this->set(
|
141 |
}
|
142 |
|
143 |
-
// Magic method: isset(
|
144 |
-
function __isset(
|
145 |
$data = $this->get();
|
146 |
-
return isset(
|
147 |
}
|
148 |
}
|
149 |
|
1 |
<?php
|
2 |
|
3 |
+
// Documentation: http://scribu.net/wordpress/scb-framework/scb-options.html
|
4 |
|
5 |
class scbOptions {
|
6 |
|
7 |
+
protected $key; // the option name
|
8 |
|
9 |
+
protected $defaults; // the default value(s)
|
10 |
|
11 |
public $wp_filter_id; // used by WP hooks
|
12 |
|
17 |
* @param string $file Reference to main plugin file
|
18 |
* @param array $defaults An associative array of default values (optional)
|
19 |
*/
|
20 |
+
public function __construct($key, $file, $defaults = '') {
|
21 |
$this->key = $key;
|
22 |
$this->defaults = $defaults;
|
23 |
|
24 |
+
if ( is_array($this->defaults) )
|
25 |
+
register_activation_hook($file, array($this, '_update_reset'));
|
26 |
+
|
27 |
+
scbUtil::add_uninstall_hook($file, array($this, 'delete'));
|
28 |
}
|
29 |
|
30 |
/**
|
35 |
}
|
36 |
|
37 |
/**
|
38 |
+
* Get option values for one, many or all fields
|
39 |
*
|
40 |
+
* @param string|array $field The field(s) to get
|
41 |
* @return mixed Whatever is in those fields
|
42 |
*/
|
43 |
+
public function get($field = '') {
|
44 |
+
$data = get_option($this->key);
|
45 |
|
46 |
+
if ( is_array($this->defaults) )
|
47 |
+
$data = (array) $data;
|
48 |
+
|
49 |
+
return $this->_get($field, $data);
|
50 |
}
|
51 |
|
52 |
/**
|
53 |
+
* Get default values for one, many or all fields
|
54 |
*
|
55 |
+
* @param string|array $field The field(s) to get
|
56 |
* @return mixed Whatever is in those fields
|
57 |
*/
|
58 |
+
public function get_defaults($field = '') {
|
59 |
+
return $this->_get($field, $this->defaults);
|
60 |
}
|
61 |
|
62 |
/**
|
63 |
* Set all data fields, certain fields or a single field
|
64 |
*
|
65 |
* @param string|array $field The field to update or an associative array
|
66 |
+
* @param mixed $value The new value (ignored if $field is array)
|
67 |
* @return null
|
68 |
*/
|
69 |
+
public function set($field, $value = '') {
|
70 |
+
if ( is_array($field) )
|
71 |
$newdata = $field;
|
72 |
else
|
73 |
+
$newdata = array($field => $value);
|
74 |
|
75 |
+
$this->update(array_merge($this->get(), $newdata));
|
76 |
}
|
77 |
|
78 |
/**
|
81 |
* @return null
|
82 |
*/
|
83 |
public function reset() {
|
84 |
+
$this->update($this->defaults, false);
|
85 |
}
|
86 |
|
87 |
/**
|
90 |
* @return bool
|
91 |
*/
|
92 |
public function cleanup() {
|
93 |
+
$this->update($this->_clean($this->get()));
|
94 |
}
|
95 |
|
96 |
/**
|
100 |
* @param bool $clean wether to remove unrecognized keys or not
|
101 |
* @return null
|
102 |
*/
|
103 |
+
public function update($newdata, $clean = true) {
|
104 |
if ( $clean )
|
105 |
+
$newdata = $this->_clean($newdata);
|
106 |
|
107 |
+
update_option($this->key, $newdata);
|
108 |
}
|
109 |
|
110 |
/**
|
113 |
* @return null
|
114 |
*/
|
115 |
public function delete() {
|
116 |
+
delete_option($this->key);
|
117 |
}
|
118 |
|
119 |
|
120 |
//_____INTERNAL METHODS_____
|
121 |
|
122 |
|
123 |
+
// Add new fields with their default values
|
124 |
+
function _update_reset() {
|
125 |
+
$this->update(array_merge($this->defaults, $this->get()));
|
126 |
}
|
127 |
|
128 |
+
private function _clean($data) {
|
129 |
+
if ( !is_array($data) || !is_array($this->defaults) )
|
130 |
+
return $data;
|
131 |
+
|
132 |
+
$r = array();
|
133 |
+
foreach ( array_keys($this->defaults) as $key )
|
134 |
+
$r[$key] = @$data[$key];
|
135 |
+
|
136 |
+
return $r;
|
137 |
}
|
138 |
|
139 |
+
// Get one, more or all fields from an array
|
140 |
+
private function _get($field, $data) {
|
141 |
+
if ( empty($field) )
|
142 |
+
return $data;
|
143 |
+
|
144 |
+
if ( is_string($field) )
|
145 |
+
return $data[$field];
|
146 |
+
|
147 |
+
foreach ( $field as $key )
|
148 |
+
if ( isset($data[$key]) )
|
149 |
+
$result[] = $data[$key];
|
150 |
+
|
151 |
+
return $result;
|
152 |
}
|
153 |
|
154 |
// Magic method: $options->field
|
155 |
+
function __get($field) {
|
156 |
+
return $this->get($field);
|
157 |
}
|
158 |
|
159 |
// Magic method: $options->field = $value
|
160 |
+
function __set($field, $value) {
|
161 |
+
$this->set($field, $value);
|
162 |
}
|
163 |
|
164 |
+
// Magic method: isset($options->field)
|
165 |
+
function __isset($field) {
|
166 |
$data = $this->get();
|
167 |
+
return isset($data[$field]);
|
168 |
}
|
169 |
}
|
170 |
|
scb/PostMetabox.php
DELETED
@@ -1,182 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class scbPostMetabox {
|
4 |
-
|
5 |
-
private $id, $title;
|
6 |
-
|
7 |
-
private $post_types;
|
8 |
-
|
9 |
-
private $post_data = array();
|
10 |
-
|
11 |
-
protected $actions = array( 'admin_enqueue_scripts', 'post_updated_messages' );
|
12 |
-
|
13 |
-
public function __construct( $id, $title, $args = array() ) {
|
14 |
-
$this->id = $id;
|
15 |
-
$this->title = $title;
|
16 |
-
|
17 |
-
$args = wp_parse_args( $args, array(
|
18 |
-
'post_type' => 'post',
|
19 |
-
'context' => 'advanced',
|
20 |
-
'priority' => 'default'
|
21 |
-
) );
|
22 |
-
|
23 |
-
if ( is_string( $args['post_type'] ) )
|
24 |
-
$args['post_type'] = array( $args['post_type'] );
|
25 |
-
$this->post_types = $args['post_type'];
|
26 |
-
|
27 |
-
$this->context = $args['context'];
|
28 |
-
$this->priority = $args['priority'];
|
29 |
-
|
30 |
-
add_action( 'load-post.php', array( $this, 'pre_register' ) );
|
31 |
-
add_action( 'load-post-new.php', array( $this, 'pre_register' ) );
|
32 |
-
}
|
33 |
-
|
34 |
-
final public function pre_register() {
|
35 |
-
if ( ! in_array( get_current_screen()->post_type, $this->post_types ) )
|
36 |
-
return;
|
37 |
-
|
38 |
-
if ( ! $this->condition() )
|
39 |
-
return;
|
40 |
-
|
41 |
-
if ( isset( $_GET['post'] ) )
|
42 |
-
$this->post_data = $this->get_meta( intval( $_GET['post'] ) );
|
43 |
-
|
44 |
-
add_action( 'add_meta_boxes', array( $this, 'register' ) );
|
45 |
-
add_action( 'save_post', array( $this, '_save_post' ), 10, 2 );
|
46 |
-
|
47 |
-
foreach ( $this->actions as $action ) {
|
48 |
-
if ( method_exists( $this, $action ) )
|
49 |
-
add_action( $action, array( $this, $action ) );
|
50 |
-
}
|
51 |
-
}
|
52 |
-
|
53 |
-
// Additional checks before registering the metabox
|
54 |
-
protected function condition() {
|
55 |
-
return true;
|
56 |
-
}
|
57 |
-
|
58 |
-
final public function register() {
|
59 |
-
add_meta_box( $this->id, $this->title, array( $this, 'display' ), null, $this->context, $this->priority );
|
60 |
-
}
|
61 |
-
|
62 |
-
public function before_display( $form_data, $post ) {
|
63 |
-
return $form_data;
|
64 |
-
}
|
65 |
-
|
66 |
-
public function display( $post ) {
|
67 |
-
$form_fields = $this->form_fields();
|
68 |
-
if ( ! $form_fields )
|
69 |
-
return;
|
70 |
-
|
71 |
-
$form_data = $this->post_data;
|
72 |
-
$error_fields = array();
|
73 |
-
|
74 |
-
if ( isset( $form_data['_error_data_' . $this->id ] ) ) {
|
75 |
-
$data = maybe_unserialize( $form_data['_error_data_' . $this->id ] );
|
76 |
-
|
77 |
-
$error_fields = $data['fields'];
|
78 |
-
$form_data = $data['data'];
|
79 |
-
}
|
80 |
-
|
81 |
-
$form_data = $this->before_display( $form_data, $post );
|
82 |
-
|
83 |
-
$this->before_form( $post );
|
84 |
-
echo $this->table( $form_fields, $form_data, $error_fields );
|
85 |
-
$this->after_form( $post );
|
86 |
-
|
87 |
-
delete_post_meta( $post->ID, '_error_data_' . $this->id );
|
88 |
-
}
|
89 |
-
|
90 |
-
public function table( $rows, $formdata, $errors = array() ) {
|
91 |
-
$output = '';
|
92 |
-
foreach ( $rows as $row ) {
|
93 |
-
$output .= $this->table_row( $row, $formdata, $errors );
|
94 |
-
}
|
95 |
-
|
96 |
-
$output = scbForms::table_wrap( $output );
|
97 |
-
|
98 |
-
return $output;
|
99 |
-
}
|
100 |
-
|
101 |
-
public function table_row( $row, $formdata, $errors = array() ) {
|
102 |
-
$input = scbForms::input( $row, $formdata );
|
103 |
-
|
104 |
-
// If row has an error, highlight it
|
105 |
-
$style = ( in_array( $row['name'], $errors ) ) ? 'style= "background-color: #FFCCCC"' : '';
|
106 |
-
|
107 |
-
return html( 'tr',
|
108 |
-
html( "th $style scope='row'", $row['title'] ),
|
109 |
-
html( "td $style", $input )
|
110 |
-
);
|
111 |
-
}
|
112 |
-
|
113 |
-
// Display some extra HTML before the form
|
114 |
-
public function before_form( $post ) { }
|
115 |
-
|
116 |
-
// Return the list of form fields
|
117 |
-
public function form_fields() {
|
118 |
-
return array();
|
119 |
-
}
|
120 |
-
|
121 |
-
// Display some extra HTML after the form
|
122 |
-
public function after_form( $post ) { }
|
123 |
-
|
124 |
-
// Makes sure that the saving occurs only for the post being edited
|
125 |
-
final public function _save_post( $post_id, $post ) {
|
126 |
-
if ( ! isset( $_POST['action'] ) || $_POST['action'] != 'editpost' )
|
127 |
-
return;
|
128 |
-
|
129 |
-
if ( $post_id != $_POST['post_ID'] )
|
130 |
-
return;
|
131 |
-
|
132 |
-
if ( ! in_array( $post->post_type, $this->post_types ) )
|
133 |
-
return;
|
134 |
-
|
135 |
-
$this->save( $post->ID );
|
136 |
-
}
|
137 |
-
|
138 |
-
protected function save( $post_id ) {
|
139 |
-
$form_fields = $this->form_fields();
|
140 |
-
|
141 |
-
$to_update = scbForms::validate_post_data( $form_fields );
|
142 |
-
|
143 |
-
// Filter data
|
144 |
-
$to_update = $this->before_save( $to_update, $post_id );
|
145 |
-
|
146 |
-
// Validate dataset
|
147 |
-
$is_valid = $this->validate_post_data( $to_update, $post_id );
|
148 |
-
if ( $is_valid instanceof WP_Error && $is_valid->get_error_codes() ) {
|
149 |
-
|
150 |
-
$error_data = array(
|
151 |
-
'fields' => $is_valid->get_error_codes(),
|
152 |
-
'data' => $to_update
|
153 |
-
);
|
154 |
-
update_post_meta( $post_id, '_error_data_' . $this->id, $error_data );
|
155 |
-
|
156 |
-
$location = add_query_arg( 'message', 1, get_edit_post_link( $post_id, 'url' ) );
|
157 |
-
wp_redirect( apply_filters( 'redirect_post_location', $location, $post_id ) );
|
158 |
-
exit;
|
159 |
-
}
|
160 |
-
|
161 |
-
foreach ( $to_update as $key => $value ) {
|
162 |
-
update_post_meta( $post_id, $key, $value );
|
163 |
-
}
|
164 |
-
}
|
165 |
-
|
166 |
-
protected function before_save( $post_data, $post_id ) {
|
167 |
-
return $post_data;
|
168 |
-
}
|
169 |
-
|
170 |
-
protected function validate_post_data( $post_data, $post_id ) {
|
171 |
-
return false;
|
172 |
-
}
|
173 |
-
|
174 |
-
private function get_meta( $post_id ) {
|
175 |
-
$meta = get_post_custom( $post_id );
|
176 |
-
foreach ( $meta as $key => $values )
|
177 |
-
$meta[ $key ] = maybe_unserialize( $meta[ $key ][0] );
|
178 |
-
|
179 |
-
return $meta;
|
180 |
-
}
|
181 |
-
}
|
182 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
scb/Table.php
CHANGED
@@ -1,31 +1,40 @@
|
|
1 |
<?php
|
2 |
|
3 |
// Takes care of creating, updating and deleting database tables
|
4 |
-
|
5 |
class scbTable {
|
6 |
protected $name;
|
7 |
protected $columns;
|
8 |
-
protected $upgrade_method;
|
9 |
|
10 |
-
function __construct(
|
11 |
-
|
12 |
-
$this->columns = $columns;
|
13 |
-
$this->upgrade_method = $upgrade_method;
|
14 |
|
15 |
-
|
|
|
16 |
|
17 |
-
|
18 |
-
|
19 |
-
scbUtil::add_uninstall_hook( $file, array( $this, 'uninstall' ) );
|
20 |
-
}
|
21 |
}
|
22 |
|
23 |
function install() {
|
24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
}
|
26 |
|
27 |
function uninstall() {
|
28 |
-
|
|
|
|
|
29 |
}
|
30 |
}
|
31 |
|
1 |
<?php
|
2 |
|
3 |
// Takes care of creating, updating and deleting database tables
|
|
|
4 |
class scbTable {
|
5 |
protected $name;
|
6 |
protected $columns;
|
|
|
7 |
|
8 |
+
function __construct($name, $file, $columns) {
|
9 |
+
global $wpdb;
|
|
|
|
|
10 |
|
11 |
+
$this->name = $wpdb->$name = $wpdb->prefix . $name;
|
12 |
+
$this->columns = $columns;
|
13 |
|
14 |
+
register_activation_hook($file, array($this, 'install'));
|
15 |
+
scbUtil::add_uninstall_hook($file, array($this, 'uninstall'));
|
|
|
|
|
16 |
}
|
17 |
|
18 |
function install() {
|
19 |
+
global $wpdb;
|
20 |
+
|
21 |
+
$charset_collate = '';
|
22 |
+
if ( $wpdb->has_cap( 'collation' ) ) {
|
23 |
+
if ( ! empty($wpdb->charset) )
|
24 |
+
$charset_collate = "DEFAULT CHARACTER SET $wpdb->charset";
|
25 |
+
if ( ! empty($wpdb->collate) )
|
26 |
+
$charset_collate .= " COLLATE $wpdb->collate";
|
27 |
+
}
|
28 |
+
|
29 |
+
require_once ABSPATH . 'wp-admin/includes/upgrade.php';
|
30 |
+
|
31 |
+
dbDelta("CREATE TABLE $this->name ($this->columns) $charset_collate;");
|
32 |
}
|
33 |
|
34 |
function uninstall() {
|
35 |
+
global $wpdb;
|
36 |
+
|
37 |
+
$wpdb->query("DROP TABLE IF EXISTS $this->name");
|
38 |
}
|
39 |
}
|
40 |
|
scb/Util.php
CHANGED
@@ -1,305 +1,162 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
// Various utilities
|
4 |
-
|
5 |
class scbUtil {
|
6 |
|
7 |
// Force script enqueue
|
8 |
-
static function do_scripts(
|
9 |
global $wp_scripts;
|
10 |
|
11 |
-
if ( ! is_a(
|
12 |
$wp_scripts = new WP_Scripts();
|
13 |
|
14 |
-
$wp_scripts->do_items(
|
15 |
}
|
16 |
|
17 |
// Force style enqueue
|
18 |
-
static function do_styles(
|
19 |
-
self::do_scripts(
|
20 |
|
21 |
global $wp_styles;
|
22 |
|
23 |
-
if ( ! is_a(
|
24 |
$wp_styles = new WP_Styles();
|
25 |
|
26 |
ob_start();
|
27 |
-
$wp_styles->do_items(
|
28 |
-
$content = str_replace(
|
29 |
|
30 |
echo "<script type='text/javascript'>\n";
|
31 |
-
echo "
|
32 |
-
echo "
|
33 |
-
echo "
|
34 |
echo "</script>";
|
35 |
}
|
36 |
|
37 |
-
// Enable delayed activation; to be used with scb_init()
|
38 |
-
static function add_activation_hook( $plugin, $callback ) {
|
39 |
-
if ( defined( 'SCB_LOAD_MU' ) )
|
40 |
-
register_activation_hook( $plugin, $callback );
|
41 |
-
else
|
42 |
-
add_action( 'scb_activation_' . plugin_basename( $plugin ), $callback );
|
43 |
-
}
|
44 |
-
|
45 |
-
// For debugging
|
46 |
-
static function do_activation( $plugin ) {
|
47 |
-
do_action( 'scb_activation_' . plugin_basename( $plugin ) );
|
48 |
-
}
|
49 |
-
|
50 |
-
// Allows more than one uninstall hooks.
|
51 |
-
// Also prevents an UPDATE query on each page load.
|
52 |
-
static function add_uninstall_hook( $plugin, $callback ) {
|
53 |
-
if ( !is_admin() )
|
54 |
-
return;
|
55 |
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
}
|
60 |
-
|
61 |
-
// For debugging
|
62 |
-
static function do_uninstall( $plugin ) {
|
63 |
-
do_action( 'uninstall_' . plugin_basename( $plugin ) );
|
64 |
-
}
|
65 |
|
66 |
-
|
67 |
-
static function get_current_url() {
|
68 |
-
return ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
69 |
}
|
70 |
|
71 |
-
// Apply a function to each element of a (
|
72 |
-
static function array_map_recursive(
|
73 |
-
array_walk_recursive(
|
74 |
|
75 |
return $array;
|
76 |
}
|
77 |
|
78 |
-
static function array_map_recursive_helper(
|
79 |
-
$val =
|
80 |
}
|
81 |
|
82 |
// Extract certain $keys from $array
|
83 |
-
static function array_extract(
|
84 |
-
|
85 |
-
|
|
|
|
|
|
|
|
|
|
|
86 |
}
|
87 |
|
88 |
// Extract a certain value from a list of arrays
|
89 |
-
static function array_pluck(
|
90 |
-
|
91 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
}
|
93 |
|
94 |
// Transform a list of objects into an associative array
|
95 |
-
static function objects_to_assoc(
|
96 |
-
|
97 |
-
|
|
|
|
|
|
|
|
|
98 |
}
|
99 |
|
100 |
// Prepare an array for an IN statement
|
101 |
-
static function array_to_sql(
|
102 |
foreach ( $values as &$val )
|
103 |
-
$val = "'" . esc_sql(
|
104 |
|
105 |
-
return implode(
|
106 |
}
|
107 |
|
108 |
-
// Example: split_at(
|
109 |
-
static function split_at(
|
110 |
-
$i = strpos(
|
111 |
|
112 |
if ( false === $i )
|
113 |
return false;
|
114 |
|
115 |
-
$start = substr(
|
116 |
-
$finish = substr(
|
117 |
-
|
118 |
-
return array( $start, $finish );
|
119 |
-
}
|
120 |
-
}
|
121 |
-
|
122 |
-
// Return a standard admin notice
|
123 |
-
function scb_admin_notice( $msg, $class = 'updated' ) {
|
124 |
-
return html( "div class='$class fade'", html( "p", $msg ) );
|
125 |
-
}
|
126 |
-
|
127 |
-
// Transform a list of objects into an associative array
|
128 |
-
function scb_list_fold( $list, $key, $value ) {
|
129 |
-
$r = array();
|
130 |
-
|
131 |
-
if ( is_array( reset( $list ) ) ) {
|
132 |
-
foreach ( $list as $item )
|
133 |
-
$r[ $item[ $key ] ] = $item[ $value ];
|
134 |
-
} else {
|
135 |
-
foreach ( $list as $item )
|
136 |
-
$r[ $item->$key ] = $item->$value;
|
137 |
-
}
|
138 |
-
|
139 |
-
return $r;
|
140 |
-
}
|
141 |
-
|
142 |
-
/**
|
143 |
-
* Splits a list into sets, grouped by the result of running each value through $fn.
|
144 |
-
*
|
145 |
-
* @param array List of items to be partitioned
|
146 |
-
* @param callback Function that takes an element and returns a string key
|
147 |
-
*/
|
148 |
-
function scb_list_group_by( $list, $fn ) {
|
149 |
-
$groups = array();
|
150 |
-
|
151 |
-
foreach ( $list as $item ) {
|
152 |
-
$key = call_user_func( $fn, $item );
|
153 |
-
|
154 |
-
if ( null === $key )
|
155 |
-
continue;
|
156 |
-
|
157 |
-
$groups[ $key ][] = $item;
|
158 |
-
}
|
159 |
-
|
160 |
-
return $groups;
|
161 |
-
}
|
162 |
-
|
163 |
-
//_____Database Table Utilities_____
|
164 |
-
|
165 |
-
/**
|
166 |
-
* Register a table with $wpdb
|
167 |
-
*
|
168 |
-
* @param string $key The key to be used on the $wpdb object
|
169 |
-
* @param string $name The actual name of the table, without $wpdb->prefix
|
170 |
-
*/
|
171 |
-
function scb_register_table( $key, $name = false ) {
|
172 |
-
global $wpdb;
|
173 |
-
|
174 |
-
if ( !$name )
|
175 |
-
$name = $key;
|
176 |
-
|
177 |
-
$wpdb->tables[] = $name;
|
178 |
-
$wpdb->$key = $wpdb->prefix . $name;
|
179 |
-
}
|
180 |
-
|
181 |
-
/**
|
182 |
-
* Runs the SQL query for installing/upgrading a table
|
183 |
-
*
|
184 |
-
* @param string $key The key used in scb_register_table()
|
185 |
-
* @param string $columns The SQL columns for the CREATE TABLE statement
|
186 |
-
* @param array $opts Various other options
|
187 |
-
*/
|
188 |
-
function scb_install_table( $key, $columns, $opts = array() ) {
|
189 |
-
global $wpdb;
|
190 |
-
|
191 |
-
$full_table_name = $wpdb->$key;
|
192 |
-
|
193 |
-
if ( is_string( $opts ) ) {
|
194 |
-
$opts = array( 'upgrade_method' => $opts );
|
195 |
-
}
|
196 |
|
197 |
-
|
198 |
-
'upgrade_method' => 'dbDelta',
|
199 |
-
'table_options' => '',
|
200 |
-
) );
|
201 |
-
|
202 |
-
$charset_collate = '';
|
203 |
-
if ( $wpdb->has_cap( 'collation' ) ) {
|
204 |
-
if ( ! empty( $wpdb->charset ) )
|
205 |
-
$charset_collate = "DEFAULT CHARACTER SET $wpdb->charset";
|
206 |
-
if ( ! empty( $wpdb->collate ) )
|
207 |
-
$charset_collate .= " COLLATE $wpdb->collate";
|
208 |
}
|
209 |
-
|
210 |
-
$table_options = $charset_collate . ' ' . $opts['table_options'];
|
211 |
-
|
212 |
-
if ( 'dbDelta' == $opts['upgrade_method'] ) {
|
213 |
-
require_once ABSPATH . 'wp-admin/includes/upgrade.php';
|
214 |
-
dbDelta( "CREATE TABLE $full_table_name ( $columns ) $table_options" );
|
215 |
-
return;
|
216 |
-
}
|
217 |
-
|
218 |
-
if ( 'delete_first' == $opts['upgrade_method'] )
|
219 |
-
$wpdb->query( "DROP TABLE IF EXISTS $full_table_name;" );
|
220 |
-
|
221 |
-
$wpdb->query( "CREATE TABLE IF NOT EXISTS $full_table_name ( $columns ) $table_options;" );
|
222 |
}
|
223 |
|
224 |
-
function scb_uninstall_table( $key ) {
|
225 |
-
global $wpdb;
|
226 |
-
|
227 |
-
$wpdb->query( "DROP TABLE IF EXISTS " . $wpdb->$key );
|
228 |
-
}
|
229 |
|
230 |
//_____Minimalist HTML framework_____
|
231 |
|
232 |
-
/**
|
233 |
-
* Generate an HTML tag. Atributes are escaped. Content is NOT escaped.
|
234 |
-
*/
|
235 |
-
if ( ! function_exists( 'html' ) ):
|
236 |
-
function html( $tag ) {
|
237 |
-
static $SELF_CLOSING_TAGS = array( 'area', 'base', 'basefont', 'br', 'hr', 'input', 'img', 'link', 'meta' );
|
238 |
|
239 |
-
|
240 |
-
|
241 |
-
$
|
242 |
-
|
243 |
-
if ( is_array( $args[0] ) ) {
|
244 |
-
$closing = $tag;
|
245 |
-
$attributes = array_shift( $args );
|
246 |
-
foreach ( $attributes as $key => $value ) {
|
247 |
-
if ( false === $value )
|
248 |
-
continue;
|
249 |
-
|
250 |
-
if ( true === $value )
|
251 |
-
$value = $key;
|
252 |
-
|
253 |
-
$tag .= ' ' . $key . '="' . esc_attr( $value ) . '"';
|
254 |
-
}
|
255 |
-
} else {
|
256 |
-
list( $closing ) = explode( ' ', $tag, 2 );
|
257 |
-
}
|
258 |
-
|
259 |
-
if ( in_array( $closing, $SELF_CLOSING_TAGS ) ) {
|
260 |
-
return "<{$tag} />";
|
261 |
-
}
|
262 |
-
|
263 |
-
$content = implode( '', $args );
|
264 |
|
265 |
return "<{$tag}>{$content}</{$closing}>";
|
266 |
}
|
267 |
endif;
|
268 |
|
269 |
// Generate an <a> tag
|
270 |
-
if ( ! function_exists(
|
271 |
-
function html_link(
|
272 |
-
if ( empty(
|
273 |
$title = $url;
|
274 |
|
275 |
-
return
|
276 |
}
|
277 |
endif;
|
278 |
|
279 |
-
function scb_get_query_flags( $wp_query = null ) {
|
280 |
-
if ( !$wp_query )
|
281 |
-
$wp_query = $GLOBALS['wp_query'];
|
282 |
|
283 |
-
|
284 |
-
foreach ( get_object_vars( $wp_query ) as $key => $val ) {
|
285 |
-
if ( 'is_' == substr( $key, 0, 3 ) && $val )
|
286 |
-
$flags[] = substr( $key, 3 );
|
287 |
-
}
|
288 |
|
289 |
-
|
|
|
|
|
|
|
|
|
290 |
}
|
|
|
291 |
|
292 |
-
//
|
|
|
|
|
|
|
|
|
|
|
293 |
|
294 |
// WP < ?
|
295 |
-
if ( ! function_exists(
|
296 |
-
function set_post_field(
|
297 |
global $wpdb;
|
298 |
|
299 |
-
$post_id = absint(
|
300 |
-
$value = sanitize_post_field(
|
301 |
|
302 |
-
return $wpdb->update(
|
303 |
}
|
304 |
endif;
|
305 |
|
1 |
<?php
|
2 |
|
|
|
|
|
3 |
class scbUtil {
|
4 |
|
5 |
// Force script enqueue
|
6 |
+
static function do_scripts($handles) {
|
7 |
global $wp_scripts;
|
8 |
|
9 |
+
if ( ! is_a($wp_scripts, 'WP_Scripts') )
|
10 |
$wp_scripts = new WP_Scripts();
|
11 |
|
12 |
+
$wp_scripts->do_items((array) $handles);
|
13 |
}
|
14 |
|
15 |
// Force style enqueue
|
16 |
+
static function do_styles($handles) {
|
17 |
+
self::do_scripts('jquery');
|
18 |
|
19 |
global $wp_styles;
|
20 |
|
21 |
+
if ( ! is_a($wp_styles, 'WP_Styles') )
|
22 |
$wp_styles = new WP_Styles();
|
23 |
|
24 |
ob_start();
|
25 |
+
$wp_styles->do_items((array) $handles);
|
26 |
+
$content = str_replace(array('"', "\n"), array("'", ''), ob_get_clean());
|
27 |
|
28 |
echo "<script type='text/javascript'>\n";
|
29 |
+
echo "jQuery(document).ready(function($) {\n";
|
30 |
+
echo "$('head').prepend(\"$content\");\n";
|
31 |
+
echo "});\n";
|
32 |
echo "</script>";
|
33 |
}
|
34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
+
// Have more than one uninstall hooks; also prevents an UPDATE query on each page load
|
37 |
+
static function add_uninstall_hook($plugin, $callback) {
|
38 |
+
register_uninstall_hook($plugin, '__return_false'); // dummy
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
|
40 |
+
add_action('uninstall_' . plugin_basename($plugin), $callback);
|
|
|
|
|
41 |
}
|
42 |
|
43 |
+
// Apply a function to each element of a (nested) array recursively
|
44 |
+
static function array_map_recursive($callback, $array) {
|
45 |
+
array_walk_recursive($array, array(__CLASS__, 'array_map_recursive_helper'), $callback);
|
46 |
|
47 |
return $array;
|
48 |
}
|
49 |
|
50 |
+
static function array_map_recursive_helper(&$val, $key, $callback) {
|
51 |
+
$val = $callback($val);
|
52 |
}
|
53 |
|
54 |
// Extract certain $keys from $array
|
55 |
+
static function array_extract($array, $keys) {
|
56 |
+
$r = array();
|
57 |
+
|
58 |
+
foreach ( $keys as $key )
|
59 |
+
if ( array_key_exists($key, $array) )
|
60 |
+
$r[$key] = $array[$key];
|
61 |
+
|
62 |
+
return $r;
|
63 |
}
|
64 |
|
65 |
// Extract a certain value from a list of arrays
|
66 |
+
static function array_pluck($array, $key) {
|
67 |
+
$r = array();
|
68 |
+
|
69 |
+
foreach ( $array as $value ) {
|
70 |
+
if ( is_object($value) )
|
71 |
+
$value = get_object_vars($value);
|
72 |
+
if ( array_key_exists($key, $value) )
|
73 |
+
$r[] = $value[$key];
|
74 |
+
}
|
75 |
+
|
76 |
+
return $r;
|
77 |
}
|
78 |
|
79 |
// Transform a list of objects into an associative array
|
80 |
+
static function objects_to_assoc($objects, $key, $value) {
|
81 |
+
$r = array();
|
82 |
+
|
83 |
+
foreach ( $objects as $obj )
|
84 |
+
$r[$obj->$key] = $obj->$value;
|
85 |
+
|
86 |
+
return $r;
|
87 |
}
|
88 |
|
89 |
// Prepare an array for an IN statement
|
90 |
+
static function array_to_sql($values) {
|
91 |
foreach ( $values as &$val )
|
92 |
+
$val = "'" . esc_sql(trim($val)) . "'";
|
93 |
|
94 |
+
return implode(',', $values);
|
95 |
}
|
96 |
|
97 |
+
// Example: split_at('</', '<a></a>') => array('<a>', '</a>')
|
98 |
+
static function split_at($delim, $str) {
|
99 |
+
$i = strpos($str, $delim);
|
100 |
|
101 |
if ( false === $i )
|
102 |
return false;
|
103 |
|
104 |
+
$start = substr($str, 0, $i);
|
105 |
+
$finish = substr($str, $i);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
|
107 |
+
return array($start, $finish);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
}
|
110 |
|
|
|
|
|
|
|
|
|
|
|
111 |
|
112 |
//_____Minimalist HTML framework_____
|
113 |
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
|
115 |
+
if ( ! function_exists('html') ):
|
116 |
+
function html($tag, $content = '') {
|
117 |
+
list($closing) = explode(' ', $tag, 2);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
|
119 |
return "<{$tag}>{$content}</{$closing}>";
|
120 |
}
|
121 |
endif;
|
122 |
|
123 |
// Generate an <a> tag
|
124 |
+
if ( ! function_exists('html_link') ):
|
125 |
+
function html_link($url, $title = '') {
|
126 |
+
if ( empty($title) )
|
127 |
$title = $url;
|
128 |
|
129 |
+
return sprintf("<a href='%s'>%s</a>", esc_url($url), $title);
|
130 |
}
|
131 |
endif;
|
132 |
|
|
|
|
|
|
|
133 |
|
134 |
+
//_____Compatibility layer_____
|
|
|
|
|
|
|
|
|
135 |
|
136 |
+
|
137 |
+
// WP < 3.0
|
138 |
+
if ( ! function_exists('__return_false') ) :
|
139 |
+
function __return_false() {
|
140 |
+
return false;
|
141 |
}
|
142 |
+
endif;
|
143 |
|
144 |
+
// WP < ?
|
145 |
+
if ( ! function_exists('__return_true') ) :
|
146 |
+
function __return_true() {
|
147 |
+
return true;
|
148 |
+
}
|
149 |
+
endif;
|
150 |
|
151 |
// WP < ?
|
152 |
+
if ( ! function_exists('set_post_field') ) :
|
153 |
+
function set_post_field($field, $value, $post_id) {
|
154 |
global $wpdb;
|
155 |
|
156 |
+
$post_id = absint($post_id);
|
157 |
+
$value = sanitize_post_field($field, $value, $post_id, 'db');
|
158 |
|
159 |
+
return $wpdb->update($wpdb->posts, array($field => $value), array('ID' => $post_id));
|
160 |
}
|
161 |
endif;
|
162 |
|
scb/Widget.php
CHANGED
@@ -7,41 +7,41 @@ abstract class scbWidget extends WP_Widget {
|
|
7 |
|
8 |
private static $scb_widgets = array();
|
9 |
|
10 |
-
static function init(
|
11 |
self::$scb_widgets[] = $class;
|
12 |
|
13 |
-
add_action(
|
14 |
|
15 |
// for auto-uninstall
|
16 |
-
if ( $file && $base && class_exists(
|
17 |
-
new scbOptions(
|
18 |
}
|
19 |
|
20 |
static function _scb_register() {
|
21 |
foreach ( self::$scb_widgets as $widget )
|
22 |
-
register_widget(
|
23 |
}
|
24 |
|
25 |
// A pre-filled method, for convenience
|
26 |
-
function widget(
|
27 |
-
$instance = wp_parse_args(
|
28 |
|
29 |
-
extract(
|
30 |
|
31 |
echo $before_widget;
|
32 |
|
33 |
-
$title = apply_filters(
|
34 |
|
35 |
-
if ( ! empty(
|
36 |
echo $before_title . $title . $after_title;
|
37 |
|
38 |
-
$this->content(
|
39 |
|
40 |
echo $after_widget;
|
41 |
}
|
42 |
|
43 |
// This is where the actual widget content goes
|
44 |
-
function content(
|
45 |
|
46 |
|
47 |
//_____HELPER METHODS_____
|
@@ -49,27 +49,52 @@ abstract class scbWidget extends WP_Widget {
|
|
49 |
|
50 |
// See scbForms::input()
|
51 |
// Allows extra parameter $args['title']
|
52 |
-
protected function input(
|
53 |
-
$prefix = array( 'widget-' . $this->id_base, $this->number );
|
54 |
-
|
55 |
-
$form = new scbForm( $formdata, $prefix );
|
56 |
-
|
57 |
// Add default class
|
58 |
-
if ( !isset(
|
59 |
-
$args['extra'] =
|
60 |
|
61 |
// Add default label position
|
62 |
-
if ( !in_array(
|
63 |
$args['desc_pos'] = 'before';
|
64 |
|
65 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
|
67 |
-
if ( !is_array( $name ) && '[]' == substr( $name, -2 ) )
|
68 |
-
$name = array( substr( $name, 0, -2 ), '' );
|
69 |
|
70 |
-
|
|
|
|
|
|
|
|
|
71 |
|
72 |
-
return $
|
73 |
}
|
74 |
}
|
75 |
|
7 |
|
8 |
private static $scb_widgets = array();
|
9 |
|
10 |
+
static function init($class, $file = '', $base = '') {
|
11 |
self::$scb_widgets[] = $class;
|
12 |
|
13 |
+
add_action('widgets_init', array(__CLASS__, '_scb_register'));
|
14 |
|
15 |
// for auto-uninstall
|
16 |
+
if ( $file && $base && class_exists('scbOptions') )
|
17 |
+
new scbOptions("widget_$base", $file);
|
18 |
}
|
19 |
|
20 |
static function _scb_register() {
|
21 |
foreach ( self::$scb_widgets as $widget )
|
22 |
+
register_widget($widget);
|
23 |
}
|
24 |
|
25 |
// A pre-filled method, for convenience
|
26 |
+
function widget($args, $instance) {
|
27 |
+
$instance = wp_parse_args($instance, $this->defaults);
|
28 |
|
29 |
+
extract($args);
|
30 |
|
31 |
echo $before_widget;
|
32 |
|
33 |
+
$title = apply_filters('widget_title', isset($instance['title']) ? $instance['title'] : '', $instance, $this->id_base);
|
34 |
|
35 |
+
if ( ! empty($title) )
|
36 |
echo $before_title . $title . $after_title;
|
37 |
|
38 |
+
$this->content($instance);
|
39 |
|
40 |
echo $after_widget;
|
41 |
}
|
42 |
|
43 |
// This is where the actual widget content goes
|
44 |
+
function content($instance) {}
|
45 |
|
46 |
|
47 |
//_____HELPER METHODS_____
|
49 |
|
50 |
// See scbForms::input()
|
51 |
// Allows extra parameter $args['title']
|
52 |
+
protected function input($args, $formdata = array()) {
|
|
|
|
|
|
|
|
|
53 |
// Add default class
|
54 |
+
if ( !isset($args['extra']) )
|
55 |
+
$args['extra'] = 'class="regular-text"';
|
56 |
|
57 |
// Add default label position
|
58 |
+
if ( !in_array($args['type'], array('checkbox', 'radio')) && empty($args['desc_pos']) )
|
59 |
$args['desc_pos'] = 'before';
|
60 |
|
61 |
+
// Then add prefix to names and formdata
|
62 |
+
$new_formdata = array();
|
63 |
+
foreach ( (array) $args['name'] as $name )
|
64 |
+
$new_formdata[$this->scb_get_field_name($name)] = @$formdata[$name];
|
65 |
+
$new_names = array_keys($new_formdata);
|
66 |
+
|
67 |
+
// Finally, replace the old names
|
68 |
+
if ( 1 == count($new_names) )
|
69 |
+
$args['name'] = $new_names[0];
|
70 |
+
else
|
71 |
+
$args['name'] = $new_names;
|
72 |
+
|
73 |
+
// Remember $desc and replace with $title
|
74 |
+
$desc = '';
|
75 |
+
if ( isset($args['title']) ) {
|
76 |
+
if ( isset($args['desc']) )
|
77 |
+
$desc = "<small>{$args['desc']}</small>";
|
78 |
+
$args['desc'] = $args['title'];
|
79 |
+
unset($args['title']);
|
80 |
+
}
|
81 |
+
|
82 |
+
$input = scbForms::input($args, $new_formdata);
|
83 |
+
|
84 |
+
return "<p>{$input}\n<br />\n$desc\n</p>\n";
|
85 |
+
}
|
86 |
+
|
87 |
+
|
88 |
+
//_____INTERNAL METHODS_____
|
89 |
|
|
|
|
|
90 |
|
91 |
+
private function scb_get_field_name($name) {
|
92 |
+
if ( $split = scbUtil::split_at('[', $name) )
|
93 |
+
list($basename, $extra) = $split;
|
94 |
+
else
|
95 |
+
return $this->get_field_name($name);
|
96 |
|
97 |
+
return str_replace('[]', '', $this->get_field_name($basename)) . $extra;
|
98 |
}
|
99 |
}
|
100 |
|
scb/composer.json
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"name" : "scribu/scb-framework",
|
3 |
-
"description": "A set of useful classes for faster plugin development",
|
4 |
-
"keywords" : ["wordpress"],
|
5 |
-
"homepage" : "https://github.com/scribu/wp-scb-framework",
|
6 |
-
"license" : "GPL-3.0+",
|
7 |
-
"authors" : [
|
8 |
-
{
|
9 |
-
"name" : "Cristi Burcă",
|
10 |
-
"homepage": "http://scribu.net/"
|
11 |
-
}
|
12 |
-
],
|
13 |
-
"support" : {
|
14 |
-
"issues": "https://github.com/scribu/wp-scb-framework/issues",
|
15 |
-
"source": "https://github.com/scribu/wp-scb-framework",
|
16 |
-
"wiki": "https://github.com/scribu/wp-scb-framework/wiki"
|
17 |
-
},
|
18 |
-
"autoload" : {
|
19 |
-
"classmap": ["."],
|
20 |
-
"files" : ["load-composer.php", "Util.php"]
|
21 |
-
}
|
22 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
scb/load-composer.php
DELETED
@@ -1,11 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Pass through version to use when Composer handles classes load.
|
5 |
-
*
|
6 |
-
* @param callable $callback
|
7 |
-
*/
|
8 |
-
function scb_init( $callback = null ) {
|
9 |
-
if ( $callback )
|
10 |
-
call_user_func( $callback );
|
11 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
scb/load.php
CHANGED
@@ -1,93 +1,71 @@
|
|
1 |
<?php
|
|
|
|
|
2 |
|
3 |
-
|
4 |
-
'scbUtil', 'scbOptions', 'scbForms', 'scbTable',
|
5 |
-
'scbWidget', 'scbAdminPage', 'scbBoxesPage', 'scbPostMetabox',
|
6 |
-
'scbCron', 'scbHooks',
|
7 |
-
) );
|
8 |
-
|
9 |
-
if ( !class_exists( 'scbLoad4' ) ) :
|
10 |
-
/**
|
11 |
-
* The main idea behind this class is to load the most recent version of the scb classes available.
|
12 |
-
*
|
13 |
-
* It waits until all plugins are loaded and then does some crazy hacks to make activation hooks work.
|
14 |
-
*/
|
15 |
-
class scbLoad4 {
|
16 |
-
|
17 |
-
private static $candidates = array();
|
18 |
-
private static $classes;
|
19 |
-
private static $callbacks = array();
|
20 |
-
|
21 |
private static $loaded;
|
22 |
|
23 |
-
static function init( $
|
24 |
-
|
25 |
-
|
26 |
-
self::$candidates[$file] = $rev;
|
27 |
-
self::$classes[$file] = $classes;
|
28 |
|
29 |
-
|
30 |
-
self::$callbacks[$file] = $callback;
|
31 |
|
32 |
-
|
33 |
-
}
|
34 |
|
35 |
-
|
36 |
-
self::load();
|
37 |
-
else
|
38 |
-
add_action( 'plugins_loaded', array( __CLASS__, 'load' ), 9, 0 );
|
39 |
}
|
40 |
|
41 |
-
static function
|
42 |
-
|
43 |
|
44 |
-
|
45 |
-
|
|
|
|
|
|
|
|
|
|
|
46 |
|
47 |
-
|
48 |
-
|
49 |
-
self::load( false );
|
50 |
-
call_user_func( $callback );
|
51 |
-
do_action( 'scb_activation_' . $plugin );
|
52 |
break;
|
53 |
}
|
54 |
}
|
55 |
-
}
|
56 |
|
57 |
-
|
58 |
-
|
59 |
|
60 |
-
$
|
|
|
61 |
|
62 |
-
|
|
|
63 |
|
64 |
-
|
65 |
-
|
|
|
66 |
continue;
|
67 |
|
68 |
-
$fpath = $path . substr(
|
69 |
-
|
|
|
|
|
70 |
include $fpath;
|
71 |
-
self::$loaded[] = $fpath;
|
72 |
}
|
73 |
}
|
74 |
-
|
75 |
-
if ( $do_callbacks )
|
76 |
-
foreach ( self::$callbacks as $callback )
|
77 |
-
call_user_func( $callback );
|
78 |
}
|
79 |
|
80 |
static function get_info() {
|
81 |
-
|
82 |
|
83 |
-
return array(
|
84 |
}
|
85 |
}
|
86 |
endif;
|
87 |
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
|
1 |
<?php
|
2 |
+
if ( !class_exists('scbLoad3') ) :
|
3 |
+
class scbLoad3 {
|
4 |
|
5 |
+
private static $candidates;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
private static $loaded;
|
7 |
|
8 |
+
static function init($rev, $file, $classes) {
|
9 |
+
$dir = dirname($file);
|
|
|
|
|
|
|
10 |
|
11 |
+
self::$candidates[$rev] = $dir;
|
|
|
12 |
|
13 |
+
self::load($dir . '/', $classes);
|
|
|
14 |
|
15 |
+
add_action('activated_plugin', array(__CLASS__, 'reorder'));
|
|
|
|
|
|
|
16 |
}
|
17 |
|
18 |
+
static function reorder() {
|
19 |
+
krsort(self::$candidates);
|
20 |
|
21 |
+
$dir = dirname(plugin_basename(reset(self::$candidates)));
|
22 |
+
|
23 |
+
$current = get_option('active_plugins', array());
|
24 |
+
|
25 |
+
$found = false;
|
26 |
+
foreach ( $current as $i => $plugin ) {
|
27 |
+
$plugin_dir = dirname($plugin);
|
28 |
|
29 |
+
if ( $plugin_dir == $dir ) {
|
30 |
+
$found = true;
|
|
|
|
|
|
|
31 |
break;
|
32 |
}
|
33 |
}
|
|
|
34 |
|
35 |
+
if ( !$found || 0 == $i )
|
36 |
+
return;
|
37 |
|
38 |
+
unset($current[$i]);
|
39 |
+
array_unshift($current, $plugin);
|
40 |
|
41 |
+
update_option('active_plugins', $current);
|
42 |
+
}
|
43 |
|
44 |
+
private static function load($path, $classes) {
|
45 |
+
foreach ( $classes as $class_name ) {
|
46 |
+
if ( class_exists($class_name) )
|
47 |
continue;
|
48 |
|
49 |
+
$fpath = $path . substr($class_name, 3) . '.php';
|
50 |
+
|
51 |
+
if ( file_exists($fpath) ) {
|
52 |
+
self::$loaded[$class_name] = $fpath;
|
53 |
include $fpath;
|
|
|
54 |
}
|
55 |
}
|
|
|
|
|
|
|
|
|
56 |
}
|
57 |
|
58 |
static function get_info() {
|
59 |
+
krsort(self::$candidates);
|
60 |
|
61 |
+
return array(self::$loaded, self::$candidates);
|
62 |
}
|
63 |
}
|
64 |
endif;
|
65 |
|
66 |
+
scbLoad3::init(12, __FILE__, array(
|
67 |
+
'scbUtil', 'scbOptions', 'scbForms', 'scbTable', 'scbDebug',
|
68 |
+
'scbWidget', 'scbAdminPage', 'scbBoxesPage',
|
69 |
+
'scbQuery', 'scbRewrite', 'scbCron',
|
70 |
+
));
|
71 |
|
screenshot-1.png
ADDED
Binary file
|
screenshot-2.png
ADDED
Binary file
|
screenshot-3.png
ADDED
Binary file
|
template-tags.php
CHANGED
@@ -7,16 +7,16 @@ function users_online() {
|
|
7 |
|
8 |
function get_users_online() {
|
9 |
$template = UserOnline_Core::$options->templates['useronline'];
|
10 |
-
$template = str_ireplace(
|
11 |
-
$template = str_ireplace(
|
12 |
-
$template = str_ireplace(
|
13 |
|
14 |
-
return UserOnline_Template::format_count(
|
15 |
}
|
16 |
|
17 |
### Function: Display UserOnline Count
|
18 |
function users_online_count() {
|
19 |
-
echo number_format_i18n(
|
20 |
}
|
21 |
|
22 |
function get_users_online_count() {
|
@@ -25,11 +25,11 @@ function get_users_online_count() {
|
|
25 |
|
26 |
### Function: Display Max UserOnline
|
27 |
function most_users_online() {
|
28 |
-
echo number_format_i18n(
|
29 |
}
|
30 |
|
31 |
function get_most_users_online() {
|
32 |
-
return intval(
|
33 |
}
|
34 |
|
35 |
### Function: Display Max UserOnline Date
|
@@ -38,7 +38,7 @@ function most_users_online_date() {
|
|
38 |
}
|
39 |
|
40 |
function get_most_users_online_date() {
|
41 |
-
return UserOnline_Template::format_date(
|
42 |
}
|
43 |
|
44 |
### Function: Display Users Browsing The Site
|
@@ -47,35 +47,33 @@ function users_browsing_site() {
|
|
47 |
}
|
48 |
|
49 |
function get_users_browsing_site() {
|
50 |
-
return UserOnline_Template::compact_list(
|
51 |
}
|
52 |
|
53 |
-
### Function: Display Users Browsing The (
|
54 |
-
function users_browsing_page(
|
55 |
-
echo get_users_browsing_page(
|
56 |
}
|
57 |
|
58 |
-
function get_users_browsing_page(
|
59 |
-
return UserOnline_Template::compact_list(
|
60 |
}
|
61 |
|
62 |
### Function: UserOnline Page
|
63 |
function users_online_page() {
|
64 |
global $wpdb;
|
65 |
|
66 |
-
$usersonline = $wpdb->get_results(
|
67 |
|
68 |
$user_buckets = array();
|
69 |
foreach ( $usersonline as $useronline )
|
70 |
$user_buckets[$useronline->user_type][] = $useronline;
|
71 |
|
72 |
-
$
|
73 |
-
|
74 |
-
$counts = UserOnline_Template::get_counts( $user_buckets );
|
75 |
|
76 |
$nicetexts = array();
|
77 |
-
foreach ( array(
|
78 |
-
$nicetexts[$user_type] = UserOnline_Template::format_count(
|
79 |
|
80 |
$text = _n(
|
81 |
'There is <strong>%s</strong> online now: <strong>%s</strong>, <strong>%s</strong> and <strong>%s</strong>.',
|
@@ -83,49 +81,44 @@ function users_online_page() {
|
|
83 |
$counts['user'], 'wp-useronline'
|
84 |
);
|
85 |
|
86 |
-
$output =
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
.UserOnline_Template::detailed_list( $counts, $user_buckets, $nicetexts )
|
91 |
-
);
|
92 |
|
93 |
-
return apply_filters(
|
94 |
}
|
95 |
|
96 |
### Function Check If User Is Online
|
97 |
-
function is_user_online(
|
98 |
global $wpdb;
|
99 |
|
100 |
-
return (bool) $wpdb->get_var(
|
101 |
}
|
102 |
|
103 |
-
function get_useronline_(
|
104 |
-
return UserOnline_Template::compact_list(
|
105 |
}
|
106 |
|
107 |
class UserOnline_Template {
|
108 |
|
109 |
private static $cache = array();
|
110 |
|
111 |
-
|
112 |
-
UserOnline_Core::$add_script = true;
|
113 |
|
114 |
-
if ( !isset(
|
115 |
global $wpdb;
|
116 |
|
117 |
-
if ( 'site' == $type )
|
118 |
$where = '';
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
$where = $wpdb->prepare(
|
123 |
-
}
|
124 |
|
125 |
-
self::$cache[$type
|
126 |
}
|
127 |
-
|
128 |
-
$users = self::$cache[$type . $page_url];
|
129 |
|
130 |
if ( 'list' == $output )
|
131 |
return $users;
|
@@ -137,7 +130,7 @@ class UserOnline_Template {
|
|
137 |
if ( 'buckets' == $output )
|
138 |
return $buckets;
|
139 |
|
140 |
-
$counts = self::get_counts(
|
141 |
|
142 |
if ( 'counts' == $output )
|
143 |
return $counts;
|
@@ -149,52 +142,50 @@ class UserOnline_Template {
|
|
149 |
$template = UserOnline_Core::$options->templates["browsing$type"];
|
150 |
|
151 |
// Nice Text For Users
|
152 |
-
$output = self::format_count(
|
153 |
|
154 |
// Print Member Name
|
155 |
$temp_member = '';
|
156 |
-
$members =
|
157 |
if ( $members ) {
|
158 |
$temp_member = array();
|
159 |
foreach ( $members as $member )
|
160 |
-
$temp_member[] = self::format_name(
|
161 |
-
$temp_member = implode(
|
162 |
}
|
163 |
-
$output = str_ireplace(
|
164 |
|
165 |
// Counts
|
166 |
-
foreach ( array(
|
167 |
if ( $counts[$user_type] > 1 )
|
168 |
-
$number = str_ireplace(
|
169 |
elseif ( $counts[$user_type] == 1 )
|
170 |
$number = $naming[$user_type];
|
171 |
else
|
172 |
$number = '';
|
173 |
-
$output = str_ireplace(
|
174 |
}
|
175 |
|
176 |
-
//
|
177 |
$separator = ( $counts['member'] && $counts['guest'] ) ? $template['separators']['guests'] : '';
|
178 |
-
$output = str_ireplace(
|
179 |
|
180 |
$separator = ( ( $counts['guest'] || $counts['member'] ) && $counts['bot'] ) ? $template['separators']['bots'] : '';
|
181 |
-
$output = str_ireplace(
|
182 |
|
183 |
return $output;
|
184 |
}
|
185 |
|
186 |
-
|
187 |
-
UserOnline_Core::$add_script = true;
|
188 |
-
|
189 |
if ( $counts['user'] == 0 )
|
190 |
-
return html(
|
191 |
|
192 |
-
$_on = __(
|
193 |
-
$_url = __(
|
194 |
-
$_referral = __(
|
195 |
|
196 |
$output = '';
|
197 |
-
foreach ( array(
|
198 |
if ( !$counts[$user_type] )
|
199 |
continue;
|
200 |
|
@@ -202,20 +193,20 @@ class UserOnline_Template {
|
|
202 |
$users = $user_buckets[$user_type];
|
203 |
$nicetext = $nicetexts[$user_type];
|
204 |
|
205 |
-
$output .= html(
|
206 |
|
207 |
$i=1;
|
208 |
foreach ( $users as $user ) {
|
209 |
-
$nr = number_format_i18n(
|
210 |
-
$name = self::format_name(
|
211 |
-
$user_ip = self::format_ip(
|
212 |
-
$date = self::format_date(
|
|
|
|
|
213 |
|
214 |
-
|
215 |
-
|
216 |
-
$
|
217 |
-
$referral_link = self::format_link( $user->referral, $_referral );
|
218 |
-
}
|
219 |
|
220 |
$output .= "<p><strong>#$nr - $name</strong> $user_ip $_on $date<br/>$page_title $current_link $referral_link</p>\n";
|
221 |
}
|
@@ -224,62 +215,46 @@ class UserOnline_Template {
|
|
224 |
return $output;
|
225 |
}
|
226 |
|
227 |
-
static private function format_link($url, $title) {
|
228 |
-
if ( !empty($url) )
|
229 |
-
return '[' . html_link( $url, $title ) . ']';
|
230 |
|
231 |
-
|
232 |
-
|
|
|
233 |
|
234 |
-
|
235 |
-
$ip = $user->user_ip;
|
236 |
-
|
237 |
-
if ( current_user_can( 'edit_users' ) && !empty( $ip ) && $ip != 'unknown' ) {
|
238 |
-
return
|
239 |
-
html( 'span', array('dir' => 'ltr'),
|
240 |
-
html( 'a', array(
|
241 |
-
'href' => 'http://whois.domaintools.com/' . $ip,
|
242 |
-
'title' => $user->user_agent
|
243 |
-
), $ip )
|
244 |
-
);
|
245 |
-
}
|
246 |
}
|
247 |
|
248 |
-
|
249 |
-
|
250 |
-
return mysql2date( sprintf( __( '%s @ %s', 'wp-useronline' ), get_option( 'date_format' ), get_option( 'time_format' ) ), $date, true );
|
251 |
-
|
252 |
-
return date_i18n( sprintf( __( '%s @ %s', 'wp-useronline' ), get_option( 'date_format' ), get_option( 'time_format' ) ), $date );
|
253 |
}
|
254 |
|
255 |
-
|
256 |
-
return apply_filters(
|
257 |
}
|
258 |
|
259 |
-
|
260 |
-
$i = (
|
261 |
$string = UserOnline_Core::$options->naming[$user_type . $i];
|
262 |
|
263 |
-
$output = str_ireplace(
|
264 |
|
265 |
-
if (
|
266 |
return $output;
|
267 |
|
268 |
-
return str_ireplace(
|
269 |
}
|
270 |
|
271 |
-
|
272 |
-
return sprintf(
|
273 |
-
number_format_i18n(
|
274 |
get_most_users_online_date()
|
275 |
);
|
276 |
}
|
277 |
|
278 |
-
|
279 |
$counts = array();
|
280 |
$total = 0;
|
281 |
-
foreach ( array(
|
282 |
-
$total += $counts[$user_type] = count(
|
283 |
|
284 |
$counts['user'] = $total;
|
285 |
|
7 |
|
8 |
function get_users_online() {
|
9 |
$template = UserOnline_Core::$options->templates['useronline'];
|
10 |
+
$template = str_ireplace('%PAGE_URL%', UserOnline_Core::$options->page_url, $template);
|
11 |
+
$template = str_ireplace('%MOSTONLINE_COUNT%', get_most_users_online(), $template);
|
12 |
+
$template = str_ireplace('%MOSTONLINE_DATE%', get_most_users_online_date(), $template);
|
13 |
|
14 |
+
return UserOnline_Template::format_count(get_users_online_count(), 'user', $template);
|
15 |
}
|
16 |
|
17 |
### Function: Display UserOnline Count
|
18 |
function users_online_count() {
|
19 |
+
echo number_format_i18n(get_useronline_count());
|
20 |
}
|
21 |
|
22 |
function get_users_online_count() {
|
25 |
|
26 |
### Function: Display Max UserOnline
|
27 |
function most_users_online() {
|
28 |
+
echo number_format_i18n(get_most_users_online());
|
29 |
}
|
30 |
|
31 |
function get_most_users_online() {
|
32 |
+
return intval(UserOnline_Core::$most->count);
|
33 |
}
|
34 |
|
35 |
### Function: Display Max UserOnline Date
|
38 |
}
|
39 |
|
40 |
function get_most_users_online_date() {
|
41 |
+
return UserOnline_Template::format_date(UserOnline_Core::$most->date);
|
42 |
}
|
43 |
|
44 |
### Function: Display Users Browsing The Site
|
47 |
}
|
48 |
|
49 |
function get_users_browsing_site() {
|
50 |
+
return UserOnline_Template::compact_list('site');
|
51 |
}
|
52 |
|
53 |
+
### Function: Display Users Browsing The (Current) Page
|
54 |
+
function users_browsing_page($page_url = '') {
|
55 |
+
echo get_users_browsing_page($page_url);
|
56 |
}
|
57 |
|
58 |
+
function get_users_browsing_page($page_url = '') {
|
59 |
+
return UserOnline_Template::compact_list('page');
|
60 |
}
|
61 |
|
62 |
### Function: UserOnline Page
|
63 |
function users_online_page() {
|
64 |
global $wpdb;
|
65 |
|
66 |
+
$usersonline = $wpdb->get_results("SELECT * FROM $wpdb->useronline");
|
67 |
|
68 |
$user_buckets = array();
|
69 |
foreach ( $usersonline as $useronline )
|
70 |
$user_buckets[$useronline->user_type][] = $useronline;
|
71 |
|
72 |
+
$counts = UserOnline_Template::get_counts($user_buckets);
|
|
|
|
|
73 |
|
74 |
$nicetexts = array();
|
75 |
+
foreach ( array('user', 'member', 'guest', 'bot') as $user_type )
|
76 |
+
$nicetexts[$user_type] = UserOnline_Template::format_count($counts[$user_type], $user_type);
|
77 |
|
78 |
$text = _n(
|
79 |
'There is <strong>%s</strong> online now: <strong>%s</strong>, <strong>%s</strong> and <strong>%s</strong>.',
|
81 |
$counts['user'], 'wp-useronline'
|
82 |
);
|
83 |
|
84 |
+
$output =
|
85 |
+
html('p', vsprintf($text, $nicetexts))
|
86 |
+
.html('p', UserOnline_Template::format_most_users())
|
87 |
+
.UserOnline_Template::detailed_list($counts, $user_buckets, $nicetexts);
|
|
|
|
|
88 |
|
89 |
+
return apply_filters('useronline_page', $output);
|
90 |
}
|
91 |
|
92 |
### Function Check If User Is Online
|
93 |
+
function is_user_online($user_id) {
|
94 |
global $wpdb;
|
95 |
|
96 |
+
return (bool) $wpdb->get_var($wpdb-prepare("SELECT COUNT(*) FROM $wpdb->useronline WHERE user_id = %d LIMIT 1", $user_id));
|
97 |
}
|
98 |
|
99 |
+
function get_useronline_($output, $type = 'site') {
|
100 |
+
return UserOnline_Template::compact_list($type, $output);
|
101 |
}
|
102 |
|
103 |
class UserOnline_Template {
|
104 |
|
105 |
private static $cache = array();
|
106 |
|
107 |
+
function compact_list($type, $output = 'html') {
|
|
|
108 |
|
109 |
+
if ( !isset(self::$cache[$type]) ) {
|
110 |
global $wpdb;
|
111 |
|
112 |
+
if ( 'site' == $type )
|
113 |
$where = '';
|
114 |
+
elseif ( 'page' == $type )
|
115 |
+
$where = $wpdb->prepare('WHERE page_url = %s', $_SERVER['REQUEST_URI']);
|
116 |
+
else
|
117 |
+
$where = $wpdb->prepare('WHERE page_url = %s', $type);
|
|
|
118 |
|
119 |
+
self::$cache[$type] = $wpdb->get_results("SELECT * FROM $wpdb->useronline $where");
|
120 |
}
|
121 |
+
$users = self::$cache[$type];
|
|
|
122 |
|
123 |
if ( 'list' == $output )
|
124 |
return $users;
|
130 |
if ( 'buckets' == $output )
|
131 |
return $buckets;
|
132 |
|
133 |
+
$counts = self::get_counts($buckets);
|
134 |
|
135 |
if ( 'counts' == $output )
|
136 |
return $counts;
|
142 |
$template = UserOnline_Core::$options->templates["browsing$type"];
|
143 |
|
144 |
// Nice Text For Users
|
145 |
+
$output = self::format_count($counts['user'], 'user', $template['text']);
|
146 |
|
147 |
// Print Member Name
|
148 |
$temp_member = '';
|
149 |
+
$members = $buckets['member'];
|
150 |
if ( $members ) {
|
151 |
$temp_member = array();
|
152 |
foreach ( $members as $member )
|
153 |
+
$temp_member[] = self::format_name($member);
|
154 |
+
$temp_member = implode($template['separators']['members'], $temp_member);
|
155 |
}
|
156 |
+
$output = str_ireplace('%MEMBER_NAMES%', $temp_member, $output);
|
157 |
|
158 |
// Counts
|
159 |
+
foreach ( array('member', 'guest', 'bot') as $user_type ) {
|
160 |
if ( $counts[$user_type] > 1 )
|
161 |
+
$number = str_ireplace('%COUNT%', number_format_i18n($counts[$user_type]), $naming[$user_type . 's']);
|
162 |
elseif ( $counts[$user_type] == 1 )
|
163 |
$number = $naming[$user_type];
|
164 |
else
|
165 |
$number = '';
|
166 |
+
$output = str_ireplace("%{$user_type}S%", $number, $output);
|
167 |
}
|
168 |
|
169 |
+
// Seperators
|
170 |
$separator = ( $counts['member'] && $counts['guest'] ) ? $template['separators']['guests'] : '';
|
171 |
+
$output = str_ireplace('%GUESTS_SEPERATOR%', $separator, $output);
|
172 |
|
173 |
$separator = ( ( $counts['guest'] || $counts['member'] ) && $counts['bot'] ) ? $template['separators']['bots'] : '';
|
174 |
+
$output = str_ireplace('%BOTS_SEPERATOR%', $separator, $output);
|
175 |
|
176 |
return $output;
|
177 |
}
|
178 |
|
179 |
+
function detailed_list($counts, $user_buckets, $nicetexts) {
|
|
|
|
|
180 |
if ( $counts['user'] == 0 )
|
181 |
+
return html('h2', __('No one is online now.', 'wp-useronline'));
|
182 |
|
183 |
+
$_on = __('on', 'wp-useronline');
|
184 |
+
$_url = __('url', 'wp-useronline');
|
185 |
+
$_referral = __('referral', 'wp-useronline');
|
186 |
|
187 |
$output = '';
|
188 |
+
foreach ( array('member', 'guest', 'bot') as $user_type ) {
|
189 |
if ( !$counts[$user_type] )
|
190 |
continue;
|
191 |
|
193 |
$users = $user_buckets[$user_type];
|
194 |
$nicetext = $nicetexts[$user_type];
|
195 |
|
196 |
+
$output .= html('h2', $nicetext . ' ' . __('Online Now', 'wp-useronline'));
|
197 |
|
198 |
$i=1;
|
199 |
foreach ( $users as $user ) {
|
200 |
+
$nr = number_format_i18n($i++);
|
201 |
+
$name = self::format_name($user);
|
202 |
+
$user_ip = self::format_ip($user->user_ip);
|
203 |
+
$date = self::format_date($user->timestamp);
|
204 |
+
$page_title = esc_html($user->page_title);
|
205 |
+
$current_link = '[' . html_link(esc_url($user->page_url), $_url) . ']';
|
206 |
|
207 |
+
$referral_link = '';
|
208 |
+
if ( !empty($user->referral) )
|
209 |
+
$referral_link = '[' . html_link(esc_attr(esc_url($user->referral)), $_referral) . ']';
|
|
|
|
|
210 |
|
211 |
$output .= "<p><strong>#$nr - $name</strong> $user_ip $_on $date<br/>$page_title $current_link $referral_link</p>\n";
|
212 |
}
|
215 |
return $output;
|
216 |
}
|
217 |
|
|
|
|
|
|
|
218 |
|
219 |
+
function format_ip($ip) {
|
220 |
+
if ( ! current_user_can('administrator') || empty($ip) || $ip == 'unknown' )
|
221 |
+
return;
|
222 |
|
223 |
+
return '<span dir="ltr">(<a href="http://whois.domaintools.com/' . $ip . '" title="' . gethostbyaddr($ip) . '">' . $ip . '</a>)</span>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
224 |
}
|
225 |
|
226 |
+
function format_date($date) {
|
227 |
+
return mysql2date(sprintf(__('%s @ %s', 'wp-useronline'), get_option('date_format'), get_option('time_format')), $date, true);
|
|
|
|
|
|
|
228 |
}
|
229 |
|
230 |
+
function format_name($user) {
|
231 |
+
return apply_filters('useronline_display_user', esc_html($user->user_name), $user);
|
232 |
}
|
233 |
|
234 |
+
function format_count($count, $user_type, $template = '') {
|
235 |
+
$i = ($count == 1) ? '' : 's';
|
236 |
$string = UserOnline_Core::$options->naming[$user_type . $i];
|
237 |
|
238 |
+
$output = str_ireplace('%COUNT%', number_format_i18n($count), $string);
|
239 |
|
240 |
+
if ( empty($template) )
|
241 |
return $output;
|
242 |
|
243 |
+
return str_ireplace('%USERS%', $output, $template);
|
244 |
}
|
245 |
|
246 |
+
function format_most_users() {
|
247 |
+
return sprintf(__('Most users ever online were <strong>%s</strong>, on <strong>%s</strong>', 'wp-useronline'),
|
248 |
+
number_format_i18n(get_most_users_online()),
|
249 |
get_most_users_online_date()
|
250 |
);
|
251 |
}
|
252 |
|
253 |
+
function get_counts($buckets) {
|
254 |
$counts = array();
|
255 |
$total = 0;
|
256 |
+
foreach ( array('member', 'guest', 'bot') as $user_type )
|
257 |
+
$total += $counts[$user_type] = count(@$buckets[$user_type]);
|
258 |
|
259 |
$counts['user'] = $total;
|
260 |
|
useronline.dev.js
CHANGED
@@ -1,21 +1,23 @@
|
|
1 |
-
jQuery(document).ready(function($)
|
2 |
var timeout = parseInt(useronlineL10n.timeout);
|
3 |
|
4 |
var get_data = function(mode) {
|
5 |
var data = {
|
6 |
'action': 'useronline',
|
7 |
-
'mode': mode
|
8 |
-
'page_url': location.protocol + '//' + location.host + location.pathname + location.search,
|
9 |
-
'page_title': $('title').text()
|
10 |
};
|
11 |
|
12 |
-
$.post(useronlineL10n.ajax_url, data, function(response)
|
13 |
$('#useronline-' + mode).html(response);
|
14 |
});
|
15 |
}
|
16 |
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
|
|
|
|
|
|
|
|
21 |
});
|
1 |
+
jQuery(document).ready(function($){
|
2 |
var timeout = parseInt(useronlineL10n.timeout);
|
3 |
|
4 |
var get_data = function(mode) {
|
5 |
var data = {
|
6 |
'action': 'useronline',
|
7 |
+
'mode': mode
|
|
|
|
|
8 |
};
|
9 |
|
10 |
+
$.post(useronlineL10n.ajax_url, data, function(response){
|
11 |
$('#useronline-' + mode).html(response);
|
12 |
});
|
13 |
}
|
14 |
|
15 |
+
if ( $('#useronline-count').length )
|
16 |
+
setInterval("get_data('count')", timeout);
|
17 |
+
|
18 |
+
if ( $('#useronline-browsing-site').length )
|
19 |
+
setInterval("get_data('browsing-site')", timeout);
|
20 |
+
|
21 |
+
if ( $('#useronline-browsing-page').length )
|
22 |
+
setInterval("get_data('browsing-page')", timeout);
|
23 |
});
|
useronline.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function(
|
1 |
+
jQuery(document).ready(function($){var timeout=parseInt(useronlineL10n.timeout);var get_data=function(mode){var data={action:"useronline",mode:mode};$.post(useronlineL10n.ajax_url,data,function(response){$("#useronline-"+mode).html(response)})};if($("#useronline-count").length){setInterval("get_data('count')",timeout)}if($("#useronline-browsing-site").length){setInterval("get_data('browsing-site')",timeout)}if($("#useronline-browsing-page").length){setInterval("get_data('browsing-page')",timeout)}});
|
widget.php
CHANGED
@@ -2,72 +2,72 @@
|
|
2 |
|
3 |
class UserOnline_Widget extends scbWidget {
|
4 |
function UserOnline_Widget() {
|
5 |
-
$widget_ops = array(
|
6 |
-
$this->WP_Widget(
|
7 |
}
|
8 |
|
9 |
-
function content(
|
10 |
$out = '';
|
11 |
|
12 |
switch( $instance['type'] ) {
|
13 |
case 'users_online':
|
14 |
-
$out .= html(
|
15 |
break;
|
16 |
case 'users_browsing_page':
|
17 |
-
$out .= html(
|
18 |
break;
|
19 |
case 'users_browsing_site':
|
20 |
-
$out .= html(
|
21 |
break;
|
22 |
case 'users_online_browsing_page':
|
23 |
-
$out .= html(
|
24 |
-
$out .= html(
|
25 |
break;
|
26 |
case 'users_online_browsing_site':
|
27 |
-
$out .= html(
|
28 |
-
$out .= html(
|
29 |
break;
|
30 |
}
|
31 |
|
32 |
echo $out;
|
33 |
}
|
34 |
|
35 |
-
function update(
|
36 |
-
if ( !isset(
|
37 |
return false;
|
38 |
|
39 |
$instance = $old_instance;
|
40 |
-
$instance['title'] = strip_tags(
|
41 |
-
$instance['type'] = strip_tags(
|
42 |
|
43 |
return $instance;
|
44 |
}
|
45 |
|
46 |
-
function form(
|
47 |
global $wpdb;
|
48 |
-
$instance = wp_parse_args(
|
49 |
-
'title' => __(
|
50 |
'type' => 'users_online'
|
51 |
-
)
|
52 |
-
$title = esc_attr(
|
53 |
-
$type = esc_attr(
|
54 |
?>
|
55 |
<p>
|
56 |
-
<label for="<?php echo $this->get_field_id(
|
57 |
</p>
|
58 |
<p>
|
59 |
-
<label for="<?php echo $this->get_field_id(
|
60 |
-
<select name="<?php echo $this->get_field_name(
|
61 |
-
<option value="users_online"<?php selected(
|
62 |
-
<option value="users_browsing_page"<?php selected(
|
63 |
-
<option value="users_browsing_site"<?php selected(
|
64 |
<optgroup> </optgroup>
|
65 |
-
<option value="users_online_browsing_page"<?php selected(
|
66 |
-
<option value="users_online_browsing_site"<?php selected(
|
67 |
</select>
|
68 |
</label>
|
69 |
</p>
|
70 |
-
<input type="hidden" id="<?php echo $this->get_field_id(
|
71 |
<?php
|
72 |
}
|
73 |
}
|
2 |
|
3 |
class UserOnline_Widget extends scbWidget {
|
4 |
function UserOnline_Widget() {
|
5 |
+
$widget_ops = array('description' => __('WP-UserOnline users online statistics', 'wp-useronline'));
|
6 |
+
$this->WP_Widget('useronline', __('UserOnline', 'wp-useronline'), $widget_ops);
|
7 |
}
|
8 |
|
9 |
+
function content($instance) {
|
10 |
$out = '';
|
11 |
|
12 |
switch( $instance['type'] ) {
|
13 |
case 'users_online':
|
14 |
+
$out .= html('div id="useronline-count"', get_users_online());
|
15 |
break;
|
16 |
case 'users_browsing_page':
|
17 |
+
$out .= html('div id="useronline-browsing-page"', get_users_browsing_page());
|
18 |
break;
|
19 |
case 'users_browsing_site':
|
20 |
+
$out .= html('div id="useronline-browsing-site"', get_users_browsing_site());
|
21 |
break;
|
22 |
case 'users_online_browsing_page':
|
23 |
+
$out .= html('div id="useronline-count"', get_users_online());
|
24 |
+
$out .= html('div id="useronline-browsing-page"', get_users_browsing_page());
|
25 |
break;
|
26 |
case 'users_online_browsing_site':
|
27 |
+
$out .= html('div id="useronline-count"', get_users_online());
|
28 |
+
$out .= html('div id="useronline-browsing-site"', get_users_browsing_site());
|
29 |
break;
|
30 |
}
|
31 |
|
32 |
echo $out;
|
33 |
}
|
34 |
|
35 |
+
function update($new_instance, $old_instance) {
|
36 |
+
if ( !isset($new_instance['submit']) )
|
37 |
return false;
|
38 |
|
39 |
$instance = $old_instance;
|
40 |
+
$instance['title'] = strip_tags($new_instance['title']);
|
41 |
+
$instance['type'] = strip_tags($new_instance['type']);
|
42 |
|
43 |
return $instance;
|
44 |
}
|
45 |
|
46 |
+
function form($instance) {
|
47 |
global $wpdb;
|
48 |
+
$instance = wp_parse_args((array) $instance, array(
|
49 |
+
'title' => __('UserOnline', 'wp-useronline'),
|
50 |
'type' => 'users_online'
|
51 |
+
));
|
52 |
+
$title = esc_attr($instance['title']);
|
53 |
+
$type = esc_attr($instance['type']);
|
54 |
?>
|
55 |
<p>
|
56 |
+
<label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:', 'wp-useronline'); ?> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" /></label>
|
57 |
</p>
|
58 |
<p>
|
59 |
+
<label for="<?php echo $this->get_field_id('type'); ?>"><?php _e('Statistics Type:', 'wp-useronline'); ?>
|
60 |
+
<select name="<?php echo $this->get_field_name('type'); ?>" id="<?php echo $this->get_field_id('type'); ?>" class="widefat">
|
61 |
+
<option value="users_online"<?php selected('users_online', $type); ?>><?php _e('Users Online Count', 'wp-useronline'); ?></option>
|
62 |
+
<option value="users_browsing_page"<?php selected('users_browsing_page', $type); ?>><?php _e('Users Browsing Current Page', 'wp-useronline'); ?></option>
|
63 |
+
<option value="users_browsing_site"<?php selected('users_browsing_site', $type); ?>><?php _e('Users Browsing Site', 'wp-useronline'); ?></option>
|
64 |
<optgroup> </optgroup>
|
65 |
+
<option value="users_online_browsing_page"<?php selected('users_online_browsing_page', $type); ?>><?php _e('Users Online Count & Users Browsing Current Page', 'wp-useronline'); ?></option>
|
66 |
+
<option value="users_online_browsing_site"<?php selected('users_online_browsing_site', $type); ?>><?php _e('Users Online Count & Users Browsing Site', 'wp-useronline'); ?></option>
|
67 |
</select>
|
68 |
</label>
|
69 |
</p>
|
70 |
+
<input type="hidden" id="<?php echo $this->get_field_id('submit'); ?>" name="<?php echo $this->get_field_name('submit'); ?>" value="1" />
|
71 |
<?php
|
72 |
}
|
73 |
}
|
wp-stats.php
CHANGED
@@ -3,35 +3,35 @@
|
|
3 |
class UserOnline_WpStats {
|
4 |
|
5 |
function init() {
|
6 |
-
add_filter(
|
7 |
-
add_filter(
|
8 |
}
|
9 |
|
10 |
// Add WP-UserOnline General Stats To WP-Stats Page Options
|
11 |
-
function page_admin_general_stats(
|
12 |
-
$stats_display = get_option(
|
13 |
-
|
14 |
-
$content .= '<input type="checkbox" name="stats_display[]" id="wpstats_useronline" value="useronline"' . checked(
|
15 |
|
16 |
return $content;
|
17 |
}
|
18 |
|
19 |
// Add WP-UserOnline General Stats To WP-Stats Page
|
20 |
-
function page_general_stats(
|
21 |
-
$stats_display = get_option(
|
22 |
|
23 |
$str = _n(
|
24 |
'<strong>%s</strong> user online now.',
|
25 |
-
'<strong>%s</strong> users online now.',
|
26 |
get_users_online_count(), 'wp-useronline'
|
27 |
);
|
28 |
|
29 |
if ( $stats_display['useronline'] == 1 )
|
30 |
-
$content .=
|
31 |
-
html(
|
32 |
-
.html(
|
33 |
-
html(
|
34 |
-
.html(
|
35 |
);
|
36 |
|
37 |
return $content;
|
3 |
class UserOnline_WpStats {
|
4 |
|
5 |
function init() {
|
6 |
+
add_filter('wp_stats_page_admin_plugins', array(__CLASS__, 'page_admin_general_stats'));
|
7 |
+
add_filter('wp_stats_page_plugins', array(__CLASS__, 'page_general_stats'));
|
8 |
}
|
9 |
|
10 |
// Add WP-UserOnline General Stats To WP-Stats Page Options
|
11 |
+
function page_admin_general_stats($content) {
|
12 |
+
$stats_display = get_option('stats_display');
|
13 |
+
|
14 |
+
$content .= '<input type="checkbox" name="stats_display[]" id="wpstats_useronline" value="useronline"' . checked($stats_display['useronline'], 1, false) . '/> <label for="wpstats_useronline">'.__('WP-UserOnline', 'wp-useronline').'</label><br />'."\n";
|
15 |
|
16 |
return $content;
|
17 |
}
|
18 |
|
19 |
// Add WP-UserOnline General Stats To WP-Stats Page
|
20 |
+
function page_general_stats($content) {
|
21 |
+
$stats_display = get_option('stats_display');
|
22 |
|
23 |
$str = _n(
|
24 |
'<strong>%s</strong> user online now.',
|
25 |
+
'<strong>%s</strong> users online now.',
|
26 |
get_users_online_count(), 'wp-useronline'
|
27 |
);
|
28 |
|
29 |
if ( $stats_display['useronline'] == 1 )
|
30 |
+
$content .=
|
31 |
+
html('p', html('strong', __('WP-UserOnline', 'wp-useronline')))
|
32 |
+
.html('ul',
|
33 |
+
html('li', sprintf($str, number_format_i18n(get_users_online_count())))
|
34 |
+
.html('li', UserOnline_Template::format_most_users())
|
35 |
);
|
36 |
|
37 |
return $content;
|
wp-useronline.php
CHANGED
@@ -1,96 +1,324 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: WP-UserOnline
|
4 |
-
Plugin URI: http://
|
5 |
Description: Enable you to display how many users are online on your Wordpress site
|
6 |
-
Version: 2.
|
7 |
Author: Lester 'GaMerZ' Chan & scribu
|
8 |
-
|
9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
*/
|
11 |
|
12 |
-
|
|
|
13 |
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
'
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
'
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
)
|
55 |
-
|
56 |
-
'
|
57 |
-
'
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
),
|
67 |
|
68 |
-
'
|
69 |
-
'
|
70 |
-
|
71 |
-
|
72 |
-
'
|
|
|
|
|
|
|
|
|
|
|
73 |
),
|
74 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
)
|
76 |
-
)
|
77 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
|
79 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
|
81 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
|
83 |
if ( is_admin() ) {
|
84 |
-
require_once dirname(
|
85 |
-
scbAdminPage::register(
|
86 |
-
scbAdminPage::register(
|
87 |
}
|
|
|
|
|
|
|
88 |
|
89 |
-
|
90 |
-
|
|
|
91 |
|
92 |
-
|
93 |
-
# scbUtil::do_activation( __FILE__ );
|
94 |
}
|
95 |
-
scb_init( '_useronline_init' );
|
96 |
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: WP-UserOnline
|
4 |
+
Plugin URI: http://wordpress.org/extend/plugins/wp-useronline/
|
5 |
Description: Enable you to display how many users are online on your Wordpress site
|
6 |
+
Version: 2.70
|
7 |
Author: Lester 'GaMerZ' Chan & scribu
|
8 |
+
|
9 |
+
|
10 |
+
Copyright 2009 Lester Chan (email : lesterchan@gmail.com)
|
11 |
+
|
12 |
+
This program is free software; you can redistribute it and/or modify
|
13 |
+
it under the terms of the GNU General Public License as published by
|
14 |
+
the Free Software Foundation; either version 2 of the License, or
|
15 |
+
(at your option) any later version.
|
16 |
+
|
17 |
+
This program is distributed in the hope that it will be useful,
|
18 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
19 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
20 |
+
GNU General Public License for more details.
|
21 |
+
|
22 |
+
You should have received a copy of the GNU General Public License
|
23 |
+
along with this program; if not, write to the Free Software
|
24 |
+
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
25 |
*/
|
26 |
|
27 |
+
class UserOnline_Core {
|
28 |
+
static $options;
|
29 |
|
30 |
+
static $most;
|
31 |
+
|
32 |
+
private static $useronline;
|
33 |
+
|
34 |
+
function get_user_online_count() {
|
35 |
+
global $wpdb;
|
36 |
+
|
37 |
+
if ( is_null(self::$useronline) )
|
38 |
+
self::$useronline = intval($wpdb->get_var("SELECT COUNT(*) FROM $wpdb->useronline"));
|
39 |
+
|
40 |
+
return self::$useronline;
|
41 |
+
}
|
42 |
+
|
43 |
+
function init() {
|
44 |
+
add_action('plugins_loaded', array(__CLASS__, 'wp_stats_integration'));
|
45 |
+
|
46 |
+
add_action('template_redirect', array(__CLASS__, 'scripts'));
|
47 |
+
|
48 |
+
add_action('admin_head', array(__CLASS__, 'record'));
|
49 |
+
add_action('wp_head', array(__CLASS__, 'record'));
|
50 |
+
|
51 |
+
add_action('wp_ajax_useronline', array(__CLASS__, 'ajax'));
|
52 |
+
add_action('wp_ajax_nopriv_useronline', array(__CLASS__, 'ajax'));
|
53 |
+
|
54 |
+
add_shortcode('page_useronline', 'users_online_page');
|
55 |
+
|
56 |
+
register_activation_hook(__FILE__, array(__CLASS__, 'upgrade'));
|
57 |
+
|
58 |
+
// Table
|
59 |
+
new scbTable('useronline', __FILE__, "
|
60 |
+
timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
61 |
+
user_type varchar(20) NOT NULL default 'guest',
|
62 |
+
user_id bigint(20) NOT NULL default 0,
|
63 |
+
user_name varchar(250) NOT NULL default '',
|
64 |
+
user_ip varchar(20) NOT NULL default '',
|
65 |
+
user_agent varchar(255) NOT NULL default '',
|
66 |
+
page_title text NOT NULL default '',
|
67 |
+
page_url varchar(255) NOT NULL default '',
|
68 |
+
referral varchar(255) NOT NULL default '',
|
69 |
+
UNIQUE KEY useronline_id (timestamp, user_ip, user_agent)
|
70 |
+
");
|
71 |
+
|
72 |
+
self::$most = new scbOptions('useronline_most', __FILE__, array(
|
73 |
+
'count' => 1,
|
74 |
+
'date' => current_time('mysql')
|
75 |
+
));
|
76 |
+
|
77 |
+
self::$options = new scbOptions('useronline', __FILE__, array(
|
78 |
+
'timeout' => 300,
|
79 |
+
'url' => trailingslashit(get_bloginfo('url')) . 'useronline',
|
80 |
+
'names' => false,
|
81 |
+
|
82 |
+
'naming' => array(
|
83 |
+
'user' => __('1 User', 'wp-useronline'),
|
84 |
+
'users' => __('%COUNT% Users', 'wp-useronline'),
|
85 |
+
'member' => __('1 Member', 'wp-useronline'),
|
86 |
+
'members' => __('%COUNT% Members', 'wp-useronline'),
|
87 |
+
'guest' => __('1 Guest', 'wp-useronline'),
|
88 |
+
'guests' => __('%COUNT% Guests', 'wp-useronline'),
|
89 |
+
'bot' => __('1 Bot', 'wp-useronline'),
|
90 |
+
'bots' => __('%COUNT% Bots', 'wp-useronline')
|
91 |
),
|
92 |
|
93 |
+
'templates' => array(
|
94 |
+
'useronline' => '<a href="%PAGE_URL%"><strong>%USERS%</strong> '.__('Online', 'wp-useronline').'</a>',
|
95 |
+
|
96 |
+
'browsingsite' => array(
|
97 |
+
'separators' => array(
|
98 |
+
'members' => __(',', 'wp-useronline').' ',
|
99 |
+
'guests' => __(',', 'wp-useronline').' ',
|
100 |
+
'bots' => __(',', 'wp-useronline').' ',
|
101 |
+
),
|
102 |
+
'text' => _x('Users', 'Template Element', 'wp-useronline').': <strong>%MEMBER_NAMES%%GUESTS_SEPERATOR%%GUESTS%%BOTS_SEPERATOR%%BOTS%</strong>'
|
103 |
),
|
104 |
+
|
105 |
+
'browsingpage' => array(
|
106 |
+
'separators' => array(
|
107 |
+
'members' => __(',', 'wp-useronline').' ',
|
108 |
+
'guests' => __(',', 'wp-useronline').' ',
|
109 |
+
'bots' => __(',', 'wp-useronline').' ',
|
110 |
+
),
|
111 |
+
'text' => '<strong>%USERS%</strong> '.__('Browsing This Page.', 'wp-useronline').'<br />'._x('Users', 'Template Element', 'wp-useronline').': <strong>%MEMBER_NAMES%%GUESTS_SEPERATOR%%GUESTS%%BOTS_SEPERATOR%%BOTS%</strong>'
|
112 |
+
)
|
113 |
)
|
114 |
+
));
|
115 |
+
}
|
116 |
+
|
117 |
+
function upgrade() {
|
118 |
+
global $wpdb;
|
119 |
+
|
120 |
+
$count = self::get_and_delete_option('useronline_most_users');
|
121 |
+
$date = self::get_and_delete_option('useronline_most_timestamp');
|
122 |
+
|
123 |
+
if ( !$count )
|
124 |
+
return;
|
125 |
+
add_option('useronline_most', compact('count', 'date'));
|
126 |
+
|
127 |
+
$naming = self::get_and_delete_option('useronline_naming');
|
128 |
+
|
129 |
+
$templates['useronline'] = str_replace('%USERONLINE_', '%', self::get_and_delete_option('useronline_template_useronline'));
|
130 |
+
|
131 |
+
foreach ( array('browsingsite', 'browsingpage') as $template ) {
|
132 |
+
list($members, $guests, $bots, $text) = self::get_and_delete_option("useronline_template_$template");
|
133 |
+
$templates[$template] = array(
|
134 |
+
'text' => str_replace('%USERONLINE_', '%', $text),
|
135 |
+
'separators' => compact('members', 'guests', 'bots'),
|
136 |
+
);
|
137 |
+
}
|
138 |
+
|
139 |
+
$options = compact('naming', 'templates');
|
140 |
+
foreach ( array('timeout', 'url') as $option )
|
141 |
+
$options[$option] = self::get_and_delete_option("useronline_$option");
|
142 |
+
|
143 |
+
add_option('useronline', $options);
|
144 |
+
|
145 |
+
delete_option('useronline_bots');
|
146 |
+
|
147 |
+
$wpdb->query("DROP TABLE IF EXISTS {$wpdb->prefix}useronline");
|
148 |
+
}
|
149 |
+
|
150 |
+
private function get_and_delete_option($key) {
|
151 |
+
$val = get_option($key);
|
152 |
+
delete_option($key);
|
153 |
+
return $val;
|
154 |
+
}
|
155 |
+
|
156 |
+
function scripts() {
|
157 |
+
$js_dev = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '.dev' : '';
|
158 |
|
159 |
+
wp_enqueue_script('wp-useronline', plugins_url("useronline$js_dev.js", __FILE__), array('jquery'), '2.70', true);
|
160 |
+
wp_localize_script('wp-useronline', 'useronlineL10n', array(
|
161 |
+
'ajax_url' => admin_url('admin-ajax.php'),
|
162 |
+
'timeout' => self::$options->timeout * 1000
|
163 |
+
));
|
164 |
+
}
|
165 |
+
|
166 |
+
function record() {
|
167 |
+
global $wpdb;
|
168 |
+
|
169 |
+
$user_ip = self::get_ip();
|
170 |
+
$user_agent = $_SERVER['HTTP_USER_AGENT'];
|
171 |
+
$page_url = $_SERVER['REQUEST_URI'];
|
172 |
+
|
173 |
+
$referral = strip_tags(@$_SERVER['HTTP_REFERER']);
|
174 |
+
|
175 |
+
$current_user = wp_get_current_user();
|
176 |
+
|
177 |
+
// Check For Bot
|
178 |
+
$bots = array('Google Bot' => 'googlebot', 'Google Bot' => 'google', 'MSN' => 'msnbot', 'Alex' => 'ia_archiver', 'Lycos' => 'lycos', 'Ask Jeeves' => 'jeeves', 'Altavista' => 'scooter', 'AllTheWeb' => 'fast-webcrawler', 'Inktomi' => 'slurp@inktomi', 'Turnitin.com' => 'turnitinbot', 'Technorati' => 'technorati', 'Yahoo' => 'yahoo', 'Findexa' => 'findexa', 'NextLinks' => 'findlinks', 'Gais' => 'gaisbo', 'WiseNut' => 'zyborg', 'WhoisSource' => 'surveybot', 'Bloglines' => 'bloglines', 'BlogSearch' => 'blogsearch', 'PubSub' => 'pubsub', 'Syndic8' => 'syndic8', 'RadioUserland' => 'userland', 'Gigabot' => 'gigabot', 'Become.com' => 'become.com', 'Baidu' => 'baidu');
|
179 |
+
|
180 |
+
$bot_found = false;
|
181 |
+
foreach ( $bots as $name => $lookfor )
|
182 |
+
if ( stristr($user_agent, $lookfor) !== false ) {
|
183 |
+
$user_id = 0;
|
184 |
+
$user_name = $name;
|
185 |
+
$username = $lookfor;
|
186 |
+
$user_type = 'bot';
|
187 |
+
$bot_found = true;
|
188 |
+
|
189 |
+
break;
|
190 |
+
}
|
191 |
+
|
192 |
+
$where = $wpdb->prepare("WHERE user_ip = %s", $user_ip);
|
193 |
+
|
194 |
+
// If No Bot Is Found, Then We Check Members And Guests
|
195 |
+
if ( !$bot_found ) {
|
196 |
+
if ( $current_user->ID ) {
|
197 |
+
// Check For Member
|
198 |
+
$user_id = $current_user->ID;
|
199 |
+
$user_name = $current_user->display_name;
|
200 |
+
$user_type = 'member';
|
201 |
+
$where = $wpdb->prepare("WHERE user_id = %d", $user_id);
|
202 |
+
} elseif ( !empty($_COOKIE['comment_author_'.COOKIEHASH]) ) {
|
203 |
+
// Check For Comment Author (Guest)
|
204 |
+
$user_id = 0;
|
205 |
+
$user_name = trim(strip_tags($_COOKIE['comment_author_'.COOKIEHASH]));
|
206 |
+
$user_type = 'guest';
|
207 |
+
} else {
|
208 |
+
// Check For Guest
|
209 |
+
$user_id = 0;
|
210 |
+
$user_name = __('Guest', 'wp-useronline');
|
211 |
+
$user_type = 'guest';
|
212 |
+
}
|
213 |
+
}
|
214 |
|
215 |
+
// Check For Page Title
|
216 |
+
if ( is_admin() && function_exists('get_admin_page_title') ) {
|
217 |
+
$page_title = ' » ' . __('Admin', 'wp-useronline') . ' » ' . get_admin_page_title();
|
218 |
+
} else {
|
219 |
+
$page_title = wp_title('»', false);
|
220 |
+
if ( empty($page_title) )
|
221 |
+
$page_title = ' » ' . strip_tags($_SERVER['REQUEST_URI']);
|
222 |
+
elseif ( is_singular() )
|
223 |
+
$page_title = ' » ' . __('Archive', 'wp-useronline') . ' ' . $page_title;
|
224 |
+
}
|
225 |
+
$page_title = get_bloginfo('name') . $page_title;
|
226 |
+
|
227 |
+
// Delete Users
|
228 |
+
$delete_users = $wpdb->query($wpdb->prepare("
|
229 |
+
DELETE FROM $wpdb->useronline
|
230 |
+
$where OR timestamp < CURRENT_TIMESTAMP - %d
|
231 |
+
", self::$options->timeout));
|
232 |
+
|
233 |
+
// Insert Users
|
234 |
+
$data = compact('user_type', 'user_id', 'user_name', 'user_ip', 'user_agent', 'page_title', 'page_url', 'referral');
|
235 |
+
$data = stripslashes_deep($data);
|
236 |
+
$insert_user = $wpdb->insert($wpdb->useronline, $data);
|
237 |
+
|
238 |
+
// Count Users Online
|
239 |
+
self::$useronline = intval($wpdb->get_var("SELECT COUNT(*) FROM $wpdb->useronline"));
|
240 |
+
|
241 |
+
// Maybe Update Most User Online
|
242 |
+
if ( self::$useronline > self::$most->count )
|
243 |
+
self::$most->update(array(
|
244 |
+
'count' => self::$useronline,
|
245 |
+
'date' => current_time('mysql')
|
246 |
+
));
|
247 |
+
}
|
248 |
+
|
249 |
+
function ajax() {
|
250 |
+
$mode = trim($_POST['mode']);
|
251 |
+
|
252 |
+
switch($mode) {
|
253 |
+
case 'count':
|
254 |
+
users_online();
|
255 |
+
break;
|
256 |
+
case 'browsingsite':
|
257 |
+
users_browsing_site();
|
258 |
+
break;
|
259 |
+
case 'browsingpage':
|
260 |
+
users_browsing_page();
|
261 |
+
break;
|
262 |
+
}
|
263 |
+
|
264 |
+
die;
|
265 |
+
}
|
266 |
+
|
267 |
+
function wp_stats_integration() {
|
268 |
+
if ( function_exists('stats_page') )
|
269 |
+
require_once dirname(__FILE__) . '/wp-stats.php';
|
270 |
+
}
|
271 |
+
|
272 |
+
private function get_ip() {
|
273 |
+
if ( isset($_SERVER["HTTP_X_FORWARDED_FOR"]) )
|
274 |
+
$ip_address = $_SERVER["HTTP_X_FORWARDED_FOR"];
|
275 |
+
else
|
276 |
+
$ip_address = $_SERVER["REMOTE_ADDR"];
|
277 |
+
|
278 |
+
list($ip_address) = explode(',', $ip_address);
|
279 |
+
|
280 |
+
return $ip_address;
|
281 |
+
}
|
282 |
+
|
283 |
+
private function clear_table() {
|
284 |
+
global $wpdb;
|
285 |
+
|
286 |
+
$wpdb->query("DELETE FROM $wpdb->useronline");
|
287 |
+
}
|
288 |
+
}
|
289 |
+
|
290 |
+
function _useronline_init() {
|
291 |
+
require_once dirname(__FILE__) . '/scb/load.php';
|
292 |
+
|
293 |
+
require_once dirname(__FILE__) . '/template-tags.php';
|
294 |
+
require_once dirname(__FILE__) . '/deprecated.php';
|
295 |
+
|
296 |
+
load_plugin_textdomain('wp-useronline', '', basename(dirname(__FILE__)));
|
297 |
+
|
298 |
+
UserOnline_Core::init();
|
299 |
+
|
300 |
+
if ( UserOnline_Core::$options->names )
|
301 |
+
add_filter('useronline_display_user', 'wpu_linked_names', 10, 2);
|
302 |
+
|
303 |
+
require_once dirname(__FILE__) . '/widget.php';
|
304 |
+
scbWidget::init('UserOnline_Widget', __FILE__, 'useronline');
|
305 |
+
|
306 |
+
if ( function_exists('stats_page') )
|
307 |
+
require_once dirname(__FILE__) . '/wp-stats.php';
|
308 |
|
309 |
if ( is_admin() ) {
|
310 |
+
require_once dirname(__FILE__) . '/admin.php';
|
311 |
+
scbAdminPage::register('UserOnline_Admin_Integration', __FILE__);
|
312 |
+
scbAdminPage::register('UserOnline_Options', __FILE__, UserOnline_Core::$options);
|
313 |
}
|
314 |
+
}
|
315 |
+
_useronline_init();
|
316 |
+
|
317 |
|
318 |
+
function wpu_linked_names($name, $user) {
|
319 |
+
if ( !$user->user_id )
|
320 |
+
return $name;
|
321 |
|
322 |
+
return html_link(get_author_posts_url($user->user_id), $name);
|
|
|
323 |
}
|
|
|
324 |
|