public function generate()
 {
     if (TL_MODE == 'BE') {
         $objTemplate = new \BackendTemplate('be_wildcard');
         $objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['acquisto_category_nav'][0]) . ' ###';
         $objTemplate->title = $this->headline;
         $objTemplate->id = $this->id;
         $objTemplate->link = $this->name;
         $objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id;
         return $objTemplate->parse();
     }
     if (FE_USER_LOGGED_IN) {
         $this->Import('FrontendUser', 'Member');
     }
     $this->generateTrail(\Input::get('category'));
     $pid = 0;
     if ($this->acquisto_levelOffset != 0) {
         $pid = $this->trail[$this->acquisto_levelOffset - 1];
     } elseif ($this->acquisto_referenceCategory) {
         $pid = $this->acquisto_referenceCategory;
     }
     $this->items = $this->getCategory($pid, $this->acquisto_levelOffset, 0, $this->acquisto_hardlimit);
     if (!is_array($this->items)) {
         return '';
     }
     return parent::generate();
 }
Example #2
0
 /**
  * Redirect to the selected page
  * @return string
  */
 public function generate()
 {
     if (TL_MODE == 'BE') {
         $objTemplate = new \BackendTemplate('be_wildcard');
         $objTemplate->wildcard = '### QUICK LINK ###';
         $objTemplate->title = $this->headline;
         $objTemplate->id = $this->id;
         $objTemplate->link = $this->name;
         $objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id;
         return $objTemplate->parse();
     }
     // Redirect to selected page
     if (\Input::post('FORM_SUBMIT') == 'tl_quicklink') {
         if (strlen(\Input::post('target', true))) {
             $this->redirect(\Input::post('target', true));
         }
         $this->reload();
     }
     // Get all pages
     $this->pages = deserialize($this->pages);
     if (!is_array($this->pages) || $this->pages[0] == '') {
         return '';
     }
     return parent::generate();
 }
Example #3
0
 /**
  * Display a wildcard in the back end
  *
  * @return string
  */
 public function generate()
 {
     if (TL_MODE == 'BE') {
         /** @var \BackendTemplate|object $objTemplate */
         $objTemplate = new \BackendTemplate('be_wildcard');
         $objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['rss_reader'][0]) . ' ###';
         $objTemplate->title = $this->headline;
         $objTemplate->id = $this->id;
         $objTemplate->link = $this->name;
         $objTemplate->href = '' . $GLOBALS['TL_CONFIG']['backendPath'] . '/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id;
         return $objTemplate->parse();
     }
     $this->objFeed = new \SimplePie();
     $arrUrls = trimsplit('[\\n\\t ]', trim($this->rss_feed));
     if (count($arrUrls) > 1) {
         $this->objFeed->set_feed_url($arrUrls);
     } else {
         $this->objFeed->set_feed_url($arrUrls[0]);
     }
     $this->objFeed->set_output_encoding(\Config::get('characterSet'));
     $this->objFeed->set_cache_location(TL_ROOT . '/system/tmp');
     $this->objFeed->enable_cache(false);
     if ($this->rss_cache > 0) {
         $this->objFeed->enable_cache(true);
         $this->objFeed->set_cache_duration($this->rss_cache);
     }
     if (!$this->objFeed->init()) {
         $this->log('Error importing RSS feed "' . $this->rss_feed . '"', __METHOD__, TL_ERROR);
         return '';
     }
     $this->objFeed->handle_content_type();
     return parent::generate();
 }
 /**
  * Display a wildcard in the back end
  * @return string
  */
 public function generate()
 {
     if (TL_MODE == 'BE') {
         $objTemplate = new \BackendTemplate('be_wildcard');
         $objTemplate->wildcard = '### GLOSSARY MENU ###';
         $objTemplate->title = $this->headline;
         $objTemplate->id = $this->id;
         $objTemplate->link = $this->name;
         $objTemplate->href = 'contao/main.php?do=modules&act=edit&id=' . $this->id;
         return $objTemplate->parse();
     }
     $this->strTemplate = $this->navigationTpl;
     $this->glossaries = deserialize($this->glossaries);
     // Return if there are no glossaries
     if (!is_array($this->glossaries) || count($this->glossaries) < 1) {
         return '';
     }
     // fetch entries
     $objTerm = \Database::getInstance()->execute("SELECT * FROM tl_glossary_term WHERE published=1 AND pid IN(" . implode(',', array_map('intval', $this->glossaries)) . ")" . " ORDER BY term");
     if ($objTerm->numRows < 1) {
         return '';
     }
     $this->objResult = $objTerm;
     return parent::generate();
 }
 public function generate()
 {
     if (TL_MODE == 'BE') {
         $objTemplate = new \BackendTemplate('be_wildcard');
         $objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['memberreader'][0]) . ' ###';
         $objTemplate->title = $this->headline;
         $objTemplate->id = $this->id;
         $objTemplate->link = $this->name;
         $objTemplate->href = 'contao/main.php?do=themes&amp;table=tl_module&amp;act=edit&amp;id=' . $this->id;
         return $objTemplate->parse();
     }
     // logic for this is done in HeimrichHannot\Memberplus\Hooks::getPageIdFromUrlHook
     if (\Input::get('article_reader')) {
         \Input::setGet('items', \Input::get('article_reader'));
     } else {
         if (!isset($_GET['items']) && \Config::get('useAutoItem') && isset($_GET['auto_item'])) {
             \Input::setGet('items', \Input::get('auto_item'));
         }
     }
     if (!\Input::get('items')) {
         return '';
     }
     $this->mlGroups = deserialize($this->mlGroups);
     if (!is_array($this->mlGroups) || empty($this->mlGroups)) {
         return '';
     }
     return parent::generate();
 }
