Answers.Body: <p>I assume you mean CRM/Core/Config/Variables.php</p>
  
  <p>If you're adding something to that file that you're going to <strong>submit as a pull request or patch back to core</strong>, put your changes where they fit most logically.  It'll make more sense to others in the future.</p>
  
  <p>If you're doing a <strong>site-specific customization</strong> and want to edit the file, <em>don't</em>.  You'll have trouble when it comes time to upgrade.  Instead, <a href="http://wiki.civicrm.org/confluence/display/CRMDOC/Create+an+Extension" rel="nofollow">create an extension</a>.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-17T13:36:39.897Z
Answers.Text: I am (dreaming of) adding something that would end up in core via a PR.
Answers.UserDisplayName: JoAnne
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-17T13:22:56.960Z
Answers.LastActivityDate: 2015-06-17T13:22:56.960Z
Answers.UserDisplayName: Andie Hunt
Answers.Body: <p>Neither place is appropriate for my use. CRM/Core/Config/Variables.php is 'deprecated'. (I didn't know that when I asked my question.) </p>
  
  <p>New variables for settings should be added to the appropriate file in the settings folder. </p>
  
  <p>See <a href="http://wiki.civicrm.org/confluence/display/CRMDOC/Settings+Reference" rel="nofollow">http://wiki.civicrm.org/confluence/display/CRMDOC/Settings+Reference</a> for more details.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-18T04:06:04.847Z
Answers.LastActivityDate: 2015-06-18T04:06:04.847Z
Answers.UserDisplayName: JoAnne
Answers.Body: <p>If you want to make local changes to core files there's also the Custom PHP directory. This won't get overwritten on upgrade but you'll need to review your patches to make sure the underlying core file hasn't significantly changed.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-18T09:47:44.507Z
Answers.LastActivityDate: 2015-06-18T09:47:44.507Z
Answers.UserDisplayName: DaveFF
Body: <p>I want to add a new variable to the variables.php file.  Should I add it at the bottom of the file, or where it logically sits in the order of the variables, ie  under the variable that will be above it on the form?</p>
  
Tags: <developer>
Title: At what line in a file should I add a new variable
ThreadText: # At what line in a file should I add a new variable
  
  (Asked by: username_0 on 2015-06-17)
  
  I want to add a new variable to the variables.php file. Should I add it at the bottom of the file, or where it logically sits in the order of the variables, ie under the variable that will be above it on the form?
  
  **Tags:** developer
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_1 on 2015-06-17. Score: 3
  
  I assume you mean CRM/Core/Config/Variables.php
  
  If you're adding something to that file that you're going to **submit as a pull request or patch back to core**, put your changes where they fit most logically. It'll make more sense to others in the future.
  
  If you're doing a **site-specific customization** and want to edit the file, *don't*. You'll have trouble when it comes time to upgrade. Instead, [create an extension](http://wiki.civicrm.org/confluence/display/CRMDOC/Create+an+Extension).
  
  > **Comments:**
  > **username_0**: I am (dreaming of) adding something that would end up in core via a PR.  
  
  ---
  
  ### Answer by username_0 on 2015-06-18. Score: 2
  
  Neither place is appropriate for my use. CRM/Core/Config/Variables.php is 'deprecated'. (I didn't know that when I asked my question.)
  
  New variables for settings should be added to the appropriate file in the settings folder.
  
  See <http://wiki.civicrm.org/confluence/display/CRMDOC/Settings+Reference> for more details.
  
  
  ---
  
  ### Answer by username_2 on 2015-06-18. Score: 1
  
  If you want to make local changes to core files there's also the Custom PHP directory. This won't get overwritten on upgrade but you'll need to review your patches to make sure the underlying core file hasn't significantly changed.
  
  
  ---
  
  