Version Description
- Addressed some warning/notice messages that shows when debug is enabled.
Download this release
Release Info
Developer | mra13 |
Plugin | Simple Download Monitor |
Version | 3.2.3 |
Comparing to | |
See all releases |
Code changes from version 3.0 to 3.2.3
- css/sdm_wp_styles.css +82 -15
- includes/sdm-admin-menu-handler.php +180 -0
- includes/sdm-latest-downloads.php +48 -0
- includes/sdm-logs-list-table.php +216 -0
- includes/sdm-utility-functions.php +120 -0
- includes/templates/fancy0/sdm-fancy-0.php +99 -0
- includes/templates/fancy1/sdm-fancy-1.php +128 -0
- includes/templates/fancy2/sdm-fancy-2-styles.css +66 -0
- includes/templates/fancy2/sdm-fancy-2.php +137 -0
- js/sdm_admin_scripts.js +1 -1
- js/sdm_wp_scripts.js +2 -6
- langs/sdm_lang-es_ES.mo +0 -0
- langs/sdm_lang-es_ES.po +533 -0
- langs/sdm_lang-nl_NL.mo +0 -0
- langs/sdm_lang-nl_NL.po +345 -0
- langs/sdm_lang-pt_BR.mo +0 -0
- langs/sdm_lang-pt_BR.po +343 -0
- langs/sdm_lang-ru_RU.mo +0 -0
- langs/sdm_lang-ru_RU.po +548 -0
- langs/sdm_lang.pot +511 -0
- main.php +657 -1062
- readme.txt +109 -23
- sdm-post-type-and-taxonomy.php +91 -0
- sdm-post-type-content-handler.php +68 -7
- sdm-shortcodes.php +251 -259
- tinymce/sdm_editor_plugin.js +2 -2
css/sdm_wp_styles.css
CHANGED
@@ -1,31 +1,98 @@
|
|
|
|
|
|
|
|
|
|
1 |
.sdm_download_item {
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
}
|
9 |
.sdm_download_title {
|
10 |
-
|
11 |
font-size: 24px;
|
12 |
font-weight: bold;
|
13 |
line-height: 75px;
|
14 |
}
|
15 |
.sdm_download_thumbnail {
|
16 |
-
|
17 |
}
|
18 |
.sdm_download_thumbnail_image {
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
}
|
24 |
.sdm_download_description {
|
25 |
-
|
26 |
-
|
27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
.sdm_download {
|
30 |
display: inline-block;
|
31 |
text-decoration: none;
|
1 |
+
.sdm_clear_float{
|
2 |
+
clear: both;
|
3 |
+
}
|
4 |
+
|
5 |
.sdm_download_item {
|
6 |
+
display: block;
|
7 |
+
border:1px solid #E7E9EB;
|
8 |
+
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
|
9 |
+
margin-top:10px;
|
10 |
+
margin-bottom:10px;
|
11 |
+
padding:15px;
|
12 |
}
|
13 |
.sdm_download_title {
|
14 |
+
float:left;
|
15 |
font-size: 24px;
|
16 |
font-weight: bold;
|
17 |
line-height: 75px;
|
18 |
}
|
19 |
.sdm_download_thumbnail {
|
20 |
+
float:left;
|
21 |
}
|
22 |
.sdm_download_thumbnail_image {
|
23 |
+
width:75px !important;
|
24 |
+
height:75px !important;
|
25 |
+
float:left !important;
|
26 |
+
margin-right:10px !important;
|
27 |
}
|
28 |
.sdm_download_description {
|
29 |
+
margin: 15px 0 15px 0;
|
30 |
+
padding-bottom: 10px;
|
31 |
+
border-bottom: 1px solid #EEEEEE;
|
32 |
+
}
|
33 |
+
.sdm_download_item_count{
|
34 |
+
margin-left: 20px;
|
35 |
+
border: 1px solid #E7E9EB;
|
36 |
+
padding: 3px 10px;
|
37 |
+
display: inline-block;
|
38 |
+
float: right;
|
39 |
+
}
|
40 |
+
.sdm_download_link{
|
41 |
+
display: block;
|
42 |
+
}
|
43 |
+
.sdm_download_button{
|
44 |
+
display: inline-block;
|
45 |
+
}
|
46 |
+
.sdm_download_button_box_default{
|
47 |
+
margin: 10px 0;
|
48 |
+
}
|
49 |
+
/********************************************/
|
50 |
+
/*** Individual Download Item View Styles ***/
|
51 |
+
/********************************************/
|
52 |
+
.sdm_post_item{
|
53 |
+
width: 90%;
|
54 |
+
}
|
55 |
+
.sdm_post_item_top{
|
56 |
+
display: block;
|
57 |
}
|
58 |
+
.sdm_post_item_top_left{
|
59 |
+
width: 40%;
|
60 |
+
float: left;
|
61 |
+
margin-right: 30px;
|
62 |
+
}
|
63 |
+
.sdm_post_item_top_right{
|
64 |
+
float: left;
|
65 |
+
width: 50%;
|
66 |
+
}
|
67 |
+
.sdm_post_item_top_left img{
|
68 |
+
width: 100%;
|
69 |
+
border: 1px solid #e8e4e3;
|
70 |
+
padding: 5px;
|
71 |
+
}
|
72 |
+
.sdm_post_title{
|
73 |
+
font-size: 26px;
|
74 |
+
font-weight: bold;
|
75 |
+
margin-bottom: 20px;
|
76 |
+
}
|
77 |
+
.sdm_post_download_count{
|
78 |
+
margin-bottom: 20px;
|
79 |
+
font-size: 18px;
|
80 |
+
font-weight: bold;
|
81 |
+
border: 1px solid #e8e4e3;
|
82 |
+
display: inline-block;
|
83 |
+
padding: 10px 15px;
|
84 |
+
}
|
85 |
+
.sdm_post_download_section{
|
86 |
+
margin: 15px 0;
|
87 |
+
}
|
88 |
+
.sdm_post_meta_section{
|
89 |
+
border-top: 4px double #e8e4e3;
|
90 |
+
padding-top: 15px;
|
91 |
+
}
|
92 |
+
|
93 |
+
/*********************/
|
94 |
+
/*** Button styles ***/
|
95 |
+
/*********************/
|
96 |
.sdm_download {
|
97 |
display: inline-block;
|
98 |
text-decoration: none;
|
includes/sdm-admin-menu-handler.php
ADDED
@@ -0,0 +1,180 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
function sdm_handle_admin_menu() {
|
4 |
+
//***** If user clicked to download the bulk export log
|
5 |
+
if (isset($_GET['download_log'])) {
|
6 |
+
global $wpdb;
|
7 |
+
$csv_output = '';
|
8 |
+
$table = $wpdb->prefix . 'sdm_downloads';
|
9 |
+
|
10 |
+
$result = mysql_query("SHOW COLUMNS FROM " . $table . "");
|
11 |
+
|
12 |
+
$i = 0;
|
13 |
+
if (mysql_num_rows($result) > 0) {
|
14 |
+
while ($row = mysql_fetch_assoc($result)) {
|
15 |
+
$csv_output = $csv_output . $row['Field'] . ",";
|
16 |
+
$i++;
|
17 |
+
}
|
18 |
+
}
|
19 |
+
$csv_output .= "\n";
|
20 |
+
|
21 |
+
$values = mysql_query("SELECT * FROM " . $table . "");
|
22 |
+
while ($rowr = mysql_fetch_row($values)) {
|
23 |
+
for ($j = 0; $j < $i; $j++) {
|
24 |
+
$csv_output .= $rowr[$j] . ",";
|
25 |
+
}
|
26 |
+
$csv_output .= "\n";
|
27 |
+
}
|
28 |
+
|
29 |
+
header("Pragma: public");
|
30 |
+
header("Expires: 0");
|
31 |
+
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
|
32 |
+
header("Cache-Control: private", false);
|
33 |
+
header("Content-Type: application/octet-stream");
|
34 |
+
header("Content-Disposition: attachment; filename=\"report.csv\";");
|
35 |
+
header("Content-Transfer-Encoding: binary");
|
36 |
+
|
37 |
+
echo $csv_output;
|
38 |
+
exit;
|
39 |
+
}
|
40 |
+
|
41 |
+
//*****
|
42 |
+
//***** Create the 'logs' and 'settings' submenu pages
|
43 |
+
$sdm_logs_page = add_submenu_page('edit.php?post_type=sdm_downloads', __('Logs', 'sdm_lang'), __('Logs', 'sdm_lang'), 'manage_options', 'logs', 'sdm_create_logs_page');
|
44 |
+
$sdm_settings_page = add_submenu_page('edit.php?post_type=sdm_downloads', __('Settings', 'sdm_lang'), __('Settings', 'sdm_lang'), 'manage_options', 'settings', 'sdm_create_settings_page');
|
45 |
+
}
|
46 |
+
|
47 |
+
/*
|
48 |
+
* Settings page
|
49 |
+
*/
|
50 |
+
function sdm_create_settings_page() {
|
51 |
+
echo '<div class="wrap">';
|
52 |
+
echo '<div id="poststuff"><div id="post-body">';
|
53 |
+
?>
|
54 |
+
<h2><?php _e('Simple Download Monitor Settings Page', 'sdm_lang') ?></h2>
|
55 |
+
|
56 |
+
<div style="background: #FFF6D5; border: 1px solid #D1B655; color: #3F2502; padding: 15px 10px">
|
57 |
+
Read the full plugin usage documentation <a href="https://www.tipsandtricks-hq.com/simple-wordpress-download-monitor-plugin" target="_blank">here</a>.
|
58 |
+
You can also <a href="http://www.tipsandtricks-hq.com/development-center" target="_blank"><?php _e('follow us', 'sdm_lang'); ?></a> <?php _e('on Twitter, Google+ or via Email to stay upto date about the new features of this plugin.', 'sdm_lang'); ?>
|
59 |
+
</div>
|
60 |
+
|
61 |
+
<!-- settings page form -->
|
62 |
+
<form method="post" action="options.php">
|
63 |
+
|
64 |
+
<!-- BEGIN ADMIN OPTIONS DIV -->
|
65 |
+
<div id="sdm_admin_opts_div" class="sdm_sliding_div_title">
|
66 |
+
<div class="sdm_slider_title">
|
67 |
+
<?php _e('Admin Options', 'sdm_lang') ?>
|
68 |
+
</div>
|
69 |
+
<div class="sdm_desc">
|
70 |
+
<?php _e("Control various plugin features.", 'sdm_lang') ?>
|
71 |
+
</div>
|
72 |
+
</div>
|
73 |
+
<div id="sliding_div1" class="slidingDiv">
|
74 |
+
<?php
|
75 |
+
// This prints out all hidden setting fields
|
76 |
+
do_settings_sections('admin_options_section');
|
77 |
+
settings_fields('sdm_downloads_options');
|
78 |
+
|
79 |
+
submit_button();
|
80 |
+
?>
|
81 |
+
</div>
|
82 |
+
<!-- END ADMIN OPTIONS DIV -->
|
83 |
+
|
84 |
+
<!-- BEGIN COLORS DIV -->
|
85 |
+
<div id="sdm_color_opts_div" class="sdm_sliding_div_title">
|
86 |
+
<div class="sdm_slider_title">
|
87 |
+
<?php _e('Color Options', 'sdm_lang') ?>
|
88 |
+
</div>
|
89 |
+
<div class="sdm_desc">
|
90 |
+
<?php _e("Adjust color options", 'sdm_lang') ?>
|
91 |
+
</div>
|
92 |
+
</div>
|
93 |
+
<div id="sliding_div2" class="slidingDiv">
|
94 |
+
<?php
|
95 |
+
// This prints out all hidden setting fields
|
96 |
+
do_settings_sections('sdm_colors_section');
|
97 |
+
settings_fields('sdm_downloads_options');
|
98 |
+
|
99 |
+
submit_button();
|
100 |
+
?>
|
101 |
+
</div>
|
102 |
+
<!-- END COLORS OPTIONS DIV -->
|
103 |
+
|
104 |
+
<!-- End of settings page form -->
|
105 |
+
</form>
|
106 |
+
|
107 |
+
<div style="background: none repeat scroll 0 0 #FFF6D5;border: 1px solid #D1B655;color: #3F2502;margin: 10px 0;padding: 5px 5px 5px 10px;text-shadow: 1px 1px #FFFFFF;">
|
108 |
+
<p><?php _e('If you need a feature rich and supported plugin for selling your digital items then checkout our', 'sdm_lang'); ?> <a href="https://www.tipsandtricks-hq.com/wordpress-estore-plugin-complete-solution-to-sell-digital-products-from-your-wordpress-blog-securely-1059" target="_blank"><?php _e('WP eStore Plugin', 'sdm_lang'); ?></a>
|
109 |
+
</p>
|
110 |
+
</div>
|
111 |
+
|
112 |
+
<?php
|
113 |
+
echo '</div></div>'; //end of post-stuff
|
114 |
+
echo '</div>'; //end of wrap
|
115 |
+
}
|
116 |
+
|
117 |
+
/*
|
118 |
+
* * Logs Page
|
119 |
+
*/
|
120 |
+
function sdm_create_logs_page() {
|
121 |
+
global $wpdb;
|
122 |
+
|
123 |
+
if (isset($_POST['sdm_reset_log_entries'])) {
|
124 |
+
//reset log entries
|
125 |
+
$table_name = $wpdb->prefix . 'sdm_downloads';
|
126 |
+
$query = "TRUNCATE $table_name";
|
127 |
+
$result = $wpdb->query($query);
|
128 |
+
echo '<div id="message" class="updated fade"><p>';
|
129 |
+
_e('Download log entries deleted!', 'sdm_lang');
|
130 |
+
echo '</p></div>';
|
131 |
+
}
|
132 |
+
|
133 |
+
/*** Display the logs table ***/
|
134 |
+
//Create an instance of our package class...
|
135 |
+
$sdmListTable = new sdm_List_Table();
|
136 |
+
//Fetch, prepare, sort, and filter our data...
|
137 |
+
$sdmListTable->prepare_items();
|
138 |
+
?>
|
139 |
+
<div class="wrap">
|
140 |
+
|
141 |
+
<div id="icon-users" class="icon32"><br/></div>
|
142 |
+
<h2><?php _e('Download Logs', 'sdm_lang'); ?></h2>
|
143 |
+
|
144 |
+
<div style="background:#ECECEC;border:1px solid #CCC;padding:0 10px;margin-top:5px;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;">
|
145 |
+
<p><?php _e('This page lists all tracked downloads.', 'sdm_lang'); ?></p>
|
146 |
+
</div>
|
147 |
+
|
148 |
+
<div id="poststuff"><div id="post-body">
|
149 |
+
<!-- Log reset button -->
|
150 |
+
<div class="postbox">
|
151 |
+
<h3><label for="title"><?php _e('Reset Download Log Entries', 'sdm_lang'); ?></label></h3>
|
152 |
+
<div class="inside">
|
153 |
+
|
154 |
+
<form method="post" action="<?php echo $_SERVER["REQUEST_URI"]; ?>" onSubmit="return confirm('Are you sure you want to reset all the log entries?');" >
|
155 |
+
<div class="submit">
|
156 |
+
<input type="submit" class="button" name="sdm_reset_log_entries" value="<?php _e('Reset Log Entries', 'sdm_lang'); ?>" />
|
157 |
+
</div>
|
158 |
+
</form>
|
159 |
+
|
160 |
+
</div></div>
|
161 |
+
</div></div>
|
162 |
+
|
163 |
+
<!-- Forms are NOT created automatically, so you need to wrap the table in one to use features like bulk actions -->
|
164 |
+
<form id="sdm_downloads-filter" method="post">
|
165 |
+
<input type="hidden" name="page" value="<?php echo $_REQUEST['page'] ?>" />
|
166 |
+
<!-- Now we can render the completed list table -->
|
167 |
+
<?php $sdmListTable->display() ?>
|
168 |
+
</form>
|
169 |
+
|
170 |
+
|
171 |
+
</div><!-- end of wrap -->
|
172 |
+
<script type="text/javascript">
|
173 |
+
jQuery(document).ready(function($) {
|
174 |
+
$('.fade').click(function() {
|
175 |
+
$(this).fadeOut('slow');
|
176 |
+
});
|
177 |
+
});
|
178 |
+
</script>
|
179 |
+
<?php
|
180 |
+
}
|
includes/sdm-latest-downloads.php
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
function sdm_show_latest_downloads($args){
|
4 |
+
|
5 |
+
extract(shortcode_atts(array(
|
6 |
+
'number' => '5',
|
7 |
+
'fancy' => '0',
|
8 |
+
'button_text' => '',
|
9 |
+
'new_window' => '',
|
10 |
+
'orderby' => 'post_date',
|
11 |
+
'order' => 'DESC',
|
12 |
+
), $args));
|
13 |
+
|
14 |
+
|
15 |
+
// Query cpt's based on arguments above
|
16 |
+
$get_posts = get_posts(array(
|
17 |
+
'post_type' => 'sdm_downloads',
|
18 |
+
'show_posts' => -1,
|
19 |
+
'posts_per_page' => $number,
|
20 |
+
'orderby' => $orderby,
|
21 |
+
'order' => $order,
|
22 |
+
));
|
23 |
+
|
24 |
+
// If no cpt's are found
|
25 |
+
if (!$get_posts) {
|
26 |
+
return '<p style="color: red;">' . __('There are no download items matching this shortcode criteria.', 'sdm_lang') . '</p>';
|
27 |
+
}
|
28 |
+
// Else iterate cpt's
|
29 |
+
else {
|
30 |
+
|
31 |
+
$output = '';
|
32 |
+
if ($fancy == '0') {
|
33 |
+
include_once(WP_SIMPLE_DL_MONITOR_PATH.'includes/templates/fancy0/sdm-fancy-0.php');
|
34 |
+
$output .= sdm_generate_fancy0_latest_downloads_display_output($get_posts, $args);
|
35 |
+
}
|
36 |
+
if ($fancy == '1') {
|
37 |
+
include_once(WP_SIMPLE_DL_MONITOR_PATH.'includes/templates/fancy1/sdm-fancy-1.php');
|
38 |
+
$output .= sdm_generate_fancy1_latest_downloads_display_output($get_posts, $args);
|
39 |
+
} else if ($fancy == '2') {
|
40 |
+
include_once(WP_SIMPLE_DL_MONITOR_PATH.'includes/templates/fancy2/sdm-fancy-2.php');
|
41 |
+
$output .= sdm_generate_fancy2_latest_downloads_display_output($get_posts, $args);
|
42 |
+
}
|
43 |
+
|
44 |
+
// Return results
|
45 |
+
return apply_filters('sdm_latest_downloads_shortcode_output', $output, $args, $get_posts);
|
46 |
+
} // End else iterate cpt's
|
47 |
+
|
48 |
+
}
|
includes/sdm-logs-list-table.php
ADDED
@@ -0,0 +1,216 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
//*****
|
4 |
+
//***** Check WP_List_Table exists
|
5 |
+
if (!class_exists('WP_List_Table')) {
|
6 |
+
require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
|
7 |
+
}
|
8 |
+
|
9 |
+
//*****
|
10 |
+
//***** Define our new Table
|
11 |
+
class sdm_List_Table extends WP_List_Table {
|
12 |
+
|
13 |
+
function __construct() {
|
14 |
+
|
15 |
+
global $status, $page;
|
16 |
+
|
17 |
+
//Set parent defaults
|
18 |
+
parent::__construct(array(
|
19 |
+
'singular' => __('Download', 'sdm_lang'), //singular name of the listed records
|
20 |
+
'plural' => __('Downloads', 'sdm_lang'), //plural name of the listed records
|
21 |
+
'ajax' => false //does this table support ajax?
|
22 |
+
));
|
23 |
+
}
|
24 |
+
|
25 |
+
function column_default($item, $column_name) {
|
26 |
+
|
27 |
+
switch ($column_name) {
|
28 |
+
case 'URL':
|
29 |
+
case 'visitor_ip':
|
30 |
+
case 'date':
|
31 |
+
return $item[$column_name];
|
32 |
+
case 'visitor_country':
|
33 |
+
return $item[$column_name];
|
34 |
+
case 'visitor_name':
|
35 |
+
return $item[$column_name];
|
36 |
+
default:
|
37 |
+
return print_r($item, true); //Show the whole array for troubleshooting purposes
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
+
function column_title($item) {
|
42 |
+
|
43 |
+
//Build row actions
|
44 |
+
$actions = array(
|
45 |
+
'edit' => sprintf('<a href="' . admin_url('post.php?post=' . $item['ID'] . '&action=edit') . '">' . __('Edit', 'sdm_lang') . '</a>'),
|
46 |
+
'delete' => sprintf('<a href="?post_type=sdm_downloads&page=%s&action=%s&download=%s&datetime=%s">' . __('Delete', 'sdm_lang') . '</a>', $_REQUEST['page'], 'delete', $item['ID'], $item['date'])
|
47 |
+
);
|
48 |
+
|
49 |
+
//Return the title contents
|
50 |
+
return sprintf('%1$s <span style="color:silver">(id:%2$s)</span>%3$s',
|
51 |
+
/* $1%s */ $item['title'],
|
52 |
+
/* $2%s */ $item['ID'],
|
53 |
+
/* $3%s */ $this->row_actions($actions)
|
54 |
+
);
|
55 |
+
}
|
56 |
+
|
57 |
+
function column_cb($item) {
|
58 |
+
|
59 |
+
return sprintf(
|
60 |
+
'<input type="checkbox" name="%1$s[]" value="%2$s" />',
|
61 |
+
/* $1%s */ $this->_args['singular'], //Let's simply repurpose the table's singular label ("Download")
|
62 |
+
/* $2%s */ $item['ID'] . '|' . $item['date'] //The value of the checkbox should be the record's id
|
63 |
+
);
|
64 |
+
}
|
65 |
+
|
66 |
+
function get_columns() {
|
67 |
+
|
68 |
+
$columns = array(
|
69 |
+
'cb' => '<input type="checkbox" />', //Render a checkbox instead of text
|
70 |
+
'title' => __('Title', 'sdm_lang'),
|
71 |
+
'URL' => __('File', 'sdm_lang'),
|
72 |
+
'visitor_ip' => __('Visitor IP', 'sdm_lang'),
|
73 |
+
'date' => __('Date', 'sdm_lang'),
|
74 |
+
'visitor_country' => __('Country', 'sdm_lang'),
|
75 |
+
'visitor_name' => __('Username', 'sdm_lang')
|
76 |
+
);
|
77 |
+
return $columns;
|
78 |
+
}
|
79 |
+
|
80 |
+
function get_sortable_columns() {
|
81 |
+
|
82 |
+
$sortable_columns = array(
|
83 |
+
'title' => array('title', false), //true means it's already sorted
|
84 |
+
'URL' => array('URL', false),
|
85 |
+
'visitor_ip' => array('visitor_ip', false),
|
86 |
+
'date' => array('date', false),
|
87 |
+
'visitor_country' => array('visitor_country', false),
|
88 |
+
'visitor_name' => array('visitor_name', false)
|
89 |
+
);
|
90 |
+
return $sortable_columns;
|
91 |
+
}
|
92 |
+
|
93 |
+
function get_bulk_actions() {
|
94 |
+
|
95 |
+
$actions = array();
|
96 |
+
$actions['delete2'] = __('Delete Permanently', 'sdm_lang');
|
97 |
+
$actions['export_all'] = __('Export All as Excel', 'sdm_lang');
|
98 |
+
//$actions['export-selected'] = __( 'Export Selected', 'sdm_lang' );
|
99 |
+
|
100 |
+
return $actions;
|
101 |
+
}
|
102 |
+
|
103 |
+
function process_bulk_action() {
|
104 |
+
|
105 |
+
// security check!
|
106 |
+
if (isset($_POST['_wpnonce']) && !empty($_POST['_wpnonce'])) {
|
107 |
+
|
108 |
+
$nonce = filter_input(INPUT_POST, '_wpnonce', FILTER_SANITIZE_STRING);
|
109 |
+
$action = 'bulk-' . $this->_args['plural'];
|
110 |
+
|
111 |
+
if (!wp_verify_nonce($nonce, $action))
|
112 |
+
wp_die(__('Nope! Security check failed!', 'sdm_lang'));
|
113 |
+
}
|
114 |
+
|
115 |
+
$action = $this->current_action();
|
116 |
+
|
117 |
+
// If bulk 'Export All' was clicked
|
118 |
+
if ('export_all' === $this->current_action()) {
|
119 |
+
|
120 |
+
echo '<div id="message" class="updated"><p><strong><a id="sdm_download_export" href="?post_type=sdm_downloads&page=logs&download_log">' . __('Download Export File', 'sdm_lang') . '</a></strong></p></div>';
|
121 |
+
}
|
122 |
+
|
123 |
+
// if bulk 'Delete Permanently' was clicked
|
124 |
+
if ('delete2' === $this->current_action()) {
|
125 |
+
|
126 |
+
if (!isset($_POST['download']) || $_POST['download'] == null) {
|
127 |
+
echo '<div id="message" class="updated fade"><p><strong>' . __('No entries were selected.', 'sdm_lang') . '</strong></p><p><em>' . __('Click to Dismiss', 'sdm_lang') . '</em></p></div>';
|
128 |
+
return;
|
129 |
+
}
|
130 |
+
|
131 |
+
foreach ($_POST['download'] as $item) {
|
132 |
+
$str_tok_id = substr($item, 0, strpos($item, '|'));
|
133 |
+
$str_tok_datetime = substr($item, strpos($item, '|') + 1);
|
134 |
+
|
135 |
+
global $wpdb;
|
136 |
+
$del_row = $wpdb->query(
|
137 |
+
'DELETE FROM ' . $wpdb->prefix . 'sdm_downloads
|
138 |
+
WHERE post_id = "' . $str_tok_id . '"
|
139 |
+
AND date_time = "' . $str_tok_datetime . '"'
|
140 |
+
);
|
141 |
+
}
|
142 |
+
if ($del_row) {
|
143 |
+
echo '<div id="message" class="updated fade"><p><strong>' . __('Entries Deleted!', 'sdm_lang') . '</strong></p><p><em>' . __('Click to Dismiss', 'sdm_lang') . '</em></p></div>';
|
144 |
+
} else {
|
145 |
+
echo '<div id="message" class="updated fade"><p><strong>' . __('Error', 'sdm_lang') . '</strong></p><p><em>' . __('Click to Dismiss', 'sdm_lang') . '</em></p></div>';
|
146 |
+
}
|
147 |
+
}
|
148 |
+
|
149 |
+
// If single entry 'Delete' was clicked
|
150 |
+
if ('delete' === $this->current_action()) {
|
151 |
+
|
152 |
+
$item_id = isset($_GET['download']) ? strtok($_GET['download'], '|') : '';
|
153 |
+
$item_datetime = isset($_GET['datetime']) ? $_GET['datetime'] : '';
|
154 |
+
|
155 |
+
global $wpdb;
|
156 |
+
$del_row = $wpdb->query(
|
157 |
+
'DELETE FROM ' . $wpdb->prefix . 'sdm_downloads
|
158 |
+
WHERE post_id = "' . $item_id . '"
|
159 |
+
AND date_time = "' . $item_datetime . '"'
|
160 |
+
);
|
161 |
+
if ($del_row) {
|
162 |
+
echo '<div id="message" class="updated fade"><p><strong>' . __('Entry Deleted!', 'sdm_lang') . '</strong></p><p><em>' . __('Click to Dismiss', 'sdm_lang') . '</em></p></div>';
|
163 |
+
} else {
|
164 |
+
echo '<div id="message" class="updated fade"><p><strong>' . __('Error', 'sdm_lang') . '</strong></p><p><em>' . __('Click to Dismiss', 'sdm_lang') . '</em></p></div>';
|
165 |
+
}
|
166 |
+
}
|
167 |
+
}
|
168 |
+
|
169 |
+
function prepare_items() {
|
170 |
+
|
171 |
+
global $wpdb; //This is used only if making any database queries
|
172 |
+
$per_page = 30;
|
173 |
+
$columns = $this->get_columns();
|
174 |
+
$hidden = array();
|
175 |
+
$sortable = $this->get_sortable_columns();
|
176 |
+
$current_page = $this->get_pagenum();
|
177 |
+
|
178 |
+
$this->_column_headers = array($columns, $hidden, $sortable);
|
179 |
+
$this->process_bulk_action();
|
180 |
+
|
181 |
+
function usort_reorder($a, $b) {
|
182 |
+
$orderby = (!empty($_REQUEST['orderby'])) ? $_REQUEST['orderby'] : 'title'; //If no sort, default to title
|
183 |
+
$order = (!empty($_REQUEST['order'])) ? $_REQUEST['order'] : 'asc'; //If no order, default to asc
|
184 |
+
$result = strcmp($a[$orderby], $b[$orderby]); //Determine sort order
|
185 |
+
return ($order === 'asc') ? $result : -$result; //Send final sort direction to usort
|
186 |
+
}
|
187 |
+
|
188 |
+
//Do a query to find the total number of rows then calculate the query limit
|
189 |
+
$table_name = $wpdb->prefix . 'sdm_downloads';
|
190 |
+
$query = "SELECT COUNT(*) FROM $table_name";
|
191 |
+
$total_items = $wpdb->get_var($query);
|
192 |
+
$offset = ($current_page - 1) * $per_page;
|
193 |
+
$query_limit =' LIMIT ' . (int) $offset . ',' . (int) $per_page;
|
194 |
+
|
195 |
+
$data_results = $wpdb->get_results('SELECT * FROM ' . $wpdb->prefix . 'sdm_downloads'. $query_limit);
|
196 |
+
$data = array();
|
197 |
+
foreach ($data_results as $data_result) {
|
198 |
+
$data[] = array('ID' => $data_result->post_id, 'title' => $data_result->post_title, 'URL' => $data_result->file_url, 'visitor_ip' => $data_result->visitor_ip, 'date' => $data_result->date_time, 'visitor_country' => $data_result->visitor_country, 'visitor_name' => $data_result->visitor_name);
|
199 |
+
}
|
200 |
+
|
201 |
+
|
202 |
+
usort($data, 'usort_reorder');
|
203 |
+
|
204 |
+
//The following is not needed as it comes from the extra query and the query limit stuff
|
205 |
+
//$total_items = count($data);
|
206 |
+
//$data = array_slice($data, (($current_page - 1) * $per_page), $per_page);
|
207 |
+
|
208 |
+
$this->items = $data;
|
209 |
+
$this->set_pagination_args(array(
|
210 |
+
'total_items' => $total_items, //WE have to calculate the total number of items
|
211 |
+
'per_page' => $per_page, //WE have to determine how many items to show on a page
|
212 |
+
'total_pages' => ceil($total_items / $per_page) //WE have to calculate the total number of pages
|
213 |
+
));
|
214 |
+
}
|
215 |
+
|
216 |
+
}
|
includes/sdm-utility-functions.php
ADDED
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
function sdm_get_download_count_for_post($id){
|
4 |
+
// Get number of downloads by counting db columns matching postID
|
5 |
+
global $wpdb;
|
6 |
+
$table = $wpdb->prefix . 'sdm_downloads';
|
7 |
+
$wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $table . ' WHERE post_id=%s', $id));
|
8 |
+
// Count database rows
|
9 |
+
$db_count = $wpdb->num_rows;
|
10 |
+
|
11 |
+
// Check post meta to see if we need to offset the count before displaying to viewers
|
12 |
+
$get_offset = get_post_meta($id, 'sdm_count_offset', true);
|
13 |
+
|
14 |
+
if ($get_offset && $get_offset != '') {
|
15 |
+
|
16 |
+
$db_count = $db_count + $get_offset;
|
17 |
+
}
|
18 |
+
|
19 |
+
return $db_count;
|
20 |
+
}
|
21 |
+
|
22 |
+
function sdm_get_item_description_output($id){
|
23 |
+
$item_description = get_post_meta($id, 'sdm_description', true);
|
24 |
+
$isset_item_description = isset($item_description) && !empty($item_description) ? $item_description : '';
|
25 |
+
//$isset_item_description = apply_filters('the_content', $isset_item_description);
|
26 |
+
|
27 |
+
$isset_item_description = do_shortcode($isset_item_description);
|
28 |
+
$isset_item_description = wptexturize($isset_item_description);
|
29 |
+
$isset_item_description = convert_smilies($isset_item_description);
|
30 |
+
$isset_item_description = convert_chars($isset_item_description);
|
31 |
+
$isset_item_description = wpautop($isset_item_description);
|
32 |
+
$isset_item_description = shortcode_unautop($isset_item_description);
|
33 |
+
$isset_item_description = prepend_attachment($isset_item_description);
|
34 |
+
return $isset_item_description;
|
35 |
+
}
|
36 |
+
|
37 |
+
//Use this function to redirect to a URL
|
38 |
+
function sdm_redirect_to_url($url, $delay = '0', $exit = '1') {
|
39 |
+
$url = apply_filters('sdm_before_redirect_to_url',$url);
|
40 |
+
if (empty($url)) {
|
41 |
+
echo '<strong>';
|
42 |
+
_e('Error! The URL value is empty. Please specify a correct URL value to redirect to!', 'sdm_lang');
|
43 |
+
echo '</strong>';
|
44 |
+
exit;
|
45 |
+
}
|
46 |
+
if (!headers_sent()) {
|
47 |
+
header('Location: ' . $url);
|
48 |
+
} else {
|
49 |
+
echo '<meta http-equiv="refresh" content="' . $delay . ';url=' . $url . '" />';
|
50 |
+
}
|
51 |
+
if ($exit == '1') {//exit
|
52 |
+
exit;
|
53 |
+
}
|
54 |
+
}
|
55 |
+
|
56 |
+
// Helper function to get visitor country (or other info)
|
57 |
+
function sdm_ip_info($ip = NULL, $purpose = "location", $deep_detect = TRUE) {
|
58 |
+
$output = NULL;
|
59 |
+
if (filter_var($ip, FILTER_VALIDATE_IP) === FALSE) {
|
60 |
+
$ip = $_SERVER["REMOTE_ADDR"];
|
61 |
+
if ($deep_detect) {
|
62 |
+
if (filter_var(@$_SERVER['HTTP_X_FORWARDED_FOR'], FILTER_VALIDATE_IP))
|
63 |
+
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
|
64 |
+
if (filter_var(@$_SERVER['HTTP_CLIENT_IP'], FILTER_VALIDATE_IP))
|
65 |
+
$ip = $_SERVER['HTTP_CLIENT_IP'];
|
66 |
+
}
|
67 |
+
}
|
68 |
+
$purpose = str_replace(array("name", "\n", "\t", " ", "-", "_"), NULL, strtolower(trim($purpose)));
|
69 |
+
$support = array("country", "countrycode", "state", "region", "city", "location", "address");
|
70 |
+
$continents = array(
|
71 |
+
"AF" => "Africa",
|
72 |
+
"AN" => "Antarctica",
|
73 |
+
"AS" => "Asia",
|
74 |
+
"EU" => "Europe",
|
75 |
+
"OC" => "Australia (Oceania)",
|
76 |
+
"NA" => "North America",
|
77 |
+
"SA" => "South America"
|
78 |
+
);
|
79 |
+
if (filter_var($ip, FILTER_VALIDATE_IP) && in_array($purpose, $support)) {
|
80 |
+
$ipdat = @json_decode(file_get_contents("http://www.geoplugin.net/json.gp?ip=" . $ip));
|
81 |
+
if (@strlen(trim($ipdat->geoplugin_countryCode)) == 2) {
|
82 |
+
switch ($purpose) {
|
83 |
+
case "location":
|
84 |
+
$output = array(
|
85 |
+
"city" => @$ipdat->geoplugin_city,
|
86 |
+
"state" => @$ipdat->geoplugin_regionName,
|
87 |
+
"country" => @$ipdat->geoplugin_countryName,
|
88 |
+
"country_code" => @$ipdat->geoplugin_countryCode,
|
89 |
+
"continent" => @$continents[strtoupper($ipdat->geoplugin_continentCode)],
|
90 |
+
"continent_code" => @$ipdat->geoplugin_continentCode
|
91 |
+
);
|
92 |
+
break;
|
93 |
+
case "address":
|
94 |
+
$address = array($ipdat->geoplugin_countryName);
|
95 |
+
if (@strlen($ipdat->geoplugin_regionName) >= 1)
|
96 |
+
$address[] = $ipdat->geoplugin_regionName;
|
97 |
+
if (@strlen($ipdat->geoplugin_city) >= 1)
|
98 |
+
$address[] = $ipdat->geoplugin_city;
|
99 |
+
$output = implode(", ", array_reverse($address));
|
100 |
+
break;
|
101 |
+
case "city":
|
102 |
+
$output = @$ipdat->geoplugin_city;
|
103 |
+
break;
|
104 |
+
case "state":
|
105 |
+
$output = @$ipdat->geoplugin_regionName;
|
106 |
+
break;
|
107 |
+
case "region":
|
108 |
+
$output = @$ipdat->geoplugin_regionName;
|
109 |
+
break;
|
110 |
+
case "country":
|
111 |
+
$output = @$ipdat->geoplugin_countryName;
|
112 |
+
break;
|
113 |
+
case "countrycode":
|
114 |
+
$output = @$ipdat->geoplugin_countryCode;
|
115 |
+
break;
|
116 |
+
}
|
117 |
+
}
|
118 |
+
}
|
119 |
+
return $output;
|
120 |
+
}
|
includes/templates/fancy0/sdm-fancy-0.php
ADDED
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
function sdm_generate_fancy0_latest_downloads_display_output($get_posts, $args) {
|
4 |
+
|
5 |
+
$output = "";
|
6 |
+
isset($args['button_text']) ? $button_text = $args['button_text'] : $button_text = '';
|
7 |
+
isset($args['new_window']) ? $new_window = $args['new_window'] : $new_window = '';
|
8 |
+
foreach ($get_posts as $item) {
|
9 |
+
$id = $item->ID; //Get the post ID
|
10 |
+
//Create a args array
|
11 |
+
$args = array(
|
12 |
+
'id' => $id,
|
13 |
+
'fancy' => '0',
|
14 |
+
'button_text' => $button_text,
|
15 |
+
'new_window' => $new_window,
|
16 |
+
);
|
17 |
+
$output .= sdm_generate_fancy0_display_output($args);
|
18 |
+
}
|
19 |
+
$output .= '<div class="sdm_clear_float"></div>';
|
20 |
+
return $output;
|
21 |
+
}
|
22 |
+
|
23 |
+
/*** TODO - Use this function in the category shortcode handler function ***/
|
24 |
+
//function sdm_generate_fancy0_category_display_output($get_posts, $args) {
|
25 |
+
//
|
26 |
+
// $output = "";
|
27 |
+
//
|
28 |
+
// //TODO - when the CSS file is moved to the fancy1 folder, change it here
|
29 |
+
// //$output .= '<link type="text/css" rel="stylesheet" href="' . WP_SIMPLE_DL_MONITOR_URL . '/includes/templates/fancy1/sdm-fancy-1-styles.css?ver=' . WP_SIMPLE_DL_MONITOR_VERSION . '" />';
|
30 |
+
//
|
31 |
+
// foreach ($get_posts as $item) {
|
32 |
+
// $id = $item->ID; //Get the post ID
|
33 |
+
// //Create a args array
|
34 |
+
// $args = array(
|
35 |
+
// 'id' => $id,
|
36 |
+
// 'fancy' => '1',
|
37 |
+
// 'button_text' => $args['button_text'],
|
38 |
+
// 'new_window' => $args['new_window'],
|
39 |
+
// );
|
40 |
+
// $output .= sdm_generate_fancy0_display_output($args);
|
41 |
+
// }
|
42 |
+
// $output .= '<div class="sdm_clear_float"></div>';
|
43 |
+
// return $output;
|
44 |
+
//}
|
45 |
+
|
46 |
+
/*
|
47 |
+
* Generates the output of a single item using fancy2 sytle
|
48 |
+
* $args array can have the following parameters
|
49 |
+
* id, fancy, button_text, new_window
|
50 |
+
*/
|
51 |
+
|
52 |
+
function sdm_generate_fancy0_display_output($args) {
|
53 |
+
|
54 |
+
//Get the download ID
|
55 |
+
$id = $args['id'];
|
56 |
+
if (!is_numeric($id)) {
|
57 |
+
return '<div class="sdm_error_msg">Error! The shortcode is missing the ID parameter. Please refer to the documentation to learn the shortcode usage.</div>';
|
58 |
+
}
|
59 |
+
|
60 |
+
// See if user color option is selected
|
61 |
+
$main_opts = get_option('sdm_downloads_options');
|
62 |
+
$color_opt = $main_opts['download_button_color'];
|
63 |
+
$def_color = isset($color_opt) ? str_replace(' ', '', strtolower($color_opt)) : __('green', 'sdm_lang');
|
64 |
+
|
65 |
+
//See if new window parameter is seet
|
66 |
+
$window_target = '';
|
67 |
+
if (isset($args['new_window']) && $args['new_window'] == '1') {
|
68 |
+
$window_target = 'target="_blank"';
|
69 |
+
}
|
70 |
+
|
71 |
+
//Get the download button text
|
72 |
+
$button_text = isset($args['button_text']) ? $args['button_text'] : '';
|
73 |
+
if (empty($button_text)) {//Use the default text for the button
|
74 |
+
$button_text_string = __('Download Now!', 'sdm_lang');
|
75 |
+
} else {//Use the custom text
|
76 |
+
$button_text_string = $button_text;
|
77 |
+
}
|
78 |
+
|
79 |
+
// Get CPT title
|
80 |
+
$item_title = get_the_title($id);
|
81 |
+
$isset_item_title = isset($item_title) && !empty($item_title) ? $item_title : '';
|
82 |
+
|
83 |
+
// Get download button
|
84 |
+
$homepage = WP_SIMPLE_DL_MONITOR_SITE_HOME_URL;
|
85 |
+
$download_url = $homepage . '/?smd_process_download=1&download_id=' . $id;
|
86 |
+
$download_button_code = '<a href="' . $download_url . '" class="sdm_download ' . $def_color . '" title="' . $isset_item_title . '" ' . $window_target . '>' . $button_text_string . '</a>';
|
87 |
+
|
88 |
+
// Check to see if the download link cpt is password protected
|
89 |
+
$get_cpt_object = get_post($id);
|
90 |
+
$cpt_is_password = !empty($get_cpt_object->post_password) ? 'yes' : 'no'; // yes = download is password protected;
|
91 |
+
if ($cpt_is_password !== 'no') {//This is a password protected download so replace the download now button with password requirement
|
92 |
+
$download_button_code = sdm_get_password_entry_form($id);
|
93 |
+
}
|
94 |
+
|
95 |
+
$output = "";
|
96 |
+
$output .= '<div class="sdm_download_button_box_default"><div class="sdm_download_link">' . $download_button_code . '</div></div>';
|
97 |
+
|
98 |
+
return $output;
|
99 |
+
}
|
includes/templates/fancy1/sdm-fancy-1.php
ADDED
@@ -0,0 +1,128 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
function sdm_generate_fancy1_latest_downloads_display_output($get_posts, $args) {
|
4 |
+
|
5 |
+
$output = "";
|
6 |
+
isset($args['button_text']) ? $button_text = $args['button_text'] : $button_text = '';
|
7 |
+
isset($args['new_window']) ? $new_window = $args['new_window'] : $new_window = '';
|
8 |
+
foreach ($get_posts as $item) {
|
9 |
+
$id = $item->ID; //Get the post ID
|
10 |
+
//Create a args array
|
11 |
+
$args = array(
|
12 |
+
'id' => $id,
|
13 |
+
'fancy' => '1',
|
14 |
+
'button_text' => $button_text,
|
15 |
+
'new_window' => $new_window,
|
16 |
+
);
|
17 |
+
$output .= sdm_generate_fancy1_display_output($args);
|
18 |
+
}
|
19 |
+
$output .= '<div class="sdm_clear_float"></div>';
|
20 |
+
return $output;
|
21 |
+
}
|
22 |
+
|
23 |
+
function sdm_generate_fancy1_category_display_output($get_posts, $args) {
|
24 |
+
|
25 |
+
$output = "";
|
26 |
+
|
27 |
+
//TODO - when the CSS file is moved to the fancy1 folder, change it here
|
28 |
+
//$output .= '<link type="text/css" rel="stylesheet" href="' . WP_SIMPLE_DL_MONITOR_URL . '/includes/templates/fancy1/sdm-fancy-1-styles.css?ver=' . WP_SIMPLE_DL_MONITOR_VERSION . '" />';
|
29 |
+
|
30 |
+
isset($args['button_text']) ? $button_text = $args['button_text'] : $button_text = '';
|
31 |
+
isset($args['new_window']) ? $new_window = $args['new_window'] : $new_window = '';
|
32 |
+
foreach ($get_posts as $item) {
|
33 |
+
$id = $item->ID; //Get the post ID
|
34 |
+
//Create a args array
|
35 |
+
$args = array(
|
36 |
+
'id' => $id,
|
37 |
+
'fancy' => '1',
|
38 |
+
'button_text' => $button_text,
|
39 |
+
'new_window' => $new_window,
|
40 |
+
);
|
41 |
+
$output .= sdm_generate_fancy1_display_output($args);
|
42 |
+
}
|
43 |
+
$output .= '<div class="sdm_clear_float"></div>';
|
44 |
+
return $output;
|
45 |
+
}
|
46 |
+
|
47 |
+
/*
|
48 |
+
* Generates the output of a single item using fancy2 sytle
|
49 |
+
* $args array can have the following parameters
|
50 |
+
* id, fancy, button_text, new_window
|
51 |
+
*/
|
52 |
+
|
53 |
+
function sdm_generate_fancy1_display_output($args) {
|
54 |
+
|
55 |
+
//Get the download ID
|
56 |
+
$id = $args['id'];
|
57 |
+
if (!is_numeric($id)) {
|
58 |
+
return '<div class="sdm_error_msg">Error! The shortcode is missing the ID parameter. Please refer to the documentation to learn the shortcode usage.</div>';
|
59 |
+
}
|
60 |
+
|
61 |
+
// See if user color option is selected
|
62 |
+
$main_opts = get_option('sdm_downloads_options');
|
63 |
+
$color_opt = $main_opts['download_button_color'];
|
64 |
+
$def_color = isset($color_opt) ? str_replace(' ', '', strtolower($color_opt)) : __('green', 'sdm_lang');
|
65 |
+
|
66 |
+
//See if new window parameter is seet
|
67 |
+
$window_target = '';
|
68 |
+
if (isset($args['new_window']) && $args['new_window'] == '1') {
|
69 |
+
$window_target = 'target="_blank"';
|
70 |
+
}
|
71 |
+
|
72 |
+
//Get the download button text
|
73 |
+
$button_text = isset($args['button_text']) ? $args['button_text'] : '';
|
74 |
+
if (empty($button_text)) {//Use the default text for the button
|
75 |
+
$button_text_string = __('Download Now!', 'sdm_lang');
|
76 |
+
} else {//Use the custom text
|
77 |
+
$button_text_string = $button_text;
|
78 |
+
}
|
79 |
+
|
80 |
+
// Get permalink
|
81 |
+
$permalink = get_permalink($id);
|
82 |
+
|
83 |
+
// Get CPT thumbnail
|
84 |
+
$item_download_thumbnail = get_post_meta($id, 'sdm_upload_thumbnail', true);
|
85 |
+
$isset_download_thumbnail = isset($item_download_thumbnail) && !empty($item_download_thumbnail) ? '<img class="sdm_download_thumbnail_image" src="' . $item_download_thumbnail . '" />' : '';
|
86 |
+
|
87 |
+
// Get CPT title
|
88 |
+
$item_title = get_the_title($id);
|
89 |
+
$isset_item_title = isset($item_title) && !empty($item_title) ? $item_title : '';
|
90 |
+
|
91 |
+
// Get CPT description
|
92 |
+
$isset_item_description = sdm_get_item_description_output($id);
|
93 |
+
|
94 |
+
// Get download button
|
95 |
+
$homepage = get_bloginfo('url');
|
96 |
+
$download_url = $homepage . '/?smd_process_download=1&download_id=' . $id;
|
97 |
+
$download_button_code = '<a href="' . $download_url . '" class="sdm_download ' . $def_color . '" title="' . $isset_item_title . '" ' . $window_target . '>' . $button_text_string . '</a>';
|
98 |
+
|
99 |
+
// Check to see if the download link cpt is password protected
|
100 |
+
$get_cpt_object = get_post($id);
|
101 |
+
$cpt_is_password = !empty($get_cpt_object->post_password) ? 'yes' : 'no'; // yes = download is password protected;
|
102 |
+
if ($cpt_is_password !== 'no') {//This is a password protected download so replace the download now button with password requirement
|
103 |
+
$download_button_code = sdm_get_password_entry_form($id);
|
104 |
+
}
|
105 |
+
|
106 |
+
$db_count = sdm_get_download_count_for_post($id);
|
107 |
+
$string = ($db_count == '1') ? __('Download', 'sdm_lang') : __('Downloads', 'sdm_lang');
|
108 |
+
$download_count_string = '<span class="sdm_item_count_number">' . $db_count . '</span><span class="sdm_item_count_string"> ' . $string . '</span>';
|
109 |
+
|
110 |
+
$css_class = isset($args['css_class']) ? $args['css_class'] : '';
|
111 |
+
|
112 |
+
$output = '';
|
113 |
+
|
114 |
+
$output .= '<div class="sdm_download_item ' . $css_class . '">';
|
115 |
+
$output .= '<div class="sdm_download_item_top">';
|
116 |
+
$output .= '<div class="sdm_download_thumbnail">' . $isset_download_thumbnail . '</div>';
|
117 |
+
$output .= '<div class="sdm_download_title">' . $isset_item_title . '</div>';
|
118 |
+
$output .= '</div>'; //End of .sdm_download_item_top
|
119 |
+
$output .= '<div style="clear:both;"></div>';
|
120 |
+
$output .= '<div class="sdm_download_description">' . $isset_item_description . '</div>';
|
121 |
+
$output .= '<div class="sdm_download_link">';
|
122 |
+
$output .= '<span class="sdm_download_button">' . $download_button_code . '</span>';
|
123 |
+
$output .= '<span class="sdm_download_item_count">' . $download_count_string . '</span>';
|
124 |
+
$output .= '</div>'; //end .sdm_download_link
|
125 |
+
$output .= '</div>'; //end .sdm_download_item
|
126 |
+
|
127 |
+
return $output;
|
128 |
+
}
|
includes/templates/fancy2/sdm-fancy-2-styles.css
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
.sdm_fancy2_item{
|
3 |
+
margin: 5px 10px 5px 0;
|
4 |
+
border: 1px solid #BBBEC9;
|
5 |
+
float: left;
|
6 |
+
width: 220px;
|
7 |
+
}
|
8 |
+
.sdm_fancy2_grid{
|
9 |
+
width: 30%;
|
10 |
+
}
|
11 |
+
|
12 |
+
.sdm_fancy2_wrapper{
|
13 |
+
margin: 15px;
|
14 |
+
}
|
15 |
+
|
16 |
+
.sdm_fancy2_download_thumbnail {
|
17 |
+
width: 100%;
|
18 |
+
overflow: hidden;
|
19 |
+
margin: 0;
|
20 |
+
padding: 0;
|
21 |
+
}
|
22 |
+
|
23 |
+
.sdm_fancy2_download_title{
|
24 |
+
font-family: Bitter, Georgia, serif;
|
25 |
+
margin: 10px 0;
|
26 |
+
text-align: center;
|
27 |
+
}
|
28 |
+
|
29 |
+
.sdm_fancy2_download_title a{
|
30 |
+
text-decoration: none !important;
|
31 |
+
border: none;
|
32 |
+
margin: 0;
|
33 |
+
padding: 0;
|
34 |
+
}
|
35 |
+
|
36 |
+
.sdm_fancy2_download_thumbnail img{
|
37 |
+
max-width: 100%;
|
38 |
+
}
|
39 |
+
|
40 |
+
.sdm_fancy2_download_link{
|
41 |
+
text-align: center;
|
42 |
+
}
|
43 |
+
|
44 |
+
.sdm_fancy2_download_link a{
|
45 |
+
border: 3px solid #2D3140;
|
46 |
+
color: #2D3140;
|
47 |
+
padding: 5px 10px;
|
48 |
+
display: inline-block;
|
49 |
+
text-decoration: none !important;
|
50 |
+
}
|
51 |
+
|
52 |
+
.sdm_fancy2_download_link a:hover{
|
53 |
+
color: #FFF;
|
54 |
+
background-color: #2D3140;
|
55 |
+
}
|
56 |
+
|
57 |
+
/*** For smaller devices ***/
|
58 |
+
@media only screen and (max-width : 480px)
|
59 |
+
{
|
60 |
+
.sdm_fancy2_item{
|
61 |
+
margin: 5px 10px 5px 0;
|
62 |
+
border: 1px solid #BBBEC9;
|
63 |
+
float: left;
|
64 |
+
width: 95%;
|
65 |
+
}
|
66 |
+
}
|
includes/templates/fancy2/sdm-fancy-2.php
ADDED
@@ -0,0 +1,137 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
//TODO write a function for doing grid display then the conditional function calls this grid display function
|
4 |
+
|
5 |
+
function sdm_generate_fancy2_latest_downloads_display_output($get_posts, $args) {
|
6 |
+
|
7 |
+
$output = "";
|
8 |
+
$output .= '<link type="text/css" rel="stylesheet" href="' . WP_SIMPLE_DL_MONITOR_URL . '/includes/templates/fancy2/sdm-fancy-2-styles.css?ver=' . WP_SIMPLE_DL_MONITOR_VERSION . '" />';
|
9 |
+
|
10 |
+
$count = 1;
|
11 |
+
//$output .= '<ul class="sdm_fancy2_category_items">';
|
12 |
+
foreach ($get_posts as $item) {
|
13 |
+
$id = $item->ID; //Get the post ID
|
14 |
+
$button_text = isset($args['button_text'])? $args['button_text'] : '';
|
15 |
+
$new_window = isset($args['new_window'])? $args['new_window'] : '';
|
16 |
+
|
17 |
+
//Create a args array
|
18 |
+
$args = array(
|
19 |
+
'id' => $id,
|
20 |
+
'fancy' => '2',
|
21 |
+
'button_text' => $button_text,
|
22 |
+
'new_window' => $new_window,
|
23 |
+
'css_class' => 'sdm_fancy2_grid',
|
24 |
+
);
|
25 |
+
$output .= sdm_generate_fancy2_display_output($args);
|
26 |
+
|
27 |
+
if ($count % 3 == 0) {//Clear after every 3 items in the grid
|
28 |
+
$output .= '<div class="sdm_clear_float"></div>';
|
29 |
+
}
|
30 |
+
$count++;
|
31 |
+
}
|
32 |
+
//$output .= '</ul>';
|
33 |
+
$output .= '<div class="sdm_clear_float"></div>';
|
34 |
+
return $output;
|
35 |
+
}
|
36 |
+
|
37 |
+
function sdm_generate_fancy2_category_display_output($get_posts, $args) {
|
38 |
+
|
39 |
+
$output = "";
|
40 |
+
$output .= '<link type="text/css" rel="stylesheet" href="' . WP_SIMPLE_DL_MONITOR_URL . '/includes/templates/fancy2/sdm-fancy-2-styles.css?ver=' . WP_SIMPLE_DL_MONITOR_VERSION . '" />';
|
41 |
+
|
42 |
+
$count = 1;
|
43 |
+
//$output .= '<ul class="sdm_fancy2_category_items">';
|
44 |
+
foreach ($get_posts as $item) {
|
45 |
+
$id = $item->ID; //Get the post ID
|
46 |
+
$button_text = isset($args['button_text'])? $args['button_text'] : '';
|
47 |
+
$new_window = isset($args['new_window'])? $args['new_window'] : '';
|
48 |
+
|
49 |
+
//Create a args array
|
50 |
+
$args = array(
|
51 |
+
'id' => $id,
|
52 |
+
'fancy' => '2',
|
53 |
+
'button_text' => $button_text,
|
54 |
+
'new_window' => $new_window,
|
55 |
+
'css_class' => 'sdm_fancy2_grid',
|
56 |
+
);
|
57 |
+
$output .= sdm_generate_fancy2_display_output($args);
|
58 |
+
|
59 |
+
if ($count % 3 == 0) {//Clear after every 3 items in the grid
|
60 |
+
$output .= '<div class="sdm_clear_float"></div>';
|
61 |
+
}
|
62 |
+
$count++;
|
63 |
+
}
|
64 |
+
//$output .= '</ul>';
|
65 |
+
$output .= '<div class="sdm_clear_float"></div>';
|
66 |
+
return $output;
|
67 |
+
}
|
68 |
+
|
69 |
+
/*
|
70 |
+
* Generates the output of a single item using fancy2 sytle
|
71 |
+
* $args array can have the following parameters
|
72 |
+
* id, fancy, button_text, new_window
|
73 |
+
*/
|
74 |
+
|
75 |
+
function sdm_generate_fancy2_display_output($args) {
|
76 |
+
|
77 |
+
//Get the download ID
|
78 |
+
$id = $args['id'];
|
79 |
+
if (!is_numeric($id)) {
|
80 |
+
return '<div class="sdm_error_msg">Error! The shortcode is missing the ID parameter. Please refer to the documentation to learn the shortcode usage.</div>';
|
81 |
+
}
|
82 |
+
|
83 |
+
//See if new window parameter is seet
|
84 |
+
$window_target = '';
|
85 |
+
if (isset($args['new_window']) && $args['new_window'] == '1') {
|
86 |
+
$window_target = 'target="_blank"';
|
87 |
+
}
|
88 |
+
|
89 |
+
//Get the download button text
|
90 |
+
$button_text = isset($args['button_text']) ? $args['button_text'] : '';
|
91 |
+
if (empty($button_text)) {//Use the default text for the button
|
92 |
+
$button_text_string = __('Download Now!', 'sdm_lang');
|
93 |
+
} else {//Use the custom text
|
94 |
+
$button_text_string = $button_text;
|
95 |
+
}
|
96 |
+
$homepage = get_bloginfo('url');
|
97 |
+
$download_url = $homepage . '/?smd_process_download=1&download_id=' . $id;
|
98 |
+
$download_button_code = '<a href="' . $download_url . '" class="sdm_fancy2_download" ' . $window_target . '>' . $button_text_string . '</a>';
|
99 |
+
|
100 |
+
// Check to see if the download link cpt is password protected
|
101 |
+
$get_cpt_object = get_post($id);
|
102 |
+
$cpt_is_password = !empty($get_cpt_object->post_password) ? 'yes' : 'no'; // yes = download is password protected;
|
103 |
+
if ($cpt_is_password !== 'no') {//This is a password protected download so replace the download now button with password requirement
|
104 |
+
$download_button_code = sdm_get_password_entry_form($id);
|
105 |
+
}
|
106 |
+
|
107 |
+
// Get item permalink
|
108 |
+
$permalink = get_permalink($id);
|
109 |
+
|
110 |
+
// Get item thumbnail
|
111 |
+
$item_download_thumbnail = get_post_meta($id, 'sdm_upload_thumbnail', true);
|
112 |
+
$isset_download_thumbnail = isset($item_download_thumbnail) && !empty($item_download_thumbnail) ? '<img class="sdm_fancy2_thumb_image" src="' . $item_download_thumbnail . '" />' : '';
|
113 |
+
|
114 |
+
// Get item title
|
115 |
+
$item_title = get_the_title($id);
|
116 |
+
$isset_item_title = isset($item_title) && !empty($item_title) ? $item_title : '';
|
117 |
+
|
118 |
+
// Get item description
|
119 |
+
$isset_item_description = sdm_get_item_description_output($id);
|
120 |
+
|
121 |
+
$css_class = isset($args['css_class']) ? $args['css_class'] : '';
|
122 |
+
$output = '';
|
123 |
+
$output .= '<div class="sdm_fancy2_item ' . $css_class . '">';
|
124 |
+
$output .= '<div class="sdm_fancy2_wrapper">';
|
125 |
+
|
126 |
+
$output .= '<div class="sdm_fancy2_download_item_top">';
|
127 |
+
$output .= '<div class="sdm_fancy2_download_thumbnail">' . $isset_download_thumbnail . '</div>';
|
128 |
+
$output .= '</div>'; //End of .sdm_download_item_top
|
129 |
+
|
130 |
+
$output .= '<div class="sdm_fancy2_download_title">' . $isset_item_title . '</div>';
|
131 |
+
$output .= '<div class="sdm_fancy2_download_link">' . $download_button_code . '</div>';
|
132 |
+
|
133 |
+
$output .= '</div>'; //end .sdm_fancy2_item
|
134 |
+
$output .= '</div>'; //end .sdm_fancy2_wrapper
|
135 |
+
|
136 |
+
return $output;
|
137 |
+
}
|
js/sdm_admin_scripts.js
CHANGED
@@ -22,7 +22,7 @@ jQuery(document).ready(function($){
|
|
22 |
|
23 |
imgurl = $(html).attr('href');
|
24 |
$('#sdm_thumbnail_image').remove();
|
25 |
-
|
26 |
|
27 |
$('#sdm_upload_thumbnail').val(imgurl);
|
28 |
tb_remove();
|
22 |
|
23 |
imgurl = $(html).attr('href');
|
24 |
$('#sdm_thumbnail_image').remove();
|
25 |
+
$('#sdm_admin_thumb_preview').html('<img id="sdm_thumbnail_image" src="'+imgurl+'" style="max-width:200px;" />');
|
26 |
|
27 |
$('#sdm_upload_thumbnail').val(imgurl);
|
28 |
tb_remove();
|
js/sdm_wp_scripts.js
CHANGED
@@ -25,15 +25,14 @@ jQuery(document).ready(function($) {
|
|
25 |
// Populate each matched post title and permalink
|
26 |
$this.children('.sdm_placeholder').append('<a href="'+value['permalink']+'"><span class="sdm_post_title" style="cursor:pointer;">'+value['title']+'</span></a>');
|
27 |
});
|
|
|
|
|
28 |
}
|
29 |
);
|
30 |
});
|
31 |
|
32 |
// Hide results on page load
|
33 |
$('li.sdm_cat').children('.sdm_placeholder').hide();
|
34 |
-
//$('li.sdm_cat').children('ul').hide();
|
35 |
-
//$('.sdm_cat ul').children().hide();
|
36 |
-
$('.sdm_cat ul').css('display', 'none');
|
37 |
|
38 |
// Slide toggle for each list item
|
39 |
$('body').on('click', '.sdm_cat_title', function(e) {
|
@@ -41,10 +40,7 @@ jQuery(document).ready(function($) {
|
|
41 |
// If there is any html.. then we have more elements
|
42 |
if($(this).next().html() != '') {
|
43 |
|
44 |
-
e.stopPropagation(); // prevetn climbing dom tree
|
45 |
$(this).next().slideToggle(); // toggle div titles
|
46 |
-
$(this).next().next().slideToggle(); // toggle next elements
|
47 |
-
$(this).next().next().find('ul').slideToggle(); // toggle all child ul elements
|
48 |
}
|
49 |
});
|
50 |
|
25 |
// Populate each matched post title and permalink
|
26 |
$this.children('.sdm_placeholder').append('<a href="'+value['permalink']+'"><span class="sdm_post_title" style="cursor:pointer;">'+value['title']+'</span></a>');
|
27 |
});
|
28 |
+
|
29 |
+
$this.children('span').append('<span style="margin-left:5px;" class="sdm_arrow">↨</span>');
|
30 |
}
|
31 |
);
|
32 |
});
|
33 |
|
34 |
// Hide results on page load
|
35 |
$('li.sdm_cat').children('.sdm_placeholder').hide();
|
|
|
|
|
|
|
36 |
|
37 |
// Slide toggle for each list item
|
38 |
$('body').on('click', '.sdm_cat_title', function(e) {
|
40 |
// If there is any html.. then we have more elements
|
41 |
if($(this).next().html() != '') {
|
42 |
|
|
|
43 |
$(this).next().slideToggle(); // toggle div titles
|
|
|
|
|
44 |
}
|
45 |
});
|
46 |
|
langs/sdm_lang-es_ES.mo
ADDED
Binary file
|
langs/sdm_lang-es_ES.po
ADDED
@@ -0,0 +1,533 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: SDM 3.1\n"
|
4 |
+
"POT-Creation-Date: 2014-07-29 12:06+1000\n"
|
5 |
+
"PO-Revision-Date: 2014-09-25 07:43+1000\n"
|
6 |
+
"Last-Translator: Manuel <mbruiz1967@mbrsolution.com>\n"
|
7 |
+
"Language-Team: \n"
|
8 |
+
"MIME-Version: 1.0\n"
|
9 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
+
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"X-Generator: Poedit 1.6.9\n"
|
12 |
+
"X-Poedit-KeywordsList: __;_e\n"
|
13 |
+
"X-Poedit-Basepath: .\n"
|
14 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
15 |
+
"Language: es\n"
|
16 |
+
"X-Poedit-SearchPath-0: C:\\Users\\amin\\Desktop\\simple-download-monitor\n"
|
17 |
+
|
18 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:91
|
19 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:310
|
20 |
+
msgid "Settings"
|
21 |
+
msgstr "Configuración"
|
22 |
+
|
23 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:145
|
24 |
+
msgid "Image Successfully Removed"
|
25 |
+
msgstr "Imagen Eliminado Con Éxito"
|
26 |
+
|
27 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:146
|
28 |
+
msgid "Error with AJAX"
|
29 |
+
msgstr "Error con AJAX"
|
30 |
+
|
31 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:156
|
32 |
+
msgid "Please select a Download Item:"
|
33 |
+
msgstr "Por favor seleccione una Descarga De Artículo:"
|
34 |
+
|
35 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:156
|
36 |
+
msgid "Download Title"
|
37 |
+
msgstr "Titulo Descarga"
|
38 |
+
|
39 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:156
|
40 |
+
msgid "Include Fancy Box"
|
41 |
+
msgstr "Incluya Caja de Visión"
|
42 |
+
|
43 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:156
|
44 |
+
msgid "Insert SDM Shortcode"
|
45 |
+
msgstr "Inserte Código Corto De SDM"
|
46 |
+
|
47 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:166
|
48 |
+
msgid "Incorrect Password"
|
49 |
+
msgstr "Clave Incorrecta"
|
50 |
+
|
51 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:182
|
52 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:183
|
53 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:188
|
54 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:194
|
55 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:590
|
56 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:1034
|
57 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-post-type-content-handler.php:48
|
58 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-shortcodes.php:94
|
59 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/includes/templates/fancy1/sdm-fancy-1.php:87
|
60 |
+
msgid "Downloads"
|
61 |
+
msgstr "Descarga"
|
62 |
+
|
63 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:184
|
64 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:185
|
65 |
+
msgid "Add New"
|
66 |
+
msgstr "Agregar Nuevo"
|
67 |
+
|
68 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:186
|
69 |
+
msgid "Edit Download"
|
70 |
+
msgstr "Editar la Bajada"
|
71 |
+
|
72 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:187
|
73 |
+
msgid "New Download"
|
74 |
+
msgstr "Nueva Descarga"
|
75 |
+
|
76 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:189
|
77 |
+
msgid "View Download"
|
78 |
+
msgstr "Ver Descarga"
|
79 |
+
|
80 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:190
|
81 |
+
msgid "Search Downloads"
|
82 |
+
msgstr "Buscar En Las Bajadas"
|
83 |
+
|
84 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:191
|
85 |
+
msgid "No Downloads found"
|
86 |
+
msgstr "Ninguna Descarga Encontrada"
|
87 |
+
|
88 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:192
|
89 |
+
msgid "No Downloads found in Trash"
|
90 |
+
msgstr "Ninguna Descarga Encontrada En La Papelera"
|
91 |
+
|
92 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:193
|
93 |
+
msgid "Parent Download"
|
94 |
+
msgstr "El Padre De La Descarga "
|
95 |
+
|
96 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:221
|
97 |
+
msgid "Search Categories"
|
98 |
+
msgstr "Buscar Categorías"
|
99 |
+
|
100 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:222
|
101 |
+
msgid "All Categories"
|
102 |
+
msgstr "Todas Las Categorías"
|
103 |
+
|
104 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:223
|
105 |
+
msgid "Categories Genre"
|
106 |
+
msgstr "Género De Categorías"
|
107 |
+
|
108 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:224
|
109 |
+
msgid "Categories Genre:"
|
110 |
+
msgstr "Género De Categorías:"
|
111 |
+
|
112 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:225
|
113 |
+
msgid "Edit Category"
|
114 |
+
msgstr "Editar Categoría"
|
115 |
+
|
116 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:226
|
117 |
+
msgid "Update Category"
|
118 |
+
msgstr "Actualizar Categoría"
|
119 |
+
|
120 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:227
|
121 |
+
msgid "Add New Category"
|
122 |
+
msgstr "Añade Una Categorías"
|
123 |
+
|
124 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:228
|
125 |
+
msgid "New Category"
|
126 |
+
msgstr "Nueva Categoría"
|
127 |
+
|
128 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:229
|
129 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:1032
|
130 |
+
msgid "Categories"
|
131 |
+
msgstr "Categorías"
|
132 |
+
|
133 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:246
|
134 |
+
msgid "Search Tags"
|
135 |
+
msgstr "Buscar Etiquetas"
|
136 |
+
|
137 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:247
|
138 |
+
msgid "All Tags"
|
139 |
+
msgstr "Todas Las Etiquetas"
|
140 |
+
|
141 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:248
|
142 |
+
msgid "Tags Genre"
|
143 |
+
msgstr "Género De Etiquetas"
|
144 |
+
|
145 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:249
|
146 |
+
msgid "Tags Genre:"
|
147 |
+
msgstr "Género De Etiquetas:"
|
148 |
+
|
149 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:250
|
150 |
+
msgid "Edit Tag"
|
151 |
+
msgstr "Editar Etiqueta"
|
152 |
+
|
153 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:251
|
154 |
+
msgid "Update Tag"
|
155 |
+
msgstr "Actualizar La Etiqueta"
|
156 |
+
|
157 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:252
|
158 |
+
msgid "Add New Tag"
|
159 |
+
msgstr "Agrega Nueva Etiqueta"
|
160 |
+
|
161 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:253
|
162 |
+
msgid "New Tag"
|
163 |
+
msgstr "Nueva Etiqueta"
|
164 |
+
|
165 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:254
|
166 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:1033
|
167 |
+
msgid "Tags"
|
168 |
+
msgstr "Etiquetas"
|
169 |
+
|
170 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:309
|
171 |
+
msgid "Logs"
|
172 |
+
msgstr "Registros"
|
173 |
+
|
174 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:317
|
175 |
+
msgid "Simple Download Monitor Settings Page"
|
176 |
+
msgstr "Simple Configuración De Descarga De La Pagina Del Monitor"
|
177 |
+
|
178 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:320
|
179 |
+
msgid "Follow us"
|
180 |
+
msgstr "Síganos"
|
181 |
+
|
182 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:320
|
183 |
+
msgid ""
|
184 |
+
"on Twitter, Google+ or via Email to stay upto date about the new features of "
|
185 |
+
"this plugin."
|
186 |
+
msgstr ""
|
187 |
+
"en Twitter, Google+ o vía correo electrónico estar acutalizado hasta la "
|
188 |
+
"fecha de hoy de las nuevas características de este plugin."
|
189 |
+
|
190 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:329
|
191 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:528
|
192 |
+
msgid "Admin Options"
|
193 |
+
msgstr "Opciones Del Administrador"
|
194 |
+
|
195 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:332
|
196 |
+
msgid "Control various plugin features."
|
197 |
+
msgstr "Controla varias funciones del plugin."
|
198 |
+
|
199 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:349
|
200 |
+
msgid "Color Options"
|
201 |
+
msgstr "Opciones De Color"
|
202 |
+
|
203 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:352
|
204 |
+
msgid "Adjust color options"
|
205 |
+
msgstr "Ajuste Las Opciones Del Color"
|
206 |
+
|
207 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:370
|
208 |
+
msgid ""
|
209 |
+
"If you need a feature rich and supported plugin for selling your digital "
|
210 |
+
"items then checkout our"
|
211 |
+
msgstr ""
|
212 |
+
"Si usted necesita una característica rica y un plugin compatible para la "
|
213 |
+
"venta de sus artículos digitales entonces echa un vistazo a nuestra"
|
214 |
+
|
215 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:370
|
216 |
+
msgid "WP eStore Plugin"
|
217 |
+
msgstr "WP eStore Plugin"
|
218 |
+
|
219 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:383
|
220 |
+
msgid "Description"
|
221 |
+
msgstr "Descripción"
|
222 |
+
|
223 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:385
|
224 |
+
msgid "Upload File"
|
225 |
+
msgstr "Subir Archivo"
|
226 |
+
|
227 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:387
|
228 |
+
msgid "File Thumbnail (Optional)"
|
229 |
+
msgstr "Archivo Miniatura (Opcional)"
|
230 |
+
|
231 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:389
|
232 |
+
msgid "Shortcodes"
|
233 |
+
msgstr "Código Corto"
|
234 |
+
|
235 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:391
|
236 |
+
msgid "Statistics"
|
237 |
+
msgstr "Estadísticas"
|
238 |
+
|
239 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:396
|
240 |
+
msgid "Add a description for this download item."
|
241 |
+
msgstr "Añadir una descripción para este articulo de descarga."
|
242 |
+
|
243 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:409
|
244 |
+
msgid "Click \"Select File\" to upload (or choose) the file."
|
245 |
+
msgstr ""
|
246 |
+
"Haga clic en \"Seleccione Archivo\" para cargar (o seleccione) el archivo."
|
247 |
+
|
248 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:412
|
249 |
+
msgid "Select File"
|
250 |
+
msgstr "Selecciona Archivo"
|
251 |
+
|
252 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:414
|
253 |
+
msgid "File URL:"
|
254 |
+
msgstr "Archivo URL:"
|
255 |
+
|
256 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:422
|
257 |
+
msgid ""
|
258 |
+
"Click \"Select Image\" to upload (or choose) the file thumbnail image. This "
|
259 |
+
"thumbnail image will be used to create a fancy file download box if you want "
|
260 |
+
"to use it."
|
261 |
+
msgstr ""
|
262 |
+
"Haga clic en \"Seleccionar Imagen\" para subir (o seleccione) la imagen en "
|
263 |
+
"miniatura del archivo. Esta imagen en miniatura se utiliza para crear un "
|
264 |
+
"cuadro de descarga de archivo de visión si usted desea utilizarlo."
|
265 |
+
|
266 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:427
|
267 |
+
msgid "Select Image"
|
268 |
+
msgstr "Selecciona Imagen"
|
269 |
+
|
270 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:428
|
271 |
+
msgid "Remove Image"
|
272 |
+
msgstr "Eliminar Imagen"
|
273 |
+
|
274 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:442
|
275 |
+
msgid ""
|
276 |
+
"This is the shortcode which can used on posts or pages to embed a download "
|
277 |
+
"now button for this file. You can also use the shortcode inserter to add "
|
278 |
+
"this shortcode to a post or page."
|
279 |
+
msgstr ""
|
280 |
+
"Este es el código abreviado que puede utilizar en los mensajes o páginas "
|
281 |
+
"para incrustar un botón Descargar ahora para este archivo. También puede "
|
282 |
+
"utilizar el código corto de inserción para agregar este código corto para "
|
283 |
+
"una entrada o página."
|
284 |
+
|
285 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:447
|
286 |
+
msgid "This shortcode may be used as a download counter."
|
287 |
+
msgstr "Este código corto puede ser utilizado como un contador de descarga."
|
288 |
+
|
289 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:456
|
290 |
+
msgid "These are the statistics for this download item."
|
291 |
+
msgstr "Estas son las estadísticas sobre este articulo descarga."
|
292 |
+
|
293 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:461
|
294 |
+
msgid "Number of Downloads:"
|
295 |
+
msgstr "Numero de Descargas:"
|
296 |
+
|
297 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:464
|
298 |
+
msgid "Offset Count"
|
299 |
+
msgstr "Cuenta De Desplazamiento"
|
300 |
+
|
301 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:529
|
302 |
+
msgid "Colors"
|
303 |
+
msgstr "Colores"
|
304 |
+
|
305 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:531
|
306 |
+
msgid "Remove Tinymce Button"
|
307 |
+
msgstr "Eliminar El Botón Tinymce"
|
308 |
+
|
309 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:532
|
310 |
+
msgid "Download Button Color"
|
311 |
+
msgstr "Color Del Botón De Descarga"
|
312 |
+
|
313 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:536
|
314 |
+
msgid "Admin options settings"
|
315 |
+
msgstr "Configuración de las opciones administrador"
|
316 |
+
|
317 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:540
|
318 |
+
msgid "Front End colors settings"
|
319 |
+
msgstr "Ajustes de colores parte Delantera"
|
320 |
+
|
321 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:546
|
322 |
+
msgid "Removes the SDM Downloads button from the WP content editor."
|
323 |
+
msgstr "Elimina el botón Descargas SDM del editor del contenido WP."
|
324 |
+
|
325 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:552
|
326 |
+
msgid "Green"
|
327 |
+
msgstr "Verde"
|
328 |
+
|
329 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:552
|
330 |
+
msgid "Blue"
|
331 |
+
msgstr "Azul"
|
332 |
+
|
333 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:552
|
334 |
+
msgid "Purple"
|
335 |
+
msgstr "Púrpura"
|
336 |
+
|
337 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:552
|
338 |
+
msgid "Teal"
|
339 |
+
msgstr "Verde Azulado"
|
340 |
+
|
341 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:552
|
342 |
+
msgid "Dark Blue"
|
343 |
+
msgstr "Azul Oscuro"
|
344 |
+
|
345 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:552
|
346 |
+
msgid "Black"
|
347 |
+
msgstr "Negro"
|
348 |
+
|
349 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:552
|
350 |
+
msgid "Grey"
|
351 |
+
msgstr "Gris"
|
352 |
+
|
353 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:552
|
354 |
+
msgid "Pink"
|
355 |
+
msgstr "Rosa"
|
356 |
+
|
357 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:552
|
358 |
+
msgid "Orange"
|
359 |
+
msgstr "Naranja"
|
360 |
+
|
361 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:552
|
362 |
+
msgid "White"
|
363 |
+
msgstr "Blanco"
|
364 |
+
|
365 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:555
|
366 |
+
msgid "current"
|
367 |
+
msgstr "al corriente"
|
368 |
+
|
369 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:561
|
370 |
+
msgid "Adjusts the color of the \"Download Now\" button."
|
371 |
+
msgstr "Ajusta el color del botón de la \"Descargar Ahora\"."
|
372 |
+
|
373 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:589
|
374 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-post-type-content-handler.php:48
|
375 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-shortcodes.php:94
|
376 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/includes/templates/fancy1/sdm-fancy-1.php:87
|
377 |
+
msgid "Download"
|
378 |
+
msgstr "Bajada"
|
379 |
+
|
380 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:613
|
381 |
+
msgid "Edit"
|
382 |
+
msgstr "Editar"
|
383 |
+
|
384 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:614
|
385 |
+
msgid "Delete"
|
386 |
+
msgstr "Borrar"
|
387 |
+
|
388 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:638
|
389 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:1029
|
390 |
+
msgid "Title"
|
391 |
+
msgstr "Titulo"
|
392 |
+
|
393 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:639
|
394 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:1031
|
395 |
+
msgid "File"
|
396 |
+
msgstr "Archivo"
|
397 |
+
|
398 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:640
|
399 |
+
msgid "Visitor IP"
|
400 |
+
msgstr "IP del Visitante"
|
401 |
+
|
402 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:641
|
403 |
+
msgid "Date"
|
404 |
+
msgstr "Fecha"
|
405 |
+
|
406 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:642
|
407 |
+
msgid "Country"
|
408 |
+
msgstr "País"
|
409 |
+
|
410 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:662
|
411 |
+
msgid "Delete Permanently"
|
412 |
+
msgstr "Borrar Permanente"
|
413 |
+
|
414 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:663
|
415 |
+
msgid "Export All as Excel"
|
416 |
+
msgstr "Exportar todo como Excel"
|
417 |
+
|
418 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:678
|
419 |
+
msgid "Nope! Security check failed!"
|
420 |
+
msgstr "¡No! ¡Control de seguridad falló!"
|
421 |
+
|
422 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:686
|
423 |
+
msgid "Download Export File"
|
424 |
+
msgstr "Descarga de archivo de exportación"
|
425 |
+
|
426 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:693
|
427 |
+
msgid "No entries were selected."
|
428 |
+
msgstr "No se seleccionaron entradas."
|
429 |
+
|
430 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:693
|
431 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:709
|
432 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:711
|
433 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:728
|
434 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:730
|
435 |
+
msgid "Click to Dismiss"
|
436 |
+
msgstr "Haga clic para Descartar"
|
437 |
+
|
438 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:709
|
439 |
+
msgid "Entries Deleted!"
|
440 |
+
msgstr "¡Entradas Eliminadas!"
|
441 |
+
|
442 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:711
|
443 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:730
|
444 |
+
msgid "Error"
|
445 |
+
msgstr "Error"
|
446 |
+
|
447 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:728
|
448 |
+
msgid "Entry Deleted!"
|
449 |
+
msgstr "¡Entrada Eliminada!"
|
450 |
+
|
451 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:788
|
452 |
+
msgid "Download Logs"
|
453 |
+
msgstr "Descargar Registros"
|
454 |
+
|
455 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:791
|
456 |
+
msgid "This page lists all tracked downloads."
|
457 |
+
msgstr "Esta página muestra todas las descargas de rastreadores."
|
458 |
+
|
459 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:813
|
460 |
+
msgid "Enter Password to Download:"
|
461 |
+
msgstr "Introduzca La Contraseña Para Descargar:"
|
462 |
+
|
463 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:816
|
464 |
+
msgid "Submit"
|
465 |
+
msgstr "Enviar"
|
466 |
+
|
467 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:862
|
468 |
+
msgid "Error! Failed to log the download request in the database table"
|
469 |
+
msgstr ""
|
470 |
+
"¡Error! No se pudo registrar la solicitud de descarga en la tabla de base de "
|
471 |
+
"datos"
|
472 |
+
|
473 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:871
|
474 |
+
msgid ""
|
475 |
+
"Error! The URL value is empty. Please specify a correct URL value to "
|
476 |
+
"redirect to!"
|
477 |
+
msgstr ""
|
478 |
+
"¡Error ! El valor URL está vacío. ¡Por favor, especifique un valor URL "
|
479 |
+
"correcto para redirigir a!"
|
480 |
+
|
481 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:1028
|
482 |
+
msgid "Image"
|
483 |
+
msgstr "Imagen"
|
484 |
+
|
485 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:1030
|
486 |
+
msgid "ID"
|
487 |
+
msgstr "ID"
|
488 |
+
|
489 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:1035
|
490 |
+
msgid "Date Posted"
|
491 |
+
msgstr "Fecha de Publicación"
|
492 |
+
|
493 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:1036
|
494 |
+
msgid "Visitor Country"
|
495 |
+
msgstr "País del Usuario"
|
496 |
+
|
497 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-post-type-content-handler.php:32
|
498 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-shortcodes.php:40
|
499 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-shortcodes.php:166
|
500 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/includes/templates/fancy1/sdm-fancy-1.php:42
|
501 |
+
msgid "green"
|
502 |
+
msgstr "verde"
|
503 |
+
|
504 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-post-type-content-handler.php:37
|
505 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-shortcodes.php:48
|
506 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-shortcodes.php:174
|
507 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/includes/templates/fancy1/sdm-fancy-1.php:53
|
508 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/includes/templates/fancy2/sdm-fancy-2.php:57
|
509 |
+
msgid "Download Now!"
|
510 |
+
msgstr "Bajar Ahora!"
|
511 |
+
|
512 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-shortcodes.php:27
|
513 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-shortcodes.php:88
|
514 |
+
msgid "Error! Please enter an ID value with this shortcode."
|
515 |
+
msgstr "¡Error! Por favor, introduzca un valor de ID con este código corto."
|
516 |
+
|
517 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-shortcodes.php:118
|
518 |
+
msgid ""
|
519 |
+
"Error! You must enter a category slug OR a category id with this shortcode. "
|
520 |
+
"Refer to the documentation for usage instructions."
|
521 |
+
msgstr ""
|
522 |
+
"¡Error! Debe introducir una categoría slug o la identificación de la "
|
523 |
+
"categoría con este código corto. Consulte la documentación para obtener "
|
524 |
+
"instrucciones de uso."
|
525 |
+
|
526 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-shortcodes.php:122
|
527 |
+
msgid "Error! Please enter a category slug OR id; not both."
|
528 |
+
msgstr "¡Error! Por favor introduce una categoría slug O id; no ambos."
|
529 |
+
|
530 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-shortcodes.php:153
|
531 |
+
msgid "There are no download items matching this category criteria."
|
532 |
+
msgstr ""
|
533 |
+
"No hay elementos que coincidan con este criterio de categoría de descarga."
|
langs/sdm_lang-nl_NL.mo
ADDED
Binary file
|
langs/sdm_lang-nl_NL.po
ADDED
@@ -0,0 +1,345 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: simple-download-monitor\n"
|
4 |
+
"POT-Creation-Date: 2013-11-01 01:22-0500\n"
|
5 |
+
"PO-Revision-Date: 2014-11-03 18:42+0100\n"
|
6 |
+
"Last-Translator: \n"
|
7 |
+
"Language-Team: \n"
|
8 |
+
"MIME-Version: 1.0\n"
|
9 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
+
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"X-Generator: Poedit 1.6.5\n"
|
12 |
+
"X-Poedit-KeywordsList: __;_e;_x\n"
|
13 |
+
"X-Poedit-Basepath: .\n"
|
14 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
15 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
16 |
+
"Language: nl\n"
|
17 |
+
"X-Poedit-SearchPath-0: .\n"
|
18 |
+
"X-Poedit-SearchPath-1: ..\n"
|
19 |
+
|
20 |
+
#: ../main.php:63 ../main.php:262
|
21 |
+
msgid "Settings"
|
22 |
+
msgstr "Instellingen"
|
23 |
+
|
24 |
+
#: ../main.php:134 ../main.php:135 ../main.php:140 ../main.php:146
|
25 |
+
#: ../main.php:974
|
26 |
+
msgid "Downloads"
|
27 |
+
msgstr "Downloads"
|
28 |
+
|
29 |
+
#: ../main.php:136 ../main.php:137
|
30 |
+
msgid "Add New"
|
31 |
+
msgstr "Nieuwe toevoegen"
|
32 |
+
|
33 |
+
#: ../main.php:138
|
34 |
+
msgid "Edit Download"
|
35 |
+
msgstr "Download bewerken"
|
36 |
+
|
37 |
+
#: ../main.php:139
|
38 |
+
msgid "New Download"
|
39 |
+
msgstr "Nieuwe download"
|
40 |
+
|
41 |
+
#: ../main.php:141
|
42 |
+
msgid "View Download"
|
43 |
+
msgstr "Download bekijken"
|
44 |
+
|
45 |
+
#: ../main.php:142
|
46 |
+
msgid "Search Downloads"
|
47 |
+
msgstr "Download zoeken"
|
48 |
+
|
49 |
+
#: ../main.php:143
|
50 |
+
msgid "No Downloads found"
|
51 |
+
msgstr "Geen downloads gevonden"
|
52 |
+
|
53 |
+
#: ../main.php:144
|
54 |
+
msgid "No Downloads found in Trash"
|
55 |
+
msgstr "Geen downloads in de prullenbak"
|
56 |
+
|
57 |
+
#: ../main.php:170 ../main.php:180 ../main.php:972
|
58 |
+
msgid "Categories"
|
59 |
+
msgstr "Categorieen"
|
60 |
+
|
61 |
+
#: ../main.php:171
|
62 |
+
msgid "Category"
|
63 |
+
msgstr "Categorie"
|
64 |
+
|
65 |
+
#: ../main.php:172
|
66 |
+
msgid "Search Categories"
|
67 |
+
msgstr "Categorie zoeken"
|
68 |
+
|
69 |
+
#: ../main.php:173
|
70 |
+
msgid "All Categories"
|
71 |
+
msgstr "Alle categorieen"
|
72 |
+
|
73 |
+
#: ../main.php:174
|
74 |
+
msgid "Categories Genre"
|
75 |
+
msgstr "Category Genre"
|
76 |
+
|
77 |
+
#: ../main.php:175
|
78 |
+
msgid "Categories Genre:"
|
79 |
+
msgstr "Categorie Genre"
|
80 |
+
|
81 |
+
#: ../main.php:176
|
82 |
+
msgid "Edit Category"
|
83 |
+
msgstr "Categorie bewerken"
|
84 |
+
|
85 |
+
#: ../main.php:177
|
86 |
+
msgid "Update Category"
|
87 |
+
msgstr "Categorie updaten"
|
88 |
+
|
89 |
+
#: ../main.php:178
|
90 |
+
msgid "Add New Category"
|
91 |
+
msgstr "Nieuwe categorie toevoegen"
|
92 |
+
|
93 |
+
#: ../main.php:179
|
94 |
+
msgid "New Category"
|
95 |
+
msgstr "Nieuwe categorie"
|
96 |
+
|
97 |
+
#: ../main.php:195 ../main.php:205 ../main.php:973
|
98 |
+
msgid "Tags"
|
99 |
+
msgstr "Tags"
|
100 |
+
|
101 |
+
#: ../main.php:196
|
102 |
+
msgid "Tag"
|
103 |
+
msgstr "Tag"
|
104 |
+
|
105 |
+
#: ../main.php:197
|
106 |
+
msgid "Search Tags"
|
107 |
+
msgstr "Tag zoeken"
|
108 |
+
|
109 |
+
#: ../main.php:198
|
110 |
+
msgid "All Tags"
|
111 |
+
msgstr "Alle tags"
|
112 |
+
|
113 |
+
#: ../main.php:199
|
114 |
+
msgid "Tags Genre"
|
115 |
+
msgstr "Tag Genre"
|
116 |
+
|
117 |
+
#: ../main.php:200
|
118 |
+
msgid "Tags Genre:"
|
119 |
+
msgstr "Tag Genre"
|
120 |
+
|
121 |
+
#: ../main.php:201
|
122 |
+
msgid "Edit Tag"
|
123 |
+
msgstr "Tag bewerken"
|
124 |
+
|
125 |
+
#: ../main.php:202
|
126 |
+
msgid "Update Tag"
|
127 |
+
msgstr "Tag updaten"
|
128 |
+
|
129 |
+
#: ../main.php:203
|
130 |
+
msgid "Add New Tag"
|
131 |
+
msgstr "Nieuwe tag toevoegen"
|
132 |
+
|
133 |
+
#: ../main.php:204
|
134 |
+
msgid "New Tag"
|
135 |
+
msgstr "Nieuwe tag"
|
136 |
+
|
137 |
+
#: ../main.php:261
|
138 |
+
msgid "Logs"
|
139 |
+
msgstr "Logs"
|
140 |
+
|
141 |
+
#: ../main.php:270
|
142 |
+
msgid "Simple Download Monitor Settings Page"
|
143 |
+
msgstr "Simple Download Monitor Settings Pagina"
|
144 |
+
|
145 |
+
#: ../main.php:278 ../main.php:514
|
146 |
+
msgid "Admin Options"
|
147 |
+
msgstr "Admin opties"
|
148 |
+
|
149 |
+
#: ../main.php:281
|
150 |
+
msgid "Control various plugin features."
|
151 |
+
msgstr "Bewerk diverse instellingen"
|
152 |
+
|
153 |
+
#: ../main.php:284 ../main.php:307
|
154 |
+
msgid "Expand Option Panel"
|
155 |
+
msgstr "Optiepaneel uitvouwen"
|
156 |
+
|
157 |
+
#: ../main.php:301
|
158 |
+
msgid "Color Options"
|
159 |
+
msgstr "Kleurinstellingen"
|
160 |
+
|
161 |
+
#: ../main.php:304
|
162 |
+
msgid "Adjust color options"
|
163 |
+
msgstr "Kleurinstellingen bewerken"
|
164 |
+
|
165 |
+
#: ../main.php:376
|
166 |
+
msgid "Description"
|
167 |
+
msgstr "Omschrijving"
|
168 |
+
|
169 |
+
#: ../main.php:381
|
170 |
+
msgid "Upload File"
|
171 |
+
msgstr "Bestand uploaden"
|
172 |
+
|
173 |
+
#: ../main.php:386
|
174 |
+
msgid "File Thumbnail"
|
175 |
+
msgstr "Miniatuurweergave"
|
176 |
+
|
177 |
+
#: ../main.php:391
|
178 |
+
msgid "Shortcode"
|
179 |
+
msgstr "Shortcode"
|
180 |
+
|
181 |
+
#: ../main.php:396
|
182 |
+
msgid "Statistics"
|
183 |
+
msgstr "Statistieken"
|
184 |
+
|
185 |
+
#: ../main.php:404
|
186 |
+
msgid "Add a description for this download item."
|
187 |
+
msgstr "Voeg een omschrijving toe voor dit bestand"
|
188 |
+
|
189 |
+
#: ../main.php:418
|
190 |
+
msgid "Click \"Select File\" to upload (or choose) the file."
|
191 |
+
msgstr "Klik op \"Select File\" om een bestand te kiezen of uploaden."
|
192 |
+
|
193 |
+
#: ../main.php:423
|
194 |
+
msgid "File:"
|
195 |
+
msgstr "Bestand:"
|
196 |
+
|
197 |
+
#: ../main.php:432
|
198 |
+
msgid "Click \"Select Image\" to upload (or choose) the file thumbnail image."
|
199 |
+
msgstr ""
|
200 |
+
"Klik op \"Select Image\"om een miniatuurafbeelding te kiezen of uploaden"
|
201 |
+
|
202 |
+
#: ../main.php:434
|
203 |
+
msgid "Recommended image size is 75px by 75px."
|
204 |
+
msgstr "Beste grootte is 75x75 pixels"
|
205 |
+
|
206 |
+
#: ../main.php:437
|
207 |
+
msgid "Select Image"
|
208 |
+
msgstr "Selecteer plaatje"
|
209 |
+
|
210 |
+
#: ../main.php:438
|
211 |
+
msgid "Remove Image"
|
212 |
+
msgstr "Verwijder het plaatje"
|
213 |
+
|
214 |
+
#: ../main.php:453
|
215 |
+
msgid ""
|
216 |
+
"This is the shortcode which can used on posts or pages for this download."
|
217 |
+
msgstr "Dit is de shortcode die u in berichten of op pagina's kunt gebruiken"
|
218 |
+
|
219 |
+
#: ../main.php:460
|
220 |
+
msgid "These are the statistics for this download item."
|
221 |
+
msgstr "Dit zijn de statistieken voor deze download."
|
222 |
+
|
223 |
+
#: ../main.php:465
|
224 |
+
msgid "Number of Downloads:"
|
225 |
+
msgstr "Aantal downloads:"
|
226 |
+
|
227 |
+
#: ../main.php:515
|
228 |
+
msgid "Colors"
|
229 |
+
msgstr "Kleuren"
|
230 |
+
|
231 |
+
#: ../main.php:517
|
232 |
+
msgid "Remove Tinymce Button"
|
233 |
+
msgstr "TinyMCE button verwijderen"
|
234 |
+
|
235 |
+
#: ../main.php:518
|
236 |
+
msgid "Download Button Color"
|
237 |
+
msgstr "Kleur van downloadknop"
|
238 |
+
|
239 |
+
#: ../main.php:521
|
240 |
+
msgid "Admin options settings"
|
241 |
+
msgstr "Admin optie instellingen"
|
242 |
+
|
243 |
+
#: ../main.php:524
|
244 |
+
msgid "Front End colors settings"
|
245 |
+
msgstr "Front End kleurinstellingen"
|
246 |
+
|
247 |
+
#: ../main.php:529
|
248 |
+
msgid "Removes the SDM Downloads button from the WP content editor."
|
249 |
+
msgstr "Verwijdert de SDM Downloads knop uit de WP inhoudsbewerker."
|
250 |
+
|
251 |
+
#: ../main.php:534
|
252 |
+
msgid "Green"
|
253 |
+
msgstr "Groen"
|
254 |
+
|
255 |
+
#: ../main.php:534
|
256 |
+
msgid "Blue"
|
257 |
+
msgstr "Blauw"
|
258 |
+
|
259 |
+
#: ../main.php:534
|
260 |
+
msgid "Purple"
|
261 |
+
msgstr "Paars"
|
262 |
+
|
263 |
+
#: ../main.php:534
|
264 |
+
msgid "Teal"
|
265 |
+
msgstr "Groenblauw"
|
266 |
+
|
267 |
+
#: ../main.php:534
|
268 |
+
msgid "Dark Blue"
|
269 |
+
msgstr "Donkerblauw"
|
270 |
+
|
271 |
+
#: ../main.php:534
|
272 |
+
msgid "Black"
|
273 |
+
msgstr "Zwart"
|
274 |
+
|
275 |
+
#: ../main.php:534
|
276 |
+
msgid "Grey"
|
277 |
+
msgstr "Grijs"
|
278 |
+
|
279 |
+
#: ../main.php:534
|
280 |
+
msgid "Pink"
|
281 |
+
msgstr "Roze"
|
282 |
+
|
283 |
+
#: ../main.php:534
|
284 |
+
msgid "Orange"
|
285 |
+
msgstr "Oranje"
|
286 |
+
|
287 |
+
#: ../main.php:534
|
288 |
+
msgid "White"
|
289 |
+
msgstr "Wit"
|
290 |
+
|
291 |
+
#: ../main.php:543
|
292 |
+
msgid "Adjusts the color of the \"Download Now\" button."
|
293 |
+
msgstr "Past de kleur aan van de download knop"
|
294 |
+
|
295 |
+
#: ../main.php:622 ../main.php:969
|
296 |
+
msgid "Title"
|
297 |
+
msgstr "Titel"
|
298 |
+
|
299 |
+
#: ../main.php:623 ../main.php:971
|
300 |
+
msgid "File"
|
301 |
+
msgstr "Bestand"
|
302 |
+
|
303 |
+
#: ../main.php:624
|
304 |
+
msgid "Visitor IP"
|
305 |
+
msgstr "IP adres bezoeker"
|
306 |
+
|
307 |
+
#: ../main.php:625
|
308 |
+
msgid "Date"
|
309 |
+
msgstr "Datum"
|
310 |
+
|
311 |
+
#: ../main.php:644
|
312 |
+
msgid "Delete Permanently"
|
313 |
+
msgstr "Permanent verwijderen"
|
314 |
+
|
315 |
+
#: ../main.php:645
|
316 |
+
msgid "Export All as Excel"
|
317 |
+
msgstr "Als Excel bestand exporteren"
|
318 |
+
|
319 |
+
#: ../main.php:773
|
320 |
+
msgid "Download Logs"
|
321 |
+
msgstr "Logbestanden downloaden"
|
322 |
+
|
323 |
+
#: ../main.php:776
|
324 |
+
msgid "This page lists all tracked downloads."
|
325 |
+
msgstr "Deze pagina geeft alle gevolgde downloads weer."
|
326 |
+
|
327 |
+
#: ../main.php:836
|
328 |
+
msgid "green"
|
329 |
+
msgstr "groen"
|
330 |
+
|
331 |
+
#: ../main.php:841 ../main.php:853
|
332 |
+
msgid "Download Now!"
|
333 |
+
msgstr "Nu downloaden!"
|
334 |
+
|
335 |
+
#: ../main.php:968
|
336 |
+
msgid "Image"
|
337 |
+
msgstr "Plaatje"
|
338 |
+
|
339 |
+
#: ../main.php:970
|
340 |
+
msgid "ID"
|
341 |
+
msgstr "ID"
|
342 |
+
|
343 |
+
#: ../main.php:975
|
344 |
+
msgid "Date Posted"
|
345 |
+
msgstr "Plaatsingsdatum"
|
langs/sdm_lang-pt_BR.mo
ADDED
Binary file
|
langs/sdm_lang-pt_BR.po
ADDED
@@ -0,0 +1,343 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: simple-download-monitor\n"
|
4 |
+
"POT-Creation-Date: 2013-11-01 01:22-0500\n"
|
5 |
+
"PO-Revision-Date: 2015-01-14 04:33-0300\n"
|
6 |
+
"Last-Translator: \n"
|
7 |
+
"Language-Team: \n"
|
8 |
+
"MIME-Version: 1.0\n"
|
9 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
+
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"X-Generator: Poedit 1.7.3\n"
|
12 |
+
"X-Poedit-KeywordsList: __;_e;_x\n"
|
13 |
+
"X-Poedit-Basepath: .\n"
|
14 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
15 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
16 |
+
"Language: pt\n"
|
17 |
+
"X-Poedit-SearchPath-0: .\n"
|
18 |
+
"X-Poedit-SearchPath-1: ..\n"
|
19 |
+
|
20 |
+
#: ../main.php:63 ../main.php:262
|
21 |
+
msgid "Settings"
|
22 |
+
msgstr "Configurações"
|
23 |
+
|
24 |
+
#: ../main.php:134 ../main.php:135 ../main.php:140 ../main.php:146
|
25 |
+
#: ../main.php:974
|
26 |
+
msgid "Downloads"
|
27 |
+
msgstr "Downloads"
|
28 |
+
|
29 |
+
#: ../main.php:136 ../main.php:137
|
30 |
+
msgid "Add New"
|
31 |
+
msgstr "Adicionar novo"
|
32 |
+
|
33 |
+
#: ../main.php:138
|
34 |
+
msgid "Edit Download"
|
35 |
+
msgstr "Editar download"
|
36 |
+
|
37 |
+
#: ../main.php:139
|
38 |
+
msgid "New Download"
|
39 |
+
msgstr "Novo download"
|
40 |
+
|
41 |
+
#: ../main.php:141
|
42 |
+
msgid "View Download"
|
43 |
+
msgstr "Ver download"
|
44 |
+
|
45 |
+
#: ../main.php:142
|
46 |
+
msgid "Search Downloads"
|
47 |
+
msgstr "Pesquisar downloads"
|
48 |
+
|
49 |
+
#: ../main.php:143
|
50 |
+
msgid "No Downloads found"
|
51 |
+
msgstr "Nenhum arquivo para download foi encontrado."
|
52 |
+
|
53 |
+
#: ../main.php:144
|
54 |
+
msgid "No Downloads found in Trash"
|
55 |
+
msgstr "Nenhum arquivo para download foi encontrado na lixeira."
|
56 |
+
|
57 |
+
#: ../main.php:170 ../main.php:180 ../main.php:972
|
58 |
+
msgid "Categories"
|
59 |
+
msgstr "Categorias"
|
60 |
+
|
61 |
+
#: ../main.php:171
|
62 |
+
msgid "Category"
|
63 |
+
msgstr "Categoria"
|
64 |
+
|
65 |
+
#: ../main.php:172
|
66 |
+
msgid "Search Categories"
|
67 |
+
msgstr "Pesquisar em categorias"
|
68 |
+
|
69 |
+
#: ../main.php:173
|
70 |
+
msgid "All Categories"
|
71 |
+
msgstr "Todas as categorias"
|
72 |
+
|
73 |
+
#: ../main.php:174
|
74 |
+
msgid "Categories Genre"
|
75 |
+
msgstr "Gênero de categorias"
|
76 |
+
|
77 |
+
#: ../main.php:175
|
78 |
+
msgid "Categories Genre:"
|
79 |
+
msgstr "Gênero de categorias:"
|
80 |
+
|
81 |
+
#: ../main.php:176
|
82 |
+
msgid "Edit Category"
|
83 |
+
msgstr "Editar categoria"
|
84 |
+
|
85 |
+
#: ../main.php:177
|
86 |
+
msgid "Update Category"
|
87 |
+
msgstr "Atualizar categoria"
|
88 |
+
|
89 |
+
#: ../main.php:178
|
90 |
+
msgid "Add New Category"
|
91 |
+
msgstr "Adicionar nova Categoria"
|
92 |
+
|
93 |
+
#: ../main.php:179
|
94 |
+
msgid "New Category"
|
95 |
+
msgstr "Nova Categoria"
|
96 |
+
|
97 |
+
#: ../main.php:195 ../main.php:205 ../main.php:973
|
98 |
+
msgid "Tags"
|
99 |
+
msgstr "Tags"
|
100 |
+
|
101 |
+
#: ../main.php:196
|
102 |
+
msgid "Tag"
|
103 |
+
msgstr "Tag"
|
104 |
+
|
105 |
+
#: ../main.php:197
|
106 |
+
msgid "Search Tags"
|
107 |
+
msgstr "Pesquisar tags"
|
108 |
+
|
109 |
+
#: ../main.php:198
|
110 |
+
msgid "All Tags"
|
111 |
+
msgstr "Todas as tags"
|
112 |
+
|
113 |
+
#: ../main.php:199
|
114 |
+
msgid "Tags Genre"
|
115 |
+
msgstr "Gênero de tags"
|
116 |
+
|
117 |
+
#: ../main.php:200
|
118 |
+
msgid "Tags Genre:"
|
119 |
+
msgstr "Gênero de tags:"
|
120 |
+
|
121 |
+
#: ../main.php:201
|
122 |
+
msgid "Edit Tag"
|
123 |
+
msgstr "Editar tag"
|
124 |
+
|
125 |
+
#: ../main.php:202
|
126 |
+
msgid "Update Tag"
|
127 |
+
msgstr "Atualizar tag"
|
128 |
+
|
129 |
+
#: ../main.php:203
|
130 |
+
msgid "Add New Tag"
|
131 |
+
msgstr "Adicionar nova Tag"
|
132 |
+
|
133 |
+
#: ../main.php:204
|
134 |
+
msgid "New Tag"
|
135 |
+
msgstr "Nova Tag"
|
136 |
+
|
137 |
+
#: ../main.php:261
|
138 |
+
msgid "Logs"
|
139 |
+
msgstr "Logs"
|
140 |
+
|
141 |
+
#: ../main.php:270
|
142 |
+
msgid "Simple Download Monitor Settings Page"
|
143 |
+
msgstr "Simple Download Monitor - Configurações"
|
144 |
+
|
145 |
+
#: ../main.php:278 ../main.php:514
|
146 |
+
msgid "Admin Options"
|
147 |
+
msgstr "Opções do Administrador"
|
148 |
+
|
149 |
+
#: ../main.php:281
|
150 |
+
msgid "Control various plugin features."
|
151 |
+
msgstr "Controlar várias funções do plugin."
|
152 |
+
|
153 |
+
#: ../main.php:284 ../main.php:307
|
154 |
+
msgid "Expand Option Panel"
|
155 |
+
msgstr "Expandir painel de opções"
|
156 |
+
|
157 |
+
#: ../main.php:301
|
158 |
+
msgid "Color Options"
|
159 |
+
msgstr "Opções de cor"
|
160 |
+
|
161 |
+
#: ../main.php:304
|
162 |
+
msgid "Adjust color options"
|
163 |
+
msgstr "Ajuste as opções de cores"
|
164 |
+
|
165 |
+
#: ../main.php:376
|
166 |
+
msgid "Description"
|
167 |
+
msgstr "Descrição"
|
168 |
+
|
169 |
+
#: ../main.php:381
|
170 |
+
msgid "Upload File"
|
171 |
+
msgstr "Fazer envio de arquivo"
|
172 |
+
|
173 |
+
#: ../main.php:386
|
174 |
+
msgid "File Thumbnail"
|
175 |
+
msgstr "Miniatura do arquivo"
|
176 |
+
|
177 |
+
#: ../main.php:391
|
178 |
+
msgid "Shortcode"
|
179 |
+
msgstr "Bloco de código"
|
180 |
+
|
181 |
+
#: ../main.php:396
|
182 |
+
msgid "Statistics"
|
183 |
+
msgstr "Estatísticas"
|
184 |
+
|
185 |
+
#: ../main.php:404
|
186 |
+
msgid "Add a description for this download item."
|
187 |
+
msgstr "Adicionar uma descrição para este item de download"
|
188 |
+
|
189 |
+
#: ../main.php:418
|
190 |
+
msgid "Click \"Select File\" to upload (or choose) the file."
|
191 |
+
msgstr "Clique em selecionar um arquivo para escolher ou enviar um arquivo."
|
192 |
+
|
193 |
+
#: ../main.php:423
|
194 |
+
msgid "File:"
|
195 |
+
msgstr "Arquivo:"
|
196 |
+
|
197 |
+
#: ../main.php:432
|
198 |
+
msgid "Click \"Select Image\" to upload (or choose) the file thumbnail image."
|
199 |
+
msgstr "Clique em selecionar imagem para enviar ou escolher uma miniatura para o arquivo."
|
200 |
+
|
201 |
+
#: ../main.php:434
|
202 |
+
msgid "Recommended image size is 75px by 75px."
|
203 |
+
msgstr "Tamanho recomendado de imagem em pixels 75 x 75"
|
204 |
+
|
205 |
+
#: ../main.php:437
|
206 |
+
msgid "Select Image"
|
207 |
+
msgstr "Selecionar imagem"
|
208 |
+
|
209 |
+
#: ../main.php:438
|
210 |
+
msgid "Remove Image"
|
211 |
+
msgstr "Remover imagem"
|
212 |
+
|
213 |
+
#: ../main.php:453
|
214 |
+
msgid "This is the shortcode which can used on posts or pages for this download."
|
215 |
+
msgstr "Este é o bloco de código que pode ser usado em mensagens ou em páginas para download de arquivos."
|
216 |
+
|
217 |
+
#: ../main.php:460
|
218 |
+
msgid "These are the statistics for this download item."
|
219 |
+
msgstr "Estas são as estatísticas para este item de download."
|
220 |
+
|
221 |
+
#: ../main.php:465
|
222 |
+
msgid "Number of Downloads:"
|
223 |
+
msgstr "Número de Downloads"
|
224 |
+
|
225 |
+
#: ../main.php:515
|
226 |
+
msgid "Colors"
|
227 |
+
msgstr "Cores"
|
228 |
+
|
229 |
+
#: ../main.php:517
|
230 |
+
msgid "Remove Tinymce Button"
|
231 |
+
msgstr "Remover botão TinyMCE"
|
232 |
+
|
233 |
+
#: ../main.php:518
|
234 |
+
msgid "Download Button Color"
|
235 |
+
msgstr "Cor do botão de baixar arquivo"
|
236 |
+
|
237 |
+
#: ../main.php:521
|
238 |
+
msgid "Admin options settings"
|
239 |
+
msgstr "Configurações de opções da Administração"
|
240 |
+
|
241 |
+
#: ../main.php:524
|
242 |
+
msgid "Front End colors settings"
|
243 |
+
msgstr "Configurações de cores do front-end"
|
244 |
+
|
245 |
+
#: ../main.php:529
|
246 |
+
msgid "Removes the SDM Downloads button from the WP content editor."
|
247 |
+
msgstr "Remover o botão do SDM Downloads do editor de conteúdo"
|
248 |
+
|
249 |
+
#: ../main.php:534
|
250 |
+
msgid "Green"
|
251 |
+
msgstr "Verde"
|
252 |
+
|
253 |
+
#: ../main.php:534
|
254 |
+
msgid "Blue"
|
255 |
+
msgstr "Azul"
|
256 |
+
|
257 |
+
#: ../main.php:534
|
258 |
+
msgid "Purple"
|
259 |
+
msgstr "Roxo"
|
260 |
+
|
261 |
+
#: ../main.php:534
|
262 |
+
msgid "Teal"
|
263 |
+
msgstr "Turquesa"
|
264 |
+
|
265 |
+
#: ../main.php:534
|
266 |
+
msgid "Dark Blue"
|
267 |
+
msgstr "Azul Marinho"
|
268 |
+
|
269 |
+
#: ../main.php:534
|
270 |
+
msgid "Black"
|
271 |
+
msgstr "Preto"
|
272 |
+
|
273 |
+
#: ../main.php:534
|
274 |
+
msgid "Grey"
|
275 |
+
msgstr "Cinza"
|
276 |
+
|
277 |
+
#: ../main.php:534
|
278 |
+
msgid "Pink"
|
279 |
+
msgstr "Rosa"
|
280 |
+
|
281 |
+
#: ../main.php:534
|
282 |
+
msgid "Orange"
|
283 |
+
msgstr "Laranja"
|
284 |
+
|
285 |
+
#: ../main.php:534
|
286 |
+
msgid "White"
|
287 |
+
msgstr "Branco"
|
288 |
+
|
289 |
+
#: ../main.php:543
|
290 |
+
msgid "Adjusts the color of the \"Download Now\" button."
|
291 |
+
msgstr "Ajustes de cor para o botão: Baixar Agora!"
|
292 |
+
|
293 |
+
#: ../main.php:622 ../main.php:969
|
294 |
+
msgid "Title"
|
295 |
+
msgstr "Título"
|
296 |
+
|
297 |
+
#: ../main.php:623 ../main.php:971
|
298 |
+
msgid "File"
|
299 |
+
msgstr "Arquivo"
|
300 |
+
|
301 |
+
#: ../main.php:624
|
302 |
+
msgid "Visitor IP"
|
303 |
+
msgstr "IP do Visitante"
|
304 |
+
|
305 |
+
#: ../main.php:625
|
306 |
+
msgid "Date"
|
307 |
+
msgstr "Data"
|
308 |
+
|
309 |
+
#: ../main.php:644
|
310 |
+
msgid "Delete Permanently"
|
311 |
+
msgstr "Deletar permanemtemente"
|
312 |
+
|
313 |
+
#: ../main.php:645
|
314 |
+
msgid "Export All as Excel"
|
315 |
+
msgstr "Exportar tudo como Excel"
|
316 |
+
|
317 |
+
#: ../main.php:773
|
318 |
+
msgid "Download Logs"
|
319 |
+
msgstr "Baixar logs"
|
320 |
+
|
321 |
+
#: ../main.php:776
|
322 |
+
msgid "This page lists all tracked downloads."
|
323 |
+
msgstr "Esta página lista todos os downloads monitorados"
|
324 |
+
|
325 |
+
#: ../main.php:836
|
326 |
+
msgid "green"
|
327 |
+
msgstr "verde"
|
328 |
+
|
329 |
+
#: ../main.php:841 ../main.php:853
|
330 |
+
msgid "Download Now!"
|
331 |
+
msgstr "Baixar agora!"
|
332 |
+
|
333 |
+
#: ../main.php:968
|
334 |
+
msgid "Image"
|
335 |
+
msgstr "Imagem"
|
336 |
+
|
337 |
+
#: ../main.php:970
|
338 |
+
msgid "ID"
|
339 |
+
msgstr "Código"
|
340 |
+
|
341 |
+
#: ../main.php:975
|
342 |
+
msgid "Date Posted"
|
343 |
+
msgstr "Data de postagem"
|
langs/sdm_lang-ru_RU.mo
ADDED
Binary file
|
langs/sdm_lang-ru_RU.po
ADDED
@@ -0,0 +1,548 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: SDM 3.1\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2014-07-29 12:06+1000\n"
|
6 |
+
"PO-Revision-Date: Sun Oct 26 2014 02:26:34 GMT+0300 (RTZ 2 (зима))\n"
|
7 |
+
"Last-Translator: Начальник <chistigovno@ya.ru>\n"
|
8 |
+
"Language-Team: \n"
|
9 |
+
"Language: Russian\n"
|
10 |
+
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10 >= 2 && "
|
11 |
+
"n%10<=4 &&(n%100<10||n%100 >= 20)? 1 : 2)\n"
|
12 |
+
"MIME-Version: 1.0\n"
|
13 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
14 |
+
"Content-Transfer-Encoding: 8bit\n"
|
15 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
16 |
+
"X-Generator: Loco - https://localise.biz/\n"
|
17 |
+
"X-Poedit-KeywordsList: _:1;gettext:1;dgettext:2;ngettext:1,2;dngettext:2,3;"
|
18 |
+
"__:1;_e:1;_c:1;_n:1,2;_n_noop:1,2;_nc:1,2;__ngettext:1,2;__ngettext_noop:1,2;"
|
19 |
+
"_x:1,2c;_ex:1,2c;_nx:1,2,4c;_nx_noop:1,2,3c;_n_js:1,2;_nx_js:1,2,3c;"
|
20 |
+
"esc_attr__:1;esc_html__:1;esc_attr_e:1;esc_html_e:1;esc_attr_x:1,2c;"
|
21 |
+
"esc_html_x:1,2c;comments_number_link:2,3;t:1;st:1;trans:1;transChoice:1,2\n"
|
22 |
+
"X-Poedit-Basepath: .\n"
|
23 |
+
"X-Poedit-SearchPath-0: C:\\Users\\amin\\Desktop\\simple-download-monitor\n"
|
24 |
+
"X-Loco-Target-Locale: ru_RU"
|
25 |
+
|
26 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:370
|
27 |
+
msgid "WP eStore Plugin"
|
28 |
+
msgstr "WP eStore Plugin"
|
29 |
+
|
30 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:555
|
31 |
+
msgid "current"
|
32 |
+
msgstr "текущий"
|
33 |
+
|
34 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:1030
|
35 |
+
msgid "ID"
|
36 |
+
msgstr "ID"
|
37 |
+
|
38 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:246
|
39 |
+
msgid "Search Tags"
|
40 |
+
msgstr "Поиск тэгов"
|
41 |
+
|
42 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:332
|
43 |
+
msgid "Control various plugin features."
|
44 |
+
msgstr "Параметры отображаемые для администратора"
|
45 |
+
|
46 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:352
|
47 |
+
msgid "Adjust color options"
|
48 |
+
msgstr "Настройки цветов"
|
49 |
+
|
50 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:370
|
51 |
+
msgid ""
|
52 |
+
"If you need a feature rich and supported plugin for selling your digital "
|
53 |
+
"items then checkout our"
|
54 |
+
msgstr ""
|
55 |
+
"Если вам нужен более богатый функционал для продажи цифровых продуктов, "
|
56 |
+
"обратитесь к нам"
|
57 |
+
|
58 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:383
|
59 |
+
msgid "Description"
|
60 |
+
msgstr "Описание"
|
61 |
+
|
62 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:385
|
63 |
+
msgid "Upload File"
|
64 |
+
msgstr "Загрузить файл"
|
65 |
+
|
66 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:387
|
67 |
+
msgid "File Thumbnail (Optional)"
|
68 |
+
msgstr "Эскиз файла (Не обязательно)"
|
69 |
+
|
70 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:389
|
71 |
+
msgid "Shortcodes"
|
72 |
+
msgstr "Короткий код"
|
73 |
+
|
74 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:391
|
75 |
+
msgid "Statistics"
|
76 |
+
msgstr "Статистика"
|
77 |
+
|
78 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:396
|
79 |
+
msgid "Add a description for this download item."
|
80 |
+
msgstr "Добавьте описание загружаемого файла"
|
81 |
+
|
82 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:409
|
83 |
+
msgid "Click \"Select File\" to upload (or choose) the file."
|
84 |
+
msgstr "Нажмите \"Выбрать файл\" чтобы загрузить(или выбрать ранее загруженный) файл"
|
85 |
+
|
86 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:412
|
87 |
+
msgid "Select File"
|
88 |
+
msgstr "Выбрать файл"
|
89 |
+
|
90 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:414
|
91 |
+
msgid "File URL:"
|
92 |
+
msgstr "Или URL файла:"
|
93 |
+
|
94 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:422
|
95 |
+
msgid ""
|
96 |
+
"Click \"Select Image\" to upload (or choose) the file thumbnail image. This "
|
97 |
+
"thumbnail image will be used to create a fancy file download box if you want "
|
98 |
+
"to use it."
|
99 |
+
msgstr ""
|
100 |
+
"Нажмите \"Выбрать изображение\" чтобы загрузить (или выбрать) изображение "
|
101 |
+
"эскиза загрузки. Изображение будет отображаться в Fancy Box"
|
102 |
+
|
103 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:427
|
104 |
+
msgid "Select Image"
|
105 |
+
msgstr "Выбрать изображение"
|
106 |
+
|
107 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:428
|
108 |
+
msgid "Remove Image"
|
109 |
+
msgstr "Удалить изображение"
|
110 |
+
|
111 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:442
|
112 |
+
msgid ""
|
113 |
+
"This is the shortcode which can used on posts or pages to embed a download "
|
114 |
+
"now button for this file. You can also use the shortcode inserter to add "
|
115 |
+
"this shortcode to a post or page."
|
116 |
+
msgstr ""
|
117 |
+
"Этот короткий код вы должны вставить на страницу или запись вашего блога "
|
118 |
+
"чтобы отображалась кнопка загрузки файла. Вы так-же можете использовать "
|
119 |
+
"кнопку на панели инструментов при редактировании поста, чтобы вставлять "
|
120 |
+
"кнопку загрузки"
|
121 |
+
|
122 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:447
|
123 |
+
msgid "This shortcode may be used as a download counter."
|
124 |
+
msgstr "Этот короткий код будет только отображать кол-во загрузок"
|
125 |
+
|
126 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:456
|
127 |
+
msgid "These are the statistics for this download item."
|
128 |
+
msgstr "Статистика текущей загрузки"
|
129 |
+
|
130 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:461
|
131 |
+
msgid "Number of Downloads:"
|
132 |
+
msgstr "Кол-во загрузок:"
|
133 |
+
|
134 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:464
|
135 |
+
msgid "Offset Count"
|
136 |
+
msgstr "Начальное значение счётчика"
|
137 |
+
|
138 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:529
|
139 |
+
msgid "Colors"
|
140 |
+
msgstr "Цвета"
|
141 |
+
|
142 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:531
|
143 |
+
msgid "Remove Tinymce Button"
|
144 |
+
msgstr ""
|
145 |
+
"Скрыть \n"
|
146 |
+
"Tinymce \n"
|
147 |
+
" кнопку"
|
148 |
+
|
149 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:532
|
150 |
+
msgid "Download Button Color"
|
151 |
+
msgstr "Цвет кнопки загрузки"
|
152 |
+
|
153 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:536
|
154 |
+
msgid "Admin options settings"
|
155 |
+
msgstr "Настройки панели инструментов редактора постов"
|
156 |
+
|
157 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:540
|
158 |
+
msgid "Front End colors settings"
|
159 |
+
msgstr "Настройки цвета"
|
160 |
+
|
161 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:546
|
162 |
+
msgid "Removes the SDM Downloads button from the WP content editor."
|
163 |
+
msgstr "Скрывает кнопку с панели инструментов при редактировании поста"
|
164 |
+
|
165 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:552
|
166 |
+
msgid "Green"
|
167 |
+
msgstr "Зелёный"
|
168 |
+
|
169 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:552
|
170 |
+
msgid "Blue"
|
171 |
+
msgstr "Синий"
|
172 |
+
|
173 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:552
|
174 |
+
msgid "Purple"
|
175 |
+
msgstr "Пурпурный"
|
176 |
+
|
177 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:552
|
178 |
+
msgid "Teal"
|
179 |
+
msgstr "Бронзовый"
|
180 |
+
|
181 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:552
|
182 |
+
msgid "Dark Blue"
|
183 |
+
msgstr "Темно-синий"
|
184 |
+
|
185 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:552
|
186 |
+
msgid "Black"
|
187 |
+
msgstr "Чёрный"
|
188 |
+
|
189 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:552
|
190 |
+
msgid "Grey"
|
191 |
+
msgstr "Серый"
|
192 |
+
|
193 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:552
|
194 |
+
msgid "Pink"
|
195 |
+
msgstr "Розовый"
|
196 |
+
|
197 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:552
|
198 |
+
msgid "Orange"
|
199 |
+
msgstr "Оранжевый"
|
200 |
+
|
201 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:552
|
202 |
+
msgid "White"
|
203 |
+
msgstr "Белый"
|
204 |
+
|
205 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:561
|
206 |
+
msgid "Adjusts the color of the \"Download Now\" button."
|
207 |
+
msgstr "Настройка цвета кнопки \"Скачать\""
|
208 |
+
|
209 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:589
|
210 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-post-type-content-handler.
|
211 |
+
#: php:48
|
212 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-shortcodes.php:94
|
213 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/includes/templates/fancy1/sdm-
|
214 |
+
#: fancy-1.php:87
|
215 |
+
msgid "Download"
|
216 |
+
msgstr "Скачать"
|
217 |
+
|
218 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:613
|
219 |
+
msgid "Edit"
|
220 |
+
msgstr "Редактировать"
|
221 |
+
|
222 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:614
|
223 |
+
msgid "Delete"
|
224 |
+
msgstr "Удалить"
|
225 |
+
|
226 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:638
|
227 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:1029
|
228 |
+
msgid "Title"
|
229 |
+
msgstr "Заголовок"
|
230 |
+
|
231 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:639
|
232 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:1031
|
233 |
+
msgid "File"
|
234 |
+
msgstr "Файл"
|
235 |
+
|
236 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:640
|
237 |
+
msgid "Visitor IP"
|
238 |
+
msgstr "IP-адреса"
|
239 |
+
|
240 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:641
|
241 |
+
msgid "Date"
|
242 |
+
msgstr "Дата"
|
243 |
+
|
244 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:642
|
245 |
+
msgid "Country"
|
246 |
+
msgstr "Страна"
|
247 |
+
|
248 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:662
|
249 |
+
msgid "Delete Permanently"
|
250 |
+
msgstr "Удалить"
|
251 |
+
|
252 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:663
|
253 |
+
msgid "Export All as Excel"
|
254 |
+
msgstr "Экспортировать в Excel"
|
255 |
+
|
256 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:678
|
257 |
+
msgid "Nope! Security check failed!"
|
258 |
+
msgstr "Оп! Ошибка проверки безопасности!"
|
259 |
+
|
260 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:686
|
261 |
+
msgid "Download Export File"
|
262 |
+
msgstr "Скачать файл экспорта"
|
263 |
+
|
264 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:693
|
265 |
+
msgid "No entries were selected."
|
266 |
+
msgstr "Записи не выбраны"
|
267 |
+
|
268 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:693
|
269 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:709
|
270 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:711
|
271 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:728
|
272 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:730
|
273 |
+
msgid "Click to Dismiss"
|
274 |
+
msgstr "Нажми для отмены"
|
275 |
+
|
276 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:709
|
277 |
+
msgid "Entries Deleted!"
|
278 |
+
msgstr "Запись удалена!"
|
279 |
+
|
280 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:711
|
281 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:730
|
282 |
+
msgid "Error"
|
283 |
+
msgstr "Ошибка"
|
284 |
+
|
285 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:728
|
286 |
+
msgid "Entry Deleted!"
|
287 |
+
msgstr "Запись удалена!"
|
288 |
+
|
289 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:788
|
290 |
+
msgid "Download Logs"
|
291 |
+
msgstr "Журнал загрузок"
|
292 |
+
|
293 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:791
|
294 |
+
msgid "This page lists all tracked downloads."
|
295 |
+
msgstr "На этой странице показаны все отслеживаемые загрузки"
|
296 |
+
|
297 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:813
|
298 |
+
msgid "Enter Password to Download:"
|
299 |
+
msgstr "Введите пароль для скачивания:"
|
300 |
+
|
301 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:816
|
302 |
+
msgid "Submit"
|
303 |
+
msgstr "Применить"
|
304 |
+
|
305 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:862
|
306 |
+
msgid "Error! Failed to log the download request in the database table"
|
307 |
+
msgstr "Ошибка! Не удалось запросить журнал из БД"
|
308 |
+
|
309 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:871
|
310 |
+
msgid ""
|
311 |
+
"Error! The URL value is empty. Please specify a correct URL value to "
|
312 |
+
"redirect to!"
|
313 |
+
msgstr "Ошибка! Значение URL пусто! Пожалуйста введите правильный URL!"
|
314 |
+
|
315 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:1028
|
316 |
+
msgid "Image"
|
317 |
+
msgstr "Изображение"
|
318 |
+
|
319 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:1035
|
320 |
+
msgid "Date Posted"
|
321 |
+
msgstr "Дата записи"
|
322 |
+
|
323 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:1036
|
324 |
+
msgid "Visitor Country"
|
325 |
+
msgstr "Страна посетителя"
|
326 |
+
|
327 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-post-type-content-handler.
|
328 |
+
#: php:32
|
329 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-shortcodes.php:40
|
330 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-shortcodes.php:166
|
331 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/includes/templates/fancy1/sdm-
|
332 |
+
#: fancy-1.php:42
|
333 |
+
msgid "green"
|
334 |
+
msgstr "зелёный"
|
335 |
+
|
336 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-post-type-content-handler.
|
337 |
+
#: php:37
|
338 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-shortcodes.php:48
|
339 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-shortcodes.php:174
|
340 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/includes/templates/fancy1/sdm-
|
341 |
+
#: fancy-1.php:53
|
342 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/includes/templates/fancy2/sdm-
|
343 |
+
#: fancy-2.php:57
|
344 |
+
msgid "Download Now!"
|
345 |
+
msgstr "Скачать сейчас!"
|
346 |
+
|
347 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-shortcodes.php:27
|
348 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-shortcodes.php:88
|
349 |
+
msgid "Error! Please enter an ID value with this shortcode."
|
350 |
+
msgstr "Ошибка! Укажите ID загрузки здесь"
|
351 |
+
|
352 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-shortcodes.php:118
|
353 |
+
msgid ""
|
354 |
+
"Error! You must enter a category slug OR a category id with this shortcode. "
|
355 |
+
"Refer to the documentation for usage instructions."
|
356 |
+
msgstr ""
|
357 |
+
"Ошибка! Введите id или ярлык категории в этот код.Обратитесь к документации "
|
358 |
+
"плагина для инструкций"
|
359 |
+
|
360 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-shortcodes.php:122
|
361 |
+
msgid "Error! Please enter a category slug OR id; not both."
|
362 |
+
msgstr "Ошибка! Укажите или id или ярлык; не вместе."
|
363 |
+
|
364 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-shortcodes.php:153
|
365 |
+
msgid "There are no download items matching this category criteria."
|
366 |
+
msgstr "Нет загрузок по выбранному критерию"
|
367 |
+
|
368 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:247
|
369 |
+
msgid "All Tags"
|
370 |
+
msgstr "Все теги"
|
371 |
+
|
372 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:248
|
373 |
+
msgid "Tags Genre"
|
374 |
+
msgstr "Жанр тэгов:"
|
375 |
+
|
376 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:249
|
377 |
+
msgid "Tags Genre:"
|
378 |
+
msgstr "Жанр тэгов:"
|
379 |
+
|
380 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:250
|
381 |
+
msgid "Edit Tag"
|
382 |
+
msgstr "Изменить тэг"
|
383 |
+
|
384 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:251
|
385 |
+
msgid "Update Tag"
|
386 |
+
msgstr "Обновить тэг"
|
387 |
+
|
388 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:252
|
389 |
+
msgid "Add New Tag"
|
390 |
+
msgstr "Добавить новый тэг"
|
391 |
+
|
392 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:253
|
393 |
+
msgid "New Tag"
|
394 |
+
msgstr "Новый тэг"
|
395 |
+
|
396 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:254
|
397 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:1033
|
398 |
+
msgid "Tags"
|
399 |
+
msgstr "Тэги"
|
400 |
+
|
401 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:309
|
402 |
+
msgid "Logs"
|
403 |
+
msgstr "Журнал"
|
404 |
+
|
405 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:317
|
406 |
+
msgid "Simple Download Monitor Settings Page"
|
407 |
+
msgstr ""
|
408 |
+
"Страница настроек \n"
|
409 |
+
"Simple Download Monitor"
|
410 |
+
|
411 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:320
|
412 |
+
msgid "Follow us"
|
413 |
+
msgstr "Подпишись на нас"
|
414 |
+
|
415 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:320
|
416 |
+
msgid ""
|
417 |
+
"on Twitter, Google+ or via Email to stay upto date about the new features of "
|
418 |
+
"this plugin."
|
419 |
+
msgstr ""
|
420 |
+
"on Twitter, Google+ or via Email to stay upto date about the new features of "
|
421 |
+
"this plugin.\n"
|
422 |
+
"<br/>Перевод by SnakeD3"
|
423 |
+
|
424 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:329
|
425 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:528
|
426 |
+
msgid "Admin Options"
|
427 |
+
msgstr "Настройки"
|
428 |
+
|
429 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:349
|
430 |
+
msgid "Color Options"
|
431 |
+
msgstr "Цвет"
|
432 |
+
|
433 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:91
|
434 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:310
|
435 |
+
msgid "Settings"
|
436 |
+
msgstr "Настройки"
|
437 |
+
|
438 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:145
|
439 |
+
msgid "Image Successfully Removed"
|
440 |
+
msgstr "Изображение удалено"
|
441 |
+
|
442 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:146
|
443 |
+
msgid "Error with AJAX"
|
444 |
+
msgstr "Ошибка в Ajax"
|
445 |
+
|
446 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:156
|
447 |
+
msgid "Please select a Download Item:"
|
448 |
+
msgstr "Пожалуйста, выберите загрузку из списка"
|
449 |
+
|
450 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:156
|
451 |
+
msgid "Download Title"
|
452 |
+
msgstr "Заголовок"
|
453 |
+
|
454 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:156
|
455 |
+
msgid "Include Fancy Box"
|
456 |
+
msgstr "Включить Fancy Box"
|
457 |
+
|
458 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:156
|
459 |
+
msgid "Insert SDM Shortcode"
|
460 |
+
msgstr "Вставить тэг загрузки в запись"
|
461 |
+
|
462 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:166
|
463 |
+
msgid "Incorrect Password"
|
464 |
+
msgstr "Неверный пароль"
|
465 |
+
|
466 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:182
|
467 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:183
|
468 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:188
|
469 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:194
|
470 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:590
|
471 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:1034
|
472 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-post-type-content-handler.
|
473 |
+
#: php:48
|
474 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-shortcodes.php:94
|
475 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/includes/templates/fancy1/sdm-
|
476 |
+
#: fancy-1.php:87
|
477 |
+
msgid "Downloads"
|
478 |
+
msgstr "Загрузки"
|
479 |
+
|
480 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:184
|
481 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:185
|
482 |
+
msgid "Add New"
|
483 |
+
msgstr "Новая загрузка"
|
484 |
+
|
485 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:186
|
486 |
+
msgid "Edit Download"
|
487 |
+
msgstr "Редактировать загрузку"
|
488 |
+
|
489 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:187
|
490 |
+
msgid "New Download"
|
491 |
+
msgstr "Новая загрузка"
|
492 |
+
|
493 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:189
|
494 |
+
msgid "View Download"
|
495 |
+
msgstr "Посмотреть загрузку"
|
496 |
+
|
497 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:190
|
498 |
+
msgid "Search Downloads"
|
499 |
+
msgstr "Поиск загрузок"
|
500 |
+
|
501 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:191
|
502 |
+
msgid "No Downloads found"
|
503 |
+
msgstr "Загрузки не найдены"
|
504 |
+
|
505 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:192
|
506 |
+
msgid "No Downloads found in Trash"
|
507 |
+
msgstr "Загрузки не найдены в корзине"
|
508 |
+
|
509 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:193
|
510 |
+
msgid "Parent Download"
|
511 |
+
msgstr "Родительская загрузка"
|
512 |
+
|
513 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:221
|
514 |
+
msgid "Search Categories"
|
515 |
+
msgstr "Поиск категории"
|
516 |
+
|
517 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:222
|
518 |
+
msgid "All Categories"
|
519 |
+
msgstr "Все категории"
|
520 |
+
|
521 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:223
|
522 |
+
msgid "Categories Genre"
|
523 |
+
msgstr "Жанр категории"
|
524 |
+
|
525 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:224
|
526 |
+
msgid "Categories Genre:"
|
527 |
+
msgstr "Жанр категории:"
|
528 |
+
|
529 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:225
|
530 |
+
msgid "Edit Category"
|
531 |
+
msgstr "Редактировать категорию"
|
532 |
+
|
533 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:226
|
534 |
+
msgid "Update Category"
|
535 |
+
msgstr "Обновить категорию"
|
536 |
+
|
537 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:227
|
538 |
+
msgid "Add New Category"
|
539 |
+
msgstr "Добавить новую категорию"
|
540 |
+
|
541 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:228
|
542 |
+
msgid "New Category"
|
543 |
+
msgstr "Новая категория"
|
544 |
+
|
545 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:229
|
546 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:1032
|
547 |
+
msgid "Categories"
|
548 |
+
msgstr "Категории"
|
langs/sdm_lang.pot
ADDED
@@ -0,0 +1,511 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: SDM 3.1\n"
|
4 |
+
"POT-Creation-Date: 2014-07-29 12:06+1000\n"
|
5 |
+
"PO-Revision-Date: 2014-07-29 12:06+1000\n"
|
6 |
+
"Last-Translator: \n"
|
7 |
+
"Language-Team: \n"
|
8 |
+
"MIME-Version: 1.0\n"
|
9 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
+
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"X-Generator: Poedit 1.5.7\n"
|
12 |
+
"X-Poedit-KeywordsList: __;_e\n"
|
13 |
+
"X-Poedit-Basepath: .\n"
|
14 |
+
"X-Poedit-SearchPath-0: C:\\Users\\amin\\Desktop\\simple-download-monitor\n"
|
15 |
+
|
16 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:91
|
17 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:310
|
18 |
+
msgid "Settings"
|
19 |
+
msgstr ""
|
20 |
+
|
21 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:145
|
22 |
+
msgid "Image Successfully Removed"
|
23 |
+
msgstr ""
|
24 |
+
|
25 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:146
|
26 |
+
msgid "Error with AJAX"
|
27 |
+
msgstr ""
|
28 |
+
|
29 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:156
|
30 |
+
msgid "Please select a Download Item:"
|
31 |
+
msgstr ""
|
32 |
+
|
33 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:156
|
34 |
+
msgid "Download Title"
|
35 |
+
msgstr ""
|
36 |
+
|
37 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:156
|
38 |
+
msgid "Include Fancy Box"
|
39 |
+
msgstr ""
|
40 |
+
|
41 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:156
|
42 |
+
msgid "Insert SDM Shortcode"
|
43 |
+
msgstr ""
|
44 |
+
|
45 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:166
|
46 |
+
msgid "Incorrect Password"
|
47 |
+
msgstr ""
|
48 |
+
|
49 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:182
|
50 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:183
|
51 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:188
|
52 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:194
|
53 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:590
|
54 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:1034
|
55 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-post-type-content-handler.php:48
|
56 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-shortcodes.php:94
|
57 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/includes/templates/fancy1/sdm-fancy-1.php:87
|
58 |
+
msgid "Downloads"
|
59 |
+
msgstr ""
|
60 |
+
|
61 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:184
|
62 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:185
|
63 |
+
msgid "Add New"
|
64 |
+
msgstr ""
|
65 |
+
|
66 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:186
|
67 |
+
msgid "Edit Download"
|
68 |
+
msgstr ""
|
69 |
+
|
70 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:187
|
71 |
+
msgid "New Download"
|
72 |
+
msgstr ""
|
73 |
+
|
74 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:189
|
75 |
+
msgid "View Download"
|
76 |
+
msgstr ""
|
77 |
+
|
78 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:190
|
79 |
+
msgid "Search Downloads"
|
80 |
+
msgstr ""
|
81 |
+
|
82 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:191
|
83 |
+
msgid "No Downloads found"
|
84 |
+
msgstr ""
|
85 |
+
|
86 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:192
|
87 |
+
msgid "No Downloads found in Trash"
|
88 |
+
msgstr ""
|
89 |
+
|
90 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:193
|
91 |
+
msgid "Parent Download"
|
92 |
+
msgstr ""
|
93 |
+
|
94 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:221
|
95 |
+
msgid "Search Categories"
|
96 |
+
msgstr ""
|
97 |
+
|
98 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:222
|
99 |
+
msgid "All Categories"
|
100 |
+
msgstr ""
|
101 |
+
|
102 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:223
|
103 |
+
msgid "Categories Genre"
|
104 |
+
msgstr ""
|
105 |
+
|
106 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:224
|
107 |
+
msgid "Categories Genre:"
|
108 |
+
msgstr ""
|
109 |
+
|
110 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:225
|
111 |
+
msgid "Edit Category"
|
112 |
+
msgstr ""
|
113 |
+
|
114 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:226
|
115 |
+
msgid "Update Category"
|
116 |
+
msgstr ""
|
117 |
+
|
118 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:227
|
119 |
+
msgid "Add New Category"
|
120 |
+
msgstr ""
|
121 |
+
|
122 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:228
|
123 |
+
msgid "New Category"
|
124 |
+
msgstr ""
|
125 |
+
|
126 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:229
|
127 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:1032
|
128 |
+
msgid "Categories"
|
129 |
+
msgstr ""
|
130 |
+
|
131 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:246
|
132 |
+
msgid "Search Tags"
|
133 |
+
msgstr ""
|
134 |
+
|
135 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:247
|
136 |
+
msgid "All Tags"
|
137 |
+
msgstr ""
|
138 |
+
|
139 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:248
|
140 |
+
msgid "Tags Genre"
|
141 |
+
msgstr ""
|
142 |
+
|
143 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:249
|
144 |
+
msgid "Tags Genre:"
|
145 |
+
msgstr ""
|
146 |
+
|
147 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:250
|
148 |
+
msgid "Edit Tag"
|
149 |
+
msgstr ""
|
150 |
+
|
151 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:251
|
152 |
+
msgid "Update Tag"
|
153 |
+
msgstr ""
|
154 |
+
|
155 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:252
|
156 |
+
msgid "Add New Tag"
|
157 |
+
msgstr ""
|
158 |
+
|
159 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:253
|
160 |
+
msgid "New Tag"
|
161 |
+
msgstr ""
|
162 |
+
|
163 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:254
|
164 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:1033
|
165 |
+
msgid "Tags"
|
166 |
+
msgstr ""
|
167 |
+
|
168 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:309
|
169 |
+
msgid "Logs"
|
170 |
+
msgstr ""
|
171 |
+
|
172 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:317
|
173 |
+
msgid "Simple Download Monitor Settings Page"
|
174 |
+
msgstr ""
|
175 |
+
|
176 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:320
|
177 |
+
msgid "Follow us"
|
178 |
+
msgstr ""
|
179 |
+
|
180 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:320
|
181 |
+
msgid ""
|
182 |
+
"on Twitter, Google+ or via Email to stay upto date about the new features of "
|
183 |
+
"this plugin."
|
184 |
+
msgstr ""
|
185 |
+
|
186 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:329
|
187 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:528
|
188 |
+
msgid "Admin Options"
|
189 |
+
msgstr ""
|
190 |
+
|
191 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:332
|
192 |
+
msgid "Control various plugin features."
|
193 |
+
msgstr ""
|
194 |
+
|
195 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:349
|
196 |
+
msgid "Color Options"
|
197 |
+
msgstr ""
|
198 |
+
|
199 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:352
|
200 |
+
msgid "Adjust color options"
|
201 |
+
msgstr ""
|
202 |
+
|
203 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:370
|
204 |
+
msgid ""
|
205 |
+
"If you need a feature rich and supported plugin for selling your digital "
|
206 |
+
"items then checkout our"
|
207 |
+
msgstr ""
|
208 |
+
|
209 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:370
|
210 |
+
msgid "WP eStore Plugin"
|
211 |
+
msgstr ""
|
212 |
+
|
213 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:383
|
214 |
+
msgid "Description"
|
215 |
+
msgstr ""
|
216 |
+
|
217 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:385
|
218 |
+
msgid "Upload File"
|
219 |
+
msgstr ""
|
220 |
+
|
221 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:387
|
222 |
+
msgid "File Thumbnail (Optional)"
|
223 |
+
msgstr ""
|
224 |
+
|
225 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:389
|
226 |
+
msgid "Shortcodes"
|
227 |
+
msgstr ""
|
228 |
+
|
229 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:391
|
230 |
+
msgid "Statistics"
|
231 |
+
msgstr ""
|
232 |
+
|
233 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:396
|
234 |
+
msgid "Add a description for this download item."
|
235 |
+
msgstr ""
|
236 |
+
|
237 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:409
|
238 |
+
msgid "Click \"Select File\" to upload (or choose) the file."
|
239 |
+
msgstr ""
|
240 |
+
|
241 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:412
|
242 |
+
msgid "Select File"
|
243 |
+
msgstr ""
|
244 |
+
|
245 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:414
|
246 |
+
msgid "File URL:"
|
247 |
+
msgstr ""
|
248 |
+
|
249 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:422
|
250 |
+
msgid ""
|
251 |
+
"Click \"Select Image\" to upload (or choose) the file thumbnail image. This "
|
252 |
+
"thumbnail image will be used to create a fancy file download box if you want "
|
253 |
+
"to use it."
|
254 |
+
msgstr ""
|
255 |
+
|
256 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:427
|
257 |
+
msgid "Select Image"
|
258 |
+
msgstr ""
|
259 |
+
|
260 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:428
|
261 |
+
msgid "Remove Image"
|
262 |
+
msgstr ""
|
263 |
+
|
264 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:442
|
265 |
+
msgid ""
|
266 |
+
"This is the shortcode which can used on posts or pages to embed a download "
|
267 |
+
"now button for this file. You can also use the shortcode inserter to add "
|
268 |
+
"this shortcode to a post or page."
|
269 |
+
msgstr ""
|
270 |
+
|
271 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:447
|
272 |
+
msgid "This shortcode may be used as a download counter."
|
273 |
+
msgstr ""
|
274 |
+
|
275 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:456
|
276 |
+
msgid "These are the statistics for this download item."
|
277 |
+
msgstr ""
|
278 |
+
|
279 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:461
|
280 |
+
msgid "Number of Downloads:"
|
281 |
+
msgstr ""
|
282 |
+
|
283 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:464
|
284 |
+
msgid "Offset Count"
|
285 |
+
msgstr ""
|
286 |
+
|
287 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:529
|
288 |
+
msgid "Colors"
|
289 |
+
msgstr ""
|
290 |
+
|
291 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:531
|
292 |
+
msgid "Remove Tinymce Button"
|
293 |
+
msgstr ""
|
294 |
+
|
295 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:532
|
296 |
+
msgid "Download Button Color"
|
297 |
+
msgstr ""
|
298 |
+
|
299 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:536
|
300 |
+
msgid "Admin options settings"
|
301 |
+
msgstr ""
|
302 |
+
|
303 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:540
|
304 |
+
msgid "Front End colors settings"
|
305 |
+
msgstr ""
|
306 |
+
|
307 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:546
|
308 |
+
msgid "Removes the SDM Downloads button from the WP content editor."
|
309 |
+
msgstr ""
|
310 |
+
|
311 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:552
|
312 |
+
msgid "Green"
|
313 |
+
msgstr ""
|
314 |
+
|
315 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:552
|
316 |
+
msgid "Blue"
|
317 |
+
msgstr ""
|
318 |
+
|
319 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:552
|
320 |
+
msgid "Purple"
|
321 |
+
msgstr ""
|
322 |
+
|
323 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:552
|
324 |
+
msgid "Teal"
|
325 |
+
msgstr ""
|
326 |
+
|
327 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:552
|
328 |
+
msgid "Dark Blue"
|
329 |
+
msgstr ""
|
330 |
+
|
331 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:552
|
332 |
+
msgid "Black"
|
333 |
+
msgstr ""
|
334 |
+
|
335 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:552
|
336 |
+
msgid "Grey"
|
337 |
+
msgstr ""
|
338 |
+
|
339 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:552
|
340 |
+
msgid "Pink"
|
341 |
+
msgstr ""
|
342 |
+
|
343 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:552
|
344 |
+
msgid "Orange"
|
345 |
+
msgstr ""
|
346 |
+
|
347 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:552
|
348 |
+
msgid "White"
|
349 |
+
msgstr ""
|
350 |
+
|
351 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:555
|
352 |
+
msgid "current"
|
353 |
+
msgstr ""
|
354 |
+
|
355 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:561
|
356 |
+
msgid "Adjusts the color of the \"Download Now\" button."
|
357 |
+
msgstr ""
|
358 |
+
|
359 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:589
|
360 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-post-type-content-handler.php:48
|
361 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-shortcodes.php:94
|
362 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/includes/templates/fancy1/sdm-fancy-1.php:87
|
363 |
+
msgid "Download"
|
364 |
+
msgstr ""
|
365 |
+
|
366 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:613
|
367 |
+
msgid "Edit"
|
368 |
+
msgstr ""
|
369 |
+
|
370 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:614
|
371 |
+
msgid "Delete"
|
372 |
+
msgstr ""
|
373 |
+
|
374 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:638
|
375 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:1029
|
376 |
+
msgid "Title"
|
377 |
+
msgstr ""
|
378 |
+
|
379 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:639
|
380 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:1031
|
381 |
+
msgid "File"
|
382 |
+
msgstr ""
|
383 |
+
|
384 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:640
|
385 |
+
msgid "Visitor IP"
|
386 |
+
msgstr ""
|
387 |
+
|
388 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:641
|
389 |
+
msgid "Date"
|
390 |
+
msgstr ""
|
391 |
+
|
392 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:642
|
393 |
+
msgid "Country"
|
394 |
+
msgstr ""
|
395 |
+
|
396 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:662
|
397 |
+
msgid "Delete Permanently"
|
398 |
+
msgstr ""
|
399 |
+
|
400 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:663
|
401 |
+
msgid "Export All as Excel"
|
402 |
+
msgstr ""
|
403 |
+
|
404 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:678
|
405 |
+
msgid "Nope! Security check failed!"
|
406 |
+
msgstr ""
|
407 |
+
|
408 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:686
|
409 |
+
msgid "Download Export File"
|
410 |
+
msgstr ""
|
411 |
+
|
412 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:693
|
413 |
+
msgid "No entries were selected."
|
414 |
+
msgstr ""
|
415 |
+
|
416 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:693
|
417 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:709
|
418 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:711
|
419 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:728
|
420 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:730
|
421 |
+
msgid "Click to Dismiss"
|
422 |
+
msgstr ""
|
423 |
+
|
424 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:709
|
425 |
+
msgid "Entries Deleted!"
|
426 |
+
msgstr ""
|
427 |
+
|
428 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:711
|
429 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:730
|
430 |
+
msgid "Error"
|
431 |
+
msgstr ""
|
432 |
+
|
433 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:728
|
434 |
+
msgid "Entry Deleted!"
|
435 |
+
msgstr ""
|
436 |
+
|
437 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:788
|
438 |
+
msgid "Download Logs"
|
439 |
+
msgstr ""
|
440 |
+
|
441 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:791
|
442 |
+
msgid "This page lists all tracked downloads."
|
443 |
+
msgstr ""
|
444 |
+
|
445 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:813
|
446 |
+
msgid "Enter Password to Download:"
|
447 |
+
msgstr ""
|
448 |
+
|
449 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:816
|
450 |
+
msgid "Submit"
|
451 |
+
msgstr ""
|
452 |
+
|
453 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:862
|
454 |
+
msgid "Error! Failed to log the download request in the database table"
|
455 |
+
msgstr ""
|
456 |
+
|
457 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:871
|
458 |
+
msgid ""
|
459 |
+
"Error! The URL value is empty. Please specify a correct URL value to "
|
460 |
+
"redirect to!"
|
461 |
+
msgstr ""
|
462 |
+
|
463 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:1028
|
464 |
+
msgid "Image"
|
465 |
+
msgstr ""
|
466 |
+
|
467 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:1030
|
468 |
+
msgid "ID"
|
469 |
+
msgstr ""
|
470 |
+
|
471 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:1035
|
472 |
+
msgid "Date Posted"
|
473 |
+
msgstr ""
|
474 |
+
|
475 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/main.php:1036
|
476 |
+
msgid "Visitor Country"
|
477 |
+
msgstr ""
|
478 |
+
|
479 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-post-type-content-handler.php:32
|
480 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-shortcodes.php:40
|
481 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-shortcodes.php:166
|
482 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/includes/templates/fancy1/sdm-fancy-1.php:42
|
483 |
+
msgid "green"
|
484 |
+
msgstr ""
|
485 |
+
|
486 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-post-type-content-handler.php:37
|
487 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-shortcodes.php:48
|
488 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-shortcodes.php:174
|
489 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/includes/templates/fancy1/sdm-fancy-1.php:53
|
490 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/includes/templates/fancy2/sdm-fancy-2.php:57
|
491 |
+
msgid "Download Now!"
|
492 |
+
msgstr ""
|
493 |
+
|
494 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-shortcodes.php:27
|
495 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-shortcodes.php:88
|
496 |
+
msgid "Error! Please enter an ID value with this shortcode."
|
497 |
+
msgstr ""
|
498 |
+
|
499 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-shortcodes.php:118
|
500 |
+
msgid ""
|
501 |
+
"Error! You must enter a category slug OR a category id with this shortcode. "
|
502 |
+
"Refer to the documentation for usage instructions."
|
503 |
+
msgstr ""
|
504 |
+
|
505 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-shortcodes.php:122
|
506 |
+
msgid "Error! Please enter a category slug OR id; not both."
|
507 |
+
msgstr ""
|
508 |
+
|
509 |
+
#: C:\Users\amin\Desktop\simple-download-monitor/sdm-shortcodes.php:153
|
510 |
+
msgid "There are no download items matching this category criteria."
|
511 |
+
msgstr ""
|
main.php
CHANGED
@@ -1,21 +1,32 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: Simple Download Monitor
|
4 |
-
* Plugin URI:
|
5 |
* Description: Easily manage downloadable files and monitor downloads of your digital files from your WordPress site.
|
6 |
-
* Version: 3.
|
7 |
* Author: Tips and Tricks HQ, Ruhul Amin, Josh Lobe
|
8 |
-
* Author URI:
|
9 |
* License: GPL2
|
10 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
define('WP_SIMPLE_DL_MONITOR_DIR_NAME', dirname(plugin_basename(__FILE__)));
|
12 |
-
define('WP_SIMPLE_DL_MONITOR_URL', plugins_url('',__FILE__));
|
13 |
-
define('WP_SIMPLE_DL_MONITOR_PATH',plugin_dir_path(
|
|
|
14 |
|
15 |
global $sdm_db_version;
|
16 |
-
$sdm_db_version = '1.
|
17 |
|
18 |
//File includes
|
|
|
|
|
|
|
|
|
19 |
include_once('sdm-shortcodes.php');
|
20 |
include_once('sdm-post-type-content-handler.php');
|
21 |
|
@@ -26,7 +37,6 @@ function sdm_install_db_table() {
|
|
26 |
|
27 |
global $wpdb;
|
28 |
global $sdm_db_version;
|
29 |
-
|
30 |
$table_name = $wpdb->prefix . 'sdm_downloads';
|
31 |
|
32 |
$sql = 'CREATE TABLE ' . $table_name . ' (
|
@@ -37,6 +47,7 @@ function sdm_install_db_table() {
|
|
37 |
visitor_ip mediumtext NOT NULL,
|
38 |
date_time datetime DEFAULT "0000-00-00 00:00:00" NOT NULL,
|
39 |
visitor_country mediumtext NOT NULL,
|
|
|
40 |
UNIQUE KEY id (id)
|
41 |
);';
|
42 |
|
@@ -44,1156 +55,740 @@ function sdm_install_db_table() {
|
|
44 |
dbDelta($sql);
|
45 |
|
46 |
update_option('sdm_db_version', $sdm_db_version);
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
$inst_db_version = get_option('sdm_db_version');
|
54 |
-
if ($inst_db_version != $sdm_db_version) {
|
55 |
-
sdm_install_db_table();
|
56 |
-
}
|
57 |
-
}
|
58 |
}
|
59 |
|
60 |
/*
|
61 |
* * Handle Plugins loaded tasks
|
62 |
*/
|
63 |
add_action('plugins_loaded', 'sdm_plugins_loaded_tasks');
|
64 |
-
|
65 |
function sdm_plugins_loaded_tasks() {
|
66 |
//Load language
|
67 |
load_plugin_textdomain('sdm_lang', false, dirname(plugin_basename(__FILE__)) . '/langs/');
|
68 |
|
69 |
//Handle db upgrade stuff
|
70 |
sdm_db_update_check();
|
71 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
//Handle download request if any
|
73 |
handle_sdm_download_via_direct_post();
|
74 |
}
|
75 |
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
function sdm_settings_link($links, $file) {
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
|
|
88 |
}
|
89 |
-
|
90 |
// Houston... we have lift-off!!
|
91 |
class simpleDownloadManager {
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
<?php
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
}
|
144 |
-
|
145 |
-
// Pass admin ajax url
|
146 |
-
?>
|
147 |
-
<script type="text/javascript">
|
148 |
-
var sdm_admin_ajax_url = { sdm_admin_ajax_url: '<?php echo admin_url('admin-ajax.php?action=ajax'); ?>' };
|
149 |
-
var sdm_plugin_url = '<?php echo plugins_url(); ?>';
|
150 |
-
var tinymce_langs = { select_download_item: '<?php _e('Please select a Download Item:', 'sdm_lang') ?>', download_title: '<?php _e('Download Title', 'sdm_lang') ?>', include_fancy: '<?php _e('Include Fancy Box', 'sdm_lang') ?>', insert_shortcode: '<?php _e('Insert SDM Shortcode', 'sdm_lang') ?>' };
|
151 |
-
</script>
|
152 |
-
<?php
|
153 |
-
}
|
154 |
-
|
155 |
-
public function sdm_frontend_scripts() {
|
156 |
-
|
157 |
-
// Pass language strings to frontend of WP for js usage
|
158 |
-
?>
|
159 |
-
<script type="text/javascript">
|
160 |
-
var sdm_frontend_translations = { incorrect_password: '<?php _e('Incorrect Password', 'sdm_lang') ?>' };
|
161 |
-
</script>
|
162 |
-
<?php
|
163 |
-
|
164 |
-
}
|
165 |
-
|
166 |
-
public function sdm_admin_styles() {
|
167 |
-
|
168 |
-
wp_enqueue_style('thickbox'); // Needed for media upload thickbox
|
169 |
-
wp_enqueue_style('sdm_admin_styles', WP_SIMPLE_DL_MONITOR_URL.'/css/sdm_admin_styles.css'); // Needed for media upload thickbox
|
170 |
-
}
|
171 |
-
|
172 |
-
public function sdm_register_post_type() {
|
173 |
-
|
174 |
-
//*****
|
175 |
-
//***** Create 'sdm_downloads' Custom Post Type
|
176 |
-
$labels = array(
|
177 |
-
'name' => __('Downloads','sdm_lang'),
|
178 |
-
'singular_name' => __('Downloads','sdm_lang'),
|
179 |
-
'add_new' => __('Add New','sdm_lang'),
|
180 |
-
'add_new_item' => __('Add New','sdm_lang'),
|
181 |
-
'edit_item' => __('Edit Download','sdm_lang'),
|
182 |
-
'new_item' => __('New Download','sdm_lang'),
|
183 |
-
'all_items' => __('Downloads','sdm_lang'),
|
184 |
-
'view_item' => __('View Download','sdm_lang'),
|
185 |
-
'search_items' => __('Search Downloads','sdm_lang'),
|
186 |
-
'not_found' => __('No Downloads found','sdm_lang'),
|
187 |
-
'not_found_in_trash' => __('No Downloads found in Trash','sdm_lang'),
|
188 |
-
'parent_item_colon' => __('','sdm_lang'),
|
189 |
-
'menu_name' => __('Downloads','sdm_lang')
|
190 |
-
);
|
191 |
-
$args = array(
|
192 |
-
'labels' => $labels,
|
193 |
-
'public' => true,
|
194 |
-
'publicly_queryable' => true,
|
195 |
-
'show_ui' => true,
|
196 |
-
'show_in_menu' => true,
|
197 |
-
'query_var' => true,
|
198 |
-
'rewrite' => array( 'slug' => 'sdm_downloads' ),
|
199 |
-
'capability_type' => 'post',
|
200 |
-
'has_archive' => true,
|
201 |
-
'hierarchical' => false,
|
202 |
-
'menu_position' => null,
|
203 |
-
'menu_icon' => 'dashicons-download',
|
204 |
-
'supports' => array( 'title' )
|
205 |
-
);
|
206 |
-
register_post_type( 'sdm_downloads', $args );
|
207 |
-
}
|
208 |
-
|
209 |
-
public function sdm_create_taxonomies() {
|
210 |
-
|
211 |
-
//*****
|
212 |
-
//***** Create CATEGORIES Taxonomy
|
213 |
-
$labels_tags = array(
|
214 |
-
'name' => _x( 'Categories', 'sdm_lang' ),
|
215 |
-
'singular_name' => _x( 'Category', 'sdm_lang' ),
|
216 |
-
'search_items' => __( 'Search Categories', 'sdm_lang' ),
|
217 |
-
'all_items' => __( 'All Categories', 'sdm_lang' ),
|
218 |
-
'parent_item' => __( 'Categories Genre', 'sdm_lang' ),
|
219 |
-
'parent_item_colon' => __( 'Categories Genre:', 'sdm_lang' ),
|
220 |
-
'edit_item' => __( 'Edit Category', 'sdm_lang' ),
|
221 |
-
'update_item' => __( 'Update Category', 'sdm_lang' ),
|
222 |
-
'add_new_item' => __( 'Add New Category', 'sdm_lang' ),
|
223 |
-
'new_item_name' => __( 'New Category', 'sdm_lang' ),
|
224 |
-
'menu_name' => __( 'Categories', 'sdm_lang' )
|
225 |
-
);
|
226 |
-
$args_tags = array(
|
227 |
-
'hierarchical' => true,
|
228 |
-
'labels' => $labels_tags,
|
229 |
-
'show_ui' => true,
|
230 |
-
'query_var' => true,
|
231 |
-
'rewrite' => array( 'slug' => 'sdm_categories' ),
|
232 |
-
'show_admin_column' => true
|
233 |
-
);
|
234 |
-
register_taxonomy( 'sdm_categories', array( 'sdm_downloads' ), $args_tags );
|
235 |
-
|
236 |
-
//*****
|
237 |
-
//***** Create TAGS Taxonomy
|
238 |
-
$labels_tags = array(
|
239 |
-
'name' => _x( 'Tags', 'sdm_lang' ),
|
240 |
-
'singular_name' => _x( 'Tag', 'sdm_lang' ),
|
241 |
-
'search_items' => __( 'Search Tags', 'sdm_lang' ),
|
242 |
-
'all_items' => __( 'All Tags', 'sdm_lang' ),
|
243 |
-
'parent_item' => __( 'Tags Genre', 'sdm_lang' ),
|
244 |
-
'parent_item_colon' => __( 'Tags Genre:', 'sdm_lang' ),
|
245 |
-
'edit_item' => __( 'Edit Tag', 'sdm_lang' ),
|
246 |
-
'update_item' => __( 'Update Tag', 'sdm_lang' ),
|
247 |
-
'add_new_item' => __( 'Add New Tag', 'sdm_lang' ),
|
248 |
-
'new_item_name' => __( 'New Tag', 'sdm_lang' ),
|
249 |
-
'menu_name' => __( 'Tags', 'sdm_lang' )
|
250 |
-
);
|
251 |
-
$args_tags = array(
|
252 |
-
'hierarchical' => false,
|
253 |
-
'labels' => $labels_tags,
|
254 |
-
'show_ui' => true,
|
255 |
-
'query_var' => true,
|
256 |
-
'rewrite' => array( 'slug' => 'sdm_tags' ),
|
257 |
-
'show_admin_column' => true
|
258 |
-
);
|
259 |
-
register_taxonomy( 'sdm_tags', array( 'sdm_downloads' ), $args_tags );
|
260 |
-
}
|
261 |
-
|
262 |
-
public function sdm_create_menu_pages() {
|
263 |
-
|
264 |
-
//*****
|
265 |
-
//***** If user clicked to download the bulk export log
|
266 |
-
if(isset($_GET['download_log']))
|
267 |
-
{
|
268 |
-
global $wpdb;
|
269 |
-
$csv_output = '';
|
270 |
-
$table = $wpdb->prefix.'sdm_downloads';
|
271 |
-
|
272 |
-
$result = mysql_query("SHOW COLUMNS FROM ".$table."");
|
273 |
-
|
274 |
-
$i = 0;
|
275 |
-
if (mysql_num_rows($result) > 0) {
|
276 |
-
while ($row = mysql_fetch_assoc($result)) {
|
277 |
-
$csv_output = $csv_output . $row['Field'].",";
|
278 |
-
$i++;
|
279 |
-
}
|
280 |
-
}
|
281 |
-
$csv_output .= "\n";
|
282 |
-
|
283 |
-
$values = mysql_query("SELECT * FROM ".$table."");
|
284 |
-
while ($rowr = mysql_fetch_row($values)) {
|
285 |
-
for ($j=0; $j<$i; $j++) {
|
286 |
-
$csv_output .= $rowr[$j].",";
|
287 |
-
}
|
288 |
-
$csv_output .= "\n";
|
289 |
-
}
|
290 |
-
|
291 |
-
header("Pragma: public");
|
292 |
-
header("Expires: 0");
|
293 |
-
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
|
294 |
-
header("Cache-Control: private", false);
|
295 |
-
header("Content-Type: application/octet-stream");
|
296 |
-
header("Content-Disposition: attachment; filename=\"report.csv\";" );
|
297 |
-
header("Content-Transfer-Encoding: binary");
|
298 |
-
|
299 |
-
echo $csv_output;
|
300 |
-
exit;
|
301 |
-
}
|
302 |
-
|
303 |
-
//*****
|
304 |
-
//***** Create the 'logs' and 'settings' submenu pages
|
305 |
-
$sdm_logs_page = add_submenu_page( 'edit.php?post_type=sdm_downloads', __('Logs', 'sdm_lang'), __('Logs', 'sdm_lang'), 'manage_options', 'logs', 'sdm_create_logs_page' );
|
306 |
-
$sdm_settings_page = add_submenu_page( 'edit.php?post_type=sdm_downloads', __('Settings', 'sdm_lang'), __('Settings', 'sdm_lang'), 'manage_options', 'settings', array( &$this, 'sdm_create_settings_page' ));
|
307 |
-
}
|
308 |
-
|
309 |
-
public function sdm_create_settings_page()
|
310 |
-
{
|
311 |
-
echo '<div class="wrap">';
|
312 |
-
echo '<div id="poststuff"><div id="post-body">';
|
313 |
-
?>
|
314 |
-
<h2><?php _e('Simple Download Monitor Settings Page', 'sdm_lang') ?></h2>
|
315 |
-
|
316 |
-
<div style="background: #FFF6D5; border: 1px solid #D1B655; color: #3F2502; padding: 15px 10px">
|
317 |
-
<a href="http://www.tipsandtricks-hq.com/development-center" target="_blank"><?php _e('Follow us', 'sdm_lang'); ?></a> <?php _e('on Twitter, Google+ or via Email to stay upto date about the new features of this plugin.','sdm_lang'); ?>
|
318 |
-
</div>
|
319 |
-
|
320 |
-
<!-- settings page form -->
|
321 |
-
<form method="post" action="options.php">
|
322 |
-
|
323 |
-
<!-- BEGIN ADMIN OPTIONS DIV -->
|
324 |
-
<div id="sdm_admin_opts_div" class="sdm_sliding_div_title">
|
325 |
-
<div class="sdm_slider_title">
|
326 |
-
<?php _e('Admin Options', 'sdm_lang') ?>
|
327 |
-
</div>
|
328 |
-
<div class="sdm_desc">
|
329 |
-
<?php _e("Control various plugin features.", 'sdm_lang') ?>
|
330 |
-
</div>
|
331 |
-
</div>
|
332 |
-
<div id="sliding_div1" class="slidingDiv">
|
333 |
-
<?php
|
334 |
-
// This prints out all hidden setting fields
|
335 |
-
do_settings_sections( 'admin_options_section' );
|
336 |
-
settings_fields( 'sdm_downloads_options' );
|
337 |
-
|
338 |
-
submit_button();
|
339 |
-
?>
|
340 |
-
</div>
|
341 |
-
<!-- END ADMIN OPTIONS DIV -->
|
342 |
-
|
343 |
-
<!-- BEGIN COLORS DIV -->
|
344 |
-
<div id="sdm_color_opts_div" class="sdm_sliding_div_title">
|
345 |
-
<div class="sdm_slider_title">
|
346 |
-
<?php _e('Color Options', 'sdm_lang') ?>
|
347 |
-
</div>
|
348 |
-
<div class="sdm_desc">
|
349 |
-
<?php _e("Adjust color options", 'sdm_lang') ?>
|
350 |
-
</div>
|
351 |
-
</div>
|
352 |
-
<div id="sliding_div2" class="slidingDiv">
|
353 |
-
<?php
|
354 |
-
// This prints out all hidden setting fields
|
355 |
-
do_settings_sections( 'sdm_colors_section' );
|
356 |
-
settings_fields( 'sdm_downloads_options' );
|
357 |
-
|
358 |
-
submit_button();
|
359 |
-
?>
|
360 |
-
</div>
|
361 |
-
<!-- END COLORS OPTIONS DIV -->
|
362 |
-
|
363 |
-
<!-- End of settings page form -->
|
364 |
-
</form>
|
365 |
-
|
366 |
-
<div style="background: none repeat scroll 0 0 #FFF6D5;border: 1px solid #D1B655;color: #3F2502;margin: 10px 0;padding: 5px 5px 5px 10px;text-shadow: 1px 1px #FFFFFF;">
|
367 |
-
<p><?php _e('If you need a feature rich and supported plugin for selling your digital items then checkout our','sdm_lang'); ?> <a href="http://www.tipsandtricks-hq.com/wordpress-estore-plugin-complete-solution-to-sell-digital-products-from-your-wordpress-blog-securely-1059" target="_blank"><?php _e('WP eStore Plugin', 'sdm_lang'); ?></a>
|
368 |
-
</p>
|
369 |
-
</div>
|
370 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
371 |
<?php
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
__('Description', 'sdm_lang'),
|
382 |
-
array( &$this, 'display_sdm_description_meta_box'),
|
383 |
-
'sdm_downloads', 'normal', 'default'
|
384 |
-
);
|
385 |
-
add_meta_box('sdm_upload_meta_box',
|
386 |
-
__('Upload File', 'sdm_lang'),
|
387 |
-
array( &$this, 'display_sdm_upload_meta_box'),
|
388 |
-
'sdm_downloads', 'normal', 'default'
|
389 |
-
);
|
390 |
-
add_meta_box('sdm_thumbnail_meta_box',
|
391 |
-
__('File Thumbnail (Optional)', 'sdm_lang'),
|
392 |
-
array( &$this, 'display_sdm_thumbnail_meta_box'),
|
393 |
-
'sdm_downloads', 'normal', 'default'
|
394 |
-
);
|
395 |
-
add_meta_box('sdm_shortcode_meta_box',
|
396 |
-
__('Shortcodes', 'sdm_lang'),
|
397 |
-
array( &$this, 'display_sdm_shortcode_meta_box'),
|
398 |
-
'sdm_downloads', 'normal', 'default'
|
399 |
-
);
|
400 |
-
add_meta_box('sdm_stats_meta_box',
|
401 |
-
__('Statistics', 'sdm_lang'),
|
402 |
-
array( &$this, 'display_sdm_stats_meta_box'),
|
403 |
-
'sdm_downloads', 'normal', 'default'
|
404 |
-
);
|
405 |
-
}
|
406 |
-
|
407 |
-
public function display_sdm_description_meta_box( $post ) { // Description metabox
|
408 |
-
|
409 |
-
_e('Add a description for this download item.','sdm_lang');
|
410 |
-
echo '<br /><br />';
|
411 |
-
|
412 |
-
$old_description = get_post_meta( $post->ID, 'sdm_description', true );
|
413 |
-
?>
|
414 |
-
<textarea id="sdm_description" name="sdm_description" style="width:60%;height:40px;"><?php echo $old_description; ?></textarea>
|
415 |
<?php
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
425 |
<br /><br />
|
426 |
-
|
427 |
<span style="margin-left:40px;"></span>
|
428 |
-
|
429 |
<?php
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
?>
|
441 |
<br /><br />
|
442 |
-
|
443 |
-
|
444 |
-
<
|
445 |
-
|
446 |
-
<
|
447 |
-
|
448 |
-
|
449 |
-
|
|
|
|
|
450 |
<?php
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
public function display_sdm_shortcode_meta_box( $post ) { // Shortcode metabox
|
457 |
-
|
458 |
-
_e('This is the shortcode which can used on posts or pages to embed a download now button for this file. You can also use the shortcode inserter to add this shortcode to a post or page.','sdm_lang');
|
459 |
-
echo '<br />';
|
460 |
-
echo '[sdm_download id="'.$post->ID.'" fancy="0"]';
|
461 |
-
echo '<br /><br />';
|
462 |
-
|
463 |
-
_e('This shortcode may be used as a download counter.', 'sdm_lang');
|
464 |
-
echo '<br />';
|
465 |
-
echo '[sdm_download_counter id="'.$post->ID.'"]';
|
466 |
-
}
|
467 |
-
|
468 |
-
public function display_sdm_stats_meta_box( $post ) { // Stats metabox
|
469 |
-
|
470 |
-
$old_count = get_post_meta( $post->ID, 'sdm_count_offset', true );
|
471 |
-
$value = isset($old_count) && $old_count != '' ? $old_count : '0';
|
472 |
-
|
473 |
-
_e('These are the statistics for this download item.','sdm_lang');
|
474 |
-
echo '<br /><br />';
|
475 |
-
|
476 |
-
global $wpdb;
|
477 |
-
$wpdb->get_results($wpdb->prepare('SELECT * FROM '.$wpdb->prefix.'sdm_downloads WHERE post_id=%s', $post->ID));
|
478 |
-
_e('Number of Downloads:', 'sdm_lang'); echo ' <strong>'.$wpdb->num_rows.'</strong>';
|
479 |
-
echo '<span style="margin-left: 20px;"></span>';
|
480 |
-
_e('Offset Count', 'sdm_lang');
|
481 |
-
echo ' <input type="text" style="width:50px;" name="sdm_count_offset" value="'.$value.'" />';
|
482 |
-
echo ' <img src="'.WP_SIMPLE_DL_MONITOR_URL.'/css/images/info.png" style="margin-left:10px;" title="Enter any positive or negative numerical value; to offset the download count shown, when using the download counter shortcode." />';
|
483 |
-
wp_nonce_field( 'sdm_count_offset_nonce', 'sdm_count_offset_nonce_check' );
|
484 |
-
}
|
485 |
-
|
486 |
-
public function sdm_save_description_meta_data($post_id) { // Save Description metabox
|
487 |
-
|
488 |
-
if( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
|
489 |
-
return;
|
490 |
-
if( !isset( $_POST['sdm_description_box_nonce_check'] ) || !wp_verify_nonce( $_POST['sdm_description_box_nonce_check'], 'sdm_description_box_nonce' ) )
|
491 |
-
return;
|
492 |
-
|
493 |
-
if( isset( $_POST['sdm_description'] ) ) {
|
494 |
-
update_post_meta( $post_id, 'sdm_description', $_POST['sdm_description'] );
|
495 |
-
}
|
496 |
-
|
497 |
-
}
|
498 |
-
|
499 |
-
public function sdm_save_upload_meta_data($post_id) { // Save File Upload metabox
|
500 |
-
|
501 |
-
if( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
|
502 |
-
return;
|
503 |
-
if( !isset( $_POST['sdm_upload_box_nonce_check'] ) || !wp_verify_nonce( $_POST['sdm_upload_box_nonce_check'], 'sdm_upload_box_nonce' ) )
|
504 |
-
return;
|
505 |
-
|
506 |
-
if( isset( $_POST['sdm_upload'] ) ) {
|
507 |
-
update_post_meta( $post_id, 'sdm_upload', $_POST['sdm_upload'] );
|
508 |
-
}
|
509 |
-
}
|
510 |
-
|
511 |
-
public function sdm_save_thumbnail_meta_data($post_id) { // Save Thumbnail Upload metabox
|
512 |
-
|
513 |
-
if( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
|
514 |
-
return;
|
515 |
-
if( !isset( $_POST['sdm_thumbnail_box_nonce_check'] ) || !wp_verify_nonce( $_POST['sdm_thumbnail_box_nonce_check'], 'sdm_thumbnail_box_nonce' ) )
|
516 |
-
return;
|
517 |
-
|
518 |
-
if( isset( $_POST['sdm_upload_thumbnail'] ) ) {
|
519 |
-
update_post_meta( $post_id, 'sdm_upload_thumbnail', $_POST['sdm_upload_thumbnail'] );
|
520 |
-
}
|
521 |
-
}
|
522 |
-
|
523 |
-
public function sdm_save_statistics_meta_data($post_id) { // Save Thumbnail Upload metabox
|
524 |
-
|
525 |
-
if( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
|
526 |
-
return;
|
527 |
-
if( !isset( $_POST['sdm_count_offset_nonce_check'] ) || !wp_verify_nonce( $_POST['sdm_count_offset_nonce_check'], 'sdm_count_offset_nonce' ) )
|
528 |
-
return;
|
529 |
-
|
530 |
-
if(isset($_POST['sdm_count_offset']) && is_numeric($_POST['sdm_count_offset'])) {
|
531 |
-
|
532 |
-
update_post_meta( $post_id, 'sdm_count_offset', $_POST['sdm_count_offset'] );
|
533 |
-
}
|
534 |
-
}
|
535 |
-
|
536 |
-
public function sdm_remove_view_link_cpt($action, $post) {
|
537 |
-
|
538 |
-
// Only execute on SDM CPT posts page
|
539 |
-
if($post->post_type == 'sdm_downloads') {
|
540 |
-
unset ($action['view']);
|
541 |
-
}
|
542 |
-
|
543 |
-
return $action;
|
544 |
-
}
|
545 |
-
|
546 |
-
public function sdm_register_options() {
|
547 |
-
|
548 |
-
register_setting( 'sdm_downloads_options', 'sdm_downloads_options' );
|
549 |
-
add_settings_section( 'admin_options', __('Admin Options', 'sdm_lang'), array( $this, 'admin_options_cb' ), 'admin_options_section' );
|
550 |
-
add_settings_section( 'sdm_colors', __('Colors', 'sdm_lang'), array( $this, 'sdm_colors_cb' ), 'sdm_colors_section' );
|
551 |
-
|
552 |
-
add_settings_field( 'admin_tinymce_button', __('Remove Tinymce Button', 'sdm_lang'), array( $this, 'admin_tinymce_button_cb' ), 'admin_options_section', 'admin_options' );
|
553 |
-
add_settings_field( 'download_button_color', __('Download Button Color', 'sdm_lang'), array( $this, 'download_button_color_cb' ), 'sdm_colors_section', 'sdm_colors' );
|
554 |
-
}
|
555 |
-
public function admin_options_cb() {
|
556 |
-
_e('Admin options settings', 'sdm_lang');
|
557 |
-
}
|
558 |
-
public function sdm_colors_cb() {
|
559 |
-
_e('Front End colors settings', 'sdm_lang');
|
560 |
-
}
|
561 |
-
public function admin_tinymce_button_cb() {
|
562 |
-
$main_opts = get_option('sdm_downloads_options');
|
563 |
-
echo '<input name="sdm_downloads_options[admin_tinymce_button]" id="admin_tinymce_button" type="checkbox" class="sdm_opts_ajax_checkboxes" ' . checked( 1, isset($main_opts['admin_tinymce_button']), false ) . ' /> ';
|
564 |
-
_e('Removes the SDM Downloads button from the WP content editor.', 'sdm_lang');
|
565 |
-
}
|
566 |
-
public function download_button_color_cb() {
|
567 |
-
$main_opts = get_option('sdm_downloads_options');
|
568 |
-
$color_opt = $main_opts['download_button_color'];
|
569 |
-
$color_opts = array( __('Green','sdm_lang'), __('Blue','sdm_lang'),__('Purple','sdm_lang'),__('Teal','sdm_lang'),__('Dark Blue','sdm_lang'),__('Black','sdm_lang'),__('Grey','sdm_lang'),__('Pink','sdm_lang'),__('Orange','sdm_lang'),__('White','sdm_lang') );
|
570 |
-
echo '<select name="sdm_downloads_options[download_button_color]" id="download_button_color" class="sdm_opts_ajax_dropdowns">';
|
571 |
-
if(isset($color_opt)) {
|
572 |
-
echo '<option value="'.$color_opt.'" selected="selected">'.$color_opt.' ('.__('current', 'sdm_lang').')</option>';
|
573 |
-
}
|
574 |
-
foreach ($color_opts as $color) {
|
575 |
-
echo '<option value="'.$color.'" '.$sel_color.'>'.$color.'</option>';
|
576 |
-
}
|
577 |
-
echo '</select> ';
|
578 |
-
_e('Adjusts the color of the "Download Now" button.', 'sdm_lang');
|
579 |
-
}
|
580 |
-
|
581 |
-
}
|
582 |
-
$simpleDownloadManager = new simpleDownloadManager();
|
583 |
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
//*****
|
590 |
-
//***** Check WP_List_Table exists
|
591 |
-
if(!class_exists('WP_List_Table')){
|
592 |
-
require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
|
593 |
-
}
|
594 |
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
function __construct(){
|
601 |
-
|
602 |
-
global $status, $page;
|
603 |
-
|
604 |
-
//Set parent defaults
|
605 |
-
parent::__construct( array(
|
606 |
-
'singular' => __('Download', 'sdm_lang'), //singular name of the listed records
|
607 |
-
'plural' => __('Downloads', 'sdm_lang'), //plural name of the listed records
|
608 |
-
'ajax' => false //does this table support ajax?
|
609 |
-
) );
|
610 |
-
|
611 |
}
|
612 |
-
|
613 |
-
function
|
614 |
-
|
615 |
-
|
616 |
-
case 'URL':
|
617 |
-
case 'visitor_ip':
|
618 |
-
case 'date':
|
619 |
-
return $item[$column_name];
|
620 |
-
case 'visitor_country':
|
621 |
-
return $item[$column_name];
|
622 |
-
default:
|
623 |
-
return print_r($item,true); //Show the whole array for troubleshooting purposes
|
624 |
-
}
|
625 |
-
}
|
626 |
-
|
627 |
-
function column_title($item){
|
628 |
|
629 |
-
//
|
630 |
-
$
|
631 |
-
|
632 |
-
|
633 |
-
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
634 |
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
);
|
641 |
-
}
|
642 |
-
|
643 |
-
function column_cb($item){
|
644 |
-
|
645 |
-
return sprintf(
|
646 |
-
'<input type="checkbox" name="%1$s[]" value="%2$s" />',
|
647 |
-
/*$1%s*/ $this->_args['singular'], //Let's simply repurpose the table's singular label ("Download")
|
648 |
-
/*$2%s*/ $item['ID'].'|'.$item['date'] //The value of the checkbox should be the record's id
|
649 |
-
);
|
650 |
}
|
651 |
-
|
652 |
-
function
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
);
|
662 |
-
return $columns;
|
663 |
}
|
664 |
-
|
665 |
-
function
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
'
|
673 |
-
|
674 |
-
return $sortable_columns;
|
675 |
}
|
676 |
-
|
677 |
-
function get_bulk_actions() {
|
678 |
-
|
679 |
-
$actions = array();
|
680 |
-
$actions['delete2'] = __( 'Delete Permanently', 'sdm_lang' );
|
681 |
-
$actions['export_all'] = __( 'Export All as Excel', 'sdm_lang' );
|
682 |
-
//$actions['export-selected'] = __( 'Export Selected', 'sdm_lang' );
|
683 |
|
684 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
685 |
}
|
686 |
-
|
687 |
-
function process_bulk_action() {
|
688 |
-
|
689 |
-
// security check!
|
690 |
-
if ( isset( $_POST['_wpnonce'] ) && ! empty( $_POST['_wpnonce'] ) ) {
|
691 |
|
692 |
-
|
693 |
-
|
|
|
|
|
|
|
694 |
|
695 |
-
|
696 |
-
wp_die( __('Nope! Security check failed!', 'sdm_lang') );
|
697 |
|
|
|
698 |
}
|
699 |
-
|
700 |
-
$action = $this->current_action();
|
701 |
-
|
702 |
-
// If bulk 'Export All' was clicked
|
703 |
-
if( 'export_all' === $this->current_action() ) {
|
704 |
-
|
705 |
-
echo '<div id="message" class="updated"><p><strong><a id="sdm_download_export" href="?post_type=sdm_downloads&page=logs&download_log">'.__('Download Export File', 'sdm_lang').'</a></strong></p></div>';
|
706 |
-
}
|
707 |
-
|
708 |
-
// if bulk 'Delete Permanently' was clicked
|
709 |
-
if( 'delete2' === $this->current_action() ) {
|
710 |
-
|
711 |
-
if( !isset($_POST['download']) || $_POST['download'] == null) {
|
712 |
-
echo '<div id="message" class="updated fade"><p><strong>'.__('No entries were selected.', 'sdm_lang').'</strong></p><p><em>'.__('Click to Dismiss', 'sdm_lang').'</em></p></div>';
|
713 |
-
return;
|
714 |
-
}
|
715 |
-
|
716 |
-
foreach($_POST['download'] as $item) {
|
717 |
-
$str_tok_id = substr($item, 0, strpos($item, '|'));
|
718 |
-
$str_tok_datetime = substr($item,strpos($item,'|')+1);
|
719 |
-
|
720 |
-
global $wpdb;
|
721 |
-
$del_row = $wpdb->query(
|
722 |
-
'DELETE FROM '.$wpdb->prefix.'sdm_downloads
|
723 |
-
WHERE post_id = "'.$str_tok_id.'"
|
724 |
-
AND date_time = "'.$str_tok_datetime.'"'
|
725 |
-
);
|
726 |
-
}
|
727 |
-
if($del_row) {
|
728 |
-
echo '<div id="message" class="updated fade"><p><strong>'.__('Entries Deleted!', 'sdm_lang').'</strong></p><p><em>'.__('Click to Dismiss', 'sdm_lang').'</em></p></div>';
|
729 |
-
}
|
730 |
-
else {
|
731 |
-
echo '<div id="message" class="updated fade"><p><strong>'.__('Error', 'sdm_lang').'</strong></p><p><em>'.__('Click to Dismiss', 'sdm_lang').'</em></p></div>';
|
732 |
-
}
|
733 |
-
}
|
734 |
|
735 |
-
|
736 |
-
if(
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
global $wpdb;
|
742 |
-
$del_row = $wpdb->query(
|
743 |
-
'DELETE FROM '.$wpdb->prefix.'sdm_downloads
|
744 |
-
WHERE post_id = "'.$item_id.'"
|
745 |
-
AND date_time = "'.$item_datetime.'"'
|
746 |
-
);
|
747 |
-
if($del_row) {
|
748 |
-
echo '<div id="message" class="updated fade"><p><strong>'.__('Entry Deleted!', 'sdm_lang').'</strong></p><p><em>'.__('Click to Dismiss', 'sdm_lang').'</em></p></div>';
|
749 |
-
}
|
750 |
-
else {
|
751 |
-
echo '<div id="message" class="updated fade"><p><strong>'.__('Error', 'sdm_lang').'</strong></p><p><em>'.__('Click to Dismiss', 'sdm_lang').'</em></p></div>';
|
752 |
-
}
|
753 |
}
|
754 |
-
|
755 |
}
|
756 |
-
|
757 |
-
function
|
758 |
-
|
759 |
-
|
760 |
-
$
|
761 |
-
|
762 |
-
$hidden = array();
|
763 |
-
$sortable = $this->get_sortable_columns();
|
764 |
-
|
765 |
-
|
766 |
-
$this->_column_headers = array($columns, $hidden, $sortable);
|
767 |
-
$this->process_bulk_action();
|
768 |
-
//$data = $this->example_data;
|
769 |
-
|
770 |
-
function usort_reorder($a,$b){
|
771 |
-
$orderby = (!empty($_REQUEST['orderby'])) ? $_REQUEST['orderby'] : 'title'; //If no sort, default to title
|
772 |
-
$order = (!empty($_REQUEST['order'])) ? $_REQUEST['order'] : 'asc'; //If no order, default to asc
|
773 |
-
$result = strcmp($a[$orderby], $b[$orderby]); //Determine sort order
|
774 |
-
return ($order==='asc') ? $result : -$result; //Send final sort direction to usort
|
775 |
}
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
$this
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
795 |
}
|
796 |
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
//Fetch, prepare, sort, and filter our data...
|
803 |
-
$sdmListTable->prepare_items();
|
804 |
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
<
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
});
|
827 |
-
</script>
|
828 |
-
<?php
|
829 |
}
|
830 |
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
|
|
840 |
}
|
841 |
|
842 |
/*
|
843 |
-
|
844 |
-
*/
|
845 |
-
add_action(
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
|
|
854 |
}
|
855 |
|
856 |
-
function handle_sdm_download_via_direct_post()
|
857 |
-
{
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
907 |
}
|
908 |
|
909 |
// Tinymce Button Populate Post ID's
|
910 |
-
add_action(
|
911 |
-
add_action(
|
|
|
912 |
function sdm_tiny_get_post_ids_ajax_call() {
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
}
|
|
|
930 |
// Remove Thumbnail Image
|
931 |
-
add_action(
|
932 |
-
add_action(
|
|
|
933 |
function sdm_remove_thumbnail_image_ajax_call() {
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
}
|
|
|
945 |
// Check download password
|
946 |
-
add_action(
|
947 |
-
add_action(
|
|
|
948 |
function sdm_check_pass_ajax_call() {
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
995 |
}
|
|
|
996 |
// Populate category tree
|
997 |
-
add_action(
|
998 |
-
add_action(
|
|
|
999 |
function sdm_pop_cats_ajax_call() {
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
}
|
1033 |
|
1034 |
/*
|
1035 |
-
|
1036 |
-
*/
|
1037 |
-
add_filter(
|
1038 |
-
add_filter(
|
1039 |
-
add_action(
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
return $cols;
|
1058 |
}
|
1059 |
|
1060 |
-
function sdm_downloads_sortable(
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
}
|
1069 |
|
1070 |
-
function sdm_downloads_columns_content(
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
}
|
|
|
1093 |
// Adjust admin column widths
|
1094 |
add_action('admin_head', 'sdm_admin_column_width'); // Adjust column width in admin panel
|
|
|
1095 |
function sdm_admin_column_width() {
|
1096 |
-
|
1097 |
echo '<style type="text/css">';
|
1098 |
echo '.column-sdm_downloads_thumbnail { width:75px !important; overflow:hidden }';
|
1099 |
echo '.column-sdm_downloads_id { width:100px !important; overflow:hidden }';
|
1100 |
echo '.column-taxonomy-sdm_categories { width:200px !important; overflow:hidden }';
|
1101 |
echo '.column-taxonomy-sdm_tags { width:200px !important; overflow:hidden }';
|
1102 |
echo '</style>';
|
1103 |
-
}
|
1104 |
|
1105 |
/*
|
1106 |
-
|
1107 |
-
*/
|
1108 |
|
1109 |
// First check if option is checked to disable tinymce button
|
1110 |
$main_option = get_option('sdm_downloads_options');
|
1111 |
$tiny_button_option = isset($main_option['admin_tinymce_button']);
|
1112 |
-
if($tiny_button_option != true) {
|
1113 |
|
1114 |
-
|
1115 |
-
|
1116 |
-
function sdm_downloads_tinymce_button() {
|
1117 |
-
|
1118 |
-
add_filter( 'mce_external_plugins', 'sdm_downloads_add_button' );
|
1119 |
-
add_filter( 'mce_buttons', 'sdm_downloads_register_button' );
|
1120 |
-
}
|
1121 |
-
function sdm_downloads_add_button( $plugin_array ) {
|
1122 |
-
|
1123 |
-
$plugin_array['sdm_downloads'] = WP_SIMPLE_DL_MONITOR_URL. '/tinymce/sdm_editor_plugin.js';
|
1124 |
-
return $plugin_array;
|
1125 |
-
}
|
1126 |
-
function sdm_downloads_register_button( $buttons ) {
|
1127 |
-
|
1128 |
-
//array_push( $buttons, 'sdm_downloads' );
|
1129 |
-
$buttons[] = 'sdm_downloads';
|
1130 |
-
return $buttons;
|
1131 |
-
}
|
1132 |
-
}
|
1133 |
|
|
|
1134 |
|
1135 |
-
|
1136 |
-
|
1137 |
-
$output = NULL;
|
1138 |
-
if (filter_var($ip, FILTER_VALIDATE_IP) === FALSE) {
|
1139 |
-
$ip = $_SERVER["REMOTE_ADDR"];
|
1140 |
-
if ($deep_detect) {
|
1141 |
-
if (filter_var(@$_SERVER['HTTP_X_FORWARDED_FOR'], FILTER_VALIDATE_IP))
|
1142 |
-
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
|
1143 |
-
if (filter_var(@$_SERVER['HTTP_CLIENT_IP'], FILTER_VALIDATE_IP))
|
1144 |
-
$ip = $_SERVER['HTTP_CLIENT_IP'];
|
1145 |
-
}
|
1146 |
}
|
1147 |
-
|
1148 |
-
|
1149 |
-
|
1150 |
-
|
1151 |
-
|
1152 |
-
"AS" => "Asia",
|
1153 |
-
"EU" => "Europe",
|
1154 |
-
"OC" => "Australia (Oceania)",
|
1155 |
-
"NA" => "North America",
|
1156 |
-
"SA" => "South America"
|
1157 |
-
);
|
1158 |
-
if (filter_var($ip, FILTER_VALIDATE_IP) && in_array($purpose, $support)) {
|
1159 |
-
$ipdat = @json_decode(file_get_contents("http://www.geoplugin.net/json.gp?ip=" . $ip));
|
1160 |
-
if (@strlen(trim($ipdat->geoplugin_countryCode)) == 2) {
|
1161 |
-
switch ($purpose) {
|
1162 |
-
case "location":
|
1163 |
-
$output = array(
|
1164 |
-
"city" => @$ipdat->geoplugin_city,
|
1165 |
-
"state" => @$ipdat->geoplugin_regionName,
|
1166 |
-
"country" => @$ipdat->geoplugin_countryName,
|
1167 |
-
"country_code" => @$ipdat->geoplugin_countryCode,
|
1168 |
-
"continent" => @$continents[strtoupper($ipdat->geoplugin_continentCode)],
|
1169 |
-
"continent_code" => @$ipdat->geoplugin_continentCode
|
1170 |
-
);
|
1171 |
-
break;
|
1172 |
-
case "address":
|
1173 |
-
$address = array($ipdat->geoplugin_countryName);
|
1174 |
-
if (@strlen($ipdat->geoplugin_regionName) >= 1)
|
1175 |
-
$address[] = $ipdat->geoplugin_regionName;
|
1176 |
-
if (@strlen($ipdat->geoplugin_city) >= 1)
|
1177 |
-
$address[] = $ipdat->geoplugin_city;
|
1178 |
-
$output = implode(", ", array_reverse($address));
|
1179 |
-
break;
|
1180 |
-
case "city":
|
1181 |
-
$output = @$ipdat->geoplugin_city;
|
1182 |
-
break;
|
1183 |
-
case "state":
|
1184 |
-
$output = @$ipdat->geoplugin_regionName;
|
1185 |
-
break;
|
1186 |
-
case "region":
|
1187 |
-
$output = @$ipdat->geoplugin_regionName;
|
1188 |
-
break;
|
1189 |
-
case "country":
|
1190 |
-
$output = @$ipdat->geoplugin_countryName;
|
1191 |
-
break;
|
1192 |
-
case "countrycode":
|
1193 |
-
$output = @$ipdat->geoplugin_countryCode;
|
1194 |
-
break;
|
1195 |
-
}
|
1196 |
-
}
|
1197 |
}
|
1198 |
-
|
1199 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: Simple Download Monitor
|
4 |
+
* Plugin URI: https://www.tipsandtricks-hq.com/simple-wordpress-download-monitor-plugin
|
5 |
* Description: Easily manage downloadable files and monitor downloads of your digital files from your WordPress site.
|
6 |
+
* Version: 3.2.3
|
7 |
* Author: Tips and Tricks HQ, Ruhul Amin, Josh Lobe
|
8 |
+
* Author URI: https://www.tipsandtricks-hq.com/development-center
|
9 |
* License: GPL2
|
10 |
*/
|
11 |
+
|
12 |
+
if (!defined('ABSPATH')) {
|
13 |
+
exit;
|
14 |
+
}
|
15 |
+
|
16 |
+
define('WP_SIMPLE_DL_MONITOR_VERSION', '3.2.3');
|
17 |
define('WP_SIMPLE_DL_MONITOR_DIR_NAME', dirname(plugin_basename(__FILE__)));
|
18 |
+
define('WP_SIMPLE_DL_MONITOR_URL', plugins_url('', __FILE__));
|
19 |
+
define('WP_SIMPLE_DL_MONITOR_PATH', plugin_dir_path(__FILE__));
|
20 |
+
define('WP_SIMPLE_DL_MONITOR_SITE_HOME_URL', home_url());
|
21 |
|
22 |
global $sdm_db_version;
|
23 |
+
$sdm_db_version = '1.2';
|
24 |
|
25 |
//File includes
|
26 |
+
include_once('includes/sdm-utility-functions.php');
|
27 |
+
include_once('includes/sdm-logs-list-table.php');
|
28 |
+
include_once('includes/sdm-latest-downloads.php');
|
29 |
+
include_once('sdm-post-type-and-taxonomy.php');
|
30 |
include_once('sdm-shortcodes.php');
|
31 |
include_once('sdm-post-type-content-handler.php');
|
32 |
|
37 |
|
38 |
global $wpdb;
|
39 |
global $sdm_db_version;
|
|
|
40 |
$table_name = $wpdb->prefix . 'sdm_downloads';
|
41 |
|
42 |
$sql = 'CREATE TABLE ' . $table_name . ' (
|
47 |
visitor_ip mediumtext NOT NULL,
|
48 |
date_time datetime DEFAULT "0000-00-00 00:00:00" NOT NULL,
|
49 |
visitor_country mediumtext NOT NULL,
|
50 |
+
visitor_name mediumtext NOT NULL,
|
51 |
UNIQUE KEY id (id)
|
52 |
);';
|
53 |
|
55 |
dbDelta($sql);
|
56 |
|
57 |
update_option('sdm_db_version', $sdm_db_version);
|
58 |
+
|
59 |
+
//Register the post type so you can flush the rewrite rules
|
60 |
+
sdm_register_post_type();
|
61 |
+
|
62 |
+
// Flush rules after install/activation
|
63 |
+
flush_rewrite_rules();
|
|
|
|
|
|
|
|
|
|
|
64 |
}
|
65 |
|
66 |
/*
|
67 |
* * Handle Plugins loaded tasks
|
68 |
*/
|
69 |
add_action('plugins_loaded', 'sdm_plugins_loaded_tasks');
|
|
|
70 |
function sdm_plugins_loaded_tasks() {
|
71 |
//Load language
|
72 |
load_plugin_textdomain('sdm_lang', false, dirname(plugin_basename(__FILE__)) . '/langs/');
|
73 |
|
74 |
//Handle db upgrade stuff
|
75 |
sdm_db_update_check();
|
76 |
+
}
|
77 |
+
/*
|
78 |
+
* * Handle Generic Init tasks
|
79 |
+
*/
|
80 |
+
add_action('init', 'sdm_init_time_tasks');
|
81 |
+
function sdm_init_time_tasks()
|
82 |
+
{
|
83 |
//Handle download request if any
|
84 |
handle_sdm_download_via_direct_post();
|
85 |
}
|
86 |
|
87 |
+
|
88 |
+
function sdm_db_update_check() {
|
89 |
+
if (is_admin()) {//Check if DB needs to be upgraded
|
90 |
+
global $sdm_db_version;
|
91 |
+
$inst_db_version = get_option('sdm_db_version');
|
92 |
+
if ($inst_db_version != $sdm_db_version) {
|
93 |
+
sdm_install_db_table();
|
94 |
+
}
|
95 |
+
}
|
96 |
+
}
|
97 |
+
|
98 |
+
/*
|
99 |
+
* * Add a 'Settings' link to plugins list page
|
100 |
+
*/
|
101 |
+
add_filter('plugin_action_links', 'sdm_settings_link', 10, 2);
|
102 |
function sdm_settings_link($links, $file) {
|
103 |
+
static $this_plugin;
|
104 |
+
if (!$this_plugin)
|
105 |
+
$this_plugin = plugin_basename(__FILE__);
|
106 |
+
if ($file == $this_plugin) {
|
107 |
+
$settings_link = '<a href="edit.php?post_type=sdm_downloads&page=settings" title="SDM Settings Page">' . __("Settings", 'sdm_lang') . '</a>';
|
108 |
+
array_unshift($links, $settings_link);
|
109 |
+
}
|
110 |
+
return $links;
|
111 |
}
|
112 |
+
|
113 |
// Houston... we have lift-off!!
|
114 |
class simpleDownloadManager {
|
115 |
+
|
116 |
+
public function __construct() {
|
117 |
+
|
118 |
+
add_action('init', 'sdm_register_post_type'); // Create 'sdm_downloads' custom post type
|
119 |
+
add_action('init', 'sdm_create_taxonomies'); // Register 'tags' and 'categories' taxonomies
|
120 |
+
add_action('init', 'sdm_register_shortcodes'); //Register the shortcodes
|
121 |
+
add_action('wp_enqueue_scripts', array(&$this, 'sdm_frontend_scripts')); // Register frontend scripts
|
122 |
+
|
123 |
+
if (is_admin()) {
|
124 |
+
add_action('admin_menu', array(&$this, 'sdm_create_menu_pages')); // Create admin pages
|
125 |
+
add_action('add_meta_boxes', array(&$this, 'sdm_create_upload_metabox')); // Create metaboxes
|
126 |
+
|
127 |
+
add_action('save_post', array(&$this, 'sdm_save_description_meta_data')); // Save 'description' metabox
|
128 |
+
add_action('save_post', array(&$this, 'sdm_save_upload_meta_data')); // Save 'upload file' metabox
|
129 |
+
add_action('save_post', array(&$this, 'sdm_save_thumbnail_meta_data')); // Save 'thumbnail' metabox
|
130 |
+
add_action('save_post', array(&$this, 'sdm_save_statistics_meta_data')); // Save 'thumbnail' metabox
|
131 |
+
|
132 |
+
add_action('admin_enqueue_scripts', array(&$this, 'sdm_admin_scripts')); // Register admin scripts
|
133 |
+
add_action('admin_print_styles', array(&$this, 'sdm_admin_styles')); // Register admin styles
|
134 |
+
|
135 |
+
add_action('admin_init', array(&$this, 'sdm_register_options')); // Register admin options
|
136 |
+
|
137 |
+
//add_filter('post_row_actions', array(&$this, 'sdm_remove_view_link_cpt'), 10, 2); // Remove 'View' link in all downloads list view
|
138 |
+
}
|
139 |
+
}
|
140 |
+
|
141 |
+
public function sdm_admin_scripts() {
|
142 |
+
|
143 |
+
global $current_screen, $post;
|
144 |
+
|
145 |
+
if (is_admin() && $current_screen->post_type == 'sdm_downloads' && $current_screen->base == 'post') {
|
146 |
+
|
147 |
+
// These scripts are needed for the media upload thickbox
|
148 |
+
wp_enqueue_script('media-upload');
|
149 |
+
wp_enqueue_script('thickbox');
|
150 |
+
wp_register_script('sdm-upload', WP_SIMPLE_DL_MONITOR_URL . '/js/sdm_admin_scripts.js', array('jquery', 'media-upload', 'thickbox'));
|
151 |
+
wp_enqueue_script('sdm-upload');
|
152 |
+
|
153 |
+
// Pass postID for thumbnail deletion
|
154 |
+
?>
|
155 |
+
<script type="text/javascript">
|
156 |
+
var sdm_del_thumb_postid = '<?php echo $post->ID; ?>';
|
157 |
+
</script>
|
158 |
<?php
|
159 |
+
// Localize langauge strings used in js file
|
160 |
+
$sdmTranslations = array(
|
161 |
+
'image_removed' => __('Image Successfully Removed', 'sdm_lang'),
|
162 |
+
'ajax_error' => __('Error with AJAX', 'sdm_lang')
|
163 |
+
);
|
164 |
+
wp_localize_script('sdm-upload', 'sdm_translations', $sdmTranslations);
|
165 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
|
167 |
+
// Pass admin ajax url
|
168 |
+
?>
|
169 |
+
<script type="text/javascript">
|
170 |
+
var sdm_admin_ajax_url = {sdm_admin_ajax_url: '<?php echo admin_url('admin-ajax.php?action=ajax'); ?>'};
|
171 |
+
var sdm_plugin_url = '<?php echo plugins_url(); ?>';
|
172 |
+
var tinymce_langs = {select_download_item: '<?php _e('Please select a Download Item:', 'sdm_lang') ?>', download_title: '<?php _e('Download Title', 'sdm_lang') ?>', include_fancy: '<?php _e('Include Fancy Box', 'sdm_lang') ?>', insert_shortcode: '<?php _e('Insert SDM Shortcode', 'sdm_lang') ?>'};
|
173 |
+
</script>
|
174 |
<?php
|
175 |
+
}
|
176 |
+
|
177 |
+
public function sdm_frontend_scripts() {
|
178 |
+
|
179 |
+
// Pass language strings to frontend of WP for js usage
|
180 |
+
?>
|
181 |
+
<script type="text/javascript">
|
182 |
+
var sdm_frontend_translations = {incorrect_password: '<?php _e('Incorrect Password', 'sdm_lang') ?>'};
|
183 |
+
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
184 |
<?php
|
185 |
+
}
|
186 |
+
|
187 |
+
public function sdm_admin_styles() {
|
188 |
+
|
189 |
+
wp_enqueue_style('thickbox'); // Needed for media upload thickbox
|
190 |
+
wp_enqueue_style('sdm_admin_styles', WP_SIMPLE_DL_MONITOR_URL . '/css/sdm_admin_styles.css'); // Needed for media upload thickbox
|
191 |
+
}
|
192 |
+
|
193 |
+
public function sdm_create_menu_pages() {
|
194 |
+
include_once('includes/sdm-admin-menu-handler.php');
|
195 |
+
sdm_handle_admin_menu();
|
196 |
+
|
197 |
+
}
|
198 |
+
|
199 |
+
public function sdm_create_upload_metabox() {
|
200 |
+
|
201 |
+
//*****
|
202 |
+
//***** Create metaboxes for the custom post type
|
203 |
+
add_meta_box('sdm_description_meta_box', __('Description', 'sdm_lang'), array(&$this, 'display_sdm_description_meta_box'), 'sdm_downloads', 'normal', 'default'
|
204 |
+
);
|
205 |
+
add_meta_box('sdm_upload_meta_box', __('Upload File', 'sdm_lang'), array(&$this, 'display_sdm_upload_meta_box'), 'sdm_downloads', 'normal', 'default'
|
206 |
+
);
|
207 |
+
add_meta_box('sdm_thumbnail_meta_box', __('File Thumbnail (Optional)', 'sdm_lang'), array(&$this, 'display_sdm_thumbnail_meta_box'), 'sdm_downloads', 'normal', 'default'
|
208 |
+
);
|
209 |
+
add_meta_box('sdm_shortcode_meta_box', __('Shortcodes', 'sdm_lang'), array(&$this, 'display_sdm_shortcode_meta_box'), 'sdm_downloads', 'normal', 'default'
|
210 |
+
);
|
211 |
+
add_meta_box('sdm_stats_meta_box', __('Statistics', 'sdm_lang'), array(&$this, 'display_sdm_stats_meta_box'), 'sdm_downloads', 'normal', 'default'
|
212 |
+
);
|
213 |
+
}
|
214 |
+
|
215 |
+
public function display_sdm_description_meta_box($post) { // Description metabox
|
216 |
+
_e('Add a description for this download item.', 'sdm_lang');
|
217 |
+
echo '<br /><br />';
|
218 |
+
|
219 |
+
$old_description = get_post_meta($post->ID, 'sdm_description', true);
|
220 |
+
$sdm_description_field = array('textarea_name' => 'sdm_description');
|
221 |
+
wp_editor($old_description, "sdm_description_editor_content", $sdm_description_field);
|
222 |
+
|
223 |
+
wp_nonce_field('sdm_description_box_nonce', 'sdm_description_box_nonce_check');
|
224 |
+
}
|
225 |
+
|
226 |
+
public function display_sdm_upload_meta_box($post) { // File Upload metabox
|
227 |
+
$old_upload = get_post_meta($post->ID, 'sdm_upload', true);
|
228 |
+
$old_value = isset($old_upload) ? $old_upload : '';
|
229 |
+
_e('Click "Select File" to upload (or choose) the file.', 'sdm_lang');
|
230 |
+
?>
|
231 |
<br /><br />
|
232 |
+
<input id="upload_image_button" type="button" class="button-primary" value="<?php _e('Select File', 'sdm_lang'); ?>" />
|
233 |
<span style="margin-left:40px;"></span>
|
234 |
+
<?php _e('File URL:', 'sdm_lang') ?> <input id="sdm_upload" type="text" size="70" name="sdm_upload" value="<?php echo $old_value; ?>" placeholder="http://..." />
|
235 |
<?php
|
236 |
+
wp_nonce_field('sdm_upload_box_nonce', 'sdm_upload_box_nonce_check');
|
237 |
+
}
|
238 |
+
|
239 |
+
public function display_sdm_thumbnail_meta_box($post) { // Thumbnail upload metabox
|
240 |
+
$old_thumbnail = get_post_meta($post->ID, 'sdm_upload_thumbnail', true);
|
241 |
+
$old_value = isset($old_thumbnail) ? $old_thumbnail : '';
|
242 |
+
_e('Manually enter a valid URL, or click "Select Image" to upload (or choose) the file thumbnail image.', 'sdm_lang');
|
243 |
+
echo '<br />';
|
244 |
+
_e('This thumbnail image will be used to create a fancy file download box if you want to use it.', 'sdm_lang');
|
245 |
+
?>
|
|
|
246 |
<br /><br />
|
247 |
+
<input id="sdm_upload_thumbnail" type="text" size="70" name="sdm_upload_thumbnail" value="<?php echo $old_value; ?>" placeholder="http://..." />
|
248 |
+
<br />
|
249 |
+
<input id="upload_thumbnail_button" type="button" class="button-primary" value="<?php _e('Select Image', 'sdm_lang'); ?>" />
|
250 |
+
<input id="remove_thumbnail_button" type="button" class="button" value="<?php _e('Remove Image', 'sdm_lang'); ?>" />
|
251 |
+
<br /><br />
|
252 |
+
|
253 |
+
<span id="sdm_admin_thumb_preview">
|
254 |
+
<?php
|
255 |
+
if (!empty($old_value)) {
|
256 |
+
?><img id="sdm_thumbnail_image" src="<?php echo $old_value; ?>" style="max-width:200px;" />
|
257 |
<?php
|
258 |
+
}
|
259 |
+
?></span><?php
|
260 |
+
wp_nonce_field('sdm_thumbnail_box_nonce', 'sdm_thumbnail_box_nonce_check');
|
261 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
262 |
|
263 |
+
public function display_sdm_shortcode_meta_box($post) { // Shortcode metabox
|
264 |
+
_e('This is the shortcode which can used on posts or pages to embed a download now button for this file. You can also use the shortcode inserter to add this shortcode to a post or page.', 'sdm_lang');
|
265 |
+
echo '<br />';
|
266 |
+
echo '[sdm_download id="' . $post->ID . '" fancy="0"]';
|
267 |
+
echo '<br /><br />';
|
|
|
|
|
|
|
|
|
|
|
268 |
|
269 |
+
_e('This shortcode may be used as a download counter.', 'sdm_lang');
|
270 |
+
echo '<br />';
|
271 |
+
echo '[sdm_download_counter id="' . $post->ID . '"]';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
272 |
}
|
273 |
+
|
274 |
+
public function display_sdm_stats_meta_box($post) { // Stats metabox
|
275 |
+
$old_count = get_post_meta($post->ID, 'sdm_count_offset', true);
|
276 |
+
$value = isset($old_count) && $old_count != '' ? $old_count : '0';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
277 |
|
278 |
+
// Get checkbox for "disable download logging"
|
279 |
+
$no_logs = get_post_meta($post->ID, 'sdm_item_no_log', true);
|
280 |
+
$checked = isset($no_logs) && $no_logs === 'on' ? 'checked="checked"' : '';
|
281 |
+
|
282 |
+
_e('These are the statistics for this download item.', 'sdm_lang');
|
283 |
+
echo '<br /><br />';
|
284 |
+
|
285 |
+
global $wpdb;
|
286 |
+
$wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'sdm_downloads WHERE post_id=%s', $post->ID));
|
287 |
+
_e('Number of Downloads:', 'sdm_lang');
|
288 |
+
echo ' <strong>' . $wpdb->num_rows . '</strong>';
|
289 |
+
echo '<span style="margin-left: 20px;"></span>';
|
290 |
+
_e('Offset Count', 'sdm_lang');
|
291 |
+
echo ' <input type="text" style="width:50px;" name="sdm_count_offset" value="' . $value . '" />';
|
292 |
+
echo ' <img src="' . WP_SIMPLE_DL_MONITOR_URL . '/css/images/info.png" style="margin-left:10px;" title="Enter any positive or negative numerical value; to offset the download count shown, when using the download counter shortcode." />';
|
293 |
|
294 |
+
echo '<br /><br />';
|
295 |
+
echo '<input type="checkbox" name="sdm_item_no_log" '.$checked.' />';
|
296 |
+
echo '<span style="margin-left: 5px;"></span>';
|
297 |
+
_e('Disable download logging for this item.', 'sdm_lang');
|
298 |
+
|
299 |
+
wp_nonce_field('sdm_count_offset_nonce', 'sdm_count_offset_nonce_check');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
300 |
}
|
301 |
+
|
302 |
+
public function sdm_save_description_meta_data($post_id) { // Save Description metabox
|
303 |
+
if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE)
|
304 |
+
return;
|
305 |
+
if (!isset($_POST['sdm_description_box_nonce_check']) || !wp_verify_nonce($_POST['sdm_description_box_nonce_check'], 'sdm_description_box_nonce'))
|
306 |
+
return;
|
307 |
+
|
308 |
+
if (isset($_POST['sdm_description'])) {
|
309 |
+
update_post_meta($post_id, 'sdm_description', $_POST['sdm_description']);
|
310 |
+
}
|
|
|
|
|
311 |
}
|
312 |
+
|
313 |
+
public function sdm_save_upload_meta_data($post_id) { // Save File Upload metabox
|
314 |
+
if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE)
|
315 |
+
return;
|
316 |
+
if (!isset($_POST['sdm_upload_box_nonce_check']) || !wp_verify_nonce($_POST['sdm_upload_box_nonce_check'], 'sdm_upload_box_nonce'))
|
317 |
+
return;
|
318 |
+
|
319 |
+
if (isset($_POST['sdm_upload'])) {
|
320 |
+
update_post_meta($post_id, 'sdm_upload', $_POST['sdm_upload']);
|
321 |
+
}
|
|
|
322 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
323 |
|
324 |
+
public function sdm_save_thumbnail_meta_data($post_id) { // Save Thumbnail Upload metabox
|
325 |
+
if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE)
|
326 |
+
return;
|
327 |
+
if (!isset($_POST['sdm_thumbnail_box_nonce_check']) || !wp_verify_nonce($_POST['sdm_thumbnail_box_nonce_check'], 'sdm_thumbnail_box_nonce'))
|
328 |
+
return;
|
329 |
+
|
330 |
+
if (isset($_POST['sdm_upload_thumbnail'])) {
|
331 |
+
update_post_meta($post_id, 'sdm_upload_thumbnail', $_POST['sdm_upload_thumbnail']);
|
332 |
+
}
|
333 |
}
|
|
|
|
|
|
|
|
|
|
|
334 |
|
335 |
+
public function sdm_save_statistics_meta_data($post_id) { // Save Statistics Upload metabox
|
336 |
+
if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE)
|
337 |
+
return;
|
338 |
+
if (!isset($_POST['sdm_count_offset_nonce_check']) || !wp_verify_nonce($_POST['sdm_count_offset_nonce_check'], 'sdm_count_offset_nonce'))
|
339 |
+
return;
|
340 |
|
341 |
+
if (isset($_POST['sdm_count_offset']) && is_numeric($_POST['sdm_count_offset'])) {
|
|
|
342 |
|
343 |
+
update_post_meta($post_id, 'sdm_count_offset', $_POST['sdm_count_offset']);
|
344 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
345 |
|
346 |
+
// Checkbox for disabling download logging for this item
|
347 |
+
if(isset($_POST['sdm_item_no_log'])) {
|
348 |
+
update_post_meta($post_id, 'sdm_item_no_log', $_POST['sdm_item_no_log']);
|
349 |
+
}
|
350 |
+
else {
|
351 |
+
delete_post_meta($post_id, 'sdm_item_no_log');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
352 |
}
|
|
|
353 |
}
|
354 |
+
|
355 |
+
public function sdm_remove_view_link_cpt($action, $post) {
|
356 |
+
|
357 |
+
// Only execute on SDM CPT posts page
|
358 |
+
if ($post->post_type == 'sdm_downloads') {
|
359 |
+
unset($action['view']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
360 |
}
|
361 |
+
|
362 |
+
return $action;
|
363 |
+
}
|
364 |
+
|
365 |
+
public function sdm_register_options() {
|
366 |
+
|
367 |
+
register_setting('sdm_downloads_options', 'sdm_downloads_options');
|
368 |
+
add_settings_section('admin_options', __('Admin Options', 'sdm_lang'), array($this, 'admin_options_cb'), 'admin_options_section');
|
369 |
+
add_settings_section('sdm_colors', __('Colors', 'sdm_lang'), array($this, 'sdm_colors_cb'), 'sdm_colors_section');
|
370 |
+
|
371 |
+
add_settings_field('admin_tinymce_button', __('Remove Tinymce Button', 'sdm_lang'), array($this, 'admin_tinymce_button_cb'), 'admin_options_section', 'admin_options');
|
372 |
+
add_settings_field('admin_log_unique', __('Log Unique IP', 'sdm_lang'), array($this, 'admin_log_unique'), 'admin_options_section', 'admin_options');
|
373 |
+
add_settings_field('admin_no_logs', __('Disable Download Logs', 'sdm_lang'), array($this, 'admin_no_logs_cb'), 'admin_options_section', 'admin_options');
|
374 |
+
add_settings_field('download_button_color', __('Download Button Color', 'sdm_lang'), array($this, 'download_button_color_cb'), 'sdm_colors_section', 'sdm_colors');
|
375 |
+
}
|
376 |
+
|
377 |
+
public function admin_options_cb() {
|
378 |
+
_e('Admin options settings', 'sdm_lang');
|
379 |
+
}
|
380 |
+
|
381 |
+
public function sdm_colors_cb() {
|
382 |
+
_e('Front End colors settings', 'sdm_lang');
|
383 |
+
}
|
384 |
+
|
385 |
+
public function admin_tinymce_button_cb() {
|
386 |
+
$main_opts = get_option('sdm_downloads_options');
|
387 |
+
echo '<input name="sdm_downloads_options[admin_tinymce_button]" id="admin_tinymce_button" type="checkbox" class="sdm_opts_ajax_checkboxes" ' . checked(1, isset($main_opts['admin_tinymce_button']), false) . ' /> ';
|
388 |
+
_e('Removes the SDM Downloads button from the WP content editor.', 'sdm_lang');
|
389 |
}
|
390 |
|
391 |
+
public function admin_log_unique() {
|
392 |
+
$main_opts = get_option('sdm_downloads_options');
|
393 |
+
echo '<input name="sdm_downloads_options[admin_log_unique]" id="admin_log_unique" type="checkbox" class="sdm_opts_ajax_checkboxes" ' . checked(1, isset($main_opts['admin_log_unique']), false) . ' /> ';
|
394 |
+
_e('Only logs downloads from unique IP addresses.', 'sdm_lang');
|
395 |
+
}
|
|
|
|
|
396 |
|
397 |
+
public function admin_no_logs_cb() {
|
398 |
+
$main_opts = get_option('sdm_downloads_options');
|
399 |
+
echo '<input name="sdm_downloads_options[admin_no_logs]" id="admin_no_logs" type="checkbox" class="sdm_opts_ajax_checkboxes" ' . checked(1, isset($main_opts['admin_no_logs']), false) . ' /> ';
|
400 |
+
_e('Disables all download logs. (This global option overrides the individual download item option.)', 'sdm_lang');
|
401 |
+
}
|
402 |
+
|
403 |
+
public function download_button_color_cb() {
|
404 |
+
$main_opts = get_option('sdm_downloads_options');
|
405 |
+
$color_opt = $main_opts['download_button_color'];
|
406 |
+
$color_opts = array(__('Green', 'sdm_lang'), __('Blue', 'sdm_lang'), __('Purple', 'sdm_lang'), __('Teal', 'sdm_lang'), __('Dark Blue', 'sdm_lang'), __('Black', 'sdm_lang'), __('Grey', 'sdm_lang'), __('Pink', 'sdm_lang'), __('Orange', 'sdm_lang'), __('White', 'sdm_lang'));
|
407 |
+
echo '<select name="sdm_downloads_options[download_button_color]" id="download_button_color" class="sdm_opts_ajax_dropdowns">';
|
408 |
+
if (isset($color_opt)) {
|
409 |
+
echo '<option value="' . $color_opt . '" selected="selected">' . $color_opt . ' (' . __('current', 'sdm_lang') . ')</option>';
|
410 |
+
}
|
411 |
+
foreach ($color_opts as $color) {
|
412 |
+
echo '<option value="' . $color . '">' . $color . '</option>';
|
413 |
+
}
|
414 |
+
echo '</select> ';
|
415 |
+
_e('Adjusts the color of the "Download Now" button.', 'sdm_lang');
|
416 |
+
}
|
417 |
+
|
|
|
|
|
|
|
418 |
}
|
419 |
|
420 |
+
$simpleDownloadManager = new simpleDownloadManager();
|
421 |
+
|
422 |
+
function sdm_get_password_entry_form($id) {
|
423 |
+
$data = __('Enter Password to Download:', 'sdm_lang');
|
424 |
+
$data .= '<form method="post">';
|
425 |
+
$data .= '<input type="password" class="pass_text" value="" /> ';
|
426 |
+
$data .= '<input type="button" class="pass_sumbit" value="' . __('Submit', 'sdm_lang') . '" />';
|
427 |
+
$data .= '<input type="hidden" value="' . $id . '" />';
|
428 |
+
$data .= '</form>';
|
429 |
+
return $data;
|
430 |
}
|
431 |
|
432 |
/*
|
433 |
+
* * Register scripts for front-end posts/pages
|
434 |
+
*/
|
435 |
+
add_action('wp_enqueue_scripts', 'sdm_wp_scripts');
|
436 |
+
|
437 |
+
function sdm_wp_scripts() {
|
438 |
+
|
439 |
+
wp_enqueue_style('sdm-styles', WP_SIMPLE_DL_MONITOR_URL . '/css/sdm_wp_styles.css');
|
440 |
+
wp_register_script('sdm-scripts', WP_SIMPLE_DL_MONITOR_URL . '/js/sdm_wp_scripts.js', array('jquery'));
|
441 |
+
wp_enqueue_script('sdm-scripts');
|
442 |
+
|
443 |
+
// Localize ajax script for frontend
|
444 |
+
wp_localize_script('sdm-scripts', 'sdm_ajax_script', array('ajaxurl' => admin_url('admin-ajax.php')));
|
445 |
}
|
446 |
|
447 |
+
function handle_sdm_download_via_direct_post() {
|
448 |
+
if (isset($_REQUEST['smd_process_download']) && $_REQUEST['smd_process_download'] == '1') {
|
449 |
+
global $wpdb;
|
450 |
+
$download_id = strip_tags($_REQUEST['download_id']);
|
451 |
+
$download_title = get_the_title($download_id);
|
452 |
+
$download_link = get_post_meta($download_id, 'sdm_upload', true);
|
453 |
+
$ipaddress = $_SERVER["REMOTE_ADDR"];
|
454 |
+
$date_time = current_time('mysql');
|
455 |
+
$visitor_country = sdm_ip_info('Visitor', 'Country');
|
456 |
+
|
457 |
+
if(is_user_logged_in()) { // Get user name (if logged in)
|
458 |
+
global $current_user;
|
459 |
+
get_currentuserinfo();
|
460 |
+
$visitor_name = $current_user->user_login;
|
461 |
+
}
|
462 |
+
else {
|
463 |
+
$visitor_name = __('Not Logged In','sdm_lang');
|
464 |
+
}
|
465 |
+
|
466 |
+
// Get option for global disabling of download logging
|
467 |
+
$main_option = get_option('sdm_downloads_options');
|
468 |
+
$no_logs = isset($main_option['admin_no_logs']);
|
469 |
+
|
470 |
+
// Get optoin for logging only unique IPs
|
471 |
+
$unique_ips = isset($main_option['admin_log_unique']);
|
472 |
+
|
473 |
+
// Get post meta for individual disabling of download logging
|
474 |
+
$get_meta = get_post_meta($download_id, 'sdm_item_no_log', true);
|
475 |
+
$item_logging_checked = isset($get_meta) && $get_meta === 'on' ? 'on' : 'off';
|
476 |
+
|
477 |
+
$dl_logging_needed = true;
|
478 |
+
|
479 |
+
// Check if download logs have been disabled (globally or per download item)
|
480 |
+
if ($no_logs === true || $item_logging_checked === 'on') {
|
481 |
+
$dl_logging_needed = false;
|
482 |
+
}
|
483 |
+
|
484 |
+
// Check if we are only logging unique ips
|
485 |
+
if($unique_ips === true) {
|
486 |
+
$check_ip = $wpdb->get_results('SELECT * FROM '.$wpdb->prefix.'sdm_downloads WHERE post_id="'.$download_id.'" AND visitor_ip = "'.$ipaddress.'"');
|
487 |
+
|
488 |
+
//This IP is already logged for this download item. No need to log it again.
|
489 |
+
if($check_ip){
|
490 |
+
$dl_logging_needed = false;
|
491 |
+
}
|
492 |
+
}
|
493 |
+
|
494 |
+
if($dl_logging_needed){
|
495 |
+
// We need to log this download.
|
496 |
+
$table = $wpdb->prefix . 'sdm_downloads';
|
497 |
+
$data = array(
|
498 |
+
'post_id' => $download_id,
|
499 |
+
'post_title' => $download_title,
|
500 |
+
'file_url' => $download_link,
|
501 |
+
'visitor_ip' => $ipaddress,
|
502 |
+
'date_time' => $date_time,
|
503 |
+
'visitor_country' => $visitor_country,
|
504 |
+
'visitor_name' => $visitor_name
|
505 |
+
);
|
506 |
+
|
507 |
+
$insert_table = $wpdb->insert($table, $data);
|
508 |
+
|
509 |
+
if ($insert_table) {
|
510 |
+
//Download request was logged successfully
|
511 |
+
} else {
|
512 |
+
//Failed to log the download request
|
513 |
+
wp_die(__('Error! Failed to log the download request in the database table', 'sdm_lang'));
|
514 |
+
}
|
515 |
+
}
|
516 |
+
|
517 |
+
//Downoad the item
|
518 |
+
sdm_redirect_to_url($download_link);
|
519 |
+
exit;
|
520 |
+
}
|
521 |
}
|
522 |
|
523 |
// Tinymce Button Populate Post ID's
|
524 |
+
add_action('wp_ajax_nopriv_sdm_tiny_get_post_ids', 'sdm_tiny_get_post_ids_ajax_call');
|
525 |
+
add_action('wp_ajax_sdm_tiny_get_post_ids', 'sdm_tiny_get_post_ids_ajax_call');
|
526 |
+
|
527 |
function sdm_tiny_get_post_ids_ajax_call() {
|
528 |
+
|
529 |
+
$args = array(
|
530 |
+
'post_type' => 'sdm_downloads',
|
531 |
+
);
|
532 |
+
$loop = new WP_Query($args);
|
533 |
+
$test = '';
|
534 |
+
foreach ($loop->posts as $loop_post) {
|
535 |
+
//$test .= $loop_post->ID.'|'.$loop_post->post_title.'_';
|
536 |
+
$test[] = array('post_id' => $loop_post->ID, 'post_title' => $loop_post->post_title);
|
537 |
+
}
|
538 |
+
|
539 |
+
$response = json_encode(array('success' => true, 'test' => $test));
|
540 |
+
|
541 |
+
header('Content-Type: application/json');
|
542 |
+
echo $response;
|
543 |
+
exit;
|
544 |
}
|
545 |
+
|
546 |
// Remove Thumbnail Image
|
547 |
+
add_action('wp_ajax_nopriv_sdm_remove_thumbnail_image', 'sdm_remove_thumbnail_image_ajax_call');
|
548 |
+
add_action('wp_ajax_sdm_remove_thumbnail_image', 'sdm_remove_thumbnail_image_ajax_call');
|
549 |
+
|
550 |
function sdm_remove_thumbnail_image_ajax_call() {
|
551 |
+
|
552 |
+
$post_id = $_POST['post_id_del'];
|
553 |
+
$success = delete_post_meta($post_id, 'sdm_upload_thumbnail');
|
554 |
+
if ($success) {
|
555 |
+
$response = json_encode(array('success' => true));
|
556 |
+
}
|
557 |
+
|
558 |
+
header('Content-Type: application/json');
|
559 |
+
echo $response;
|
560 |
+
exit;
|
561 |
}
|
562 |
+
|
563 |
// Check download password
|
564 |
+
add_action('wp_ajax_nopriv_sdm_check_pass', 'sdm_check_pass_ajax_call');
|
565 |
+
add_action('wp_ajax_sdm_check_pass', 'sdm_check_pass_ajax_call');
|
566 |
+
|
567 |
function sdm_check_pass_ajax_call() {
|
568 |
+
|
569 |
+
global $wpdb;
|
570 |
+
$button_id = $_POST['button_id']; // Get button cpt id
|
571 |
+
$pass_val = $_POST['pass_val']; // Get password attempt
|
572 |
+
$success = '';
|
573 |
+
$download_link = '';
|
574 |
+
|
575 |
+
// Get post object
|
576 |
+
$post_object = get_post($button_id);
|
577 |
+
// Get post password
|
578 |
+
$post_pass = $post_object->post_password;
|
579 |
+
|
580 |
+
// Check if password is a match
|
581 |
+
if ($post_pass != $pass_val) { // Match is a failure
|
582 |
+
$success = 'no'; // Pass back to ajax
|
583 |
+
} else { // Match is a success
|
584 |
+
$success = 'yes'; // Pass back to ajax
|
585 |
+
|
586 |
+
$download_id = $button_id;
|
587 |
+
$download_title = get_the_title($download_id);
|
588 |
+
$download_link = get_post_meta($download_id, 'sdm_upload', true);
|
589 |
+
$ipaddress = $_SERVER["REMOTE_ADDR"];
|
590 |
+
$date_time = current_time('mysql');
|
591 |
+
$visitor_country = sdm_ip_info('Visitor', 'Country');
|
592 |
+
|
593 |
+
if(is_user_logged_in()) { // Get user name (if logged in)
|
594 |
+
global $current_user;
|
595 |
+
get_currentuserinfo();
|
596 |
+
$visitor_name = $current_user->user_login;
|
597 |
+
}
|
598 |
+
else {
|
599 |
+
$visitor_name = __('Not Logged In','sdm_lang');
|
600 |
+
}
|
601 |
+
|
602 |
+
// Get option for global disabling of download logging
|
603 |
+
$main_option = get_option('sdm_downloads_options');
|
604 |
+
$no_logs = isset($main_option['admin_no_logs']);
|
605 |
+
|
606 |
+
// Get optoin for logging only unique IPs
|
607 |
+
$unique_ips = isset($main_option['admin_log_unique']);
|
608 |
+
|
609 |
+
// Get post meta for individual disabling of download logging
|
610 |
+
$get_meta = get_post_meta($download_id, 'sdm_item_no_log', true);
|
611 |
+
$item_logging_checked = isset($get_meta) && $get_meta === 'on' ? 'on' : 'off';
|
612 |
+
|
613 |
+
$dl_logging_needed = true;
|
614 |
+
|
615 |
+
// Check if download logs have been disabled (globally or per download item)
|
616 |
+
if ($no_logs === true || $item_logging_checked === 'on') {
|
617 |
+
$dl_logging_needed = false;
|
618 |
+
}
|
619 |
+
|
620 |
+
// Check if we are only logging unique ips
|
621 |
+
if($unique_ips === true) {
|
622 |
+
$check_ip = $wpdb->get_results('SELECT * FROM '.$wpdb->prefix.'sdm_downloads WHERE post_id="'.$download_id.'" AND visitor_ip = "'.$ipaddress.'"');
|
623 |
+
|
624 |
+
//This IP is already logged for this download item. No need to log it again.
|
625 |
+
if($check_ip){
|
626 |
+
$dl_logging_needed = false;
|
627 |
+
}
|
628 |
+
}
|
629 |
+
|
630 |
+
if($dl_logging_needed){
|
631 |
+
$table = $wpdb->prefix . 'sdm_downloads';
|
632 |
+
$data = array(
|
633 |
+
'post_id' => $download_id,
|
634 |
+
'post_title' => $download_title,
|
635 |
+
'file_url' => $download_link,
|
636 |
+
'visitor_ip' => $ipaddress,
|
637 |
+
'date_time' => $date_time,
|
638 |
+
'visitor_country' => $visitor_country,
|
639 |
+
'visitor_name' => $visitor_name
|
640 |
+
);
|
641 |
+
$insert_table = $wpdb->insert($table, $data);
|
642 |
+
}
|
643 |
+
}
|
644 |
+
|
645 |
+
// Generate ajax response
|
646 |
+
$response = json_encode(array('success' => $success, 'url' => $download_link));
|
647 |
+
header('Content-Type: application/json');
|
648 |
+
echo $response;
|
649 |
+
exit;
|
650 |
}
|
651 |
+
|
652 |
// Populate category tree
|
653 |
+
add_action('wp_ajax_nopriv_sdm_pop_cats', 'sdm_pop_cats_ajax_call');
|
654 |
+
add_action('wp_ajax_sdm_pop_cats', 'sdm_pop_cats_ajax_call');
|
655 |
+
|
656 |
function sdm_pop_cats_ajax_call() {
|
657 |
+
|
658 |
+
$cat_slug = $_POST['cat_slug']; // Get button cpt slug
|
659 |
+
$parent_id = $_POST['parent_id']; // Get button cpt id
|
660 |
+
|
661 |
+
// Query custom posts based on taxonomy slug
|
662 |
+
$posts = get_posts(array(
|
663 |
+
'post_type' => 'sdm_downloads',
|
664 |
+
'numberposts' => -1,
|
665 |
+
'tax_query' => array(
|
666 |
+
array(
|
667 |
+
'taxonomy' => 'sdm_categories',
|
668 |
+
'field' => 'slug',
|
669 |
+
'terms' => $cat_slug,
|
670 |
+
'include_children' => 0
|
671 |
+
)
|
672 |
+
),
|
673 |
+
'orderby' => 'title',
|
674 |
+
'order' => 'ASC')
|
675 |
+
);
|
676 |
+
|
677 |
+
// Loop results
|
678 |
+
foreach ($posts as $post) {
|
679 |
+
|
680 |
+
// Create array of variables to pass to js
|
681 |
+
$final_array[] = array('id' => $post->ID, 'permalink' => get_permalink($post->ID), 'title' => $post->post_title);
|
682 |
+
}
|
683 |
+
|
684 |
+
// Generate ajax response
|
685 |
+
$response = json_encode(array('final_array' => $final_array));
|
686 |
+
header('Content-Type: application/json');
|
687 |
+
echo $response;
|
688 |
+
exit;
|
689 |
}
|
690 |
|
691 |
/*
|
692 |
+
* * Setup Sortable Columns
|
693 |
+
*/
|
694 |
+
add_filter('manage_edit-sdm_downloads_columns', 'sdm_create_columns'); // Define columns
|
695 |
+
add_filter('manage_edit-sdm_downloads_sortable_columns', 'sdm_downloads_sortable'); // Make sortable
|
696 |
+
add_action('manage_sdm_downloads_posts_custom_column', 'sdm_downloads_columns_content', 10, 2); // Populate new columns
|
697 |
+
|
698 |
+
function sdm_create_columns($cols) {
|
699 |
+
|
700 |
+
unset($cols['title']);
|
701 |
+
unset($cols['taxonomy-sdm_tags']);
|
702 |
+
unset($cols['taxonomy-sdm_categories']);
|
703 |
+
unset($cols['date']);
|
704 |
+
|
705 |
+
$cols['sdm_downloads_thumbnail'] = __('Image', 'sdm_lang');
|
706 |
+
$cols['title'] = __('Title', 'sdm_lang');
|
707 |
+
$cols['sdm_downloads_id'] = __('ID', 'sdm_lang');
|
708 |
+
$cols['sdm_downloads_file'] = __('File', 'sdm_lang');
|
709 |
+
$cols['taxonomy-sdm_categories'] = __('Categories', 'sdm_lang');
|
710 |
+
$cols['taxonomy-sdm_tags'] = __('Tags', 'sdm_lang');
|
711 |
+
$cols['sdm_downloads_count'] = __('Downloads', 'sdm_lang');
|
712 |
+
$cols['date'] = __('Date Posted', 'sdm_lang');
|
713 |
+
return $cols;
|
|
|
714 |
}
|
715 |
|
716 |
+
function sdm_downloads_sortable($cols) {
|
717 |
+
|
718 |
+
$cols['sdm_downloads_id'] = 'sdm_downloads_id';
|
719 |
+
$cols['sdm_downloads_file'] = 'sdm_downloads_file';
|
720 |
+
$cols['sdm_downloads_count'] = 'sdm_downloads_count';
|
721 |
+
$cols['taxonomy-sdm_categories'] = 'taxonomy-sdm_categories';
|
722 |
+
$cols['taxonomy-sdm_tags'] = 'taxonomy-sdm_tags';
|
723 |
+
return $cols;
|
724 |
}
|
725 |
|
726 |
+
function sdm_downloads_columns_content($column_name, $post_ID) {
|
727 |
+
|
728 |
+
if ($column_name == 'sdm_downloads_thumbnail') {
|
729 |
+
$old_thumbnail = get_post_meta($post_ID, 'sdm_upload_thumbnail', true);
|
730 |
+
//$old_value = isset($old_thumbnail) ? $old_thumbnail : '';
|
731 |
+
if ($old_thumbnail) {
|
732 |
+
echo '<p class="sdm_downloads_count"><img src="' . $old_thumbnail . '" style="width:50px;height:50px;" /></p>';
|
733 |
+
}
|
734 |
+
}
|
735 |
+
if ($column_name == 'sdm_downloads_id') {
|
736 |
+
echo '<p class="sdm_downloads_postid">' . $post_ID . '</p>';
|
737 |
+
}
|
738 |
+
if ($column_name == 'sdm_downloads_file') {
|
739 |
+
$old_file = get_post_meta($post_ID, 'sdm_upload', true);
|
740 |
+
$file = isset($old_file) ? $old_file : '--';
|
741 |
+
echo '<p class="sdm_downloads_file">' . $file . '</p>';
|
742 |
+
}
|
743 |
+
if ($column_name == 'sdm_downloads_count') {
|
744 |
+
global $wpdb;
|
745 |
+
$wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'sdm_downloads WHERE post_id=%s', $post_ID));
|
746 |
+
echo '<p class="sdm_downloads_count">' . $wpdb->num_rows . '</p>';
|
747 |
+
}
|
748 |
}
|
749 |
+
|
750 |
// Adjust admin column widths
|
751 |
add_action('admin_head', 'sdm_admin_column_width'); // Adjust column width in admin panel
|
752 |
+
|
753 |
function sdm_admin_column_width() {
|
754 |
+
|
755 |
echo '<style type="text/css">';
|
756 |
echo '.column-sdm_downloads_thumbnail { width:75px !important; overflow:hidden }';
|
757 |
echo '.column-sdm_downloads_id { width:100px !important; overflow:hidden }';
|
758 |
echo '.column-taxonomy-sdm_categories { width:200px !important; overflow:hidden }';
|
759 |
echo '.column-taxonomy-sdm_tags { width:200px !important; overflow:hidden }';
|
760 |
echo '</style>';
|
761 |
+
}
|
762 |
|
763 |
/*
|
764 |
+
* * Register Tinymce Button
|
765 |
+
*/
|
766 |
|
767 |
// First check if option is checked to disable tinymce button
|
768 |
$main_option = get_option('sdm_downloads_options');
|
769 |
$tiny_button_option = isset($main_option['admin_tinymce_button']);
|
770 |
+
if ($tiny_button_option != true) {
|
771 |
|
772 |
+
// Okay.. we're good. Add the button.
|
773 |
+
add_action('init', 'sdm_downloads_tinymce_button');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
774 |
|
775 |
+
function sdm_downloads_tinymce_button() {
|
776 |
|
777 |
+
add_filter('mce_external_plugins', 'sdm_downloads_add_button');
|
778 |
+
add_filter('mce_buttons', 'sdm_downloads_register_button');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
779 |
}
|
780 |
+
|
781 |
+
function sdm_downloads_add_button($plugin_array) {
|
782 |
+
|
783 |
+
$plugin_array['sdm_downloads'] = WP_SIMPLE_DL_MONITOR_URL . '/tinymce/sdm_editor_plugin.js';
|
784 |
+
return $plugin_array;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
785 |
}
|
786 |
+
|
787 |
+
function sdm_downloads_register_button($buttons) {
|
788 |
+
|
789 |
+
//array_push( $buttons, 'sdm_downloads' );
|
790 |
+
$buttons[] = 'sdm_downloads';
|
791 |
+
return $buttons;
|
792 |
+
}
|
793 |
+
|
794 |
+
}
|
readme.txt
CHANGED
@@ -1,43 +1,46 @@
|
|
1 |
=== Simple Download Monitor ===
|
2 |
Contributors: Tips and Tricks HQ, Ruhul Amin, josh401
|
3 |
-
Donate link:
|
4 |
-
Tags: download, downloads, count, counter, tracker, tracking, hits, logging, monitor, manager, files, media, digital, download monitor, download manager, downloadmanager, file manager, protect downloads, password, download category, file tree, ajax,
|
5 |
Requires at least: 3.0
|
6 |
-
Tested up to:
|
7 |
-
Stable tag: 3.
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
Easily manage downloadable files and monitor downloads of your digital files from your WordPress site.
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
-
I developed the Simple Download Monitor plugin because I needed a nice way to manage my digital downloads and monitor the number of downloads of my files.
|
15 |
|
16 |
This plugin is very useful for managing and tracking your digital file download counts.
|
17 |
|
18 |
-
You can password protect your downloadable files too (visitors will require a password before downloading the file when you use this option).
|
19 |
|
20 |
There is an option to show an ajax file tree browser so your visitors can browse all your files and download the ones they want.
|
21 |
|
22 |
You can configure downloadable files from your WordPress admin dashboard via an elegant user interface. Then allow your visitors to download the files and this plugin will monitor which files get downloaded how many times.
|
23 |
|
24 |
-
The plugin will log the IP addresses of the users who download your digital files.
|
25 |
|
26 |
It has a very user-friendly interface for uploading, managing, monitoring and tracking file downloads.
|
27 |
|
28 |
-
|
29 |
|
30 |
= Simple Download Monitor Features =
|
31 |
|
32 |
* Add, edit and remove downloads from an easy to use interface.
|
33 |
-
* Drag and drop file uploads.
|
34 |
-
* Assign categories and tags to your downloadable files.
|
35 |
-
*
|
36 |
-
*
|
|
|
|
|
37 |
* Download counter for each file.
|
38 |
* Ability to set a download count offset for each file.
|
39 |
* Track IP addresses of the users who downloaded your files.
|
40 |
* Track date and time of each file downloads.
|
|
|
41 |
* Option to upload a thumbnail image for each of your downloadable files.
|
42 |
* Option to use a nice looking template to show your download now buttons.
|
43 |
* Ability to search and sort your downloadable files in the admin dashboard.
|
@@ -47,17 +50,35 @@ http://www.youtube.com/watch?v=L-mXbs7kp0s
|
|
47 |
* Tinymce button in the WordPress post/page editor so you can easily add the shortcode.
|
48 |
* You can customize the "Download Now" button text of an item to anything you want.
|
49 |
* Ability to add the download now buttons to your sidebar widget.
|
50 |
-
* Create password protected download now buttons. Users will only be able to download the file if they enter the correct password
|
51 |
* Shortcode to show the download counter of a file. Use it to show off your file download count.
|
52 |
* Shortcode to show all the downloads from a particular category.
|
53 |
* Shortcode to embed a file tree browser for your downloadable files. The file browser is ajax based and it shows the files structured by categories.
|
54 |
* Ability to open the downloads in new browser window or tab. When your users click on a download button, it will open in a new window or tab.
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
|
56 |
-
View more details on the [download monitor plugin](
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
|
58 |
= Simple Download Monitor Plugin Usage =
|
59 |
|
60 |
-
Once you have installed the plugin go to "Downloads->Settings" to configure some options
|
61 |
|
62 |
**A) Configure Download Monitor basic settings**
|
63 |
|
@@ -83,15 +104,15 @@ Create a new post/page and click the "SDM Downlaods" TinyMCE button to insert a
|
|
83 |
|
84 |
Example Shortcode Usage:
|
85 |
|
86 |
-
`[
|
87 |
|
88 |
-
`[
|
89 |
|
90 |
**D) Download logs**
|
91 |
|
92 |
You can check the download stats from the "Downloads->Logs" interface. It shows the number of downloads for each files, IP address of the user who downloaded it, date and time of the download.
|
93 |
|
94 |
-
View more usage instructions on the [Download Monitor Plugin](
|
95 |
|
96 |
== Installation ==
|
97 |
|
@@ -123,12 +144,81 @@ Yes.
|
|
123 |
= Can I show an ajax file tree browser using this plugin? =
|
124 |
Yes.
|
125 |
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
== Screenshots ==
|
127 |
|
128 |
-
For screenshots please visit the [download monitor plugin page](
|
129 |
|
130 |
== Changelog ==
|
131 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
|
133 |
= 3.0 =
|
134 |
* Added an option to specify a download count offset for each download. This will allow you to set a starting download count for each item.
|
@@ -176,10 +266,6 @@ For screenshots please visit the [download monitor plugin page](http://www.tipsa
|
|
176 |
* You can download the old version with old architecture here:
|
177 |
http://wordpress.org/plugins/simple-download-monitor/developers/
|
178 |
|
179 |
-
= 0.24 and before =
|
180 |
-
* The old architecture changelog can be found inside the zip file here:
|
181 |
-
http://downloads.wordpress.org/plugin/simple-download-monitor.0.24.zip
|
182 |
-
|
183 |
== Upgrade Notice ==
|
184 |
|
185 |
Download monitor 2.0 uses a completely new architecture (it is much simpler and user friendly) for configuring and monitoring downloads. Read the usage section to understand how it works.
|
1 |
=== Simple Download Monitor ===
|
2 |
Contributors: Tips and Tricks HQ, Ruhul Amin, josh401
|
3 |
+
Donate link: https://www.tipsandtricks-hq.com
|
4 |
+
Tags: download, downloads, count, counter, tracker, tracking, hits, logging, monitor, manager, files, media, digital, download monitor, download manager, downloadmanager, file manager, protect downloads, password, download category, file tree, ajax, download template, grid, documents, ip address
|
5 |
Requires at least: 3.0
|
6 |
+
Tested up to: 4.2
|
7 |
+
Stable tag: 3.2.3
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
Easily manage downloadable files and monitor downloads of your digital files from your WordPress site.
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
+
I developed the Simple Download Monitor plugin because I needed a nice way to manage my digital downloads and monitor the number of downloads of my files and documents.
|
15 |
|
16 |
This plugin is very useful for managing and tracking your digital file download counts.
|
17 |
|
18 |
+
You can password protect your downloadable files and documents too (visitors will require a password before downloading the file when you use this option).
|
19 |
|
20 |
There is an option to show an ajax file tree browser so your visitors can browse all your files and download the ones they want.
|
21 |
|
22 |
You can configure downloadable files from your WordPress admin dashboard via an elegant user interface. Then allow your visitors to download the files and this plugin will monitor which files get downloaded how many times.
|
23 |
|
24 |
+
The plugin will log the IP addresses of the users who download your digital files and documents. It will also log the date and time of each download.
|
25 |
|
26 |
It has a very user-friendly interface for uploading, managing, monitoring and tracking file downloads.
|
27 |
|
28 |
+
https://www.youtube.com/watch?v=L-mXbs7kp0s
|
29 |
|
30 |
= Simple Download Monitor Features =
|
31 |
|
32 |
* Add, edit and remove downloads from an easy to use interface.
|
33 |
+
* Drag and drop file and document uploads.
|
34 |
+
* Assign categories and tags to your downloadable files and documents.
|
35 |
+
* Rich text editor for editing your download item description.
|
36 |
+
* Use shortcodes to display a download now button on a WordPress post or page.
|
37 |
+
* Show trackable download now buttons for your files anywhere on your site.
|
38 |
+
* Shortcode to create a direct download link for a file. Useful for hotlinking.
|
39 |
* Download counter for each file.
|
40 |
* Ability to set a download count offset for each file.
|
41 |
* Track IP addresses of the users who downloaded your files.
|
42 |
* Track date and time of each file downloads.
|
43 |
+
* Track the usernames of the users downloading the files.
|
44 |
* Option to upload a thumbnail image for each of your downloadable files.
|
45 |
* Option to use a nice looking template to show your download now buttons.
|
46 |
* Ability to search and sort your downloadable files in the admin dashboard.
|
50 |
* Tinymce button in the WordPress post/page editor so you can easily add the shortcode.
|
51 |
* You can customize the "Download Now" button text of an item to anything you want.
|
52 |
* Ability to add the download now buttons to your sidebar widget.
|
53 |
+
* Create password protected download now buttons. Users will only be able to download the file if they enter the correct password. [View the tutorial](http://www.tipsandtricks-hq.com/create-a-password-protected-download-file-6838)
|
54 |
* Shortcode to show the download counter of a file. Use it to show off your file download count.
|
55 |
* Shortcode to show all the downloads from a particular category.
|
56 |
* Shortcode to embed a file tree browser for your downloadable files. The file browser is ajax based and it shows the files structured by categories.
|
57 |
* Ability to open the downloads in new browser window or tab. When your users click on a download button, it will open in a new window or tab.
|
58 |
+
* Ability to show your downloads in a grid display. [View the tutorial](https://www.tipsandtricks-hq.com/show-file-downloads-in-a-nice-grid-display-7273)
|
59 |
+
* Export all the file download logs to a CSV file.
|
60 |
+
* Ability to reset the log entries.
|
61 |
+
* Shortcode to show a number of latest downloads to your visitors.
|
62 |
+
* Ability to disable the download monitoring (logging) for certain items (or all items).
|
63 |
+
* You can also choose to only monitor downloads from unique IP address only.
|
64 |
|
65 |
+
View more details on the [download monitor plugin](https://www.tipsandtricks-hq.com/simple-wordpress-download-monitor-plugin) page.
|
66 |
+
|
67 |
+
= Language Translations =
|
68 |
+
|
69 |
+
The following language translations are already available for the download monitor plugin:
|
70 |
+
|
71 |
+
* English
|
72 |
+
* German
|
73 |
+
* Spanish
|
74 |
+
* Italian
|
75 |
+
* Russian
|
76 |
+
* Dutch
|
77 |
+
* Portuguese (Brasil)
|
78 |
|
79 |
= Simple Download Monitor Plugin Usage =
|
80 |
|
81 |
+
Once you have installed the plugin, go to "Downloads -> Settings" interface to configure some options
|
82 |
|
83 |
**A) Configure Download Monitor basic settings**
|
84 |
|
104 |
|
105 |
Example Shortcode Usage:
|
106 |
|
107 |
+
`[sdm_download id="271" fancy="1"]` (embed a download button inside a box with other information e.g. Thumbnail, Title and Description)
|
108 |
|
109 |
+
`[sdm_download id="271" fancy="0"]` (embed a plain download button/link for a file)
|
110 |
|
111 |
**D) Download logs**
|
112 |
|
113 |
You can check the download stats from the "Downloads->Logs" interface. It shows the number of downloads for each files, IP address of the user who downloaded it, date and time of the download.
|
114 |
|
115 |
+
View more usage instructions on the [Download Monitor Plugin](https://www.tipsandtricks-hq.com/simple-wordpress-download-monitor-plugin) page.
|
116 |
|
117 |
== Installation ==
|
118 |
|
144 |
= Can I show an ajax file tree browser using this plugin? =
|
145 |
Yes.
|
146 |
|
147 |
+
= Can I show a number of latest downloads to my usrs? =
|
148 |
+
Yes.
|
149 |
+
|
150 |
+
= Can I track downloads from unique IP address only? =
|
151 |
+
Yes
|
152 |
+
|
153 |
== Screenshots ==
|
154 |
|
155 |
+
For screenshots please visit the [download monitor plugin page](https://www.tipsandtricks-hq.com/simple-wordpress-download-monitor-plugin)
|
156 |
|
157 |
== Changelog ==
|
158 |
|
159 |
+
= 3.2.3 =
|
160 |
+
- Addressed some warning/notice messages that shows when debug is enabled.
|
161 |
+
|
162 |
+
= 3.2.2 =
|
163 |
+
- Added a new shortcode to create a direct download link for the file. Useful if you want to create a custom download link.
|
164 |
+
- WordPress 4.2 compatibility.
|
165 |
+
|
166 |
+
= 3.2.1 =
|
167 |
+
- Fixed an issue with the ajax category browser shortcode.
|
168 |
+
- Improved the ajax category downloads shortcode to show an up/down arrow icon next to the category name.
|
169 |
+
|
170 |
+
= 3.2.0 =
|
171 |
+
- Added a textbox to manually type in an image thumbnail URL when editing a download item.
|
172 |
+
- Minor javascript improvements for the select and remove image option.
|
173 |
+
- Improved the image thumbnail preview in the admin side.
|
174 |
+
- Added placeholder text in the URL input fields.
|
175 |
+
|
176 |
+
= 3.1.9 =
|
177 |
+
- Fixed a compatibility issue with WooCommerce's latest release.
|
178 |
+
|
179 |
+
= 3.1.8 =
|
180 |
+
- Enabled shortcode filtering in standard text widget.
|
181 |
+
- Fixed an intermittent issue with the rewrite rules flushing.
|
182 |
+
|
183 |
+
= 3.1.7 =
|
184 |
+
- Added Portuguese language translation. Translation file submitted by Visto Marketing.
|
185 |
+
- New feature to disable the download monitoring (logging) for certain items (or all items).
|
186 |
+
- New option to only monitor downloads from unique IP address only.
|
187 |
+
|
188 |
+
= 3.1.6 =
|
189 |
+
- Improved the queries in the "Logs" interface to be more efficient.
|
190 |
+
- Added a new feature to reset/empty the download log entries. You can find it in the "Logs" menu of the plugin.
|
191 |
+
|
192 |
+
= 3.1.5 =
|
193 |
+
- Added Spanish language translation. Translation file submitted by Manuel.
|
194 |
+
- Added Russian language translation. Translation file submitted by Балашов Алекс.
|
195 |
+
- Added Dutch language translation. Translation file submitted by Paul Tuinman.
|
196 |
+
- Added a new feature to show X number of latest downloads.
|
197 |
+
|
198 |
+
= 3.1.4 =
|
199 |
+
- New feature to track the usernames of the WP Users downloading the files. You can view the username info in the "Logs" menu.
|
200 |
+
- Enabled the "View" link in the all downloads list table.
|
201 |
+
- Some refactoring work to move the admin menu handling code to a separate file.
|
202 |
+
|
203 |
+
= 3.1.3 =
|
204 |
+
- Added an option to use "orderby" and "order" parameters in the display downloads from a category shortcode to allow sorting the download items display list.
|
205 |
+
- The download item description field has been converted to a rich text editor. So you can customize the download description with rich text.
|
206 |
+
|
207 |
+
= 3.1.2 =
|
208 |
+
- Removed the link from the download item name in the template 2 display.
|
209 |
+
|
210 |
+
= 3.1.1 =
|
211 |
+
- Fixed a bug with the file download password entry field.
|
212 |
+
|
213 |
+
= 3.1 =
|
214 |
+
- Added a new fancy template to display the downloads.
|
215 |
+
- You can now show a grid display of your downloads.
|
216 |
+
- Added some error validation in the download shortcode entry.
|
217 |
+
- Refactored some code and added a couple of new filters.
|
218 |
+
- Added CSS classes around the download count shortcode output.
|
219 |
+
- Modified the styles of the simple downloads post type output.
|
220 |
+
- The fancy 1 template now shows the download count of each item.
|
221 |
+
- Updated the POT file for language translation.
|
222 |
|
223 |
= 3.0 =
|
224 |
* Added an option to specify a download count offset for each download. This will allow you to set a starting download count for each item.
|
266 |
* You can download the old version with old architecture here:
|
267 |
http://wordpress.org/plugins/simple-download-monitor/developers/
|
268 |
|
|
|
|
|
|
|
|
|
269 |
== Upgrade Notice ==
|
270 |
|
271 |
Download monitor 2.0 uses a completely new architecture (it is much simpler and user friendly) for configuring and monitoring downloads. Read the usage section to understand how it works.
|
sdm-post-type-and-taxonomy.php
ADDED
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
function sdm_register_post_type() {
|
4 |
+
|
5 |
+
//***** Create 'sdm_downloads' Custom Post Type
|
6 |
+
$labels = array(
|
7 |
+
'name' => __('Downloads', 'sdm_lang'),
|
8 |
+
'singular_name' => __('Downloads', 'sdm_lang'),
|
9 |
+
'add_new' => __('Add New', 'sdm_lang'),
|
10 |
+
'add_new_item' => __('Add New', 'sdm_lang'),
|
11 |
+
'edit_item' => __('Edit Download', 'sdm_lang'),
|
12 |
+
'new_item' => __('New Download', 'sdm_lang'),
|
13 |
+
'all_items' => __('Downloads', 'sdm_lang'),
|
14 |
+
'view_item' => __('View Download', 'sdm_lang'),
|
15 |
+
'search_items' => __('Search Downloads', 'sdm_lang'),
|
16 |
+
'not_found' => __('No Downloads found', 'sdm_lang'),
|
17 |
+
'not_found_in_trash' => __('No Downloads found in Trash', 'sdm_lang'),
|
18 |
+
'parent_item_colon' => __('Parent Download', 'sdm_lang'),
|
19 |
+
'menu_name' => __('Downloads', 'sdm_lang')
|
20 |
+
);
|
21 |
+
|
22 |
+
$sdm_permalink_base = 'sdm_downloads'; //TODO - add an option to configure in the settings maybe?
|
23 |
+
$sdm_slug = untrailingslashit($sdm_permalink_base);
|
24 |
+
$args = array(
|
25 |
+
'labels' => $labels,
|
26 |
+
'public' => true,
|
27 |
+
'publicly_queryable' => true,
|
28 |
+
'show_ui' => true,
|
29 |
+
'show_in_menu' => true,
|
30 |
+
'query_var' => true,
|
31 |
+
'rewrite' => array('slug' => $sdm_slug),
|
32 |
+
'capability_type' => 'post',
|
33 |
+
'has_archive' => true,
|
34 |
+
'hierarchical' => false,
|
35 |
+
'menu_position' => null,
|
36 |
+
'menu_icon' => 'dashicons-download',
|
37 |
+
'supports' => array('title')
|
38 |
+
);
|
39 |
+
register_post_type('sdm_downloads', $args);
|
40 |
+
}
|
41 |
+
|
42 |
+
function sdm_create_taxonomies() {
|
43 |
+
|
44 |
+
//***** Create CATEGORIES Taxonomy
|
45 |
+
$labels_tags = array(
|
46 |
+
'name' => _x('Categories', 'sdm_lang'),
|
47 |
+
'singular_name' => _x('Category', 'sdm_lang'),
|
48 |
+
'search_items' => __('Search Categories', 'sdm_lang'),
|
49 |
+
'all_items' => __('All Categories', 'sdm_lang'),
|
50 |
+
'parent_item' => __('Categories Genre', 'sdm_lang'),
|
51 |
+
'parent_item_colon' => __('Categories Genre:', 'sdm_lang'),
|
52 |
+
'edit_item' => __('Edit Category', 'sdm_lang'),
|
53 |
+
'update_item' => __('Update Category', 'sdm_lang'),
|
54 |
+
'add_new_item' => __('Add New Category', 'sdm_lang'),
|
55 |
+
'new_item_name' => __('New Category', 'sdm_lang'),
|
56 |
+
'menu_name' => __('Categories', 'sdm_lang')
|
57 |
+
);
|
58 |
+
$args_tags = array(
|
59 |
+
'hierarchical' => true,
|
60 |
+
'labels' => $labels_tags,
|
61 |
+
'show_ui' => true,
|
62 |
+
'query_var' => true,
|
63 |
+
'rewrite' => array('slug' => 'sdm_categories'),
|
64 |
+
'show_admin_column' => true
|
65 |
+
);
|
66 |
+
register_taxonomy('sdm_categories', array('sdm_downloads'), $args_tags);
|
67 |
+
|
68 |
+
//***** Create TAGS Taxonomy
|
69 |
+
$labels_tags = array(
|
70 |
+
'name' => _x('Tags', 'sdm_lang'),
|
71 |
+
'singular_name' => _x('Tag', 'sdm_lang'),
|
72 |
+
'search_items' => __('Search Tags', 'sdm_lang'),
|
73 |
+
'all_items' => __('All Tags', 'sdm_lang'),
|
74 |
+
'parent_item' => __('Tags Genre', 'sdm_lang'),
|
75 |
+
'parent_item_colon' => __('Tags Genre:', 'sdm_lang'),
|
76 |
+
'edit_item' => __('Edit Tag', 'sdm_lang'),
|
77 |
+
'update_item' => __('Update Tag', 'sdm_lang'),
|
78 |
+
'add_new_item' => __('Add New Tag', 'sdm_lang'),
|
79 |
+
'new_item_name' => __('New Tag', 'sdm_lang'),
|
80 |
+
'menu_name' => __('Tags', 'sdm_lang')
|
81 |
+
);
|
82 |
+
$args_tags = array(
|
83 |
+
'hierarchical' => false,
|
84 |
+
'labels' => $labels_tags,
|
85 |
+
'show_ui' => true,
|
86 |
+
'query_var' => true,
|
87 |
+
'rewrite' => array('slug' => 'sdm_tags'),
|
88 |
+
'show_admin_column' => true
|
89 |
+
);
|
90 |
+
register_taxonomy('sdm_tags', array('sdm_downloads'), $args_tags);
|
91 |
+
}
|
sdm-post-type-content-handler.php
CHANGED
@@ -2,13 +2,74 @@
|
|
2 |
|
3 |
add_filter('the_content', 'filter_sdm_post_type_content');
|
4 |
|
5 |
-
function filter_sdm_post_type_content($content)
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
$download_id
|
10 |
-
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
return $content;
|
13 |
}
|
14 |
|
2 |
|
3 |
add_filter('the_content', 'filter_sdm_post_type_content');
|
4 |
|
5 |
+
function filter_sdm_post_type_content($content) {
|
6 |
+
global $post;
|
7 |
+
if ($post->post_type == "sdm_downloads") {//Handle the content for sdm_downloads type post
|
8 |
+
//$download_id = $post->ID;
|
9 |
+
//$args = array('id' => $download_id, 'fancy' => '1');
|
10 |
+
//$content = sdm_create_download_shortcode($args);
|
11 |
+
|
12 |
+
$id = $post->ID;
|
13 |
+
// Check to see if the download link cpt is password protected
|
14 |
+
$get_cpt_object = get_post($id);
|
15 |
+
$cpt_is_password = !empty($get_cpt_object->post_password) ? 'yes' : 'no'; // yes = download is password protected;
|
16 |
+
// Get item thumbnail
|
17 |
+
$item_download_thumbnail = get_post_meta($id, 'sdm_upload_thumbnail', true);
|
18 |
+
$isset_download_thumbnail = isset($item_download_thumbnail) && !empty($item_download_thumbnail) ? '<img class="sdm_post_thumbnail_image" src="' . $item_download_thumbnail . '" />' : '';
|
19 |
+
|
20 |
+
// Get item title
|
21 |
+
$item_title = get_the_title($id);
|
22 |
+
$isset_item_title = isset($item_title) && !empty($item_title) ? $item_title : '';
|
23 |
+
|
24 |
+
// Get item description
|
25 |
+
$isset_item_description = sdm_get_item_description_output($id);
|
26 |
+
|
27 |
+
//$isset_item_description = apply_filters('the_content', $isset_item_description);
|
28 |
+
|
29 |
+
// See if user color option is selected
|
30 |
+
$main_opts = get_option('sdm_downloads_options');
|
31 |
+
$color_opt = $main_opts['download_button_color'];
|
32 |
+
$def_color = isset($color_opt) ? str_replace(' ', '', strtolower($color_opt)) : __('green', 'sdm_lang');
|
33 |
+
|
34 |
+
//Download counter
|
35 |
+
//$dl_counter = sdm_create_counter_shortcode(array('id'=>$id));
|
36 |
+
//*** Generate the download now button code ***
|
37 |
+
$button_text_string = __('Download Now!', 'sdm_lang');
|
38 |
+
|
39 |
+
$homepage = get_bloginfo('url');
|
40 |
+
$download_url = $homepage . '/?smd_process_download=1&download_id=' . $id;
|
41 |
+
$download_button_code = '<a href="' . $download_url . '" class="sdm_download ' . $def_color . '" title="' . $isset_item_title . '">' . $button_text_string . '</a>';
|
42 |
+
|
43 |
+
if ($cpt_is_password !== 'no') {//This is a password protected download so replace the download now button with password requirement
|
44 |
+
$download_button_code = sdm_get_password_entry_form($id);
|
45 |
+
}
|
46 |
+
|
47 |
+
$db_count = sdm_get_download_count_for_post($id);
|
48 |
+
$string = ($db_count == '1') ? __('Download', 'sdm_lang') : __('Downloads', 'sdm_lang');
|
49 |
+
$download_count_string = '<span class="sdm_post_count_number">'.$db_count . '</span><span class="sdm_post_count_string"> ' . $string.'</span>';
|
50 |
+
|
51 |
+
//TODO - make this display better with a new design
|
52 |
+
$content = '<div class="sdm_post_item">';
|
53 |
+
$content .= '<div class="sdm_post_item_top">';
|
54 |
+
|
55 |
+
$content .= '<div class="sdm_post_item_top_left">';
|
56 |
+
$content .= '<div class="sdm_post_thumbnail">' . $isset_download_thumbnail . '</div>';
|
57 |
+
$content .= '</div>';//end .sdm_post_item_top_left
|
58 |
+
|
59 |
+
$content .= '<div class="sdm_post_item_top_right">';
|
60 |
+
$content .= '<div class="sdm_post_title">' . $isset_item_title . '</div>';
|
61 |
+
$content .= '<div class="sdm_post_download_count">' . $download_count_string . '</div>';
|
62 |
+
$content .= '<div class="sdm_post_description">' . $isset_item_description . '</div>';
|
63 |
+
$content .= '<div class="sdm_post_download_section"><div class="sdm_download_link">' . $download_button_code . '</div></div>';
|
64 |
+
//$content .= '<div class="sdm_post_meta_section"></div>';//TODO - Show post meta (category and tags)
|
65 |
+
$content .= '</div>';//end .sdm_post_item_top_right
|
66 |
+
|
67 |
+
$content .= '</div>'; //end of .sdm_download_item_top
|
68 |
+
|
69 |
+
$content .= '<div style="clear:both;"></div>';
|
70 |
+
|
71 |
+
$content .= '</div>';//end .sdm_post_item
|
72 |
+
|
73 |
return $content;
|
74 |
}
|
75 |
|
sdm-shortcodes.php
CHANGED
@@ -1,278 +1,270 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
3 |
/*
|
4 |
-
|
5 |
-
*/
|
6 |
-
|
7 |
-
function sdm_register_shortcodes() {
|
8 |
-
add_shortcode('
|
9 |
-
add_shortcode('
|
10 |
-
add_shortcode('
|
11 |
-
add_shortcode('
|
12 |
-
add_shortcode('
|
13 |
-
add_shortcode('
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
}
|
15 |
|
16 |
// Create Download Shortcode
|
17 |
-
function sdm_create_download_shortcode(
|
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 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
return $data;
|
92 |
-
}
|
93 |
}
|
94 |
|
95 |
// Create Counter Shortcode
|
96 |
-
function sdm_create_counter_shortcode(
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
$db_count = $db_count + $get_offset;
|
115 |
-
}
|
116 |
-
|
117 |
-
// Set string for singular/plural results
|
118 |
-
$string = ($db_count == '1') ? __('Download','sdm_lang') : __('Downloads','sdm_lang');
|
119 |
-
|
120 |
-
// Return result
|
121 |
-
return $db_count.' '.$string;
|
122 |
}
|
123 |
|
124 |
// Create Category Shortcode
|
125 |
-
function sdm_handle_category_shortcode($args){
|
126 |
-
|
127 |
-
extract(
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
|
|
|
|
142 |
}
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
} // End foreach
|
243 |
-
|
244 |
-
// Return results
|
245 |
-
return $data;
|
246 |
-
|
247 |
-
} // End else iterate cpt's
|
248 |
-
|
249 |
-
|
250 |
-
exit;
|
251 |
}
|
252 |
|
253 |
// Create category tree shortcode
|
254 |
function sdm_download_categories_shortcode() {
|
255 |
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
|
|
278 |
}
|
1 |
<?php
|
2 |
|
3 |
+
add_filter('widget_text', 'do_shortcode'); //Enable shortcode filtering in standard text widget
|
4 |
+
|
5 |
/*
|
6 |
+
* * Register and handle Shortcode
|
7 |
+
*/
|
8 |
+
|
9 |
+
function sdm_register_shortcodes() {
|
10 |
+
add_shortcode('sdm_download', 'sdm_create_download_shortcode'); // For download shortcode (underscores)
|
11 |
+
add_shortcode('sdm-download', 'sdm_create_download_shortcode'); // For download shortcode (for backwards compatibility)
|
12 |
+
add_shortcode('sdm_download_counter', 'sdm_create_counter_shortcode'); // For counter shortcode (underscores)
|
13 |
+
add_shortcode('sdm-download-counter', 'sdm_create_counter_shortcode'); // For counter shortcode (for backwards compatibility)
|
14 |
+
add_shortcode('sdm_latest_downloads', 'sdm_show_latest_downloads'); // For showing X number of latest downloads
|
15 |
+
add_shortcode('sdm-latest-downloads', 'sdm_show_latest_downloads'); // For showing X number of latest downloads(for backwards compatibility)
|
16 |
+
|
17 |
+
add_shortcode('sdm_download_link', 'sdm_create_simple_download_link');
|
18 |
+
|
19 |
+
add_shortcode('sdm_show_dl_from_category', 'sdm_handle_category_shortcode'); //For category shortcode
|
20 |
+
add_shortcode('sdm_download_categories', 'sdm_download_categories_shortcode'); // Ajax file tree browser
|
21 |
+
|
22 |
}
|
23 |
|
24 |
// Create Download Shortcode
|
25 |
+
function sdm_create_download_shortcode($atts) {
|
26 |
+
|
27 |
+
extract(shortcode_atts(array(
|
28 |
+
'id' => 'id',
|
29 |
+
'fancy' => '0',
|
30 |
+
'button_text' => '',
|
31 |
+
'new_window' => '',
|
32 |
+
), $atts));
|
33 |
+
|
34 |
+
if (empty($id)) {
|
35 |
+
return '<p style="color: red;">' . __('Error! Please enter an ID value with this shortcode.', 'sdm_lang') . '</p>';
|
36 |
+
}
|
37 |
+
|
38 |
+
// Check to see if the download link cpt is password protected
|
39 |
+
$get_cpt_object = get_post($id);
|
40 |
+
$cpt_is_password = !empty($get_cpt_object->post_password) ? 'yes' : 'no'; // yes = download is password protected;
|
41 |
+
// Get CPT title
|
42 |
+
$item_title = get_the_title($id);
|
43 |
+
$isset_item_title = isset($item_title) && !empty($item_title) ? $item_title : '';
|
44 |
+
|
45 |
+
// See if user color option is selected
|
46 |
+
$main_opts = get_option('sdm_downloads_options');
|
47 |
+
$color_opt = $main_opts['download_button_color'];
|
48 |
+
$def_color = isset($color_opt) ? str_replace(' ', '', strtolower($color_opt)) : __('green', 'sdm_lang');
|
49 |
+
|
50 |
+
//*** Generate the download now button code ***
|
51 |
+
$window_target = '';
|
52 |
+
if (!empty($new_window)) {
|
53 |
+
$window_target = 'target="_blank"';
|
54 |
+
}
|
55 |
+
if (empty($button_text)) {//Use the default text for the button
|
56 |
+
$button_text_string = __('Download Now!', 'sdm_lang');
|
57 |
+
} else {//Use the custom text
|
58 |
+
$button_text_string = $button_text;
|
59 |
+
}
|
60 |
+
$homepage = get_bloginfo('url');
|
61 |
+
$download_url = $homepage . '/?smd_process_download=1&download_id=' . $id;
|
62 |
+
$download_button_code = '<a href="' . $download_url . '" class="sdm_download ' . $def_color . '" title="' . $isset_item_title . '" ' . $window_target . '>' . $button_text_string . '</a>';
|
63 |
+
|
64 |
+
if ($cpt_is_password !== 'no') {//This is a password protected download so replace the download now button with password requirement
|
65 |
+
$download_button_code = sdm_get_password_entry_form($id);
|
66 |
+
}
|
67 |
+
//End of download now button code generation
|
68 |
+
|
69 |
+
$output = '';
|
70 |
+
if ($fancy == '0') {
|
71 |
+
$output = '<div class="sdm_download_link">' . $download_button_code . '</div>';
|
72 |
+
} else if ($fancy == '1') {
|
73 |
+
include_once('includes/templates/fancy1/sdm-fancy-1.php');
|
74 |
+
$output .= sdm_generate_fancy1_display_output($atts);
|
75 |
+
$output .= '<div class="sdm_clear_float"></div>';
|
76 |
+
} else if ($fancy == '2') {
|
77 |
+
include_once('includes/templates/fancy2/sdm-fancy-2.php');
|
78 |
+
$output .= '<link type="text/css" rel="stylesheet" href="' . WP_SIMPLE_DL_MONITOR_URL . '/includes/templates/fancy2/sdm-fancy-2-styles.css?ver=' . WP_SIMPLE_DL_MONITOR_VERSION . '" />';
|
79 |
+
$output .= sdm_generate_fancy2_display_output($atts);
|
80 |
+
$output .= '<div class="sdm_clear_float"></div>';
|
81 |
+
} else {//Default output is the standard download now button (fancy 0)
|
82 |
+
$output = '<div class="sdm_download_link">' . $download_button_code . '</div>';
|
83 |
+
}
|
84 |
+
|
85 |
+
return apply_filters('sdm_download_shortcode_output', $output);
|
86 |
+
}
|
87 |
+
|
88 |
+
function sdm_create_simple_download_link($atts){
|
89 |
+
extract(shortcode_atts(array(
|
90 |
+
'id' => 'id',
|
91 |
+
), $atts));
|
92 |
+
|
93 |
+
if (empty($id)) {
|
94 |
+
return '<p style="color: red;">' . __('Error! Please enter an ID value with this shortcode.', 'sdm_lang') . '</p>';
|
95 |
+
}
|
96 |
+
|
97 |
+
$download_url = WP_SIMPLE_DL_MONITOR_SITE_HOME_URL . '/?smd_process_download=1&download_id=' . $id;
|
98 |
+
return $download_url;
|
|
|
|
|
99 |
}
|
100 |
|
101 |
// Create Counter Shortcode
|
102 |
+
function sdm_create_counter_shortcode($atts) {
|
103 |
+
|
104 |
+
extract(shortcode_atts(array(
|
105 |
+
'id' => ''
|
106 |
+
), $atts));
|
107 |
+
|
108 |
+
if (empty($id)) {
|
109 |
+
return '<p style="color: red;">' . __('Error! Please enter an ID value with this shortcode.', 'sdm_lang') . '</p>';
|
110 |
+
}
|
111 |
+
|
112 |
+
$db_count = sdm_get_download_count_for_post($id);
|
113 |
+
|
114 |
+
// Set string for singular/plural results
|
115 |
+
$string = ($db_count == '1') ? __('Download', 'sdm_lang') : __('Downloads', 'sdm_lang');
|
116 |
+
|
117 |
+
$output = '<div class="sdm_download_count"><span class="sdm_count_number">' . $db_count . '</span><span class="sdm_count_string"> ' . $string . '</span></div>';
|
118 |
+
// Return result
|
119 |
+
return apply_filters('sdm_download_count_output', $output, $atts);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
}
|
121 |
|
122 |
// Create Category Shortcode
|
123 |
+
function sdm_handle_category_shortcode($args) {
|
124 |
+
|
125 |
+
extract(shortcode_atts(array(
|
126 |
+
'category_slug' => '',
|
127 |
+
'category_id' => '',
|
128 |
+
'fancy' => '0',
|
129 |
+
'button_text' => '',
|
130 |
+
'new_window' => '',
|
131 |
+
'orderby' => 'post_date',
|
132 |
+
'order' => 'DESC',
|
133 |
+
), $args));
|
134 |
+
|
135 |
+
// Define vars
|
136 |
+
$field = '';
|
137 |
+
$terms = '';
|
138 |
+
|
139 |
+
// If category slug and category id are empty.. return error
|
140 |
+
if (empty($category_slug) && empty($category_id)) {
|
141 |
+
return '<p style="color: red;">' . __('Error! You must enter a category slug OR a category id with this shortcode. Refer to the documentation for usage instructions.', 'sdm_lang') . '</p>';
|
142 |
}
|
143 |
+
// Else if both category slug AND category id are defined... return error
|
144 |
+
else if (!empty($category_slug) && !empty($category_id)) {
|
145 |
+
return '<p style="color: red;">' . __('Error! Please enter a category slug OR id; not both.', 'sdm_lang') . '</p>';
|
146 |
+
}
|
147 |
+
// Else setup query arguments for category_slug
|
148 |
+
else if (!empty($category_slug) && empty($category_id)) {
|
149 |
+
|
150 |
+
$field = 'slug';
|
151 |
+
$terms = $category_slug;
|
152 |
+
}
|
153 |
+
// Else setup query arguments for category_id
|
154 |
+
else if (!empty($category_id) && empty($category_slug)) {
|
155 |
+
|
156 |
+
$field = 'term_id';
|
157 |
+
$terms = $category_id;
|
158 |
+
}
|
159 |
+
|
160 |
+
// Query cpt's based on arguments above
|
161 |
+
$get_posts = get_posts(array(
|
162 |
+
'post_type' => 'sdm_downloads',
|
163 |
+
'show_posts' => -1,
|
164 |
+
'posts_per_page' => 9999,
|
165 |
+
'tax_query' => array(
|
166 |
+
array(
|
167 |
+
'taxonomy' => 'sdm_categories',
|
168 |
+
'field' => $field,
|
169 |
+
'terms' => $terms
|
170 |
+
)
|
171 |
+
),
|
172 |
+
'orderby' => $orderby,
|
173 |
+
'order' => $order,
|
174 |
+
));
|
175 |
+
|
176 |
+
// If no cpt's are found
|
177 |
+
if (!$get_posts) {
|
178 |
+
return '<p style="color: red;">' . __('There are no download items matching this category criteria.', 'sdm_lang') . '</p>';
|
179 |
+
}
|
180 |
+
// Else iterate cpt's
|
181 |
+
else {
|
182 |
+
|
183 |
+
$output = '';
|
184 |
+
|
185 |
+
// Setup download location
|
186 |
+
$homepage = get_bloginfo('url');
|
187 |
+
|
188 |
+
// See if user color option is selected
|
189 |
+
$main_opts = get_option('sdm_downloads_options');
|
190 |
+
$color_opt = $main_opts['download_button_color'];
|
191 |
+
$def_color = isset($color_opt) ? str_replace(' ', '', strtolower($color_opt)) : __('green', 'sdm_lang');
|
192 |
+
|
193 |
+
$window_target = '';
|
194 |
+
if (!empty($new_window)) {
|
195 |
+
$window_target = 'target="_blank"';
|
196 |
+
}
|
197 |
+
|
198 |
+
if (empty($button_text)) {//Use the default text for the button
|
199 |
+
$button_text_string = __('Download Now!', 'sdm_lang');
|
200 |
+
} else {//Use the custom text
|
201 |
+
$button_text_string = $button_text;
|
202 |
+
}
|
203 |
+
|
204 |
+
// Iterate cpt's
|
205 |
+
foreach ($get_posts as $item) {
|
206 |
+
|
207 |
+
// Set download location
|
208 |
+
$id = $item->ID; // get each cpt ID
|
209 |
+
$download_url = $homepage . '/?smd_process_download=1&download_id=' . $id;
|
210 |
+
|
211 |
+
// Get each cpt title
|
212 |
+
$item_title = get_the_title($id);
|
213 |
+
$isset_item_title = isset($item_title) && !empty($item_title) ? $item_title : '';
|
214 |
+
|
215 |
+
// Get CPT thumbnail (for fancy option)
|
216 |
+
$item_download_thumbnail = get_post_meta($id, 'sdm_upload_thumbnail', true);
|
217 |
+
$isset_download_thumbnail = isset($item_download_thumbnail) && !empty($item_download_thumbnail) ? '<img class="sdm_download_thumbnail_image" src="' . $item_download_thumbnail . '" />' : '';
|
218 |
+
|
219 |
+
// Get item description (for fancy option)
|
220 |
+
$isset_item_description = sdm_get_item_description_output($id);
|
221 |
+
|
222 |
+
// Setup download button code
|
223 |
+
$download_button_code = '<a href="' . $download_url . '" class="sdm_download ' . $def_color . '" title="' . $isset_item_title . '" ' . $window_target . '>' . $button_text_string . '</a>';
|
224 |
+
|
225 |
+
// Generate download buttons
|
226 |
+
if ($fancy == '0') {
|
227 |
+
$output .= '<div class="sdm_download_link">' . $download_button_code . '</div><br />';
|
228 |
+
}
|
229 |
+
} // End foreach
|
230 |
+
//Fancy 1 and onwards handles the loop inside the template function
|
231 |
+
if ($fancy == '1') {
|
232 |
+
include_once('includes/templates/fancy1/sdm-fancy-1.php');
|
233 |
+
$output .= sdm_generate_fancy1_category_display_output($get_posts, $args);
|
234 |
+
} else if ($fancy == '2') {
|
235 |
+
include_once('includes/templates/fancy2/sdm-fancy-2.php');
|
236 |
+
$output .= sdm_generate_fancy2_category_display_output($get_posts, $args);
|
237 |
+
}
|
238 |
+
|
239 |
+
// Return results
|
240 |
+
return apply_filters('sdm_category_download_items_shortcode_output', $output, $args, $get_posts);
|
241 |
+
} // End else iterate cpt's
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
242 |
}
|
243 |
|
244 |
// Create category tree shortcode
|
245 |
function sdm_download_categories_shortcode() {
|
246 |
|
247 |
+
function custom_taxonomy_walker($taxonomy, $parent = 0) {
|
248 |
+
|
249 |
+
// Get terms (check if has parent)
|
250 |
+
$terms = get_terms($taxonomy, array('parent' => $parent, 'hide_empty' => false));
|
251 |
+
|
252 |
+
// If there are terms, start displaying
|
253 |
+
if (count($terms) > 0) {
|
254 |
+
// Displaying as a list
|
255 |
+
$out = '<ul>';
|
256 |
+
// Cycle though the terms
|
257 |
+
foreach ($terms as $term) {
|
258 |
+
// Secret sauce. Function calls itself to display child elements, if any
|
259 |
+
$out .= '<li class="sdm_cat" id="' . $term->slug . '"><span id="' . $term->term_id . '" class="sdm_cat_title" style="cursor:pointer;">' . $term->name . '</span>';
|
260 |
+
$out .= '<p class="sdm_placeholder" style="margin-bottom:0;"></p>' . custom_taxonomy_walker($taxonomy, $term->term_id);
|
261 |
+
$out .= '</li>';
|
262 |
+
}
|
263 |
+
$out .= '</ul>';
|
264 |
+
return $out;
|
265 |
+
}
|
266 |
+
return;
|
267 |
+
}
|
268 |
+
|
269 |
+
return '<div class="sdm_object_tree">' . custom_taxonomy_walker('sdm_categories') . '</div>';
|
270 |
}
|
tinymce/sdm_editor_plugin.js
CHANGED
@@ -124,9 +124,9 @@ jQuery(function(){
|
|
124 |
post_id = jQuery('#sdm_select').find(":selected").val(); // Get selected CPT item title value (item id)
|
125 |
|
126 |
if (jQuery('#sdm_fancy_cb').is(':checked')) {
|
127 |
-
shortcode = '[
|
128 |
} else {
|
129 |
-
shortcode = '[
|
130 |
}
|
131 |
|
132 |
// inserts the shortcode into the active editor
|
124 |
post_id = jQuery('#sdm_select').find(":selected").val(); // Get selected CPT item title value (item id)
|
125 |
|
126 |
if (jQuery('#sdm_fancy_cb').is(':checked')) {
|
127 |
+
shortcode = '[sdm_download id="'+post_id+'" fancy="1"]'; // Process shortcode
|
128 |
} else {
|
129 |
+
shortcode = '[sdm_download id="'+post_id+'" fancy="0"]'; // Process shortcode
|
130 |
}
|
131 |
|
132 |
// inserts the shortcode into the active editor
|