Example #6
0
 /**
  * Display a wildcard in the back end
  * @return string
  */
 public function generate()
 {
     if (TL_MODE == 'BE') {
         $objTemplate = new BackendTemplate('be_wildcard');
         $objTemplate->wildcard = '### VISITORS LIST ###';
         $objTemplate->title = $this->headline;
         $objTemplate->id = $this->id;
         $objTemplate->link = $this->name;
         if (version_compare(VERSION . '.' . BUILD, '2.8.9', '>')) {
             // Code für Versionen ab 2.9.0
             $objTemplate->href = 'contao/main.php?do=themes&amp;table=tl_module&amp;act=edit&amp;id=' . $this->id;
         } else {
             // Code für Versionen < 2.9.0
             $objTemplate->wildcard = '### VISITORS MODUL ONLY FOR CONTAO 2.9 ###';
         }
         return $objTemplate->parse();
     }
     //alte und neue Art gemeinsam zum Array bringen
     if (strpos($this->visitors_categories, ':') !== false) {
         $this->visitors_categories = deserialize($this->visitors_categories, true);
     } else {
         $this->visitors_categories = array($this->visitors_categories);
     }
     // Return if there are no categories
     if (!is_array($this->visitors_categories) || !is_numeric($this->visitors_categories[0])) {
         return '';
     }
     $this->useragent_filter = $this->visitors_useragent;
     return parent::generate();
 }
Example #7
0
 /**
  * Display a wildcard in the back end
  * @return string
  */
 public function generate()
 {
     if (TL_MODE == 'BE') {
         $objTemplate = new BackendTemplate('be_wildcard');
         $objTemplate->wildcard = '### FAQ READER ###';
         $objTemplate->title = $this->headline;
         $objTemplate->id = $this->id;
         $objTemplate->link = $this->name;
         $objTemplate->href = 'contao/main.php?do=themes&amp;table=tl_module&amp;act=edit&amp;id=' . $this->id;
         return $objTemplate->parse();
     }
     // Set the item from the auto_item parameter
     if ($GLOBALS['TL_CONFIG']['useAutoItem'] && isset($_GET['auto_item'])) {
         $this->Input->setGet('items', $this->Input->get('auto_item'));
     }
     // Do not index or cache the page if no FAQ has been specified
     if (!$this->Input->get('items')) {
         global $objPage;
         $objPage->noSearch = 1;
         $objPage->cache = 0;
         return '';
     }
     $this->faq_categories = deserialize($this->faq_categories);
     // Do not index or cache the page if there are no categories
     if (!is_array($this->faq_categories) || empty($this->faq_categories)) {
         global $objPage;
         $objPage->noSearch = 1;
         $objPage->cache = 0;
         return '';
     }
     return parent::generate();
 }
