From 466913fc76e4535b0b630efc2e749c602e855490 Mon Sep 17 00:00:00 2001 From: Andrew Hunt Date: Wed, 7 May 2014 14:10:24 -0400 Subject: [PATCH] CRM-14486 add empowered by CiviCRM as public footer ---------------------------------------- * CRM-14486: Empowered by CiviCRM - footer added to all public pages (with option to disable) https://issues.civicrm.org/jira/browse/CRM-14486 --- CRM/Admin/Form/Setting/Miscellaneous.php | 1 + CRM/Core/Config/Variables.php | 7 ++++ api/v3/examples/Setting/GetFields.php | 14 ++++++++ css/civicrm.css | 25 ++++++++++---- i/civi99.png | Bin 0 -> 3352 bytes settings/Core.setting.php | 14 ++++++++ .../CRM/Admin/Form/Setting/Miscellaneous.tpl | 5 +++ templates/CRM/common/drupal.tpl | 6 ++-- templates/CRM/common/drupal6.tpl | 6 ++-- templates/CRM/common/joomla.tpl | 6 ++-- templates/CRM/common/publicFooter.tpl | 31 ++++++++++++++++++ templates/CRM/common/wordpress.tpl | 6 ++-- 12 files changed, 107 insertions(+), 14 deletions(-) create mode 100644 i/civi99.png create mode 100644 templates/CRM/common/publicFooter.tpl diff --git a/CRM/Admin/Form/Setting/Miscellaneous.php b/CRM/Admin/Form/Setting/Miscellaneous.php index 778e5d1e92..1c357d9caf 100644 --- a/CRM/Admin/Form/Setting/Miscellaneous.php +++ b/CRM/Admin/Form/Setting/Miscellaneous.php @@ -44,6 +44,7 @@ class CRM_Admin_Form_Setting_Miscellaneous extends CRM_Admin_Form_Setting { 'contact_undelete' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'versionAlert' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'versionCheck' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, + 'empoweredBy' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'maxFileSize' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'doNotAttachPDFReceipt' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'secondDegRelPermissions' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, diff --git a/CRM/Core/Config/Variables.php b/CRM/Core/Config/Variables.php index 8de2b56787..c6cc5aefec 100644 --- a/CRM/Core/Config/Variables.php +++ b/CRM/Core/Config/Variables.php @@ -331,6 +331,13 @@ class CRM_Core_Config_Variables extends CRM_Core_Config_Defaults { */ public $versionCheck = TRUE; + /** + * Whether public pages should display "empowered by CiviCRM" + * + * @var boolean + */ + public $empoweredBy = TRUE; + /** * Array of enabled add-on components (e.g. CiviContribute, CiviMail...) * diff --git a/api/v3/examples/Setting/GetFields.php b/api/v3/examples/Setting/GetFields.php index 63c158a0dc..dc5329d082 100644 --- a/api/v3/examples/Setting/GetFields.php +++ b/api/v3/examples/Setting/GetFields.php @@ -814,6 +814,20 @@ When enabled, statistics about your CiviCRM installation are reported anonymousl 'description' => 'Prevent the stylesheet \"civicrm.css\" from being loaded.', 'help_text' => '', ), + 'empoweredBy' => array( + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'empoweredBy', + 'type' => 'Boolean', + 'quick_form_type' => 'YesNo', + 'default' => 1, + 'add' => '4.5', + 'title' => 'Display "empowered by CiviCRM"', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'When enabled, "empowered by CiviCRM" is displayed at the bottom of public forms.', + 'help_text' => '', + ), 'debug_enabled' => array( 'group_name' => 'Developer Preferences', 'group' => 'developer', diff --git a/css/civicrm.css b/css/civicrm.css index fcdc073d3e..3f6726d713 100644 --- a/css/civicrm.css +++ b/css/civicrm.css @@ -705,6 +705,19 @@ input.crm-form-entityref { text-align: center; } +.crm-container #civicrm-footer.crm-public-footer { + vertical-align: middle; + text-align: right; + font-size: 16px; + padding: 0.8em 0; +} + +.crm-container img.empowered-by-logo { + vertical-align: baseline; + position: relative; + top: 9px; +} + #crm-record-log { padding: 0.8em 0.8em 0em 0em; text-align: right; @@ -3349,13 +3362,13 @@ div#crm-container form { /* For the Conditional-CSS grading rows */ /* - Colour calculations (based off the main row colours) + Colour calculations (based off the main row colours) Level 1: - dd > c4 - ee > d5 - Level 2: - dd > d1 - ee > e2 + dd > c4 + ee > d5 + Level 2: + dd > d1 + ee > e2 */ .crm-container tr.odd.gradeA td.sorting_1 { background-color: #c4ffc4; diff --git a/i/civi99.png b/i/civi99.png new file mode 100644 index 0000000000000000000000000000000000000000..3333ed9fe3f59793b2646865227ad79db578fb41 GIT binary patch literal 3352 zcmV+z4d?QSP)|KDdnd++xZRizglvB)>$O6%&w2sa4$RoNi6 zWy#ztU;5_%%BS>_5ep(uZJk~V^gCtXTaZPqUeB`&$1gu|&b{`M(H@sgFNweLx^FTs z9#+3e1OPv1e~`;gO6iv%C9N&PRxZ4HVc=Z(?j<9Hw1N^Z1Co9R^3%k`Hkz8^I4`A{ zmX^5BjyF5+jr;!L!=uw`Zv{q#bp-ZWkp=T}SG^2pKass;gfM#6;=hVg0Fap2#)%Vg z9b^<3eBp_sS6%g4LZ3c?z9&ayn;JWBe$MK5&L)OlGD1izTD%Fk68P%ki;f@Yo6?e3 zR~t`VZ6dK|Xvolda`V2x>vbc2P0gOF#(K{~Ws{e_dnPgTk`Y2$QRxPd8-QJR{&d$o zRM!F2A4{6Je%0<(j$qtKN&2&7M^@5ww0UXCNYIH4AZ{6dLPOG&ZPh>eu0iEVp-IYG8>`{oyjP#kMQ&r3a z&=DehjLTcqFFY989gO@%+2tO!#foXGSyFs|+I?ji;@FvLsjXS|(1Pf|g2wF-SIzHt zEiEojo4I(A7(Gv2v#jQY;;OJ*epXht6`2HNi0T*Cn5`8R6@SvGbj{7lc>zFGEvknF z_6Jlq`u+Zc5t-cF6jcA6pkPaRMa92F$CI0tH5+5D08n_z=kslfHKA!mWh+2uoR`w# zPMW;W3Chb|^Yd2zu_uI_ir;Lx`-dv}6i9Zs&kdNm{Rhtfo4?}1^Q`4Zq3)eEOCL-# zQc_~lipo}~$g7~Ufk~=7sD`)GW|cl3HsW#ZMXFMW>dygO4^664h{)W`!jj0-lUev; z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Ra+@va<3(PF7Y|A$5T9*g7D^an$+7 zJ7^lP{Im=Jqi2<^zT}d|G1=K)l9<#M3Jr_O5=VLTksqvVXy+3+9BkUY?JOC|Ky)%f z%tK!oHsJAxn!|z10NZNfD!bA#a0mdA3!?j7*S!$c$*A7AZQHikSI*Y14XVnmojOph z0@4M>D^$l?&bos)&OHp^IEsk9<8<{WEcmxyPMC1;XID==7$yRQDvQaRm%s9XQ;7gD zq8tD)oIJP%e-PpI|KO=g(b%0s>VE| zmHYi$fG>ed^D;BX#gf5sstB&hS>`mCs4$EKmnn~90m(~!;JF^{s!Av^MSq>W;@ayD zlnfmjoCZ~z6?vq!d06J7c`GV9^$GF^07T}Dnpv6#kT!Gi^#qpztjf#X1t7ttst+J4 z-Pa3O^`(%{>vM8)rU3jPGjq5YGcP3a=gxFPPx)&Awv+6Lsu99z7VjuD0XQB7@b+nI zd!##sMO&w*v++>%kfHT6;^KnOQggG%XN-=VpSSYq?mk{H$qDjjgsmupj7W7_(c+^B zZxXB{8$McIyrJ8$L#K5B>A_B_va<4Hg=K(8RA0-@&aQQh*^BBhV2=|Q*ZDycP?6wL z6?$M!h0o`!BfJ!zVP+5^!-keP`;*QDpV?ZF@YL4nPg%?dUTLSZYgIACq|=FOXroKzMcB0ghGAb8H`MGR=DW}p}mYE>CvAobT54R86`sN$M z`!zIp0shh0)Og35HMhI5Eq0GyGCDyE<}JVl$jts?eCWGdKG}BxR?VMYfBo`Tch(FD zU&-t=wB6E^Z=w&fhl<<P0Ji4bwFKNmzmZ)Thp(u+!OQluET3S}uK iVL{E3qQ-M&|9=5gbWe_-1WynE0000 'Prevent the stylesheet "civicrm.css" from being loaded.', 'help_text' => NULL, ), + 'empoweredBy' => array( + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'empoweredBy', + 'type' => 'Boolean', + 'quick_form_type' => 'YesNo', + 'default' => 1, + 'add' => '4.5', + 'title' => 'Display "empowered by CiviCRM"', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'When enabled, "empowered by CiviCRM" is displayed at the bottom of public forms.', + 'help_text' => null, + ), ); diff --git a/templates/CRM/Admin/Form/Setting/Miscellaneous.tpl b/templates/CRM/Admin/Form/Setting/Miscellaneous.tpl index 633e9d342a..342952ab12 100644 --- a/templates/CRM/Admin/Form/Setting/Miscellaneous.tpl +++ b/templates/CRM/Admin/Form/Setting/Miscellaneous.tpl @@ -82,6 +82,11 @@ {$form.versionCheck.html}

