Chapter 5. Upgrading

Table of Contents

From version 1.x
Web template changes
From version 2.0
New requirements
Upgrade steps

The sections in this chapter are ordered ascending by version. When upgrading, you should start at the version you're currently using, and read and implement the instructions in each section in order.

From version 1.x

[Caution]Caution

Before doing anything else, ensure your environment meets the changed system requirements.

  1. Back up your existing dmBridge folder, or the folders of the individual components if you moved them out of their enclosing folder. The list of component folders includes api, dmctrl, objects, and data, any of which you may have renamed.

  2. Delete all of the above folders except data.

  3. go through the initial setup, using your existing data folder as your new data folder.

  4. Upgrade your web templates.

Web template changes

Template helpers (previously called "extensions") are largely the same since version 1.x, but the way to invoke them has changed. To update your templates, you will need to comb through the .html.php files in your template sets and change the call on the left to the call on the right. The method parameters (everything inside the parentheses) can remain unchanged.

Change... To... Notes
Draw::atomFeedURL() $view->getHelper()->getHtmlAtomFeedURL()
Draw::collectionsAsPulldown() $view->getHelper()->getHtmlCollectionsAsPulldown() No longer requires JavaScript
Draw::downloadImageLink() $view->getHelper()->getHtmlDownloadImageLink()
Draw::exception() $view->getHelper()->getHtmlException()
Draw::favoritesPageURL() $view->getFavoritesView()->getURI()
Draw::flash() $view->getFlash()
Draw::formattedFlash() $view->getHelper()->getHtmlFormattedFlash()
Draw::isFlash() $view->isFlash()
Draw::loadTime() $view->getLoadTime()
Draw::loginPageLink() $view->getHelper()->getHtmlLoginPageLink()
Draw::loginPageURL() $view->getLoginView()->getURI()
Draw::logoutURL() $view->getLogoutURL()
Draw::rssFeedURL() RSS feed support is no longer available.
Draw::searchPageURL() $view->getSearchView()->getURI()
Draw::tagsAsCloud() $view->getHelper()->getHtmlTagsAsCloud()
Draw::termLinkedToSearch() $view->getHelper()->getHtmlTermLinkedToSearch() Method parameters have changed.
Draw::vocabularyAsCloud() $view->getHelper()->getHtmlVocabularyAsCloud()
Draw::vocabularyAsList() $view->getHelper()->getHtmlVocabularyAsList()
Draw::vocabularyForSelect() $view->getHelper()->getHtmlVocabularyAsSelect() This method now returns an enclosing <select> element around its returned <option> elements.
ObjectDraw::addFavoriteButton() $view->getHelper()->getHtmlAddFavoriteButton()
ObjectDraw::childLinksAsList() $view->getHelper()->getHtmlChildLinksAsList()
ObjectDraw::childLinksAsPulldown() $view->getHelper()->getHtmlChildLinksAsPulldown()
ObjectDraw::commentsSection() $view->getHelper()->getHtmlCommentsSection()
ObjectDraw::compoundObjectSearchForm() $view->getHelper()->getHtmlCompoundObjectSearchForm()
ObjectDraw::compoundObjectPageNumbersInSearchResultsAsString() $view->getHelper()->getHtmlCompoundObjectPageNumbersInSearchResultsAsString()
ObjectDraw::compoundPageFlipLinks() $view->getHelper()->getHtmlCompoundPageFlipLinks()
ObjectDraw::highlightedFullText() $view->getHelper()->getHtmlHighlightedFullText()
ObjectDraw::loadTime() $view->getLoadTime()
ObjectDraw::metadataAsDL() $view->getHelper()->getHtmlMetadataAsDL()
ObjectDraw::metadataAsMetaTags() $view->getHelper()->getHtmlMetadataAsMetaTags()
ObjectDraw::previousNextLinks() $view->getHelper()->getHtmlPreviousNextLinks() The $results_text parameter has been removed.
ObjectDraw::ratingsSection() $view->getHelper()->getHtmlRatingsSection()
ObjectDraw::resultsAsUL() $view->getHelper()->getHtmlResultsAsUL()
ObjectDraw::taggingSection() $view->getHelper()->getHtmlTaggingSection() No longer returns a list of tags; use $view->getHelper()->getHtmlTagsAsCloud() for that.
ObjectDraw::viewer() $view->getHelper()->getHtmlViewer()
ObjectResultsDraw::loadTime() $view->getLoadTime()
ObjectResultsDraw::numResults() $view->getQuery()->getNumResults()
ObjectResultsDraw::pageLinks() $view->getHelper()->getHtmlPageLinks()
ObjectResultsDraw::results() $view->getHelper()->getHtmlResults()
ObjectResultsDraw::searchTerms() $view->getHelper()->getHtmlSearchTerms()
ResultsDraw::facetsAsUL() $view->getHelper()->getHtmlFacetsAsUL()
ResultsDraw::linkedSuggestion() $view->getHelper()->getHtmlLinkedSuggestion()
ResultsDraw::loadTime() $view->getLoadTime()
ResultsDraw::numResults() $view->getQuery()->getNumResults()
ResultsDraw::pageLinks() $view->getHelper()->getHtmlPageLinks()
ResultsDraw::results() $view->getHelper()->getHtmlResults()
ResultsDraw::resultsAsGrid() $view->getHelper()->getHtmlResultsAsGrid()
ResultsDraw::resultsAsList() $view->getHelper()->getHtmlResultsAsList()
ResultsDraw::resultsAsTiles() $view->getHelper()->getHtmlResultsAsTiles()
ResultsDraw::searchTerms() $view->getHelper()->getHtmlSearchTerms()
ResultsDraw::sortLinksAsUL() $view->getHelper()->getHtmlSortLinksAsUL()
ResultsDraw::thumbsToggleLink() Support for disabling thumbnails in results view has been removed
ResultsDraw::viewLinks() $view->getHelper()->getHtmlViewLinks() Method parameters have changed.
SearchDraw::dateSearch() $view->getHelper()->getHtmlDateSearch()
SearchDraw::fieldSearch() $view->getHelper()->getHtmlFieldSearch()
SearchDraw::loadTime() $view->getLoadTime()
SearchDraw::proximitySearch() $view->getHelper()->getHtmlProximitySearch()
dmCart::getInstance()->getAccessibleObjects() $view->getAccessibleFavorites()
dmCart::getInstance()->getNumAccessibleObjects() count($view->getAccessibleFavorites())
dmObject::getCurrent() $view->getObject()
dmQuery::getCurrent()->areSearchTerms() $view->getQuery()->arePredicates()
dmQuery::getCurrent()->getRecordURL() $view->getObject()->getURI()
dmQuery::getCurrent()->getSearchTerms() $view->getQuery()->getPredicates()
dmQuery::getCurrent()->getURL("rdf") RDF support is no longer available.
dmQuery::getCurrent()->getURL("atom") $view->getQuery()->getURI("atom")
dmQuery::getCurrent()->getURL("rss") RSS feed support is no longer available.
dmTemplateSet::getCurrent() $view->getTemplate()->getTemplateSet()
instanceof Query instanceof DMQuery

Also, you will need to add the following template helper calls to your templates:

Code Location
<?php echo $view->getHelper()->getHtmlHeadScriptTags() ?> Inside the head tag
<?php echo $view->getHelper()->getHtmlStylesheetTags() ?> Inside the head tag
<?php echo $view->getHelper()->getHtmlMetaTags() ?> Inside the head tag
<?php echo $view->getHelper()->getHtmlBodyScriptTags() ?> Inside the body element, near the bottom of the page