Skip to content

Commit f8f7cee

Browse files
committed
version 1.0.9
1 parent 41069ba commit f8f7cee

13 files changed

+601
-33
lines changed

backend-php

Submodule backend-php updated 1 file

fontawesome/fonts/FontAwesome.otf

83.9 KB
Binary file not shown.
54.7 KB
Binary file not shown.

fontawesome/fonts/fontawesome-webfont.svg

Lines changed: 520 additions & 0 deletions
Loading
110 KB
Binary file not shown.
63.9 KB
Binary file not shown.

init-sub.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
1+
faversion=4.2.0
2+
13
echo initializing submodules...
24
git submodule init
35
git submodule update
4-
cd shariff
6+
# cd shariff
57
# git fetch git://github.com/yanniks/shariff.git master
68
# git cherry-pick 85abf6b3f1e80c16fb87c99c73e28240005035c3
9+
mkdir -p fontawesome
10+
cd fontawesome
11+
curl -O http://fortawesome.github.io/Font-Awesome/assets/font-awesome-$faversion.zip
12+
unzip font-awesome-$faversion.zip
13+
rm font-awesome-$faversion.zip
14+
mv font-awesome*/fonts .
15+
rm -rf font-awesome*
716
echo done!

release.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version=1.0.8
1+
version=1.0.9
22
if [ "$1" = "zip" ]; then
33
rm -rf shariff-wp
44
mkdir -p shariff-wp
@@ -7,6 +7,7 @@ if [ "$1" = "zip" ]; then
77
cp shariff/build/shariff.min.* shariff-wp/dep
88
cp -R backend-php/build/src shariff-wp/backend/src
99
cp -R backend-php/build/vendor shariff-wp/backend/vendor
10+
cp -R fontawesome/fonts shariff-wp/fafonts
1011
# remove backend/vendor/guzzlehttp/guzzle/tests/perf.php so WordPress.org doesn't complain
1112
rm -f shariff-wp/backend/vendor/guzzlehttp/guzzle/tests/perf.php
1213
zip -r shariff-wp-$version.zip shariff-wp
@@ -20,6 +21,7 @@ elif [ "$1" = "svn" ]; then
2021
cp shariff/build/shariff.min.* shariff-svn/trunk/dep
2122
cp -R backend-php/build/src shariff-svn/trunk/backend/src
2223
cp -R backend-php/build/vendor shariff-svn/trunk/backend/vendor
24+
cp -R fontawesome/fonts shariff-svn/fafonts
2325
# remove backend/vendor/guzzlehttp/guzzle/tests/perf.php so WordPress.org doesn't complain
2426
rm -f shariff-svn/trunk/backend/vendor/guzzlehttp/guzzle/tests/perf.php
2527
else

src/locale/shariff-de_DE.mo

471 Bytes
Binary file not shown.

src/locale/shariff-de_DE.po

Lines changed: 42 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,105 +1,122 @@
11
msgid ""
22
msgstr ""
33
"Project-Id-Version: shariff\n"
4-
"POT-Creation-Date: 2014-12-05 15:42+0100\n"
5-
"PO-Revision-Date: 2014-12-05 15:43+0100\n"
4+
"POT-Creation-Date: 2014-12-16 20:37+0100\n"
5+
"PO-Revision-Date: 2014-12-16 20:37+0100\n"
66
"Last-Translator: Yannik Ehlert <[email protected]>\n"
77
"Language-Team: Yannik Ehlert <[email protected]>\n"
88
"Language: de\n"
99
"MIME-Version: 1.0\n"
1010
"Content-Type: text/plain; charset=UTF-8\n"
1111
"Content-Transfer-Encoding: 8bit\n"
12-
"X-Generator: Poedit 1.7\n"
12+
"X-Generator: Poedit 1.7.1\n"
1313
"X-Poedit-Basepath: ..\n"
1414
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
1515
"X-Poedit-SourceCharset: UTF-8\n"
1616
"X-Poedit-KeywordsList: __;_e\n"
1717
"X-Poedit-SearchPath-0: .\n"
1818

19-
#: shariff-wp.php:100
19+
#: shariff-wp.php:101
2020
msgid "en"
2121
msgstr "de"
2222

23-
#: shariff-wp.php:116
23+
#: shariff-wp.php:118
2424
msgid "Shariff platforms"
2525
msgstr "Shariff-Plattformen"
2626

27-
#: shariff-wp.php:120 shariff-wp.php:121 shariff-wp.php:122
27+
#: shariff-wp.php:122 shariff-wp.php:123 shariff-wp.php:124
2828
msgid "Experimental"
2929
msgstr "Experimentell"
3030

31-
#: shariff-wp.php:125
31+
#: shariff-wp.php:127
3232
msgid "Other Shariff settings"
3333
msgstr "Andere Shariff-Einstellungen"
3434

35-
#: shariff-wp.php:126
35+
#: shariff-wp.php:128
3636
msgid "Privacy information"
3737
msgstr "Datenschutz-Informationen"
3838