Example #8
0
 /**
  * Display a wildcard in the back end
  * @return string
  */
 public function generate()
 {
     if (TL_MODE == 'BE') {
         $objTemplate = new BackendTemplate('be_wildcard');
         $objTemplate->wildcard = '### LISTING ###';
         $objTemplate->title = $this->headline;
         $objTemplate->id = $this->id;
         $objTemplate->link = $this->name;
         $objTemplate->href = 'contao/main.php?do=themes&amp;table=tl_module&amp;act=edit&amp;id=' . $this->id;
         return $objTemplate->parse();
     }
     // Return if the table or the fields have not been set
     if ($this->list_table == '' || $this->list_fields == '') {
         return '';
     }
     // Disable the details page
     if ($this->Input->get('show') && $this->list_info == '') {
         return '';
     }
     // Fallback to the default template
     if ($this->list_layout == '') {
         $this->list_layout = 'list_default';
     }
     $this->strTemplate = $this->list_layout;
     $this->list_where = $this->replaceInsertTags($this->list_where);
     return parent::generate();
 }
Example #9
0
	/**
	 * Redirect to the selected page
	 * @return string
	 */
	public function generate()
	{
		if (TL_MODE == 'BE')
		{
			$objTemplate = new BackendTemplate('be_wildcard');

			$objTemplate->wildcard = '### QUICK NAVIGATION ###';
			$objTemplate->title = $this->headline;
			$objTemplate->id = $this->id;
			$objTemplate->link = $this->name;
			$objTemplate->href = 'contao/main.php?do=themes&amp;table=tl_module&amp;act=edit&amp;id=' . $this->id;

			return $objTemplate->parse();
		}

		if ($this->Input->post('FORM_SUBMIT') == 'tl_quicknav')
		{
			if (strlen($this->Input->post('target', true)))
			{
				$this->redirect($this->Input->post('target', true));
			}

			$this->reload();
		}

		return parent::generate();
	}
 /**
  * Display a wildcard in the back end
  * @return string
  */
 public function generate()
 {
     if (TL_MODE == 'BE') {
         $objTemplate = new \BackendTemplate('be_wildcard');
         $objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['facebook_login'][0]) . ' ###';
         $objTemplate->title = $this->headline;
         $objTemplate->id = $this->id;
         $objTemplate->link = $this->name;
         $objTemplate->href = 'contao/main.php?do=themes&amp;table=tl_module&amp;act=edit&amp;id=' . $this->id;
         return $objTemplate->parse();
     }
     // Return if a front end user is logged in
     if (FE_USER_LOGGED_IN) {
         return '';
     }
     // Execute the login
     if (\Input::get('fblogin')) {
         if ($this->loginWithFacebook()) {
             $this->jumpToOrReload($this->jumpTo);
         } else {
             $_SESSION['FACEBOOK_LOGIN'] = \Message::generate();
             $this->redirect(preg_replace('/(\\?|&)fblogin=1/', '', \Environment::get('request')));
         }
     }
     return parent::generate();
 }
 /**
  * Do not display the module if there are no articles
  * @return string
  */
 public function generate()
 {
     if (TL_MODE == 'BE') {
         $objTemplate = new BackendTemplate('be_wildcard');
         $objTemplate->wildcard = '### ARTICLE NAVIGATION ###';
         $objTemplate->title = $this->headline;
         $objTemplate->id = $this->id;
         $objTemplate->link = $this->name;
         $objTemplate->href = 'contao/main.php?do=themes&amp;table=tl_module&amp;act=edit&amp;id=' . $this->id;
         return $objTemplate->parse();
     }
     global $objPage;
     $id = $objPage->id;
     $time = time();
     $this->objArticles = $this->Database->prepare("SELECT id, alias, title FROM tl_article WHERE pid=? AND inColumn=? AND showTeaser=1" . (!BE_USER_LOGGED_IN ? " AND (start='' OR start<{$time}) AND (stop='' OR stop>{$time}) AND published=1" : "") . " ORDER BY sorting")->execute($id, $this->strColumn);
     // Return if there are no articles
     if ($this->objArticles->numRows < 1) {
         return '';
     }
     // Redirect to the first article if no article is selected
     if (!$this->Input->get('articles')) {
         if (!$this->loadFirst) {
             return '';
         }
         $strAlias = $this->objArticles->alias != '' && !$GLOBALS['TL_CONFIG']['disableAlias'] ? $this->objArticles->alias : $this->objArticles->id;
         $this->redirect($this->addToUrl('articles=' . $strAlias));
     }
     return parent::generate();
 }
 /**
  * Display a wildcard in the back end
  *
  * @return string
  */
 public function generate()
 {
     if (TL_MODE == 'BE') {
         /** @var \BackendTemplate|object $objTemplate */
         $objTemplate = new \BackendTemplate('be_wildcard');
         $objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['nl_reader'][0]) . ' ###';
         $objTemplate->title = $this->headline;
         $objTemplate->id = $this->id;
         $objTemplate->link = $this->name;
         $objTemplate->href = 'contao/main.php?do=themes&amp;table=tl_module&amp;act=edit&amp;id=' . $this->id;
         return $objTemplate->parse();
     }
     // Set the item from the auto_item parameter
     if (!isset($_GET['items']) && \Config::get('useAutoItem') && isset($_GET['auto_item'])) {
         \Input::setGet('items', \Input::get('auto_item'));
     }
     // Do not index or cache the page if no news item has been specified
     if (!\Input::get('items')) {
         /** @var \PageModel $objPage */
         global $objPage;
         $objPage->noSearch = 1;
         $objPage->cache = 0;
         return '';
     }
     $this->nl_channels = deserialize($this->nl_channels);
     // Do not index or cache the page if there are no channels
     if (!is_array($this->nl_channels) || empty($this->nl_channels)) {
         /** @var \PageModel $objPage */
         global $objPage;
         $objPage->noSearch = 1;
         $objPage->cache = 0;
         return '';
     }
     return parent::generate();
 }