{ts}When enabled, statistics about your CiviCRM installation are reported anonymously to the CiviCRM team to assist in prioritizing ongoing development efforts. The following information is gathered: CiviCRM version, versions of PHP, MySQL and framework (Drupal/Joomla/standalone), and default language. Counts (but no actual data) of the following record types are reported: contacts, activities, cases, relationships, contributions, contribution pages, contribution products, contribution widgets, discounts, price sets, profiles, events, participants, tell-a-friend pages, grants, mailings, memberships, membership blocks, pledges, pledge blocks and active payment processor types.{/ts}

+ + {$form.empoweredBy.label} + {$form.empoweredBy.html}
+

{ts}When enabled, "empowered by CiviCRM" is displayed at the bottom of public forms.{/ts}

+ {$form.max_attachments.label} {$form.max_attachments.html}
diff --git a/templates/CRM/common/drupal.tpl b/templates/CRM/common/drupal.tpl index 1a25037079..8233b41c3f 100644 --- a/templates/CRM/common/drupal.tpl +++ b/templates/CRM/common/drupal.tpl @@ -71,8 +71,10 @@ {crmRegion name='page-footer'} -{if ! $urlIsPublic} -{include file="CRM/common/footer.tpl"} +{if $urlIsPublic} + {include file="CRM/common/publicFooter.tpl"} +{else} + {include file="CRM/common/footer.tpl"} {/if} {/crmRegion} diff --git a/templates/CRM/common/drupal6.tpl b/templates/CRM/common/drupal6.tpl index a61be6fb43..be4d973b6a 100644 --- a/templates/CRM/common/drupal6.tpl +++ b/templates/CRM/common/drupal6.tpl @@ -73,8 +73,10 @@ {crmRegion name='page-footer'} -{if ! $urlIsPublic} -{include file="CRM/common/footer.tpl"} +{if $urlIsPublic} + {include file="CRM/common/publicFooter.tpl"} +{else} + {include file="CRM/common/footer.tpl"} {/if} {/crmRegion} diff --git a/templates/CRM/common/joomla.tpl b/templates/CRM/common/joomla.tpl index 15c6a72dbf..02f67d19d8 100644 --- a/templates/CRM/common/joomla.tpl +++ b/templates/CRM/common/joomla.tpl @@ -94,8 +94,10 @@ {crmRegion name='page-footer'} - {if ! $urlIsPublic} - {include file="CRM/common/footer.tpl"} + {if $urlIsPublic} + {include file="CRM/common/publicFooter.tpl"} + {else} + {include file="CRM/common/footer.tpl"} {/if} {/crmRegion} diff --git a/templates/CRM/common/publicFooter.tpl b/templates/CRM/common/publicFooter.tpl new file mode 100644 index 0000000000..467e7203ea --- /dev/null +++ b/templates/CRM/common/publicFooter.tpl @@ -0,0 +1,31 @@ +{* + +--------------------------------------------------------------------+ + | CiviCRM version 4.5 | + +--------------------------------------------------------------------+ + | Copyright CiviCRM LLC (c) 2004-2014 | + +--------------------------------------------------------------------+ + | This file is a part of CiviCRM. | + | | + | CiviCRM is free software; you can copy, modify, and distribute it | + | under the terms of the GNU Affero General Public License | + | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | + | | + | CiviCRM is distributed in the hope that it will be useful, but | + | WITHOUT ANY WARRANTY; without even the implied warranty of | + | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | + | See the GNU Affero General Public License for more details. | + | | + | You should have received a copy of the GNU Affero General Public | + | License and the CiviCRM Licensing Exception along | + | with this program; if not, contact CiviCRM LLC | + | at info[AT]civicrm[DOT]org. If you have questions about the | + | GNU Affero General Public License or the licensing of CiviCRM, | + | see the CiviCRM license FAQ at http://civicrm.org/licensing | + +--------------------------------------------------------------------+ +*} + +{if $config->empoweredBy} + +{/if} diff --git a/templates/CRM/common/wordpress.tpl b/templates/CRM/common/wordpress.tpl index aaf99de411..83db9b5472 100644 --- a/templates/CRM/common/wordpress.tpl +++ b/templates/CRM/common/wordpress.tpl @@ -91,8 +91,10 @@ {crmRegion name='page-footer'} -{if ! $urlIsPublic} -{include file="CRM/common/footer.tpl"} +{if $urlIsPublic} + {include file="CRM/common/publicFooter.tpl"} +{else} + {include file="CRM/common/footer.tpl"} {/if} {/crmRegion} -- 2.25.1