Answers.Body: <p>Lesley - better to write this in an extension rather than overriding a core file. You can place the below hook in any of your custom extension or create one using <a href="https://docs.civicrm.org/dev/en/latest/extensions/civix/" rel="nofollow noreferrer">civix</a></p>
  
  <p>As Peter Davis said in the comment, we just made this changes for one of our client using -</p>
  
  <pre><code>function example_civicrm_buildForm($formName, &amp;$form) {
    if ($formName == 'CRM_Contribute_Form_Contribution_Main' &amp;&amp; !empty($form-&gt;_pcpId)) {
      $form-&gt;assign('pcpSupporterText', 'your custom pcp text');
    } 
  }
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-09T08:30:07.303Z
Answers.LastActivityDate: 2018-10-09T08:30:07.303Z
Answers.UserDisplayName: jitendra - fuzion
Answers.Body: <p>Lesley,</p>
  
  <p>This is set in php and then assigned to tpl. It's being set from two places <a href="https://github.com/civicrm/civicrm-core/blob/master/CRM/Contribute/Form/Contribution/Main.php#L474" rel="nofollow noreferrer">CRM/Contribute/Form/Contribution/Main.php</a> and <a href="https://github.com/civicrm/civicrm-core/blob/master/CRM/PCP/BAO/PCP.php#L431" rel="nofollow noreferrer">CRM/PCP/BAO/PCP.php</a>. Since its being assigned to tpl through php then its pretty simple and easy to change the text using either preprocess/buildform/postprocess hook by over-riding the tpl variable.</p>
  
  <p>Here are list of lines that uses the variable to print the text</p>
  
  <pre><code>templates//CRM/Contribute/Form/Contribution/Main.tpl:177:    {if $pcpSupporterText}
  templates//CRM/Contribute/Form/Contribution/Main.tpl:178:    &lt;div class="crm-public-form-item crm-section pcpSupporterText-section"&gt;
  templates//CRM/Contribute/Form/Contribution/Main.tpl:180:      &lt;div class="content"&gt;{$pcpSupporterText}&lt;/div&gt;
  templates//CRM/Event/Form/Registration/Register.tpl:61:    {if $pcpSupporterText}
  templates//CRM/Event/Form/Registration/Register.tpl:62:      &lt;div class="crm-public-form-item crm-section pcpSupporterText-section"&gt;
  templates//CRM/Event/Form/Registration/Register.tpl:63:        &lt;div class="content"&gt;{$pcpSupporterText}&lt;/div&gt;
  </code></pre>
  
  <p>If you not familiar with using php then you can JS to replace the text. Here is what i would do</p>
  
  <ol>
  <li>Create a Main.extra.tpl under <code>templates/CRM/Contribute/Form/Contribution/</code> (custom template directory or extension)</li>
  <li>Add below snippet in Main.extra</li>
  </ol>
  
  <p>Snippet:</p>
  
  <pre><code>{if $pcpSupporterText}
  &lt;div class='crm-pcp_supporter_text_replace'&gt;
    &lt;div class='content'&gt;
      {ts}Text to print{/ts}
    &lt;/div&gt;
  &lt;/div&gt;
  
  {literal}
    &lt;script type="text/javascript"&gt;
      CRM.$(function($) {
        $("div.pcpSupporterText-section .content").replaceWith($('.crm-pcp_supporter_text_replace .content'));
      });
    &lt;/script&gt;
  {/literal}
  
  {/if}
  </code></pre>
  
  <p>HTH</p>
  
  <p>Pradeep</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-08T02:20:51.337Z
Answers.Text: Thanks Pradeep - no wonder I couldn’t find a tpl file!
Answers.UserDisplayName: LesleyJill
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-08T07:43:17.657Z
Answers.Text: LesleyJill i have updated my answer with a list where the variable is used.
Answers.UserDisplayName: Pradeep Nayak
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-09T05:51:25.800Z
Answers.Text: Thanks so much for those links - I don't know how to use hooks, but I think I can override template variables... or maybe not?
Answers.UserDisplayName: LesleyJill
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-09T05:58:56.727Z
Answers.Text: I have copied Main.tpl to custom_templates/CRM/Contribute/Form/Contribution. I changed line 174 to  <div class="content">{ts}My text{/ts}</div>. I cleared templates_c directory and browser cache. But the text remains as original. Am I missing something? Really appreciate your help with this. Oh and I'm on wordpress
Answers.UserDisplayName: LesleyJill
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-09T09:20:32.587Z
Answers.Text: LesleyJill, I have updated my answer on how you can do it using tpl. Personally i would hate to over-ride core file because its a pain during CiviCRM upgrade and Main.tpl is an important file and keeps changing. Let me know how it goes.
Answers.UserDisplayName: Pradeep Nayak
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-07T22:40:44.367Z
Answers.LastActivityDate: 2018-10-09T09:19:11.347Z
Answers.LastEditDate: 2018-10-09T09:19:11.347Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p>How do I change this text
  “This contribution is being made thanks to the effort of [contact name], who supports our campaign.You can support it as well - once you complete the donation, you will be able to create your own Personal Campaign Page!”</p>
  
  <p>I’ve searched high and low - every tpl file in contribute/pcp etc
  Is it hardwired somewhere?</p>
  
  <p>Thanks all.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-10-09T00:55:43.980Z
