Ejemplo n.º 1
0
 /**
  * Get the configured state of this plugin
  * @return boolean
  */
 function isConfigured()
 {
     $this->import('OpenAdsConnection');
     $config = new OpenAdsConnection($this, $this->getInstallationPath());
     return $config->isConfigured();
 }
 /**
  * Get the contents of the CMS plugin TOC.
  * @param $templateMgr object
  * @return string
  */
 function getContents(&$templateMgr)
 {
     $journal =& Request::getJournal();
     if (!$journal) {
         return '';
     }
     // Get the ad settings.
     $plugin =& $this->getOpenAdsPlugin();
     $this->import('OpenAdsConnection');
     $openAdsConnection = new OpenAdsConnection($plugin, $plugin->getInstallationPath());
     $sidebarAdHtml = $openAdsConnection->getAdHtml($plugin->getSetting($journal->getId(), 'sidebarAdId'));
     return '<div class="block">' . $sidebarAdHtml . '</div>';
 }