Gwolle Guestbook - Version 2.3.4

Version Description

  • 2017-10-19
  • When editing date, show new date after saving the date.
  • Add translations for Add-On to GlotPress of gwolle-gb.
Download this release

Release Info

Developer mpol
Plugin Icon 128x128 Gwolle Guestbook
Version 2.3.4
Comparing to
See all releases

Code changes from version 2.3.3 to 2.3.4

add-on/gb-add-on.php ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * These strings are not used for the main plugin, but for the Commercial Add-On at:
4
+ * http://www.mojomarketplace.com/item/gwolle-gb-add-on
5
+ */
6
+
7
+ function gwolle_gb_addon_translation_strings() {
8
+
9
+ // function gwolle_gb_addon_page_settings() {
10
+ /* translators: Commercial Add-On */
11
+ esc_html_e('Add-On Settings', 'gwolle-gb');
12
+
13
+ /* translators: Commercial Add-On: Settings page tab */
14
+ esc_html_e('Form Fields', 'gwolle-gb');
15
+ /* translators: Commercial Add-On: Settings page tab */
16
+ esc_html_e('Reading Fields', 'gwolle-gb');
17
+ /* translators: Commercial Add-On: Settings page tab */
18
+ esc_html_e('Social Media', 'gwolle-gb');
19
+ /* translators: Commercial Add-On: Settings page tab */
20
+ esc_html_e('Star Rating', 'gwolle-gb');
21
+ /* translators: Commercial Add-On: Settings page tab */
22
+ esc_html_e('Miscellanious', 'gwolle-gb');
23
+ /* translators: Commercial Add-On: Settings page tab */
24
+ esc_html_e('Strings', 'gwolle-gb');
25
+ /* translators: Commercial Add-On: Settings page tab */
26
+ esc_html_e('Ideas?', 'gwolle-gb');
27
+
28
+ // function gwolle_gb_entry_metabox_lines_admin_reply( $gb_metabox, $entry ) {
29
+ /* translators: Commercial Add-On */
30
+ esc_attr__('Add admin reply', 'gwolle-gb');
31
+
32
+ // function gwolle_gb_admin_reply_javascript() {
33
+
34
+ // function gwolle_gb_entry_metabox_lines_delete_link( $gb_metabox, $entry ) {
35
+ /* translators: Commercial Add-On */
36
+ esc_attr__('Delete entry', 'gwolle-gb');
37
+ /* translators: Commercial Add-On */
38
+ esc_html__('Delete', 'gwolle-gb');
39
+
40
+ // function gwolle_gb_entry_metabox_lines_social_media( $gb_metabox, $entry ) {
41
+ /* translators: Commercial Add-On: Post on Social Media */
42
+ esc_attr__('Post on', 'gwolle-gb');
43
+
44
+ // function gwolle_gb_addon_form_starrating( $output ) {
45
+ /* translators: Commercial Add-On */
46
+ esc_html__('Rating', 'gwolle-gb');
47
+
48
+ // function gwolle_gb_addon_deps_admin_notice() {
49
+ /* translators: Commercial Add-On */
50
+ esc_html__( 'Gwolle Guestbook: The Add-On requires Gwolle Guestbook. Go to your %sPlugins%s page to install or activate Gwolle Guestbook.', 'gwolle-gb' );
51
+ /* translators: Commercial Add-On */
52
+ esc_html__( 'Gwolle Guestbook: The Add-On requires Gwolle Guestbook version %s. You have version %s. Go to your %sPlugins%s page to update Gwolle Guestbook.', 'gwolle-gb' );
53
+
54
+ // function gwolle_gb_addon_page_settingstab_empty() {
55
+ /* translators: Commercial Add-On */
56
+ esc_attr_e('Ideas?', 'gwolle-gb');
57
+ /* translators: Commercial Add-On */
58
+ esc_attr_e('Please place them on the support forum. I will see what I can do.', 'gwolle-gb');
59
+
60
+ // function gwolle_gb_addon_page_settingstab_form() {
61
+ /* translators: Commercial Add-On */
62
+ esc_html_e('Configure the extra fields that you want.', 'gwolle-gb');
63
+ /* translators: Commercial Add-On */
64
+ esc_html_e('The slug of the field is where your data is attached to. Only change the slug if you know what you are doing.', 'gwolle-gb');
65
+ /* translators: Commercial Add-On */
66
+ esc_html_e('The name of the field is what you will see in the label and placeholder in the form.', 'gwolle-gb');
67
+ /* translators: Commercial Add-On */
68
+ esc_html_e('Top', 'gwolle-gb');
69
+ /* translators: Commercial Add-On */
70
+ esc_html_e('Slug:', 'gwolle-gb');
71
+ /* translators: Commercial Add-On */
72
+ esc_html_e('Name:', 'gwolle-gb');
73
+ /* translators: Commercial Add-On */
74
+ esc_html_e('+ Add new field.', 'gwolle-gb');
75
+
76
+ // function gwolle_gb_addon_page_settingstab_misc() {
77
+ /* translators: Settings page, option for permalink */
78
+ esc_html_e('Permalink', 'gwolle-gb');
79
+ /* translators: Commercial Add-On */
80
+ esc_html_e('Show permalink in Metabox.', 'gwolle-gb');
81
+ /* translators: Commercial Add-On */
82
+ esc_html_e('A link to the single entry will be added to the metabox.', 'gwolle-gb');
83
+ /* translators: Settings page, option for delete link */
84
+ esc_html_e('Delete link', 'gwolle-gb');
85
+ /* translators: Commercial Add-On */
86
+ esc_html_e('Show delete link in Metabox.', 'gwolle-gb');
87
+ /* translators: Commercial Add-On */
88
+ esc_html_e('A link to delete the entry will be added to the metabox. Only visible for moderators and the author.', 'gwolle-gb');
89
+
90
+ // function gwolle_gb_addon_page_settingstab_reading() {
91
+ /* translators: Commercial Add-On */
92
+ esc_html_e('Configure where you want the extra fields displayed.', 'gwolle-gb');
93
+ /* translators: Commercial Add-On */
94
+ esc_html_e('Above content.','gwolle-gb');
95
+ /* translators: Commercial Add-On */
96
+ esc_html_e('Under content.','gwolle-gb');
97
+ /* translators: Commercial Add-On */
98
+ esc_html_e('In metabox.','gwolle-gb');
99
+ /* translators: Commercial Add-On */
100
+ esc_html_e('None.','gwolle-gb');
101
+
102
+ // function gwolle_gb_addon_page_settingstab_social() {
103
+ /* translators: Commercial Add-On */
104
+ esc_html_e('Share on Social Media', 'gwolle-gb');
105
+ /* translators: Commercial Add-On */
106
+ esc_html_e('Show share icons for Social Media in the metabox. Below you can select which ones and their order.', 'gwolle-gb');
107
+ /* translators: Commercial Add-On */
108
+ esc_html_e('Sharing Services', 'gwolle-gb');
109
+ /* translators: Commercial Add-On */
110
+ esc_html_e('Select the Social Media services you want enabled for sharing.', 'gwolle-gb');
111
+
112
+ // function gwolle_gb_addon_page_settingstab_starrating() {
113
+ /* translators: Commercial Add-On */
114
+ esc_html_e('Use star rating so visitors can give a star rating for your website or post.', 'gwolle-gb');
115
+ /* translators: Commercial Add-On */
116
+ esc_html_e('Show Average', 'gwolle-gb');
117
+ /* translators: Commercial Add-On */
118
+ esc_html_e('Show Average Star Rating', 'gwolle-gb');
119
+ /* translators: Commercial Add-On */
120
+ esc_html_e('The average will be shown above the list of entries.', 'gwolle-gb');
121
+
122
+ // function gwolle_gb_addon_page_settingstab_strings() {
123
+ /* translators: Commercial Add-On */
124
+ esc_html_e('String Replacement', 'gwolle-gb');
125
+ /* translators: Commercial Add-On */
126
+ esc_html_e('Here you can replace text strings throughout the frontend form, the list of entries, and the messages that get displayed for the form.', 'gwolle-gb');
127
+ /* translators: Commercial Add-On */
128
+ esc_html_e('Old String', 'gwolle-gb');
129
+ /* translators: Commercial Add-On */
130
+ esc_html_e('Example: Guestbook', 'gwolle-gb');
131
+ /* translators: Commercial Add-On */
132
+ esc_html_e('New String', 'gwolle-gb');
133
+ /* translators: Commercial Add-On */
134
+ esc_html_e('Example: Review', 'gwolle-gb');
135
+ /* translators: Commercial Add-On */
136
+ esc_html_e('+ Add new string.', 'gwolle-gb');
137
+
138
+ // function gwolle_gb_addon_starrating_average_html()
139
+ __( 'Average Rating: <strong>%s out of %s</strong> (%s votes)', 'gwolle-gb' );
140
+
141
+ }
admin/css/gwolle-gb-admin.css CHANGED
@@ -329,3 +329,8 @@ form.gwolle_gb_options.gwolle_gb_social img {
329
  form.gwolle_gb_options.gwolle_gb_strings td {
330
  padding-left: 0px;
331
  }
 
 
 
 
 
329
  form.gwolle_gb_options.gwolle_gb_strings td {
330
  padding-left: 0px;
331
  }
332
+
333
+ .gb-form-top-add-new,
334
+ .gb-string-add-new {
335
+ cursor: pointer;
336
+ }
admin/gb-page-add-on.php CHANGED
@@ -30,6 +30,7 @@ function gwolle_gb_addon_page_advertisement() {
30
 
31
  add_meta_box('gwolle_gb_addon_buy', esc_html__('Buy Now', 'gwolle-gb'), 'gwolle_gb_addon_buy', 'gwolle_gb_addon', 'right');
32
  add_meta_box('gwolle_gb_addon_demo', esc_html__('Demo', 'gwolle-gb'), 'gwolle_gb_addon_demo', 'gwolle_gb_addon', 'right');
 
33
 
34
  ?>
35
  <div class="wrap gwolle_gb">
@@ -106,3 +107,16 @@ function gwolle_gb_addon_demo() {
106
  </p>
107
  <?php
108
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
30
 
31
  add_meta_box('gwolle_gb_addon_buy', esc_html__('Buy Now', 'gwolle-gb'), 'gwolle_gb_addon_buy', 'gwolle_gb_addon', 'right');
32
  add_meta_box('gwolle_gb_addon_demo', esc_html__('Demo', 'gwolle-gb'), 'gwolle_gb_addon_demo', 'gwolle_gb_addon', 'right');
33
+ add_meta_box('gwolle_gb_addon_development', esc_html__('Development', 'gwolle-gb'), 'gwolle_gb_addon_development', 'gwolle_gb_addon', 'right');
34
 
35
  ?>
36
  <div class="wrap gwolle_gb">
107
  </p>
108
  <?php
109
  }
110
+
111
+
112
+ function gwolle_gb_addon_development() {
113
+ ?>
114
+ <p><?php
115
+ esc_html_e('Over the last few years I put about 1000+ hours into this Guestbook plugin in development and support.', 'gwolle-gb'); echo '<br />';
116
+ esc_html_e('It is just a hobby for me and it is not about the money. I enjoy it very much.', 'gwolle-gb'); echo '<br />';
117
+ esc_html_e('I do like to see some money in return for my work.', 'gwolle-gb'); echo '<br />'; echo '<br />';
118
+ esc_html_e('If you buy this Add-On, that will encourage me and does add motivation to keep maintaining and supporting this guestbook software. It is a good way to support me and my work.', 'gwolle-gb');
119
+ ?>
120
+ </p>
121
+ <?php
122
+ }
admin/gb-page-editor.php CHANGED
@@ -657,7 +657,7 @@ function gwolle_gb_editor_postbox_details( $entry ) {
657
  echo '<i>(' . esc_html__('Unknown', 'gwolle-gb') . ')</i>';
658
  } ?>
659
  </span><br />
660
- <?php esc_html_e('Date and time', 'gwolle-gb'); ?>: <span><?php
661
  if ( $entry->get_datetime() > 0 ) {
662
  echo date_i18n( get_option('date_format'), $entry->get_datetime() ) . ', ';
663
  echo date_i18n( get_option('time_format'), $entry->get_datetime() );
657
  echo '<i>(' . esc_html__('Unknown', 'gwolle-gb') . ')</i>';
658
  } ?>
659
  </span><br />
660
+ <?php esc_html_e('Date and time', 'gwolle-gb'); ?>: <span class="gb-datetime"><?php
661
  if ( $entry->get_datetime() > 0 ) {
662
  echo date_i18n( get_option('date_format'), $entry->get_datetime() ) . ', ';
663
  echo date_i18n( get_option('time_format'), $entry->get_datetime() );
admin/js/gwolle-gb-admin.js CHANGED
@@ -71,11 +71,27 @@ jQuery(document).ready(function($) {
71
  var timestamp = Math.round( gwolle_date.getTime() / 1000 ) + date_offset;
72
  jQuery("#gwolle_gb_timestamp").val(timestamp);
73
 
 
 
 
74
  jQuery('.gwolle_gb_edit_meta_inputs').toggle();
75
  return false;
76
  });
77
  });
78
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
 
80
  /*
81
  * Settings Page
71
  var timestamp = Math.round( gwolle_date.getTime() / 1000 ) + date_offset;
72
  jQuery("#gwolle_gb_timestamp").val(timestamp);
73
 
74
+ var readable_time = gb_timeconverter( timestamp );
75
+ jQuery( 'span.gb-datetime' ).text( readable_time );
76
+
77
  jQuery('.gwolle_gb_edit_meta_inputs').toggle();
78
  return false;
79
  });
80
  });
81
 
82
+ /* Convert Unix timestamp to readable time. */
83
+ function gb_timeconverter( timestamp ) {
84
+ var datetime = new Date( timestamp * 1000 );
85
+ var months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];
86
+ var year = datetime.getFullYear();
87
+ var month = months[datetime.getMonth()];
88
+ var date = datetime.getDate();
89
+ var hour = datetime.getHours();
90
+ var min = datetime.getMinutes();
91
+ var readable_time = date + ' ' + month + ' ' + year + ' ' + hour + ':' + min;
92
+ return readable_time;
93
+ }
94
+
95
 
