Added option for configuration of the share providers
authorMarcel Werk <burntime@woltlab.com>
Wed, 15 Jun 2016 15:03:24 +0000 (17:03 +0200)
committerMarcel Werk <burntime@woltlab.com>
Wed, 15 Jun 2016 15:03:49 +0000 (17:03 +0200)
CHANGELOG.md
com.woltlab.wcf/option.xml
com.woltlab.wcf/templates/shareButtons.tpl
constants.php
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index 74689c3ceb66dabf01c8fc8d9780f91f6c10d820..f617099304625d851015fb6f4fa808835c43efb7 100644 (file)
 * Removed obsolete `$activeMenuItem` in frontend forms/pages
 * Obsolete interface `wcf\page\ITrackablePage` deprecated.
 * PIP `wcf\system\package\plugin\SitemapPackageInstallationPlugin` removed.
+* Option `share_buttons_show_count` removed.
 
 #### Documentation
 
index 96bb765286736bd20e31643a095b28c416795efa..ac7adc4c39205fe6d8cfb9205f34e01ba831ab50 100644 (file)
@@ -988,11 +988,34 @@ redis:cache_source_redis_host,!cache_source_memcached_host]]></enableoptions>
                                <defaultvalue>1</defaultvalue>
                                <enableoptions><![CDATA[share_buttons_show_count]]></enableoptions>
                        </option>
-                       <option name="share_buttons_show_count">
+                       <option name="share_buttons_providers">
                                <categoryname>message.general.share</categoryname>
+                               <optiontype>checkboxes</optiontype>
+                               <selectoptions>Facebook
+Twitter
+Google
+Reddit
+WhatsApp
+LinkedIn
+Pinterest
+XING</selectoptions>
+                               <defaultvalue>Facebook
+Twitter
+Google
+Reddit
+WhatsApp
+LinkedIn
+Pinterest
+XING</defaultvalue>
+                       </option>
+                               
+                               
                                <optiontype>boolean</optiontype>
                                <defaultvalue>1</defaultvalue>
+                               <enableoptions><![CDATA[share_buttons_show_count]]></enableoptions>
                        </option>
+                       providers
+                       
                        <!-- /message.general.share -->
                        
                        <!-- message.general.image -->
index 2be87763a905a67883cdb4c4054e263d90d7e99d..12ef165e69fa1da1b637ea887e455de8045cc44a 100644 (file)
@@ -1,54 +1,71 @@
 <div class="messageShareButtons jsOnly">
+       {assign var='__share_buttons_providers' value="\n"|explode:SHARE_BUTTONS_PROVIDERS}
+       
        <ul class="inlineList">
-               <li>
-                       <a class="button jsShareFacebook" title="{lang}wcf.message.share.facebook{/lang}">
-                               <span class="icon icon24 fa-facebook-official"></span>
-                               <span>{lang}wcf.message.share.facebook{/lang}</span>
-                       </a>
-               </li>
-               <li>
-                       <a class="button jsShareTwitter" title="{lang}wcf.message.share.twitter{/lang}">
-                               <span class="icon icon24 fa-twitter"></span>
-                               <span>{lang}wcf.message.share.twitter{/lang}</span>
-                       </a>
-               </li>
-               <li>
-                       <a class="button jsShareGoogle" title="{lang}wcf.message.share.google{/lang}">
-                               <span class="icon icon24 fa-google-plus"></span>{*@todo: change to fa-google-plus-official (fa 4.6)*}
-                               <span>{lang}wcf.message.share.google{/lang}</span>
-                       </a>
-               </li>
-               <li>
-                       <a class="button jsShareReddit" title="{lang}wcf.message.share.reddit{/lang}">
-                               <span class="icon icon24 fa-reddit"></span>
-                               <span>{lang}wcf.message.share.reddit{/lang}</span>
-                       </a>
-               </li>
-               <li>
-                       <a class="button jsShareWhatsApp" title="{lang}wcf.message.share.whatsApp{/lang}">
-                               <span class="icon icon24 fa-whatsapp jsTooltip"></span>
-                               <span>{lang}wcf.message.share.whatsApp{/lang}</span>
-                       </a>
-               </li>
-               <li>
-                       <a class="button jsShareLinkedIn" title="{lang}wcf.message.share.linkedIn{/lang}">
-                               <span class="icon icon24 fa-linkedin jsTooltip"></span>
-                               <span>{lang}wcf.message.share.linkedIn{/lang}</span>
-                       </a>
-               </li>
-               <li>
-                       <a class="button jsSharePinterest" title="{lang}wcf.message.share.pinterest{/lang}">
-                               <span class="icon icon24 fa-pinterest-p jsTooltip"></span>
-                               <span>{lang}wcf.message.share.pinterest{/lang}</span>
-                       </a>
-               </li>
-               <li>
-                       <a class="button jsShareXing" title="{lang}wcf.message.share.xing{/lang}">
-                               <span class="icon icon24 fa-xing jsTooltip"></span>
-                               <span>{lang}wcf.message.share.xing{/lang}</span>
-                       </a>
-               </li>
-               
+               {if 'Facebook'|in_array:$__share_buttons_providers}
+                       <li>
+                               <a class="button jsShareFacebook" title="{lang}wcf.message.share.facebook{/lang}">
+                                       <span class="icon icon24 fa-facebook-official"></span>
+                                       <span>{lang}wcf.message.share.facebook{/lang}</span>
+                               </a>
+                       </li>
+               {/if}
+               {if 'Twitter'|in_array:$__share_buttons_providers}
+                       <li>
+                               <a class="button jsShareTwitter" title="{lang}wcf.message.share.twitter{/lang}">
+                                       <span class="icon icon24 fa-twitter"></span>
+                                       <span>{lang}wcf.message.share.twitter{/lang}</span>
+                               </a>
+                       </li>
+               {/if}
+               {if 'Google'|in_array:$__share_buttons_providers}
+                       <li>
+                               <a class="button jsShareGoogle" title="{lang}wcf.message.share.google{/lang}">
+                                       <span class="icon icon24 fa-google-plus"></span>{*@todo: change to fa-google-plus-official (fa 4.6)*}
+                                       <span>{lang}wcf.message.share.google{/lang}</span>
+                               </a>
+                       </li>
+               {/if}
+               {if 'Reddit'|in_array:$__share_buttons_providers}
+                       <li>
+                               <a class="button jsShareReddit" title="{lang}wcf.message.share.reddit{/lang}">
+                                       <span class="icon icon24 fa-reddit"></span>
+                                       <span>{lang}wcf.message.share.reddit{/lang}</span>
+                               </a>
+                       </li>
+               {/if}
+               {if 'WhatsApp'|in_array:$__share_buttons_providers}
+                       <li>
+                               <a class="button jsShareWhatsApp" title="{lang}wcf.message.share.whatsApp{/lang}">
+                                       <span class="icon icon24 fa-whatsapp jsTooltip"></span>
+                                       <span>{lang}wcf.message.share.whatsApp{/lang}</span>
+                               </a>
+                       </li>
+               {/if}
+               {if 'LinkedIn'|in_array:$__share_buttons_providers}
+                       <li>
+                               <a class="button jsShareLinkedIn" title="{lang}wcf.message.share.linkedIn{/lang}">
+                                       <span class="icon icon24 fa-linkedin jsTooltip"></span>
+                                       <span>{lang}wcf.message.share.linkedIn{/lang}</span>
+                               </a>
+                       </li>
+               {/if}
+               {if 'Pinterest'|in_array:$__share_buttons_providers}
+                       <li>
+                               <a class="button jsSharePinterest" title="{lang}wcf.message.share.pinterest{/lang}">
+                                       <span class="icon icon24 fa-pinterest-p jsTooltip"></span>
+                                       <span>{lang}wcf.message.share.pinterest{/lang}</span>
+                               </a>
+                       </li>
+               {/if}
+               {if 'XING'|in_array:$__share_buttons_providers}
+                       <li>
+                               <a class="button jsShareXing" title="{lang}wcf.message.share.xing{/lang}">
+                                       <span class="icon icon24 fa-xing jsTooltip"></span>
+                                       <span>{lang}wcf.message.share.xing{/lang}</span>
+                               </a>
+                       </li>
+               {/if}
                {event name='buttons'}
        </ul>
        
