DMR Upgrade Project 2013 Code Changes
From Ball State University Libraries Wiki
This article is meant to track what files on the New Server after the DMR Upgrade Project 2013 have been modified and a brief description of the reason for the modification(s).
Actual code samples won't be listed here, only file names/paths and modification descriptions. This is for future reference when these modifications must be re-implemented the next time we need to upgrade CONTENTdm.
Note: Unless otherwise stated, it is assumed that all file paths are prefixed with OCLC\CONTENTdm\Content6\.
A custom CSS file uploaded via the Website Configuration Tool. When uploaded this way, this script will be loaded globally on every page. This is where various custom CSS declarations go, such as styles for sub-collection togglers.
The authAction() function was modified to include a check for LDAP authentication with the given user credentials. If LDAP authentication fails (or if the LDAP server is unavailable), it rolls back to default CONTENTdm authentication.
If LDAP authentication succeeds, it sets up standard CONTENTdm session variables as if the user was NOT logged in, but sets its own special "auth_by_ldap" session variable so that other files (including LogoutController.php) can treat the user as logged in, but restricted.
The indexAction() function was slightly modified with a single line of code that clears the "auth_by_ldap" session variable mentioned above to log out users, even if they were authenticated via LDAP.
The "nav_top_right" section of this page was modified to show the "Logout" link at the top right of every page when a user is logged in, even if they logged in via LDAP.
While users logged in via LDAP don't share the same privileges as those logged in through CONTENTdm, this change at least shows LDAP users that they are, in fact, logged into the site, meaning they can view BSU-restricted collections, among other privileges.
This file was also modified so that the label next to the main search box says "Search all collections" by default, and "Search this collection" when a user is viewing a particular collection.
Added a meta tag for Pinterest business account verification. This only shows up on "custom" pages, which includes the homepage and browse by pages.
Custom file for keeping track of collections that can only be viewed by users logged in via LDAP. It's a simple PHP array of the alias of each collection.
The api_get_collection_list() function has been modified to hide collections listed in the bsupriv.php file above unless the user has been logged in via LDAP.
The ITEM_VIEWER section has been altered to display in-line audio and video streamed from Mediasite. It determines if the currently viewed collection is enabled via the bsumediasite.php file below. A similar change was made to enable the 3D Object Viewer for displaying 3D OBJ files.
Also commented out code relevant to "Text Tab" and the content of that tab.
There is a temporary addition here (from 4/17/14) that singles out an item from the Friends of Bracken Library collection since it uses a different type of Mediasite presentation. (We may move all videos to this type of presentation in the future.)
The ITEM_VIEWER section has been altered similarly to the singleitem.phtml file to display in-line media. It determines if the collection is enabled in the same way, however, metadata is stored a bit differently in compound objects, thus the code is slightly different. This only works when showing in-line media associated with the parent item of the compound object (not for each page). A similar change was made to enable the 3D Object Viewer for displaying 3D OBJ files.
Also commented out code relevant to "Text Tab" and the content of that tab.
Custom file for keeping track of collections that have in-line audio and video streamed from Mediasite enabled. It's a simple PHP array of the alias of each collection.
Custom file for keeping track of collections that have in-line 3D Object Viewer enabled. It's a simple PHP array of the alias of each collection.
This file was heavily modified to display collection recommendations when bad collection aliases are used in the URL. The primary purpose of this is to redirect users to the appropriate pages when using outdated sub-collection aliases (such as LSTACivWar12, which used to lead to a sub-collection landing page). The file will also now suggest similarly named collections if the user only enters part of a collection alias, or if the collection aliases are 50% similar using the PHP similar_text function.
This file now also will redirect the user to the /login page if the collection they are trying to view is one in the bsupriv.php file.
This file contains the HTML for the /login page. The text of this page has been edited to provide more information to the user, mostly to tell them to use their BSU username and password, and to let them know why they're on the page. A link back to the home page has been provided as well.
This file was modified to add a redirect for CardCat linking. This was required since we didn't want to mess around with the server rewrite settings, and the cdmlink.php file would no longer work for us. Instead, index.php now checks for users requesting cdmlink.php and uses the parameters in the same fashion to appropriately redirect them.
This customization will (hopefully) eventually go away after we update the links in CardCat.
There was one other modification that checks for "/cgi-bin/oai.exe" and forwards users to the correct new OAI harvest point (same URL with the new 2013 port). This modification won't go away unless we instruct other harvesters to use the new point.
Yet another modification was made to redirect the five long-alias collections to their shortened versions. These collections were: /ArtHisImgCpght /BSU_ArchSlidesCpght /CiaNatRegMap /CoveredBridges /WWIIHistFilm. There were respectively changed to: /ArtHisImgC,/ArchSlidesC,/CiaNatMaps,/CvrdBrdgs,/WWIIHstFlm. The old versions of these collections were later removed.
Turns out the old front-end used a file called collections.php to refer users to splash pages. Obviously this file no longer existed after the upgrade, but because some places still link to us using that file, we had to reinstate it. Because collections.php wasn't under some other directory, the above index.php file is never called, and so autoforwarding of any kind doesn't work. In this very special case, we had to set the redirect up in a separate collections.php file.
This file was modified to remove the built-in CONTENTdm video player since it wasn't working with most of our non-MediaSite videos. The video player was instead replaced with instructional text on how to use the Download button and special instruction for if downloading a 3D object.
This file was modified to remove the "There is no file associated with this item." text that appears beneath null items, since we are now using null items for Mediasite-enabled collections, rather than URL items. The line around 58 was simply commented out.
This file was modified to add a "Browse Full Collection" button just above the collection description on landing pages.
website\public_html\ui\custom\default\collection\default\resources\custompages\home website\public_html\ui\custom\default\collection\default\resources\custompages\contact website\public_html\ui\custom\default\collection\default\resources\custompages\browseby
The files in these folders were uploaded either through the Website Configuration Tool or directly in conjunction with the WCT to create the newly designed Home Page, Contact page.
Browse By is a special page that houses all of the categories in the "Browse By" navigational menu. All of the content in this page is produced through system calls to the underlying CONTENTdm system. Most calls pull data from the Collection of Collections (or the BSU DMR Collections collection).