Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Install Instructions

The application files must be uploaded to a server that can process PHP.


Depending on which features you want to include in the widget, you just need to edit the file to configure all the settings.

// Set whether to display catalog search box (values: true or false)
// The code to display the catalog search box must be added to

// Set whether to display subject and/or course guides from LibGuides
// Set the institutional ID for your LibGuides instance, if USE_LIBGUIDES set to true
// The value for your IID can be found in the Admin Login URL for your LibGuides instance

// Set whether to display contact information
// The code to display the contact info must be added to

Caching (Optional)

There are currently two methods of caching built-in: Memcache OR Database. If you have access to either memcache or mysql, you can greatly reduce processing time by caching the output. If turned on, the default caching period is 1 day.

/* caching options */

define("USE_CACHE",true);			// true = use caching, false = don't use caching
define("CACHE_TYPE","memcache");	// database or memcache

// memcache server connection info
// cache entries older than the cutoff are considered too stale, so fresh data will be pulled instead
define("CACHE_CUTOFF",date("Y-m-d H:i:s",strtotime("1 day ago")));

// database server for caching connection info

Adding the Widget to D2L (or similar for other CMS's)

In D2L, you can make a widget box and add something like the following as the source of the widget:

<p><link rel="stylesheet" type="text/css" href="//" /></p>
<script src="//{OrgUnitCode}&amp;course_name={OrgUnitName}&amp;role_name={RoleName}" type="text/javascript"></script>

Where: - the path to the widget.css file you’ve placed on a server - the path to the widget.php file you’ve placed on a server



These tokens will pass data from D2L about the currently logged in user. The widget.php file will use these tokens as input to determine what the widget should look like for the particular course/user. This means that if you integrate with an application for Course/Subject guides, you can display a relevant guide link for the course where the widget is being viewed. Similarly, if there are course reserves items, you can display those course-relevant items as well. The widget can be integrated with any other system that can be queried in some way using the data available from D2L tokens to add course or even user specific content. For instance, if you want to display a special message, link or anything for viewers who are "Faculty", this can be done as well.

You can’t perform that action at this time.