39-
#: shariff-wp.php:127
39+
#: shariff-wp.php:129
4040
msgid "Default Image URL"
4141
msgstr "Standard Bild-URL"
4242

43-
#: shariff-wp.php:128
43+
#: shariff-wp.php:130
4444
msgid "Color"
4545
msgstr "Farbe"
4646

47-
#: shariff-wp.php:129
47+
#: shariff-wp.php:131
4848
msgid "Orientation"
4949
msgstr "Orientierung"
5050

51-
#: shariff-wp.php:130
51+
#: shariff-wp.php:132
5252
msgid "Button location"
5353
msgstr "Schaltflächen-Position"
5454

55-
#: shariff-wp.php:132
55+
#: shariff-wp.php:133
56+
msgid "Hide on overview page"
57+
msgstr "Auf Übersichtsseiten verstecken"
58+
59+
#: shariff-wp.php:135
5660
msgid "Temp directory"
5761
msgstr "Zwischenspeicher"
5862

59-
#: shariff-wp.php:153
63+
#: shariff-wp.php:157
6064
msgid "Before"
6165
msgstr "Vor"
6266

63-
#: shariff-wp.php:156
67+
#: shariff-wp.php:160
6468
msgid "After"
6569
msgstr "Nach"
6670

67-
#: shariff-wp.php:157
71+
#: shariff-wp.php:161
6872
msgid "Show the sharing buttons before or after the article."
6973
msgstr "Zeige die Teilen-Schaltflächen vor oder nach dem Artikel."
7074

71-
#: shariff-wp.php:181
75+
#: shariff-wp.php:188
7276
msgid "Used for services such as Pinterest"
7377
msgstr "Wird für Dienste wie Pinterest genutzt"
7478

75-
#: shariff-wp.php:196
79+
#: shariff-wp.php:203
7680
msgid "Horizontal"
7781
msgstr "Horizontal"
7882

79-
#: shariff-wp.php:199
83+
#: shariff-wp.php:206
8084
msgid "Vertical"
8185
msgstr "Vertikal"
8286

83-
#: shariff-wp.php:212
87+
#: shariff-wp.php:219
8488
msgid "Colored"
8589
msgstr "Farbig"
8690

87-
#: shariff-wp.php:215
91+
#: shariff-wp.php:222
8892
msgid "Grey"
8993
msgstr "Grau"
9094

91-
#: shariff-wp.php:218
95+
#: shariff-wp.php:225
9296
msgid "White"
9397
msgstr "Weiß"
9498

95-
#: shariff-wp.php:227
99+
#: shariff-wp.php:234
96100
msgid "Shariff configuration"
97101
msgstr "Shariff-Konfiguration"
98102

99-
#: shariff-wp.php:243
103+
#: shariff-wp.php:237
104+
msgid "You're using PHP 5.4 or greater."
105+
msgstr "Du benutzt PHP 5.4 oder aktueller."
106+
107+
#: shariff-wp.php:239
108+
msgid ""
109+
"You're using an outdated PHP version which will cause problems. Please "
110+
"update PHP to 5.4 or greater to have full support."
111+
msgstr ""
112+
"Du benutzt eine veraltete PHP Version, welche Probleme verursachen wird. "
113+
"Bitte aktualisiere PHP auf Version 5.4 oder neuer, damit Sheriff "
114+
"funktioniert."
115+
116+
#: shariff-wp.php:257
100117
msgid "Shariff settings"
101118
msgstr "Shariff-Einstellungen"
102119

103-
#: shariff-wp.php:249
120+
#: shariff-wp.php:263
104121
msgid "Deactivate Shariff?"
105122
msgstr "Shariff deaktivieren?"

src/readme.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Contributors: yanniks
33
Tags: sharing, social, networks, network, privacy, facebook, twitter, google, whatsapp, linkedin, heise, pinterest
44
Requires at least: 3.0
55
Tested up to: 4.0.1
6-
Stable tag: 1.0.8
6+
Stable tag: 1.0.9
77
License: MIT
88
License URI: http://opensource.org/licenses/MIT
99

@@ -48,6 +48,12 @@ Select which color you want, set the button location, select the orientation fit
4848
Your user probably doesn't have the right to write to the default temp folder `/tmp`. Then create a new folder and use it as temp folder in the Shariff settings, make sure that the rights are set correct.
4949
== Changelog ==
5050

51+
= 1.0.9 =
52+
* bug fixes
53+
* font awesome now part of the package
54+
* PHP version check
55+
* Option to hide Shariff on article overview pages
56+
5157
= 1.0.8 =
5258
* security fix
5359