Comments.Text: interesting timing - we have just had to do the exact same thing - clearly there is room for some improvements to the PCP options via the UI
Comments.UserDisplayName: petednz - fuzion
Tags: <custom-templates><pcp>
Title: Where can I edit text on pcp page
ThreadText: # Where can I edit text on pcp page
  
  (Asked by: username_0 on 2018-10-07)
  
  How do I change this text
  “This contribution is being made thanks to the effort of [contact name], who supports our campaign.You can support it as well - once you complete the donation, you will be able to create your own Personal Campaign Page!”
  
  I’ve searched high and low - every tpl file in contribute/pcp etc
  Is it hardwired somewhere?
  
  Thanks all.
  
  **Tags:** custom-templates, pcp
  
  > **Comments:**
  > **username_1**: interesting timing - we have just had to do the exact same thing - clearly there is room for some improvements to the PCP options via the UI  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2018-10-09. Score: 1
  
  Lesley - better to write this in an extension rather than overriding a core file. You can place the below hook in any of your custom extension or create one using civix
  As Peter Davis said in the comment, we just made this changes for one of our client using -
  function example_civicrm_buildForm($formName, &$form) {
    if ($formName == 'CRM_Contribute_Form_Contribution_Main' && !empty($form->_pcpId)) {
      $form->assign('pcpSupporterText', 'your custom pcp text');
    } 
  }
  
  
  ---
  
  ### Answer by username_3 on 2018-10-07. Score: 1
  
  Lesley,
  This is set in php and then assigned to tpl. It's being set from two places CRM/Contribute/Form/Contribution/Main.php and CRM/PCP/BAO/PCP.php. Since its being assigned to tpl through php then its pretty simple and easy to change the text using either preprocess/buildform/postprocess hook by over-riding the tpl variable.
  Here are list of lines that uses the variable to print the text
  templates//CRM/Contribute/Form/Contribution/Main.tpl:177:    {if $pcpSupporterText}
  templates//CRM/Contribute/Form/Contribution/Main.tpl:178:    
  templates//CRM/Contribute/Form/Contribution/Main.tpl:180:      {$pcpSupporterText}
  templates//CRM/Event/Form/Registration/Register.tpl:61:    {if $pcpSupporterText}
  templates//CRM/Event/Form/Registration/Register.tpl:62:      
  templates//CRM/Event/Form/Registration/Register.tpl:63:        {$pcpSupporterText}
  
  If you not familiar with using php then you can JS to replace the text. Here is what i would do
  
  Create a Main.extra.tpl under templates/CRM/Contribute/Form/Contribution/ (custom template directory or extension)
  Add below snippet in Main.extra
  
  Snippet:
  {if $pcpSupporterText}
  
    
      {ts}Text to print{/ts}
    
  
  
  {literal}
    
  {/literal}
  
  {/if}
  
  HTH
  Pradeep
  
  > **Comments:**
  > **username_0**: Thanks Pradeep - no wonder I couldn’t find a tpl file!  
  > **username_3**: username_0 i have updated my answer with a list where the variable is used.  
  > **username_0**: Thanks so much for those links - I don't know how to use hooks, but I think I can override template variables... or maybe not?  
  > **username_0**: I have copied Main.tpl to custom_templates/CRM/Contribute/Form/Contribution. I changed line 174 to  <div class="content">{ts}My text{/ts}</div>. I cleared templates_c directory and browser cache. But the text remains as original. Am I missing something? Really appreciate your help with this. Oh and I'm on wordpress  
  > **username_3**: username_0, I have updated my answer on how you can do it using tpl. Personally i would hate to over-ride core file because its a pain during CiviCRM upgrade and Main.tpl is an important file and keeps changing. Let me know how it goes.  
  
  ---
  
  