96
  /*
97
  * Settings Page
admin/tabs/gb-antispamtab.php CHANGED
@@ -182,7 +182,7 @@ function gwolle_gb_page_settingstab_antispam() {
182
  _e('Stop Forum Spam is an external service that acts as a spamfilter for guestbook entries.', 'gwolle-gb') . '<br />';
183
  echo '<br />';
184
  $link_wp = '<a href="https://www.stopforumspam.com" target="_blank">';
185
- echo sprintf( esc_html__( 'If you want to know more about Stop Form Spam and how it works, please read about it on their %swebsite%s.', 'gwolle-gb' ), $link_wp, '</a>' );
186
  ?>
187
  </span>
188
  </td>
182
  _e('Stop Forum Spam is an external service that acts as a spamfilter for guestbook entries.', 'gwolle-gb') . '<br />';
183
  echo '<br />';
184
  $link_wp = '<a href="https://www.stopforumspam.com" target="_blank">';
185
+ echo sprintf( esc_html__( 'If you want to know more about Stop Forum Spam and how it works, please read about it on their %swebsite%s.', 'gwolle-gb' ), $link_wp, '</a>' );
186
  ?>
187
  </span>
188
  </td>
gwolle-gb.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Gwolle Guestbook
4
  Plugin URI: http://zenoweb.nl
5
  Description: Gwolle Guestbook is not just another guestbook for WordPress. The goal is to provide an easy and slim way to integrate a guestbook into your WordPress powered site. Don't use your 'comment' section the wrong way - install Gwolle Guestbook and have a real guestbook.
6
- Version: 2.3.3
7
  Author: Marcel Pol
8
  Author URI: http://zenoweb.nl
9
  License: GPLv2 or later
@@ -32,7 +32,7 @@ Domain Path: /lang/
32
 
33
 
34
  // Plugin Version
35
- define('GWOLLE_GB_VER', '2.3.3');
36
 
37
 
38
  /*
@@ -48,7 +48,6 @@ define('GWOLLE_GB_VER', '2.3.3');
48
  * - BBcode: have sublists work.
49
  * - On admin pages, have separate functions for $_POST. (editor, entries)
50
  * - Localize admin ajax script.
51
- * - When saving new date in editor, change date in postbox too.
52
  * - Add Filter for get_entry_count SQL, like get_entries.
53
  * - Add datetime WHERE clause in get_functions? Support filter for the function parameters inside the function?
54
  *
3
  Plugin Name: Gwolle Guestbook
4
  Plugin URI: http://zenoweb.nl
5
  Description: Gwolle Guestbook is not just another guestbook for WordPress. The goal is to provide an easy and slim way to integrate a guestbook into your WordPress powered site. Don't use your 'comment' section the wrong way - install Gwolle Guestbook and have a real guestbook.
6
+ Version: 2.3.4
7
  Author: Marcel Pol
8
  Author URI: http://zenoweb.nl
9
  License: GPLv2 or later
32
 
33
 
34
  // Plugin Version
35
+ define('GWOLLE_GB_VER', '2.3.4');
36
 
37
 
38
  /*
48
  * - BBcode: have sublists work.
49
  * - On admin pages, have separate functions for $_POST. (editor, entries)
50
  * - Localize admin ajax script.
 
51
  * - Add Filter for get_entry_count SQL, like get_entries.
52
  * - Add datetime WHERE clause in get_functions? Support filter for the function parameters inside the function?
53
  *
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: Gwolle, mpol
3
  Tags: guestbook, guest book, livre d'or, Gästebuch, libro de visitas
4
  Requires at least: 3.7
5
  Tested up to: 4.8
6
- Stable tag: 2.3.3
7
  License: GPLv2 or later
8
 
9
  Gwolle Guestbook is the WordPress guestbook you've just been looking for. Beautiful and easy.
@@ -388,6 +388,11 @@ But if you don't use standard comments, you can just as easily use the comment s
388
 
389
  == Changelog ==
390
 
 
 
 
 
 
391
  = 2.3.3 =
392
  * 2017-10-06
393
  * Use more of esc_html function in translatable strings.
3
  Tags: guestbook, guest book, livre d'or, Gästebuch, libro de visitas
4
  Requires at least: 3.7
5
  Tested up to: 4.8
6
+ Stable tag: 2.3.4
7
  License: GPLv2 or later
8
 
9
  Gwolle Guestbook is the WordPress guestbook you've just been looking for. Beautiful and easy.
388
 
389
  == Changelog ==
390
 
391
+ = 2.3.4 =
392
+ * 2017-10-19
393
+ * When editing date, show new date after saving the date.
394
+ * Add translations for Add-On to GlotPress of gwolle-gb.
395
+
396
  = 2.3.3 =
397
  * 2017-10-06
398
  * Use more of esc_html function in translatable strings.