/** * Generate the JS required to load the update routine * * @return $this */ protected function _beforeToHtml() { $current = str_replace('.', '_', Mage::helper('wordpress/system')->getExtensionVersion()); $text = implode('', array('<script type="text/javascript">', sprintf("var WP_VERSION_LATEST = '%s';", $latestVersion = Mage::app()->getCache()->load('wordpress_integration_update' . $current)), sprintf("var WP_VERSION_CURRENT = '%s';", Mage::helper('wordpress/system')->getExtensionVersion()), sprintf("var WP_VERSION_LOOKUP_URL = '%s';", $this->getUrl('adminhtml/wordpress/checkVersion')), 'new fishpig.WP.Update();', '</script>')); $this->setText($text); return parent::_beforeToHtml(); }
/** * * @return */ protected function _beforeToHtml() { if ($this->getTemplate() === 'small.phtml') { $this->_setTextForSmallTemplate(); } else { if ($this->getTemplate() === 'large.phtml') { $this->_setTextForLargeTemplate(); } } return parent::_beforeToHtml(); }
/** * Before rendering html, but after trying to load cache * * @return Mage_Core_Block_Abstract */ protected function _beforeToHtml() { $this->token++; return parent::_beforeToHtml(); }
/** * Set the HTML output * * @return $this */ protected function _beforeToHtml() { $html = '<div id="%s">%s</div><script type="text/javascript">new Ajax.Updater("%s", "%s", {});</script>'; $this->setText(sprintf($html, $this->getId(), $this->_getLoader(), $this->getId(), $this->getAjaxUrl())); return parent::_beforeToHtml(); }
/** * Generate the JS required to load the update routine * * @return $this */ protected function _beforeToHtml() { $this->setText(sprintf("<script type=\"text/javascript\">new fishpig.WP.Update('%s', '%s');</script>", $this->_getSourceUrl(), $this->_getVersion())); return parent::_beforeToHtml(); }
protected function _beforeToHtml() { $this->setText('You need the <a href="#">XML Sitemap</a> add-on.'); return parent::_beforeToHtml(); }
/** * Before rendering html, but after trying to load cache * * @return Mage_Core_Block_Abstract */ protected function _beforeToHtml() { $this->token++; return parent::_beforeToHtml(); // TODO: Change the autogenerated stub }