Example #13
0
 /**
  * Do not display the module if there are no articles
  * @return string
  */
 public function generate()
 {
     if (TL_MODE == 'BE') {
         $objTemplate = new \BackendTemplate('be_wildcard');
         $objTemplate->wildcard = '### ARTICLE NAVIGATION ###';
         $objTemplate->title = $this->headline;
         $objTemplate->id = $this->id;
         $objTemplate->link = $this->name;
         $objTemplate->href = 'contao/main.php?do=themes&amp;table=tl_module&amp;act=edit&amp;id=' . $this->id;
         return $objTemplate->parse();
     }
     global $objPage;
     $this->objArticles = \ArticleModel::findPublishedWithTeaserByPidAndColumn($objPage->id, $this->strColumn);
     // Return if there are no articles
     if ($this->objArticles === null) {
         return '';
     }
     // Redirect to the first article if no article is selected
     if (!\Input::get('articles')) {
         if (!$this->loadFirst) {
             return '';
         }
         $strAlias = $this->objArticles->alias != '' && !$GLOBALS['TL_CONFIG']['disableAlias'] ? $this->objArticles->alias : $this->objArticles->id;
         $this->redirect($this->addToUrl('articles=' . $strAlias));
     }
     return parent::generate();
 }
 /**
  * @return string
  */
 public function generate()
 {
     $this->configuration = AntragoConnector::getAntragoConfiguration($this->arrData['ac_configuration']);
     $this->categoryIds = deserialize($this->arrData['ac_categories']);
     $antragoCategories = json_decode(AntragoConnector::getContentFromApi($this->configuration['api_host'] . "/categories", $this->configuration['api_user'], $this->configuration['api_password']), true);
     foreach ($antragoCategories as $val) {
         $this->antragoCategories[$val['id']] = $val;
     }
     // wildcard backend
     if (TL_MODE === 'BE') {
         $template = new \BackendTemplate('be_wildcard');
         $template->wildcard = '### ANTRAGO EVENT-LISTE ###';
         $template->title = "Kategorien: " . implode(', ', deserialize($this->arrData['ac_categories']));
         return $template->parse();
     }
     // EventList Frontend
     // Data der vorhandenen Kategorien holen
     $arrCategoryData = array();
     // hole Kategorien
     foreach ($this->categoryIds as $key => $catId) {
         $arrCategoryData[$key] = array("categoryName" => $this->antragoCategories[$catId]['name'], "categoryId" => $this->antragoCategories[$catId]['id'], "eventData" => $this->getAntragoEventsById($catId));
     }
     $this->eventData = $arrCategoryData;
     return parent::generate();
 }
Example #15
0
 /**
  * Display a wildcard in the back end
  *
  * @return string
  */
 public function generate()
 {
     if (TL_MODE == 'BE') {
         /** @var \BackendTemplate|object $objTemplate */
         $objTemplate = new \BackendTemplate('be_wildcard');
         $objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['listing'][0]) . ' ###';
         $objTemplate->title = $this->headline;
         $objTemplate->id = $this->id;
         $objTemplate->link = $this->name;
         $objTemplate->href = 'contao/main.php?do=themes&amp;table=tl_module&amp;act=edit&amp;id=' . $this->id;
         return $objTemplate->parse();
     }
     // Return if the table or the fields have not been set
     if ($this->list_table == '' || $this->list_fields == '') {
         return '';
     }
     // Disable the details page
     if (\Input::get('show') && $this->list_info == '') {
         return '';
     }
     // Fallback to the default template
     if ($this->list_layout == '') {
         $this->list_layout = 'list_default';
     }
     $this->strTemplate = $this->list_layout;
     $this->list_where = $this->replaceInsertTags($this->list_where, false);
     $this->list_info_where = $this->replaceInsertTags($this->list_info_where, false);
     return parent::generate();
 }
