# This patch file was generated by NetBeans IDE
# This patch can be applied using context Tools: Apply Diff Patch action on respective folder.
# It uses platform neutral UTF-8 encoding.
# Above lines and this line are ignored by the patching process.
Index: moodle/admin/settings/appearance.php
--- moodle/admin/settings/appearance.php Base (1.70)
+++ moodle/admin/settings/appearance.php Locally Modified (Based On 1.70)
@@ -131,5 +131,12 @@
     // link to tag management interface
     $ADMIN->add('appearance', new admin_externalpage('managetags', get_string('managetags', 'tag'), "$CFG->wwwroot/tag/manage.php"));
 
+    $temp = new admin_settingpage('additionalhtml', get_string('additionalhtml', 'admin'));
+    $temp->add(new admin_setting_heading('additionalhtml_heading', get_string('additionalhtml_heading', 'admin'), get_string('additionalhtml_desc', 'admin')));
+    $temp->add(new admin_setting_configtextarea('additionalhtmlhead', get_string('additionalhtmlhead', 'admin'), get_string('additionalhtmlhead_desc', 'admin'), '', PARAM_RAW));
+    $temp->add(new admin_setting_configtextarea('additionalhtmltopofbody', get_string('additionalhtmltopofbody', 'admin'), get_string('additionalhtmltopofbody_desc', 'admin'), '', PARAM_RAW));
+    $temp->add(new admin_setting_configtextarea('additionalhtmlfooter', get_string('additionalhtmlfooter', 'admin'), get_string('additionalhtmlfooter_desc', 'admin'), '', PARAM_RAW));
+    $ADMIN->add('appearance', $temp);
+
 } // end of speedup
 
Index: moodle/lang/en/admin.php
--- moodle/lang/en/admin.php Base (1.142)
+++ moodle/lang/en/admin.php Locally Modified (Based On 1.142)
@@ -25,6 +25,15 @@
 
 $string['accessdenied'] = 'Access denied';
 $string['accounts'] = 'Accounts';
+$string['additionalhtml'] = 'Additional HTML';
+$string['additionalhtml_heading'] = 'Additional HTML to be added to every page.';
+$string['additionalhtml_desc'] = 'These settings allow you to specify HTML that you want added to every page. You can set HTML that will be added within the HEAD tag for the page, immediatly after the BODY tag has been opened, or immediatly before the body tag is closed.<br />Doing this allows you add custom headers or footers on every page, or add support for services like Google Analytics very easily and independent of your chosen theme.';
+$string['additionalhtmlhead'] = 'Within HEAD';
+$string['additionalhtmlhead_desc'] = 'Content here will be added to the bottom of the HEAD tag for every page.';
+$string['additionalhtmltopofbody'] = 'When BODY is opened';
+$string['additionalhtmltopofbody_desc'] = 'Content here will be added in to every page immediatly after the opening body tag.';
+$string['additionalhtmlfooter'] = 'Before BODY is closed';
+$string['additionalhtmlfooter_desc'] = 'Content here will be added in to every page right before the body tag is closed.';
 $string['adminseesall'] = 'Admins see all';
 $string['adminseesallevents'] = 'Administrators see all events';
 $string['adminseesownevents'] = 'Administrators are just like other users';
Index: moodle/lib/outputrenderers.php
--- moodle/lib/outputrenderers.php Base (1.270)
+++ moodle/lib/outputrenderers.php Locally Modified (Based On 1.270)
@@ -325,6 +325,10 @@
                     'type' => $type, 'title' => $alt->title, 'href' => $alt->url));
         }
 
+        if (!empty($CFG->additionalhtmlhead)) {
+            $output .= "\n".$CFG->additionalhtmlhead;
+        }
+
         return $output;
     }
 
@@ -334,8 +338,13 @@
      * @return string HTML fragment.
      */
     public function standard_top_of_body_html() {
-        return  $this->page->requires->get_top_of_body_code();
+        global $CFG;
+        $output = $this->page->requires->get_top_of_body_code();
+        if (!empty($CFG->additionalhtmltopofbody)) {
+            $output .= "\n".$CFG->additionalhtmltopofbody;
     }
+        return $output;
+    }
 
     /**
      * The standard tags (typically performance information and validation links,
@@ -367,6 +376,9 @@
               <li><a href="http://www.contentquality.com/mynewtester/cynthia.exe?rptmode=0&amp;warnp2n3e=1&amp;url1=' . urlencode(qualified_me()) . '">WCAG 1 (2,3) Check</a></li>
             </ul></div>';
         }
+        if (!empty($CFG->additionalhtmlfooter)) {
+            $output .= "\n".$CFG->additionalhtmlfooter;
+        }
         return $output;
     }
 
