{"id":2300,"date":"2024-08-11T07:20:20","date_gmt":"2024-08-11T11:20:20","guid":{"rendered":"http:\/\/sites.bu.edu\/marcom-team\/?page_id=2300"},"modified":"2025-09-03T17:45:26","modified_gmt":"2025-09-03T21:45:26","slug":"bu-alerts","status":"publish","type":"page","link":"https:\/\/sites.bu.edu\/marcom-team\/departments\/interactive-design\/common-processes\/bu-alerts\/","title":{"rendered":"Enable BU Alert for a Sandbox"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">There are many times BU needs to issue an alert across the University. BU Alerts are only displayed on production sites and specifically targeted sandboxes. The alerts can sometimes cause complications with some components like custom navigations and positioned elements.\u00a0 There are two ways that you can add the BU Alert for testing and styling on your sandbox.<\/span><\/p>\n<h4><strong>Edit your wp-config.php file<\/strong><\/h4>\n<p><span style=\"font-weight: 400;\">The following method only works if IS&amp;T has specifically targeted your sandbox.<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Open your FTP client and navigate to your symlinked current folder<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Locate the wp-config.php file and edit line:75<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Comment out the following, define(&#8216;BU_SUPPRESS_ALERTS&#8217;, true)<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Upload file and refresh<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">*If you don\u2019t notice the alert you more than likely have not been added to the sandbox list selected to display the alerts and should follow the instructions below.<\/span><\/p>\n<h4><strong>Add BU Alert Component JS<\/strong><\/h4>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Visit github.com\/bu-ist and search for bu-alert-component<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Copy the raw .js code and paste it into your js-dev\/script.js file<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Edit the following lines of code:<\/span><\/li>\n<\/ol>\n<h5><span style=\"font-weight: 400;\"><code>component = $('component = $('&lt;div id=\"bu-alert-component\"&gt;&lt;\/div&gt;').prependTo( 'body' );<\/code><\/span><\/h5>\n<p><span style=\"font-weight: 400;\">to<\/span><\/p>\n<h5><span style=\"font-weight: 400;\"><code>component = $('&lt;div id=\"bu-alert-wrapper\"&gt;&lt;\/div&gt;').prependTo( 'body' );<\/code><\/span><\/h5>\n<p><span style=\"font-weight: 400;\">also comment out the following line;<\/span><\/p>\n<h5><span style=\"font-weight: 400;\"><code>setInterval(check, 5000);<\/code><\/span><\/h5>\n<h4><strong>Add the Alert styles<\/strong><\/h4>\n<p><span style=\"font-weight: 400;\">Finally, you will need to add the alert.css styles in order to mirror the production styles.<\/span><\/p>\n<h5><b><code>function<\/code><\/b> <span style=\"font-weight: 400;\">add_FUNCTION-NAME-HERE() {<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">wp_enqueue_style(<\/span><span style=\"font-weight: 400;\">&#8216;UNIQUE-HANDLE-NAME&#8217;<\/span><span style=\"font-weight: 400;\">, \/\/<\/span> <span style=\"font-weight: 400;\">Unique handle name.<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">&#8216;<\/span><a href=\"https:\/\/www.bu.edu\/alert\/css\/alert.css\"><span style=\"font-weight: 400;\">https:\/\/www.bu.edu\/alert\/css\/alert.css<\/span><\/a><span style=\"font-weight: 400;\">&#8216;<\/span> <span style=\"font-weight: 400;\">\/\/<\/span> <span style=\"font-weight: 400;\">Location of asset);<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">}<\/span><\/h5>\n<p><span style=\"font-weight: 400;\"><code>add_action( <\/code><\/span><span style=\"font-weight: 400;\">&#8216;wp_enqueue_scripts&#8217;<\/span><span style=\"font-weight: 400;\">, __NAMESPACE__ . <\/span><span style=\"font-weight: 400;\">&#8216;\\\\add_FUNCTION-NAME-HERE&#8217;<\/span> <span style=\"font-weight: 400;\">);<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"\/marcom-team\/files\/2024\/08\/manual-update-red-card.pdf\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"button-secondary\">BU Alert&#8217;s Manual Setup [PDF]<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are many times BU needs to issue an alert across the University. BU Alerts are only displayed on production sites and specifically targeted sandboxes. The alerts can sometimes cause complications with some components like custom navigations and positioned elements.\u00a0 There are two ways that you can add the BU Alert for testing and styling [&hellip;]<\/p>\n","protected":false},"author":12906,"featured_media":0,"parent":689,"menu_order":6,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/sites.bu.edu\/marcom-team\/wp-json\/wp\/v2\/pages\/2300"}],"collection":[{"href":"https:\/\/sites.bu.edu\/marcom-team\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/sites.bu.edu\/marcom-team\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/sites.bu.edu\/marcom-team\/wp-json\/wp\/v2\/users\/12906"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.bu.edu\/marcom-team\/wp-json\/wp\/v2\/comments?post=2300"}],"version-history":[{"count":5,"href":"https:\/\/sites.bu.edu\/marcom-team\/wp-json\/wp\/v2\/pages\/2300\/revisions"}],"predecessor-version":[{"id":3632,"href":"https:\/\/sites.bu.edu\/marcom-team\/wp-json\/wp\/v2\/pages\/2300\/revisions\/3632"}],"up":[{"embeddable":true,"href":"https:\/\/sites.bu.edu\/marcom-team\/wp-json\/wp\/v2\/pages\/689"}],"wp:attachment":[{"href":"https:\/\/sites.bu.edu\/marcom-team\/wp-json\/wp\/v2\/media?parent=2300"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}