Example #16
0
 /**
  * Display a wildcard in the back end
  * @return string
  */
 public function generate()
 {
     if (TL_MODE == 'BE') {
         $objTemplate = new \BackendTemplate('be_wildcard');
         $objTemplate->wildcard = '### RSS READER ###';
         $objTemplate->title = $this->headline;
         $objTemplate->id = $this->id;
         $objTemplate->link = $this->name;
         $objTemplate->href = 'contao/main.php?do=themes&amp;table=tl_module&amp;act=edit&amp;id=' . $this->id;
         return $objTemplate->parse();
     }
     $this->objFeed = new \SimplePie();
     $arrUrls = trimsplit('[\\n\\t ]', trim($this->rss_feed));
     if (count($arrUrls) > 1) {
         $this->objFeed->set_feed_url($arrUrls);
     } else {
         $this->objFeed->set_feed_url($arrUrls[0]);
     }
     $this->objFeed->set_output_encoding($GLOBALS['TL_CONFIG']['characterSet']);
     $this->objFeed->set_cache_location(TL_ROOT . '/system/tmp');
     $this->objFeed->enable_cache(false);
     if ($this->rss_cache > 0) {
         $this->objFeed->enable_cache(true);
         $this->objFeed->set_cache_duration($this->rss_cache);
     }
     if (!$this->objFeed->init()) {
         $this->log('Error importing RSS feed "' . $this->rss_feed . '"', 'ModuleRssReader generate()', TL_ERROR);
         return '';
     }
     $this->objFeed->handle_content_type();
     return parent::generate();
 }
 /**
  * Display a wildcard in the back end
  * @return string
  */
 public function generate()
 {
     if (TL_MODE == 'BE') {
         $objTemplate = new BackendTemplate('be_wildcard');
         $objTemplate->wildcard = '### NEWSLETTER READER ###';
         $objTemplate->title = $this->headline;
         $objTemplate->id = $this->id;
         $objTemplate->link = $this->name;
         $objTemplate->href = 'contao/main.php?do=themes&amp;table=tl_module&amp;act=edit&amp;id=' . $this->id;
         return $objTemplate->parse();
     }
     // Return if no news item has been specified
     if (!$this->Input->get('items')) {
         global $objPage;
         // Do not index the page
         $objPage->noSearch = 1;
         $objPage->cache = 0;
         return '';
     }
     $this->nl_channels = deserialize($this->nl_channels);
     // Return if there are no channels
     if (!is_array($this->nl_channels) || count($this->nl_channels) < 1) {
         global $objPage;
         // Do not index the page
         $objPage->noSearch = 1;
         $objPage->cache = 0;
         return '';
     }
     return parent::generate();
 }
Example #18
0
 /**
  * Do not display the module if there are no articles
  *
  * @return string
  */
 public function generate()
 {
     if (TL_MODE == 'BE') {
         /** @var \BackendTemplate|object $objTemplate */
         $objTemplate = new \BackendTemplate('be_wildcard');
         $objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['articlenav'][0]) . ' ###';
         $objTemplate->title = $this->headline;
         $objTemplate->id = $this->id;
         $objTemplate->link = $this->name;
         $objTemplate->href = '' . $GLOBALS['TL_CONFIG']['backendPath'] . '/main.php?do=themes&amp;table=tl_module&amp;act=edit&amp;id=' . $this->id;
         return $objTemplate->parse();
     }
     /** @var \PageModel $objPage */
     global $objPage;
     $this->objArticles = \ArticleModel::findPublishedWithTeaserByPidAndColumn($objPage->id, $this->strColumn);
     // Return if there are no articles
     if ($this->objArticles === null) {
         return '';
     }
     // Redirect to the first article if no article is selected
     if (!\Input::get('articles')) {
         if (!$this->loadFirst) {
             return '';
         }
         /** @var \ArticleModel $objArticle */
         $objArticle = $this->objArticles->current();
         $strAlias = $objArticle->alias != '' && !\Config::get('disableAlias') ? $objArticle->alias : $objArticle->id;
         $this->redirect($this->generateFrontendUrl($objPage->row(), '/articles/' . $strAlias));
     }
     return parent::generate();
 }