index 0969537ad29eb31c03da3a0563e1a41cda3dec30..1794b5359ef3497d2050c282c52fb6366fee05b2 100644 (file)
@@ -135,7 +135,7 @@ define('SHOW_SIGNATURE_DEFAULT_VALUE', 1);
 define('MODULE_EDIT_HISTORY', 1);
 define('EDIT_HISTORY_EXPIRATION', 90);
 define('ENABLE_SHARE_BUTTONS', 1);
-define('SHARE_BUTTONS_SHOW_COUNT', 1);
+define('SHARE_BUTTONS_PROVIDERS', 1);
 define('MODULE_IMAGE_PROXY', 0);
 define('IMAGE_PROXY_EXPIRATION', 14);
 define('ENABLE_CENSORSHIP', 0);
index 24ff34d29b12f938dbd13f17af02a28f677ccf0b..ecb42b8c2db65987f704cea4a672a32c09f36648 100644 (file)
                <item name="wcf.acp.option.pre_parse_default_value"><![CDATA[URLs automatisch erkennen [Vorgabewert]]]></item>
                <item name="wcf.acp.option.show_signature_default_value"><![CDATA[Signatur anzeigen [Vorgabewert]]]></item>
                <item name="wcf.acp.option.enable_share_buttons"><![CDATA[Buttons zum Teilen von Inhalten anzeigen]]></item>
-               <item name="wcf.acp.option.share_buttons_show_count"><![CDATA[Anzahl der Teilungen anzeigen]]></item>
                <item name="wcf.acp.option.category.message.general.edit"><![CDATA[Bearbeitungen]]></item>
                <item name="wcf.acp.option.module_edit_history"><![CDATA[Bearbeitungsverlauf aktivieren]]></item>
                <item name="wcf.acp.option.module_edit_history.description"><![CDATA[Speichert die alten Versionen von Benutzerinhalten.]]></item>
index d913f3eb429d6445936d1a5e7cce568d8fd3dcf7..9f7dfecdb10a4950a838d1560cf06e120a3404af 100644 (file)
@@ -860,7 +860,6 @@ Examples for medium ID detection:
                <item name="wcf.acp.option.pre_parse_default_value"><![CDATA[Detect URLs (default value)]]></item>
                <item name="wcf.acp.option.show_signature_default_value"><![CDATA[Display signatures (default value)]]></item>
                <item name="wcf.acp.option.enable_share_buttons"><![CDATA[Display content share button]]></item>
-               <item name="wcf.acp.option.share_buttons_show_count"><![CDATA[Display number of shares]]></item>
                <item name="wcf.acp.option.category.message.general.edit"><![CDATA[Edit History]]></item>
                <item name="wcf.acp.option.module_edit_history"><![CDATA[Enable Edit History]]></item>
                <item name="wcf.acp.option.module_edit_history.description"><![CDATA[Stores older versions of user-created content.]]></item>