Please enable javascript to view this page in its intended format.
The Utility Bar is a common web template for Queen's University for department websites.
For those groups who continue to develop their websites by means other than the WebPublish (Queen's custom designed content management tool), a "php snippet" has been created by the Marketing & Communications Department to facilitate a common web template "utility bar" element featuring: Queen's branding (i.e. wordmark), access to the improved Queen's web search, and a quick access list.
See a live (Option A) PHP example or live (Option B) JavaScript example of the utility bar.
Link to the external style sheet for the utility bar within the <head> </head> tags.
<link rel="stylesheet" media="screen" type="text/css" href="http://www.queensu.ca/style/css/queensDefault/queens_utilitybar.css"/> <!--[if IE]> <link rel="stylesheet" media="screen" type="text/css"
href="http://www.queensu.ca/style/css/queensDefault/queens_utilitybar_ie.css"/> <![endif]-->
Option A) PHP Include for PHP based sites
Place the following PHP snippet into your existing webpage, immediately after the <body> element. Note this is only available for PHP based web sites.
<?php
$curl_handle=curl_init();
curl_setopt($curl_handle,CURLOPT_URL,'http://www.queensu.ca/resources/php/utilitybar.php');
curl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT, 4);
curl_exec($curl_handle);
curl_close($curl_handle);
?>
Or you can use the following if you do not have cURL available.
<?php
include('http://www.queensu.ca/resources/php/utilitybar.php'); ?>
Option B) JavaScript include for any sites
This option is available for any web sites, those using PHP or any other language including plain HTML. Insert this code right after the <body> tag.
<script src="http://www.queensu.ca/style/javascript/queensDefault/utilitybar.js.php" type="text/javascript"></script>
As we continue to improve and update the queensu.ca site, your site will reflect any changes we make to the utility bar, as long as you include the php snippet and not the straight HTML code.
If you have any questions, please contact the Marketing and Communications Department.