_oTemplate = $oTemplate; else $this->_oTemplate = BxDolTemplate::getInstance(); } public function getLinkHTML ($sLink, $sTitle = '', $sMaxWidth = '') { $aAttrs = array( 'title' => bx_html_attribute($sTitle), ); // check for external link if (strncmp(BX_DOL_URL_ROOT, $sLink, strlen(BX_DOL_URL_ROOT)) !== 0) { $aAttrs['target'] = '_blank'; if (getParam('sys_add_nofollow') == 'on') $aAttrs['rel'] = 'nofollow'; } return $this->_oTemplate->parseHtmlByName('embed_embedly_link.html', array( 'link' => $sLink, 'title' => $sTitle, 'attrs' => bx_convert_array2attrs($aAttrs), 'width' => $sMaxWidth, )); } public function addJsCss () { $sKey = getParam('sys_embedly_api_key'); return $this->_oTemplate->parseHtmlByName('embed_embedly_integration.html', array( 'bx_if:key' => array ( 'condition' => !empty($sKey), 'content' => array('key' => $sKey), ) )); } } /** @} */