Better Click To Tweet - Version 4.1.1

Version Description

  • added Russian translation
  • added sample bcttstyle.css file (for moving to the root of the /uploads folder) to assets/css
Download this release

Release Info

Developer ben.meredith@gmail.com
Plugin Icon 128x128 Better Click To Tweet
Version 4.1.1
Comparing to
See all releases

Code changes from version 4.1 to 4.1.1

assets/css/bcttstyle.css ADDED
@@ -0,0 +1,54 @@
1
+ .bctt-click-to-tweet {
2
+ display: block;
3
+ background-color: #FFF;
4
+ position: relative;
5
+ border-top: 2px solid black;
6
+ border-bottom: 2px solid black;
7
+ padding: 19px 12px 19px 18px;
8
+ margin-bottom: 1em;
9
+ }
10
+ .bctt-click-to-tweet:after {
11
+ content: ".";
12
+ display: block;
13
+ clear: both;
14
+ visibility: hidden;
15
+ line-height: 0;
16
+ height: 0;
17
+ }
18
+ .bctt-ctt-text a {
19
+ padding: 15px 6px;
20
+ margin: 15px 0;
21
+ position: relative;
22
+ color: #000 !important;
23
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
24
+ font-size: 1.5em;
25
+ line-height: 140%;
26
+ font-weight: 100;
27
+ text-decoration: none !important;
28
+ text-transform: none !important;
29
+ word-wrap:break-word;
30
+ border-bottom: none !important;
31
+ }
32
+ .bctt-ctt-text a:hover {
33
+ text-decoration: none;
34
+ color: #999 !important;
35
+ }
36
+ a.bctt-ctt-btn {
37
+ border-bottom: none !important;
38
+ margin: 0;
39
+ padding: 18px 0 0 0;
40
+ position: relative;
41
+ display: block;
42
+ text-transform: uppercase;
43
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
44
+ font-size: .7em;
45
+ font-weight: bold;
46
+ color: #999999 !important;
47
+ float: right;
48
+ text-decoration: none !important;
49
+ }
50
+ .bctt-ctt-btn:hover {
51
+ text-decoration: none;
52
+ color: #666666 !important;
53
+ padding: 16px 0 0 0;
54
+ }
assets/js/bctt_clicktotweet_plugin.js ADDED
@@ -0,0 +1,80 @@
1
+ (function() {
2
+ tinymce.create('tinymce.plugins.bctt_clicktotweet', {
3
+ init: function(ed, url) {
4
+ ed.addButton('bctt_clicktotweet', {
5
+ title: 'Add Tweetable Text',
6
+ image: url.replace("/js", "") + '/img/birdy_button.png',
7
+ onclick: function() {
8
+ var width = jQuery(window).width(), H = jQuery(window).height(), W = ( 720 < width ) ? 720 : width;
9
+ W = W - 10;
10
+ tb_show( 'Better Click To Tweet Shortcode Generator', '#TB_inline?width=' + W + '&height=auto' + '&inlineId=bctt-form' );
11
+ }
12
+ });
13
+ },
14
+ createControl: function(n, cm) {
15
+ return null;
16
+ },
17
+ getInfo: function() {
18
+ return {
19
+ longname: "Click To Tweet by BenUNC",
20
+ author: 'Ben Meredith',
21
+ authorurl: 'http://benandjacq.com/',
22
+ infourl: 'http://benandjacq.com/better-click-to-tweet',
23
+ version: "2.0"
24
+ };
25
+ }
26
+ });
27
+ tinymce.PluginManager.add('bctt_clicktotweet', tinymce.plugins.bctt_clicktotweet);
28
+
29
+
30
+ jQuery(function(){
31
+ // creates a form to be displayed everytime the button is clicked
32
+ var form = jQuery('<div id="bctt-form"><table id="bctt-table" class="form-table">\
33
+ <tr>\
34
+ <th><label for="bctt-tweet">Tweetable Quote</label></th>\
35
+ <td><p><textarea cols="70" id="bctt-tweet" name="tweet" /></p>\
36
+ <small>Enter the Tweet. Text will be automatically truncated to provide space for the link back to the post and (optional) your Twitter user name. </small></td>\
37
+ </tr>\
38
+ <tr>\
39
+ <th><label for="bctt-via">Include "via"?</label></th>\
40
+ <td><p><input type="radio" name="viamark" id="via" value="yes" checked />Yes\
41
+ <input type="radio" name="viamark" id="via" value="no" />No</br /></p>\
42
+ <small>Do you wand to add \"via @YourTwitterName\" to this tweet?</small></td>\
43
+ </tr>\
44
+ </table>\
45
+ <p class="submit">\
46
+ <input type="button" id="bctt-submit" class="button-primary" value="Insert Tweet" name="submit" />\
47
+ </p>\
48
+ </div>');
49
+
50
+ var table = form.find('table');
51
+ form.appendTo('body').hide();
52
+
53
+ // handles the click event of the submit button
54
+ form.find('#bctt-submit').click(function(){
55
+ // defines the options and their default values
56
+
57
+ var shortcode = '[bctt';
58
+
59
+ var value = table.find('#bctt-tweet').val();
60
+
61
+ if ( value != '' ) {
62
+ shortcode += ' tweet="' + value + '"';
63
+ }
64
+
65
+ var viaChoice = table.find('input[name="viamark"]:checked').val();
66
+
67
+ if ( viaChoice == "no" ) {
68
+ shortcode += ' via="no"';
69
+ }
70
+
71
+ shortcode += ']';
72
+
73
+ // inserts the shortcode into the active editor
74
+ tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
75
+
76
+ // closes Thickbox
77
+ tb_remove();
78
+ });
79
+ });
80
+ })();
better-click-to-tweet.php CHANGED
@@ -2,7 +2,7 @@
2
/*
3
Plugin Name: Better Click To Tweet
4
Description: The only Click To Tweet plugin to add translation support. The only Click To Tweet plugin to take into account your Twitter username's length in truncating long tweets, or to correctly take into account non-Roman characters. Simply put, as Click To Tweet plugins go, this one is, well, BETTER.
5
- Version: 4.1
6
Author: Ben Meredith
7
Author URI: http://benandjacq.com
8
Plugin URI: https://wordpress.org/plugins/better-click-to-tweet/
2
/*
3
Plugin Name: Better Click To Tweet
4
Description: The only Click To Tweet plugin to add translation support. The only Click To Tweet plugin to take into account your Twitter username's length in truncating long tweets, or to correctly take into account non-Roman characters. Simply put, as Click To Tweet plugins go, this one is, well, BETTER.
5
+ Version: 4.1.1
6
Author: Ben Meredith
7
Author URI: http://benandjacq.com
8
Plugin URI: https://wordpress.org/plugins/better-click-to-tweet/
languages/better-click-to-tweet-ru_RU.mo ADDED
Binary file
languages/better-click-to-tweet-ru_RU.po ADDED
@@ -0,0 +1,197 @@
1
+ # Copyright (C) 2015 Better Click To Tweet
2
+ # This file is distributed under the same license as the Better Click To Tweet package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Better Click To Tweet 4.0\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/better-click-to-"
7
+ "tweet\n"
8
+ "POT-Creation-Date: 2015-03-27 20:56:20+00:00\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "PO-Revision-Date: 2015-05-07 10:47+0300\n"
13
+ "Last-Translator: \n"
14
+ "Language-Team: \n"
15
+ "X-Generator: Poedit 1.7.6\n"
16
+ "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
17
+ "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
18
+ "Language: ru_RU\n"
19
+
20
+ #: bctt_options.php:40
21
+ msgid "You do not have sufficient permissions to access this page."
22
+ msgstr "У вас нет доступа к этой странице."
23
+
24
+ #. translators: Treat "Better Click To Tweet" as a brand name, don't translate
25
+ #. it
26
+ #: bctt_options.php:45
27
+ msgid "Better Click To Tweet — a plugin by Ben Meredith"
28
+ msgstr "Better Click To Tweet — плагин от Ben Meredith"
29
+
30
+ #: bctt_options.php:53
31
+ msgid "About the Author"
32
+ msgstr "Об авторе"
33
+
34
+ #: bctt_options.php:57
35
+ msgid ""
36
+ "This plugin is developed by <a href=\"%s\">Ben Meredith</a>. I am a "
37
+ "freelance developer specializing in <a href=\"%s\">outrunning and "
38
+ "outsmarting hackers</a>."
39
+ msgstr ""
40
+ "Этот плагин создан <a href=\"%s\">Ben Meredith</a>. Я фриланс разработчик, "
41
+ "специализирующийся на <a href=\"%s\">передовых и интеллектуальных "
42
+ "разработках</a>."
43
+
44
+ #: bctt_options.php:58
45
+ msgid "Sign up to receive my FREE web strategy guide"
46
+ msgstr "Подпишитесь на мой БЕСПЛАТНЫЙ курс по стратегии в интернете."
47
+
48
+ #: bctt_options.php:59
49
+ msgctxt "placeholder text for input field"
50
+ msgid "Your Email Address"
51
+ msgstr "Ваш Email"
52
+
53
+ #: bctt_options.php:60
54
+ msgid "No Spam. One-click unsubscribe in every message"
55
+ msgstr "Без спама. Можно отписаться в один клик из любого письма."
56
+
57
+ #: bctt_options.php:74
58
+ msgid ""
59
+ "Are you a developer? I would love your help making this plugin better. Check "
60
+ "out the <a href=%s>plugin on Github.</a>"
61
+ msgstr ""
62
+ "Вы разработчик? Я буду признателен вам за вклад в улучшение плагина. Зайдите "
63
+ "на страничку <a href=%s>плагина на Github.</a>"
64
+
65
+ #: bctt_options.php:75
66
+ msgid ""
67
+ "The best way you can support this and other plugins is to <a href=%s>donate</"
68
+ "a>"
69
+ msgstr ""
70
+ "Лучший способ, как вы можете поддержать автора этого плагина - <a href="
71
+ "%s>пожертовать</a>"
72
+
73
+ #: bctt_options.php:75
74
+ msgid "The second best way is to <a href=%s>leave an honest review.</a>"
75
+ msgstr "Другой способ - <a href=%s>оставить честный отзыв.</a>"
76
+
77
+ #: bctt_options.php:76
78
+ msgid "Did this plugin save you enough time to be worth some money?"
79
+ msgstr ""
80
+ "Сэкономил ли этот плагин вам достаточно времени, чтобы быть достойным "
81
+ "небольшой оплаты?"
82
+
83
+ #: bctt_options.php:77
84
+ msgid "Click here to buy me a Coke to say thanks."
85
+ msgstr "Нажмите здесь, чтобы отблагодарить меня кока-колой."
86
+
87
+ #: bctt_options.php:87
88
+ msgid "Instructions"
89
+ msgstr "Использование"
90
+
91
+ #. translators: Treat "Better Click To Tweet" as a brand name, don't translate
92
+ #. it
93
+ #: bctt_options.php:88
94
+ msgid ""
95
+ "To add styled click-to-tweet quote boxes include the Better Click To Tweet "
96
+ "shortcode in your post."
97
+ msgstr ""
98
+ "Чтобы добавить блок с цитатой для твита разместите шорткод Better Click To "
99
+ "Tweet в вашем посте."
100
+
101
+ #: bctt_options.php:89
102
+ msgid "Here's how you format the shortcode:"
103
+ msgstr "Формат шорткода:"
104
+
105
+ #. translators: This text shows up as a sample tweet in the instructions for
106
+ #. how to use the plugin.
107
+ #: bctt_options.php:89
108
+ msgid "Meaningful, tweetable quote."
109
+ msgstr "Значимая цитата для твита."
110
+
111
+ #. translators: Also, treat "BCTT" as a brand name, don't translate it
112
+ #: bctt_options.php:90
113
+ msgid ""
114
+ "If you are using the visual editor, click the BCTT birdie in the toolbar to "
115
+ "add a pre-formatted shortcode to your post."
116
+ msgstr ""
117
+ "Если вы используете визуальный редактор, нажмите кнопку BCTT в панели "
118
+ "инструментов, чтобы добавить готовый шорткод в свой пост."
119
+
120
+ #: bctt_options.php:91
121
+ msgid ""
122
+ "Tweet length is automatically shortened to 117 characters minus the length "
123
+ "of your twitter name, to leave room for it and a link back to the post."
124
+ msgstr ""
125
+ "Длина твита автоматически сокращается до 117 символов минус длина вашего "
126
+ "ника в Twitter. Это сделано, чтобы в твите оставить место для ника и ссылки "
127
+ "на пост."
128
+
129
+ #: bctt_options.php:96
130
+ msgid "Settings"
131
+ msgstr "Настройки"
132
+
133
+ #: bctt_options.php:97
134
+ msgid ""
135
+ "Enter your Twitter handle to add \"via @yourhandle\" to your tweets. Do not "
136
+ "include the @ symbol."
137
+ msgstr ""
138
+ "Введите ваш ник в Twitter, чтобы добавить \"с помощью @вашник\" в твиты. "
139
+ "Символ @ указывать не надо."
140
+
141
+ #: bctt_options.php:98
142
+ msgid ""
143
+ "Checking the box below will force the plugin to show the WordPress shortlink "
144
+ "in place of the full URL. While this does not impact tweet character length, "
145
+ "it is useful alongside plugins which customize the WordPress shortlink using "
146
+ "services like bit.ly or yourls.org for tracking"
147
+ msgstr ""
148
+ "Чекбокс внизу позволяет использовать короткие ссылки постов вместо полных "
149
+ "URL. Несмотря на то, что длина твита остается неизменной, это полезно при "
150
+ "использовании сторонних плагинов (например bit.ly или yourls.org), которые "
151
+ "изменяют короткие ссылки постов Wordpress в целях отслеживания переходов по "
152
+ "ним."
153
+
154
+ #: bctt_options.php:104
155
+ msgctxt "label for text input on settings screen"
156
+ msgid "Your Twitter Handle"
157
+ msgstr "Ваш ник в Twitter"
158
+
159
+ #: bctt_options.php:107
160
+ msgctxt "label for checkbox on settings screen"
161
+ msgid "Use Short URL?"
162
+ msgstr "Использовать короткие ссылки?"
163
+
164
+ #: bctt_options.php:112
165
+ msgid "Save Changes"
166
+ msgstr "Сохранить изменения"
167
+
168
+ #: bctt_options.php:114
169
+ msgid "An open source plugin by <a href=%s>Ben Meredith</a>"
170
+ msgstr "Плагин с открытым кодом от <a href=%s>Ben Meredith</a>"
171
+
172
+ #: better-click-to-tweet.php:138
173
+ msgctxt "Text for the box on the reader-facing box"
174
+ msgid "Click To Tweet"
175
+ msgstr "Твитнуть"
176
+
177
+ #: better-click-to-tweet.php:209
178
+ msgctxt "text for the link on the plugins page"
179
+ msgid "Settings"
180
+ msgstr "Настройки"
181
+
182
+ #. Plugin Name of the plugin/theme
183
+ msgid "Better Click To Tweet"
184
+ msgstr "Better Click To Tweet"
185
+
186
+ #. Description of the plugin/theme
187
+ msgid ""
188
+ "The only Click To Tweet plugin to add translation support. The only Click To "
189
+ "Tweet plugin to take into account your Twitter username's length in "
190
+ "truncating long tweets, or to correctly take into account non-Roman "
191
+ "characters. Simply put, as Click To Tweet plugins go, this one is, well, "
192
+ "BETTER."
193
+ msgstr ""
194
+ "Единственный Click To Tweet плагин с возможностью локализации. Единственный "
195
+ "Click To Tweet плагин, который учитывает длину вашего ника в Twitter при "
196
+ "сокращении длинных твитов, а также корректно работающий с кодировками "
197
+ "отличными от латинской. Проще говоря, этот плагин ЛУЧШЕ других."
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
Tags: click to tweet, twitter, tweet, twitter plugin, Twitter boxes, share, social media, post, posts, plugin, auto post, bitly, bit.ly, yourls, yourls.org, translation-ready
5
Requires at least: 3.8
6
Tested up to: 4.2
7
- Stable tag: 4.1
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
@@ -34,6 +34,7 @@ Translators:
34
* Español (es_ES): Jordi Rosalez
35
* Serbian (sr_RS): [Borisa Djuraskovic](http://www.webhostinghub.com/ "Web Hosting Hub")
36
* Finnish/Suomi (fi): [Sampsa Daavitsainen](http://www.calltoaction.fi/ "CallToAction.fi")
37
38
== Installation ==
39
@@ -107,6 +108,10 @@ I want to maximize the usefulness of this plugin by translating it into multiple
107
108
== Changelog ==
109
110
= 4.1 =
111
* the plugin now looks for a custom css stylesheet before falling back to the default style, giving designers and developers full access to the CSS, without disrupting user experience for folks just looking to plug and play.
112
* added Finnish (fi) translation courtesy of Sampsa Daavitsainen at http://calltoaction.fi
@@ -215,3 +220,5 @@ I want to maximize the usefulness of this plugin by translating it into multiple
215
216
= 2.0 =
217
* Adds internationalization, and out of the box support for Spanish (ES) language.
4
Tags: click to tweet, twitter, tweet, twitter plugin, Twitter boxes, share, social media, post, posts, plugin, auto post, bitly, bit.ly, yourls, yourls.org, translation-ready
5
Requires at least: 3.8
6
Tested up to: 4.2
7
+ Stable tag: 4.1.1
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
34
* Español (es_ES): Jordi Rosalez
35
* Serbian (sr_RS): [Borisa Djuraskovic](http://www.webhostinghub.com/ "Web Hosting Hub")
36
* Finnish/Suomi (fi): [Sampsa Daavitsainen](http://www.calltoaction.fi/ "CallToAction.fi")
37
+ * Russian (ru_RU): webbolt
38
39
== Installation ==
40
108
109
== Changelog ==
110
111
+ = 4.1.1 =
112
+ * added Russian translation
113
+ * added sample bcttstyle.css file (for moving to the root of the /uploads folder) to assets/css
114
+
115
= 4.1 =
116
* the plugin now looks for a custom css stylesheet before falling back to the default style, giving designers and developers full access to the CSS, without disrupting user experience for folks just looking to plug and play.
117
* added Finnish (fi) translation courtesy of Sampsa Daavitsainen at http://calltoaction.fi
220
221
= 2.0 =
222
* Adds internationalization, and out of the box support for Spanish (ES) language.
223
+
224
+