src/shariff-wp.php

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: Shariff for Wordpress
44
* Plugin URI: http://www.heise.de/newsticker/meldung/c-t-entwickelt-datenschutzfreundliche-Social-Media-Buttons-weiter-2466687.html
55
* Description: Shariff enables website users to share their favorite content without compromising their privacy.
6-
* Version: 1.0.7
6+
* Version: 1.0.9
77
* Author: Heise Zeitschriften Verlag / Yannik Ehlert
88
* Author URI: http://www.heise.de
99
* Text Domain: shariff
@@ -96,8 +96,10 @@ function shariffsharing($content) {
9696
$image = filter_var(get_option('shariff_image',''), FILTER_SANITIZE_STRING);
9797
}
9898
}
99-
if (!((strpos($content,'hideshariff') !== false) && (strpos($content,'/hideshariff') == false)) && !(get_post_meta($post->ID, 'shariff_enabled', true))) {
100-
$content2 .= '<div class="shariff" data-backend-url="'.plugins_url( 'backend/index.php', __FILE__ ).'" data-temp="'.filter_var(get_option('shariff_temp',"/tmp"),FILTER_SANITIZE_STRING).'" data-ttl="'.filter_var(get_option('shariff_ttl',"60"),FILTER_SANITIZE_STRING).'" data-service="'.$serv.'" data-services=\''.$services.'\' data-image="'.$image.'" data-url="'.get_permalink().'" data-lang="'.__('en', 'shariff').'" data-theme="'.get_option('shariff_color',"colored").'" data-orientation="'.get_option('shariff_orientation',"horizontal").'"></div>';
99+
if(!get_option('shariff_hideonoverview',false) || is_single()) {
100+
if (!((strpos($content,'hideshariff') !== false) && (strpos($content,'/hideshariff') == false)) && !(get_post_meta($post->ID, 'shariff_enabled', true))) {
101+
$content2 .= '<div class="shariff" data-backend-url="'.plugins_url( 'backend/index.php', __FILE__ ).'" data-temp="'.filter_var(get_option('shariff_temp',"/tmp"),FILTER_SANITIZE_STRING).'" data-ttl="'.filter_var(get_option('shariff_ttl',"60"),FILTER_SANITIZE_STRING).'" data-service="'.$serv.'" data-services=\''.$services.'\' data-image="'.$image.'" data-url="'.get_permalink().'" data-lang="'.__('en', 'shariff').'" data-theme="'.get_option('shariff_color',"colored").'" data-orientation="'.get_option('shariff_orientation',"horizontal").'"></div>';
102+
}
101103
}
102104
if (get_option('shariff_beforeafter','before') != 'after') {
103105
$content2 .= $content;
@@ -128,6 +130,7 @@ function init_settings() {
128130
add_settings_field('shariff_color',__('Color',"shariff"),'setting_color_callback','shariff','shariff_other');
129131
add_settings_field('shariff_orientation',__('Orientation',"shariff"),'setting_orientation_callback','shariff','shariff_other');
130132
add_settings_field('shariff_beforeafter',__('Button location',"shariff"),'setting_before_callback','shariff','shariff_other');
133+
add_settings_field('shariff_hideonoverview',__('Hide on overview page',"shariff"),'setting_overview_callback','shariff','shariff_other');
131134
add_settings_field('shariff_ttl','TTL','setting_ttl_callback','shariff','shariff_other');
132135
add_settings_field('shariff_temp',__('Temp directory',"shariff"),'setting_temp_callback','shariff','shariff_other');
133136
register_setting('shariff','shariff_gplus');
@@ -141,6 +144,7 @@ function init_settings() {
141144
register_setting('shariff','shariff_email');
142145
register_setting('shariff','shariff_info');
143146
register_setting('shariff','shariff_color');
147+
register_setting('shariff','shariff_hideonoverview');
144148
register_setting('shariff','shariff_orientation');
145149
register_setting('shariff','shariff_beforeafter');
146150
register_setting('shariff','shariff_ttl');
@@ -177,6 +181,9 @@ function setting_linkedin_callback() {
177181
function setting_pinterest_callback() {
178182
checkbox_setting('shariff_pinterest','Pinterest',false);
179183
}
184+
function setting_overview_callback() {
185+
checkbox_setting('shariff_hideonoverview','Hide on overview',false);
186+
}
180187
function setting_imageurl() {
181188
echo '<input type="text" name="shariff_image" value="'.filter_var(get_option('shariff_image',''), FILTER_SANITIZE_STRING).'"> '.__('Used for services such as Pinterest','shariff');
182189
}
@@ -225,6 +232,13 @@ function shariff_options_page() {
225232
?>
226233
<div class="wrap">
227234
<h2><?php echo _e("Shariff configuration","shariff")?></h2>
235+
<?php
236+
if (version_compare(phpversion(), '5.4.0') >= 0) {
237+
echo '<br><font size="6" color="green">&#10004;</font> '.__("You're using PHP 5.4 or greater.","shariff").'<br>';
238+
} else {
239+
echo '<br><font size="6" color="red">&#x2717;</font> '.__("You're using an outdated PHP version which will cause problems. Please update PHP to 5.4 or greater to have full support.").'<br>';
240+
}
241+
?>
228242
<form action="options.php" method="POST">
229243
<?php settings_fields( 'shariff' ); ?>
230244
<?php do_settings_sections( 'shariff' ); ?>

0 commit comments

Comments
 (0)