CRM-17030 Fix to Event Confirmation template to improve email deliverability
authorlsmithgo <lionel@smithgordon.com>
Sat, 15 Aug 2015 15:28:32 +0000 (16:28 +0100)
committerlsmithgo <lionel@smithgordon.com>
Sat, 15 Aug 2015 15:28:32 +0000 (16:28 +0100)
The Google API is only required by the webpages, not the emails.  So the fix is simply to move the <script> reference into an IF statement that only applies if SocialNetworks is being used on a webpage.

templates/CRM/common/SocialNetwork.tpl

index 1a3b314551cdf442ebe43b006b77433c04366142..6dde2840ed3510c593f7ead3c90a148f41fa0c3c 100644 (file)
@@ -24,7 +24,7 @@
  +--------------------------------------------------------------------+
 *}
 {* Adds social networking buttons (Facebook like, Twitter tweet, Google +1, LinkedIn) to public pages (online contributions, event info) *}
-<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
+
 <div class="crm-section crm-socialnetwork help">
     <h3 class="nobackground">{ts}Help spread the word{/ts}</h3>
     <div class="description">
@@ -42,6 +42,7 @@
                 <img title="Facebook Like Button" src="{$config->userFrameworkResourceURL|replace:'https://':'http://'}/i/fblike.png" alt="Facebook Button" />
             </a>
         {else}
+            <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
             {*use advanced buttons for pages*}
             <div class="label">
                 <iframe allowtransparency="true" frameborder="0" scrolling="no"