Example #19
0
 /**
  * Check the source folder
  * @return string
  */
 public function generate()
 {
     $this->multiSRC = deserialize($this->multiSRC);
     if (!is_array($this->multiSRC)) {
         return '';
     }
     return parent::generate();
 }
 /**
  * Parse the template
  * @return string
  */
 public function generate()
 {
     if ($this->Input->get('pdf')) {
         $this->_createPDF();
         return;
     }
     return parent::generate();
 }
 public function generate()
 {
     if (TL_MODE == 'BE') {
         $objTemplate = new \BackendTemplate('be_wildcard');
         $objTemplate->wildcard = '### Article Filter - Results ###';
         return $objTemplate->parse();
     }
     return parent::generate();
 }
Example #22
0
 /**
  * Include messages if enabled
  * @return string
  */
 public function generate()
 {
     $strBuffer = parent::generate();
     // Prepend any messages to the module output
     if ($this->iso_includeMessages) {
         $strBuffer = IsotopeFrontend::getIsotopeMessages() . $strBuffer;
     }
     return $strBuffer;
 }
Example #23
0
 public function generate()
 {
     if (TL_MODE == 'BE') {
         $this->Template = new BackendTemplate('be_wildcard');
         $this->Template->wildcard = '### PHP SCRIPT MODULE ###';
         return $this->Template->parse();
     }
     return parent::generate();
 }
Example #24
0
 /**
  * Check whether the article is published
  *
  * @param boolean $blnNoMarkup
  *
  * @return string
  */
 public function generate($blnNoMarkup = false)
 {
     if (TL_MODE == 'FE' && !BE_USER_LOGGED_IN && (!$this->published || $this->start != '' && $this->start > time() || $this->stop != '' && $this->stop < time())) {
         return '';
     }
     $this->type = 'article';
     $this->blnNoMarkup = $blnNoMarkup;
     return parent::generate();
 }
 /**
  * Display a wildcard in the back end
  * @return string
  */
 public function generate()
 {
     if (TL_MODE == 'BE') {
         $objTemplate = new BackendTemplate('be_wildcard');
         $objTemplate->wildcard = '### Jeu concours ###';
         return $objTemplate->parse();
     }
     return parent::generate();
 }
Example #26
0
 /**
  * Check whether the article is published
  * @param boolean
  * @return string
  */
 public function generate($blnNoMarkup = false)
 {
     $this->type = 'article';
     $this->blnNoMarkup = $blnNoMarkup;
     if (!BE_USER_LOGGED_IN && (!$this->published || $this->start > 0 && $this->start > time() || $this->stop > 0 && $this->stop < time())) {
         return '';
     }
     return parent::generate();
 }
 /**
  * Generate content element
  */
 public function generate()
 {
     if (TL_MODE == 'BE') {
         $objMap = $this->Database->prepare("SELECT * FROM tl_c4g_maps WHERE id=?")->limit(1)->execute($this->c4g_map_id);
         $return = '<h1>' . $objMap->name . '<img src="system/modules/con4gis_maps3/assets/images/logo_con4gis-maps.png" style="float:right"></h1>';
         return $return;
     }
     return parent::generate();
 }
Example #28
0
 /**
  * Display a wildcard in the back end
  * @return string
  */
 public function generate()
 {
     if (TL_MODE == 'BE') {
         $_objTemplate = new Template('be_wildcard');
         $objTemplate->wildcard = $this->name;
         return $objTemplate->parse();
     }
     return parent::generate();
 }
 public function generate()
 {
     if (TL_MODE == 'BE') {
         $t = new BackendTemplate('be_wildcard');
         $t->wildcard = '### Contao Piwik Visitor Optout ###';
         return $t->parse();
     }
     return parent::generate();
 }
Example #30
0
 /**
  * Display a wildcard in the back end
  *
  * @return string
  */
 public function generate()
 {
     if (TL_MODE == 'BE') {
         $objTemplate = new BackendTemplate('be_wildcard');
         $objTemplate->wildcard = '### Extended 404 ###';
         $objTemplate->title = $this->headline;
         return $objTemplate->parse();
     }
     return parent::generate();
 }