Ejemplo n.º 1
0
 public function getDefaultRobots()
 {
     $oldPath = craft()->path->getTemplatesPath();
     $newPath = craft()->path->getPluginsPath() . 'seomatic/templates';
     craft()->path->setTemplatesPath($newPath);
     /* -- Return the robots.txt default template */
     $templateName = '_robotsDefault';
     $loader = new TemplateLoader();
     $template = $loader->getSource($templateName);
     craft()->path->setTemplatesPath($oldPath);
     return $template;
 }
Ejemplo n.º 2
0
 /**
  * Parse the template file and return it as string
  *
  * @return string The template markup
  */
 public function parse()
 {
     $strBuffer = '';
     // Start with the template itself
     $this->strParent = $this->strTemplate;
     // Include the parent templates
     while ($this->strParent !== null) {
         $strCurrent = $this->strParent;
         $strParent = $this->strDefault ?: $this->getTemplate($this->strParent, $this->strFormat);
         // Reset the flags
         $this->strParent = null;
         $this->strDefault = null;
         ob_start();
         include $strParent;
         // Capture the output of the root template
         if ($this->strParent === null) {
             $strBuffer = ob_get_contents();
         } elseif ($this->strParent == $strCurrent) {
             $this->strDefault = \TemplateLoader::getDefaultPath($this->strParent, $this->strFormat);
         }
         ob_end_clean();
     }
     // Reset the internal arrays
     $this->arrBlocks = array();
     // Add start and end markers in debug mode
     if (\Config::get('debugMode')) {
         $strRelPath = str_replace(TL_ROOT . '/', '', $this->getTemplate($this->strTemplate, $this->strFormat));
         $strBuffer = "\n<!-- TEMPLATE START: {$strRelPath} -->\n{$strBuffer}\n<!-- TEMPLATE END: {$strRelPath} -->\n";
     }
     return $strBuffer;
 }
Ejemplo n.º 3
0
 /**
  * Return all template files of a particular group as array
  *
  * @param string $strPrefix The template name prefix (e.g. "ce_")
  *
  * @return array An array of template names
  */
 public static function getTemplateGroup($strPrefix)
 {
     $arrTemplates = array();
     // Get the default templates
     foreach (\TemplateLoader::getPrefixedFiles($strPrefix) as $strTemplate) {
         $arrTemplates[$strTemplate][] = 'root';
     }
     $arrCustomized = glob(TL_ROOT . '/templates/' . $strPrefix . '*');
     // Add the customized templates
     if (is_array($arrCustomized)) {
         foreach ($arrCustomized as $strFile) {
             $strTemplate = basename($strFile, strrchr($strFile, '.'));
             $arrTemplates[$strTemplate][] = $GLOBALS['TL_LANG']['MSC']['global'];
         }
     }
     // Do not look for back end templates in theme folders (see #5379)
     if ($strPrefix != 'be_' && $strPrefix != 'mail_') {
         // Try to select the themes (see #5210)
         try {
             $objTheme = \ThemeModel::findAll(array('order' => 'name'));
         } catch (\Exception $e) {
             $objTheme = null;
         }
         // Add the theme templates
         if ($objTheme !== null) {
             while ($objTheme->next()) {
                 if ($objTheme->templates != '') {
                     $arrThemeTemplates = glob(TL_ROOT . '/' . $objTheme->templates . '/' . $strPrefix . '*');
                     if (is_array($arrThemeTemplates)) {
                         foreach ($arrThemeTemplates as $strFile) {
                             $strTemplate = basename($strFile, strrchr($strFile, '.'));
                             if (!isset($arrTemplates[$strTemplate])) {
                                 $arrTemplates[$strTemplate][] = $objTheme->name;
                             } else {
                                 $arrTemplates[$strTemplate][] = $objTheme->name;
                             }
                         }
                     }
                 }
             }
         }
     }
     // Show the template sources (see #6875)
     foreach ($arrTemplates as $k => $v) {
         $v = array_filter($v, function ($a) {
             return $a != 'root';
         });
         if (empty($v)) {
             $arrTemplates[$k] = $k;
         } else {
             $arrTemplates[$k] = $k . ' (' . implode(', ', $v) . ')';
         }
     }
     // Sort the template names
     ksort($arrTemplates);
     return $arrTemplates;
 }
Ejemplo n.º 4
0
 /**
  * only load templates if bootstrap is activated, so diverent layouts will work instead of template changes
  *
  * @param \PageModel   $page
  * @param \LayoutModel $layout
  */
 public function initializeLayout($page, \LayoutModel $layout)
 {
     static::$pageLayout = $layout;
     if (!static::isEnabled()) {
         return;
     }
     // reset default framework
     static::$pageLayout->framework = null;
     $templates = $GLOBALS['BOOTSTRAP']['templates']['dynamicLoad'];
     // only load these templates if layout uses it because default templates are changed
     foreach ($templates as $path => $templates) {
         foreach ($templates as $template) {
             \TemplateLoader::addFile($template, $path);
         }
     }
 }
Ejemplo n.º 5
0
 /**
  * Choose the right template
  */
 public function chooseTemplates()
 {
     // do not choose backend templates in the frontend see #27
     if (TL_MODE == "FE") {
         return;
     }
     // check theme for back end user
     /** @var \BackendUser $objUser */
     $objUser = \Controller::importStatic('BackendUser');
     $loggedIn = $this->beUserLoggedIn($objUser);
     $theme = $objUser->backendTheme;
     if ($loggedIn === false && \Config::get('backendTheme') != "sb-admin" || $theme !== null && $theme != "sb-admin") {
         return;
     }
     // modified templates
     $arrTemplate = array('be_changelog', 'be_chart_panel', 'be_confirm', 'be_diff', 'be_error', 'be_forbidden', 'be_help', 'be_incomplete', 'be_install', 'be_login', 'be_main', 'be_navigation', 'be_no_active', 'be_no_forward', 'be_no_layout', 'be_no_page', 'be_no_root', 'be_pagination', 'be_password', 'be_picker', 'be_popup', 'be_purge_data', 'be_referer', 'be_switch', 'be_unavailable', 'be_welcome');
     // Register the template
     foreach ($arrTemplate as $value) {
         \TemplateLoader::addFile($value, 'system/modules/sb-admin/templates/backend');
     }
 }
Ejemplo n.º 6
0
 /**
  * Find a particular template file and return its path
  *
  * @param string  $strTemplate The name of the template
  * @param string  $strFormat   The file extension
  * @param boolean $blnDefault  If true, the default template path is returned
  *
  * @return string The path to the template file
  */
 protected function getTemplatePath($strTemplate, $strFormat = 'html5', $blnDefault = false)
 {
     if ($blnDefault) {
         return \TemplateLoader::getDefaultPath($strTemplate, $strFormat);
     }
     return \Controller::getTemplate($strTemplate, $strFormat);
 }
Ejemplo n.º 7
0
<?php

/**
 * Contao Open Source CMS
 *
 * Copyright (c) 2005-2014 Leo Feyer
 *
 * @package Newsletter
 * @link    https://contao.org
 * @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL
 */
/**
 * Register the classes
 */
ClassLoader::addClasses(array('Contao\\Newsletter' => 'system/modules/newsletter/classes/Newsletter.php', 'Contao\\NewsletterChannelModel' => 'system/modules/newsletter/models/NewsletterChannelModel.php', 'Contao\\NewsletterModel' => 'system/modules/newsletter/models/NewsletterModel.php', 'Contao\\NewsletterRecipientsModel' => 'system/modules/newsletter/models/NewsletterRecipientsModel.php', 'Contao\\ModuleNewsletterList' => 'system/modules/newsletter/modules/ModuleNewsletterList.php', 'Contao\\ModuleNewsletterReader' => 'system/modules/newsletter/modules/ModuleNewsletterReader.php', 'Contao\\ModuleSubscribe' => 'system/modules/newsletter/modules/ModuleSubscribe.php', 'Contao\\ModuleUnsubscribe' => 'system/modules/newsletter/modules/ModuleUnsubscribe.php'));
/**
 * Register the templates
 */
TemplateLoader::addFiles(array('mod_newsletter' => 'system/modules/newsletter/templates/modules', 'mod_newsletter_list' => 'system/modules/newsletter/templates/modules', 'mod_newsletter_reader' => 'system/modules/newsletter/templates/modules', 'nl_default' => 'system/modules/newsletter/templates/newsletter'));
Ejemplo n.º 8
0
<?php

/**
 * The MetaModels extension allows the creation of multiple collections of custom items,
 * each with its own unique set of selectable attributes, with attribute extendability.
 * The Front-End modules allow you to build powerful listing and filtering of the
 * data in each collection.
 *
 * PHP version 5
 * @package    MetaModels
 * @subpackage AttributeNumeric
 * @author     Christian Schiffler <*****@*****.**>
 * @author     Stefan Heimes <*****@*****.**>
 * @author     Andreas Isaak <*****@*****.**>
 * @author     David Greminger <*****@*****.**>
 * @copyright  The MetaModels team.
 * @license    LGPL.
 * @filesource
 */
/**
 * Register the templates
 */
TemplateLoader::addFiles(array('mm_attr_numeric' => 'system/modules/metamodelsattribute_numeric/templates'));
Ejemplo n.º 9
0
<?php

/**
 * Dropbox tools extension for Contao Open Source CMS
 *
 * Copyright (C) 2015 Davide Rocchi
 *
 * @package dropbox_tools
 * @author  Davide Rocchi <http://www.daviderocchi.it>
 * @license LGPL
 */
/**
 * Register the namespace
 */
ClassLoader::addNamespace('DropboxTools');
/**
 * Register the classes
 */
ClassLoader::addClasses(array('DropboxTools\\DropboxClient' => 'system/modules/dropbox_tools/classes/DropboxClient.php', 'DropboxTools\\WidgetDropboxChooser' => 'system/modules/dropbox_tools/widgets/WidgetDropboxChooser.php', 'DropboxTools\\ContentDropboxDownloads' => 'system/modules/dropbox_tools/elements/ContentDropboxDownloads.php', 'DropboxTools\\ContentDropboxToolsTest' => 'system/modules/dropbox_tools/elements/ContentDropboxToolsTest.php'));
/**
 * Register the templates
 */
TemplateLoader::addFiles(array('ce_dropbox_downloads' => 'system/modules/dropbox_tools/templates/elements', 'ce_dropboxtoolstest' => 'system/modules/dropbox_tools/templates/elements'));
Ejemplo n.º 10
0
<?php

/**
 * Contao Open Source CMS
 *
 * Copyright (c) 2005-2016 Leo Feyer
 *
 * @license LGPL-3.0+
 */
/**
 * Register the namespaces
 */
ClassLoader::addNamespaces(array('Hofff'));
/**
 * Register the classes
 */
ClassLoader::addClasses(array('Hofff\\Contao\\Calendarfield\\FormCalendarField' => 'system/modules/hofff_calendarfield/forms/FormCalendarField.php'));
/**
 * Register the templates
 */
TemplateLoader::addFiles(array('form_calendarfield' => 'system/modules/hofff_calendarfield/templates/forms'));
Ejemplo n.º 11
0
<?php

/**
 * news_categories extension for Contao Open Source CMS
 *
 * Copyright (C) 2011-2014 Codefog
 *
 * @package news_categories
 * @author  Webcontext <http://webcontext.com>
 * @author  Codefog <*****@*****.**>
 * @author  Kamil Kuzminski <*****@*****.**>
 * @license LGPL
 */
/**
 * Register the namespace
 */
ClassLoader::addNamespace('NewsCategories');
/**
 * Register the classes
 */
ClassLoader::addClasses(array('NewsCategories\\News' => 'system/modules/news_categories/classes/News.php', 'NewsCategories\\NewsCategories' => 'system/modules/news_categories/classes/NewsCategories.php', 'NewsCategories\\ContentNewsFilter' => 'system/modules/news_categories/elements/ContentNewsFilter.php', 'NewsCategories\\NewsCategoryModel' => 'system/modules/news_categories/models/NewsCategoryModel.php', 'NewsCategories\\NewsCategoryMultilingualModel' => 'system/modules/news_categories/models/NewsCategoryMultilingualModel.php', 'NewsCategories\\NewsModel' => 'system/modules/news_categories/models/NewsModel.php', 'NewsCategories\\ModuleNewsCategories' => 'system/modules/news_categories/modules/ModuleNewsCategories.php', 'NewsCategories\\ModuleNewsArchive' => 'system/modules/news_categories/modules/ModuleNewsArchive.php', 'NewsCategories\\ModuleNewsList' => 'system/modules/news_categories/modules/ModuleNewsList.php', 'NewsCategories\\ModuleNewsMenu' => 'system/modules/news_categories/modules/ModuleNewsMenu.php'));
/**
 * Register the templates
 */
TemplateLoader::addFiles(array('mod_newscategories' => 'system/modules/news_categories/templates/modules', 'nav_newscategories' => 'system/modules/news_categories/templates/navigation'));
<?php

/**
 * Responsive Navigation Extension for Contao
 *
 * Copyright (c) 2016 Falko Schumann
 *
 * @package  ResponsiveNavigation
 * @link     https://github.com/falkoschumann/contao-responsive-navigation
 * @license  http://opensource.org/licenses/MIT MIT
 */
/**
 * Register the templates.
 */
TemplateLoader::addFiles(array('j_responsive_navigation' => 'system/modules/responsive-navigation/templates/jquery'));
<?php

/**
 * The MetaModels extension allows the creation of multiple collections of custom items,
 * each with its own unique set of selectable attributes, with attribute extendability.
 * The Front-End modules allow you to build powerful listing and filtering of the
 * data in each collection.
 *
 * PHP version 5
 *
 * @package     MetaModels
 * @subpackage  AttributeTranslatedLongtext
 * @author      Christian Schiffler <*****@*****.**>
 * @author      Andreas Isaak <*****@*****.**>
 * @author      Christopher Boelter <*****@*****.**>
 * @copyright   The MetaModels team.
 * @license     LGPL.
 * @filesource
 */
/**
 * Register the templates
 */
TemplateLoader::addFiles(array('mm_attr_translatedlongtext' => 'system/modules/metamodelsattribute_translatedlongtext/templates'));
Ejemplo n.º 14
0
<?php

/**
 * Extension for Contao Open Source CMS
 *
 * Copyright (C) 2009 - 2016 terminal42 gmbh
 *
 * @package    easy_themes
 * @link       http://www.terminal42.ch
 * @license    http://opensource.org/licenses/lgpl-3.0.html LGPL
 */
/**
 * Register the classes
 */
ClassLoader::addClasses(array('CheckBoxChooseAtLeastOne' => 'system/modules/easy_themes/CheckBoxChooseAtLeastOne.php', 'EasyThemes' => 'system/modules/easy_themes/EasyThemes.php'));
/**
 * Register the templates
 */
TemplateLoader::addFiles(array('be_easythemes' => 'system/modules/easy_themes/templates'));
Ejemplo n.º 15
0
<?php

/**
 * Contao Open Source CMS
 *
 * Copyright (c) 2005-2015 Leo Feyer
 *
 * @package   aparat
 * @author    Hamid Abbaszadeh
 * @license   GNU/GPL2
 * @copyright respinar 2014-2015
 */
/**
 * Register the namespaces
 */
ClassLoader::addNamespaces(array('aparat'));
/**
 * Register the classes
 */
ClassLoader::addClasses(array('aparat\\ContentAparat' => 'system/modules/aparat/elements/ContentAparat.php'));
/**
 * Register the templates
 */
TemplateLoader::addFiles(array('ce_aparat' => 'system/modules/aparat/templates/elements'));
Ejemplo n.º 16
0
<?php

/**
 * Contao Open Source CMS
 *
 * Copyright (c) 2005-2016 Leo Feyer
 *
 * @license LGPL-3.0+
 */
/**
 * Register the namespaces
 */
ClassLoader::addNamespaces(array('Hofff'));
/**
 * Register the classes
 */
ClassLoader::addClasses(array('Hofff\\Contao\\NewsletterExtended\\ModuleSubscribeExtended' => 'system/modules/hofff_newsletter-extended/modules/ModuleSubscribeExtended.php'));
/**
 * Register the templates
 */
TemplateLoader::addFiles(array('nl_ext_default' => 'system/modules/hofff_newsletter-extended/templates/newsletter'));
Ejemplo n.º 17
0
<?php

/**
 * PHP version 5
 * @package    dc-general
 * @author     Christian Schiffler <*****@*****.**>
 * @author     Stefan Heimes <*****@*****.**>
 * @author     Tristan Lins <*****@*****.**>
 * @copyright  Contao Community Alliance.
 * @license    LGPL.
 * @filesource
 */
/**
 * Register the classes
 */
ClassLoader::addClasses(array('DC_General' => 'system/modules/dc-general/DC_General.php'));
/**
 * Register the templates
 */
TemplateLoader::addFiles(array('dcbe_general_edit' => 'system/modules/dc-general/templates', 'dcbe_general_field' => 'system/modules/dc-general/templates', 'dcbe_general_language_panel' => 'system/modules/dc-general/templates', 'dcbe_general_listView' => 'system/modules/dc-general/templates', 'dcbe_general_listView_sorting' => 'system/modules/dc-general/templates', 'dcbe_general_panel' => 'system/modules/dc-general/templates', 'dcbe_general_panel_filter' => 'system/modules/dc-general/templates', 'dcbe_general_panel_limit' => 'system/modules/dc-general/templates', 'dcbe_general_panel_search' => 'system/modules/dc-general/templates', 'dcbe_general_panel_sort' => 'system/modules/dc-general/templates', 'dcbe_general_panel_submit' => 'system/modules/dc-general/templates', 'dcbe_general_parentView' => 'system/modules/dc-general/templates', 'dcbe_general_show' => 'system/modules/dc-general/templates', 'dcbe_general_treeview' => 'system/modules/dc-general/templates', 'dcbe_general_treeview_child' => 'system/modules/dc-general/templates', 'dcbe_general_treeview_entry' => 'system/modules/dc-general/templates', 'dcbe_general_breadcrumb' => 'system/modules/dc-general/templates', 'dcbe_general_grouping' => 'system/modules/dc-general/templates', 'widget_treepicker' => 'system/modules/dc-general/templates', 'widget_treepicker_popup' => 'system/modules/dc-general/templates', 'widget_treepicker_entry' => 'system/modules/dc-general/templates', 'widget_treepicker_child' => 'system/modules/dc-general/templates'));
Ejemplo n.º 18
0
<?php

/**
 * Contao Open Source CMS
 *
 * Copyright (c) 2005-2015 Leo Feyer
 *
 * @license LGPL-3.0+
 */
/**
 * Register the classes
 */
ClassLoader::addClasses(array('AjaxLayout' => 'system/modules/ajax_layout/classes/AjaxLayout.php'));
/**
 * Register the templates
 */
TemplateLoader::addFiles(array('fe_page_ajax' => 'system/modules/ajax_layout/templates'));
<?php

/**
 * Contao Open Source CMS
 *
 * Copyright (c) 2005-2014 Leo Feyer
 *
 * @package Inserttag_download
 * @link    https://contao.org
 * @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL
 */
/**
 * Register the namespaces
 */
ClassLoader::addNamespaces(array('HeimrichHannot'));
/**
 * Register the classes
 */
ClassLoader::addClasses(array('HeimrichHannot\\InserttagDownload' => 'system/modules/inserttag_download/classes/InserttagDownload.php', 'ContentDownloadInserttag' => 'system/modules/inserttag_download/classes/ContentDownloadInserttag.php'));
/**
 * Register the templates
 */
TemplateLoader::addFiles(array('ce_download_inserttag' => 'system/modules/inserttag_download/templates/elements', 'block_searchable_inline' => 'system/modules/inserttag_download/templates/blocks'));
Ejemplo n.º 20
0
<?php

/**
 * Contao Open Source CMS
 *
 * Copyright (c) 2005-2015 Leo Feyer
 *
 * @license LGPL-3.0+
 */
// Classes
ClassLoader::addClasses(array('Contao\\News' => 'vendor/contao/news-bundle/src/Resources/contao/classes/News.php', 'Contao\\NewsArchiveModel' => 'vendor/contao/news-bundle/src/Resources/contao/models/NewsArchiveModel.php', 'Contao\\NewsFeedModel' => 'vendor/contao/news-bundle/src/Resources/contao/models/NewsFeedModel.php', 'Contao\\NewsModel' => 'vendor/contao/news-bundle/src/Resources/contao/models/NewsModel.php', 'Contao\\ModuleNews' => 'vendor/contao/news-bundle/src/Resources/contao/modules/ModuleNews.php', 'Contao\\ModuleNewsArchive' => 'vendor/contao/news-bundle/src/Resources/contao/modules/ModuleNewsArchive.php', 'Contao\\ModuleNewsList' => 'vendor/contao/news-bundle/src/Resources/contao/modules/ModuleNewsList.php', 'Contao\\ModuleNewsMenu' => 'vendor/contao/news-bundle/src/Resources/contao/modules/ModuleNewsMenu.php', 'Contao\\ModuleNewsReader' => 'vendor/contao/news-bundle/src/Resources/contao/modules/ModuleNewsReader.php'));
// Templates
TemplateLoader::addFiles(array('mod_newsarchive' => 'vendor/contao/news-bundle/src/Resources/contao/templates/modules', 'mod_newslist' => 'vendor/contao/news-bundle/src/Resources/contao/templates/modules', 'mod_newsmenu' => 'vendor/contao/news-bundle/src/Resources/contao/templates/modules', 'mod_newsreader' => 'vendor/contao/news-bundle/src/Resources/contao/templates/modules', 'news_full' => 'vendor/contao/news-bundle/src/Resources/contao/templates/news', 'news_latest' => 'vendor/contao/news-bundle/src/Resources/contao/templates/news', 'news_short' => 'vendor/contao/news-bundle/src/Resources/contao/templates/news', 'news_simple' => 'vendor/contao/news-bundle/src/Resources/contao/templates/news'));
Ejemplo n.º 21
0
<?php

/**
 * Register the templates
 */
TemplateLoader::addFiles(array('be_css_class_replacer_update' => 'system/modules/css-class-replacer/templates'));
Ejemplo n.º 22
0
<?php

/**
 * Contao Open Source CMS
 * 
 * Copyright (C) 2005-2015 Leo Feyer
 * 
 * @package   mmenu
 * @author    Dirk Klemmt
 * @license   MIT/GPL
 * @copyright Dirk Klemmt 2013-2015
 */
/**
 * Register the namespaces
 */
ClassLoader::addNamespaces(array('Dirch'));
/**
 * Register the classes
 */
ClassLoader::addClasses(array('Dirch\\mmenu\\Mmenu' => 'system/modules/dk_mmenu/classes/Mmenu.php', 'Dirch\\mmenu\\ModuleMmenu' => 'system/modules/dk_mmenu/modules/ModuleMmenu.php', 'Dirch\\mmenu\\ModuleCustomMmenu' => 'system/modules/dk_mmenu/modules/ModuleCustomMmenu.php', 'Dirch\\mmenu\\ModuleMmenuArticle' => 'system/modules/dk_mmenu/modules/ModuleMmenuArticle.php'));
/**
 * Register the templates
 */
TemplateLoader::addFiles(array('mod_mmenu' => 'system/modules/dk_mmenu/templates/modules', 'js_mmenu' => 'system/modules/dk_mmenu/templates/jquery'));
 /**
  * Compares the current to the original template
  *
  * @param DataContainer $dc
  *
  * @return string
  */
 public function compareTemplate(DataContainer $dc)
 {
     $strCurrentPath = $dc->id;
     $strName = pathinfo($strCurrentPath, PATHINFO_FILENAME);
     $strExtension = pathinfo($strCurrentPath, PATHINFO_EXTENSION);
     $arrTemplates = TemplateLoader::getFiles();
     $blnOverridesAnotherTpl = isset($arrTemplates[$strName]);
     $strPrefix = '';
     if (($pos = strpos($strName, '_')) !== false) {
         $strPrefix = substr($strName, 0, $pos + 1);
     }
     $strBuffer = '';
     $strCompareName = null;
     $strComparePath = null;
     // By default it's the original template to compare against
     if ($blnOverridesAnotherTpl) {
         $strCompareName = $strName;
         $strComparePath = $arrTemplates[$strCompareName] . '/' . $strCompareName . '.' . $strExtension;
         if ($strComparePath !== null) {
             $strBuffer .= '<p class="tl_info" style="margin-bottom:1em">' . sprintf($GLOBALS['TL_LANG']['tl_templates']['overridesAnotherTpl'], $strComparePath) . '</p>';
         }
     }
     // User selected template to compare against
     if (\Input::post('from') && isset($arrTemplates[\Input::post('from')])) {
         $strCompareName = \Input::post('from');
         $strComparePath = $arrTemplates[$strCompareName] . '/' . $strCompareName . '.' . $strExtension;
     }
     if ($strComparePath !== null) {
         $objCurrentFile = new \File($strCurrentPath, true);
         $objCompareFile = new \File($strComparePath, true);
         // Abort if one file is missing
         if (!$objCurrentFile->exists() || !$objCompareFile->exists()) {
             $this->redirect('contao/main.php?act=error');
         }
         $objDiff = new Diff($objCompareFile->getContentAsArray(), $objCurrentFile->getContentAsArray());
         $strDiff = $objDiff->Render(new DiffRenderer(array('field' => $strCurrentPath)));
         // Identical versions
         if ($strDiff == '') {
             $strBuffer .= '<p>' . $GLOBALS['TL_LANG']['MSC']['identicalVersions'] . '</p>';
         } else {
             $strBuffer .= $strDiff;
         }
     } else {
         $strBuffer .= '<p class="tl_info">' . $GLOBALS['TL_LANG']['tl_templates']['pleaseSelect'] . '</p>';
     }
     // Templates to compare against
     $arrComparable = array();
     $intPrefixLength = strlen($strPrefix);
     foreach ($arrTemplates as $k => $v) {
         if (substr($k, 0, $intPrefixLength) === $strPrefix) {
             $arrComparable[$k] = array('version' => $k, 'info' => $k . '.' . $strExtension);
         }
     }
     /** @var \BackendTemplate|object $objTemplate */
     $objTemplate = new \BackendTemplate('be_diff');
     // Template variables
     $objTemplate->staticTo = $strCurrentPath;
     $objTemplate->versions = $arrComparable;
     $objTemplate->from = $strCompareName;
     $objTemplate->showLabel = specialchars($GLOBALS['TL_LANG']['MSC']['showDifferences']);
     $objTemplate->content = $strBuffer;
     $objTemplate->theme = \Backend::getTheme();
     $objTemplate->base = \Environment::get('base');
     $objTemplate->language = $GLOBALS['TL_LANGUAGE'];
     $objTemplate->title = specialchars($GLOBALS['TL_LANG']['MSC']['showDifferences']);
     $objTemplate->charset = \Config::get('characterSet');
     \Config::set('debugMode', false);
     $objTemplate->output();
     exit;
 }
Ejemplo n.º 24
0
<?php

/**
 * Contao Open Source CMS
 *
 * Copyright (c) 2005-2014 Leo Feyer
 *
 * @package PHPInfo
 * @link    https://contao.org
 * @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL
 */
/**
 * Register the namespaces
 */
ClassLoader::addNamespaces(array('PHPInfo'));
/**
 * Register the classes
 */
ClassLoader::addClasses(array('PHPInfo\\PHPInfo' => 'system/modules/PHPInfo/classes/PHPInfo.php'));
/**
 * Register the templates
 */
TemplateLoader::addFiles(array('be_PHPInfo' => 'system/modules/PHPInfo/templates'));
Ejemplo n.º 25
0
<?php

/**
 * Contao Open Source CMS
 *
 * Copyright (c) 2005-2016 Leo Feyer
 *
 * @license LGPL-3.0+
 */
/**
 * Register the namespaces
 */
ClassLoader::addNamespaces(array('Contao'));
/**
 * Register the classes
 */
ClassLoader::addClasses(array('Contao\\Ajax' => 'system/modules/core/classes/Ajax.php', 'Contao\\Backend' => 'system/modules/core/classes/Backend.php', 'Contao\\BackendModule' => 'system/modules/core/classes/BackendModule.php', 'Contao\\BackendTemplate' => 'system/modules/core/classes/BackendTemplate.php', 'Contao\\BackendUser' => 'system/modules/core/classes/BackendUser.php', 'Contao\\DataContainer' => 'system/modules/core/classes/DataContainer.php', 'Contao\\DropZone' => 'system/modules/core/classes/DropZone.php', 'Contao\\FileUpload' => 'system/modules/core/classes/FileUpload.php', 'Contao\\Frontend' => 'system/modules/core/classes/Frontend.php', 'Contao\\FrontendTemplate' => 'system/modules/core/classes/FrontendTemplate.php', 'Contao\\FrontendUser' => 'system/modules/core/classes/FrontendUser.php', 'Contao\\Hybrid' => 'system/modules/core/classes/Hybrid.php', 'Contao\\LiveUpdate' => 'system/modules/core/classes/LiveUpdate.php', 'Contao\\Messages' => 'system/modules/core/classes/Messages.php', 'Contao\\PurgeData' => 'system/modules/core/classes/PurgeData.php', 'Contao\\RebuildIndex' => 'system/modules/core/classes/RebuildIndex.php', 'Contao\\StyleSheets' => 'system/modules/core/classes/StyleSheets.php', 'Contao\\Theme' => 'system/modules/core/classes/Theme.php', 'Contao\\Versions' => 'system/modules/core/classes/Versions.php', 'Contao\\BackendChangelog' => 'system/modules/core/controllers/BackendChangelog.php', 'Contao\\BackendConfirm' => 'system/modules/core/controllers/BackendConfirm.php', 'Contao\\BackendFile' => 'system/modules/core/controllers/BackendFile.php', 'Contao\\BackendHelp' => 'system/modules/core/controllers/BackendHelp.php', 'Contao\\BackendIndex' => 'system/modules/core/controllers/BackendIndex.php', 'Contao\\BackendInstall' => 'system/modules/core/controllers/BackendInstall.php', 'Contao\\BackendMain' => 'system/modules/core/controllers/BackendMain.php', 'Contao\\BackendPage' => 'system/modules/core/controllers/BackendPage.php', 'Contao\\BackendPassword' => 'system/modules/core/controllers/BackendPassword.php', 'Contao\\BackendPopup' => 'system/modules/core/controllers/BackendPopup.php', 'Contao\\BackendPreview' => 'system/modules/core/controllers/BackendPreview.php', 'Contao\\BackendSwitch' => 'system/modules/core/controllers/BackendSwitch.php', 'Contao\\FrontendCron' => 'system/modules/core/controllers/FrontendCron.php', 'Contao\\FrontendIndex' => 'system/modules/core/controllers/FrontendIndex.php', 'Contao\\FrontendShare' => 'system/modules/core/controllers/FrontendShare.php', 'Contao\\DC_File' => 'system/modules/core/drivers/DC_File.php', 'Contao\\DC_Folder' => 'system/modules/core/drivers/DC_Folder.php', 'Contao\\DC_Table' => 'system/modules/core/drivers/DC_Table.php', 'Contao\\ContentAccordion' => 'system/modules/core/elements/ContentAccordion.php', 'Contao\\ContentAccordionStart' => 'system/modules/core/elements/ContentAccordionStart.php', 'Contao\\ContentAccordionStop' => 'system/modules/core/elements/ContentAccordionStop.php', 'Contao\\ContentAlias' => 'system/modules/core/elements/ContentAlias.php', 'Contao\\ContentArticle' => 'system/modules/core/elements/ContentArticle.php', 'Contao\\ContentCode' => 'system/modules/core/elements/ContentCode.php', 'Contao\\ContentDownload' => 'system/modules/core/elements/ContentDownload.php', 'Contao\\ContentDownloads' => 'system/modules/core/elements/ContentDownloads.php', 'Contao\\ContentElement' => 'system/modules/core/elements/ContentElement.php', 'Contao\\ContentGallery' => 'system/modules/core/elements/ContentGallery.php', 'Contao\\ContentHeadline' => 'system/modules/core/elements/ContentHeadline.php', 'Contao\\ContentHtml' => 'system/modules/core/elements/ContentHtml.php', 'Contao\\ContentHyperlink' => 'system/modules/core/elements/ContentHyperlink.php', 'Contao\\ContentImage' => 'system/modules/core/elements/ContentImage.php', 'Contao\\ContentList' => 'system/modules/core/elements/ContentList.php', 'Contao\\ContentMarkdown' => 'system/modules/core/elements/ContentMarkdown.php', 'Contao\\ContentMedia' => 'system/modules/core/elements/ContentMedia.php', 'Contao\\ContentModule' => 'system/modules/core/elements/ContentModule.php', 'Contao\\ContentSliderStart' => 'system/modules/core/elements/ContentSliderStart.php', 'Contao\\ContentSliderStop' => 'system/modules/core/elements/ContentSliderStop.php', 'Contao\\ContentTable' => 'system/modules/core/elements/ContentTable.php', 'Contao\\ContentTeaser' => 'system/modules/core/elements/ContentTeaser.php', 'Contao\\ContentText' => 'system/modules/core/elements/ContentText.php', 'Contao\\ContentToplink' => 'system/modules/core/elements/ContentToplink.php', 'Contao\\ContentYouTube' => 'system/modules/core/elements/ContentYouTube.php', 'Contao\\Form' => 'system/modules/core/forms/Form.php', 'Contao\\FormCaptcha' => 'system/modules/core/forms/FormCaptcha.php', 'Contao\\FormCheckBox' => 'system/modules/core/forms/FormCheckBox.php', 'Contao\\FormExplanation' => 'system/modules/core/forms/FormExplanation.php', 'Contao\\FormFieldset' => 'system/modules/core/forms/FormFieldset.php', 'Contao\\FormFileUpload' => 'system/modules/core/forms/FormFileUpload.php', 'Contao\\FormHeadline' => 'system/modules/core/forms/FormHeadline.php', 'Contao\\FormHidden' => 'system/modules/core/forms/FormHidden.php', 'Contao\\FormHtml' => 'system/modules/core/forms/FormHtml.php', 'Contao\\FormPassword' => 'system/modules/core/forms/FormPassword.php', 'Contao\\FormRadioButton' => 'system/modules/core/forms/FormRadioButton.php', 'Contao\\FormSelectMenu' => 'system/modules/core/forms/FormSelectMenu.php', 'Contao\\FormSubmit' => 'system/modules/core/forms/FormSubmit.php', 'Contao\\FormTextArea' => 'system/modules/core/forms/FormTextArea.php', 'Contao\\FormTextField' => 'system/modules/core/forms/FormTextField.php', 'Contao\\Automator' => 'system/modules/core/library/Contao/Automator.php', 'Contao\\BaseTemplate' => 'system/modules/core/library/Contao/BaseTemplate.php', 'Contao\\Cache' => 'system/modules/core/library/Contao/Cache.php', 'Contao\\ClassLoader' => 'system/modules/core/library/Contao/ClassLoader.php', 'Contao\\Combiner' => 'system/modules/core/library/Contao/Combiner.php', 'Contao\\Config' => 'system/modules/core/library/Contao/Config.php', 'Contao\\Controller' => 'system/modules/core/library/Contao/Controller.php', 'Contao\\Database\\Installer' => 'system/modules/core/library/Contao/Database/Installer.php', 'Contao\\Database\\Mysql\\Result' => 'system/modules/core/library/Contao/Database/Mysql/Result.php', 'Contao\\Database\\Mysql\\Statement' => 'system/modules/core/library/Contao/Database/Mysql/Statement.php', 'Contao\\Database\\Mysql' => 'system/modules/core/library/Contao/Database/Mysql.php', 'Contao\\Database\\Mysqli\\Result' => 'system/modules/core/library/Contao/Database/Mysqli/Result.php', 'Contao\\Database\\Mysqli\\Statement' => 'system/modules/core/library/Contao/Database/Mysqli/Statement.php', 'Contao\\Database\\Mysqli' => 'system/modules/core/library/Contao/Database/Mysqli.php', 'Contao\\Database\\Result' => 'system/modules/core/library/Contao/Database/Result.php', 'Contao\\Database\\Statement' => 'system/modules/core/library/Contao/Database/Statement.php', 'Contao\\Database\\Updater' => 'system/modules/core/library/Contao/Database/Updater.php', 'Contao\\Database' => 'system/modules/core/library/Contao/Database.php', 'Contao\\Date' => 'system/modules/core/library/Contao/Date.php', 'Contao\\Dbafs' => 'system/modules/core/library/Contao/Dbafs.php', 'Contao\\DcaExtractor' => 'system/modules/core/library/Contao/DcaExtractor.php', 'Contao\\DcaLoader' => 'system/modules/core/library/Contao/DcaLoader.php', 'Contao\\DiffRenderer' => 'system/modules/core/library/Contao/DiffRenderer.php', 'Contao\\Email' => 'system/modules/core/library/Contao/Email.php', 'Contao\\Encryption' => 'system/modules/core/library/Contao/Encryption.php', 'Contao\\Environment' => 'system/modules/core/library/Contao/Environment.php', 'Contao\\Feed' => 'system/modules/core/library/Contao/Feed.php', 'Contao\\FeedItem' => 'system/modules/core/library/Contao/FeedItem.php', 'Contao\\File' => 'system/modules/core/library/Contao/File.php', 'Contao\\Files\\Ftp' => 'system/modules/core/library/Contao/Files/Ftp.php', 'Contao\\Files\\Php' => 'system/modules/core/library/Contao/Files/Php.php', 'Contao\\Files' => 'system/modules/core/library/Contao/Files.php', 'Contao\\Filter\\SqlFiles' => 'system/modules/core/library/Contao/Filter/SqlFiles.php', 'Contao\\Filter\\SyncExclude' => 'system/modules/core/library/Contao/Filter/SyncExclude.php', 'Contao\\Folder' => 'system/modules/core/library/Contao/Folder.php', 'Contao\\GdImage' => 'system/modules/core/library/Contao/GdImage.php', 'Contao\\Idna' => 'system/modules/core/library/Contao/Idna.php', 'Contao\\Image' => 'system/modules/core/library/Contao/Image.php', 'Contao\\Input' => 'system/modules/core/library/Contao/Input.php', 'Contao\\InsertTags' => 'system/modules/core/library/Contao/InsertTags.php', 'Contao\\Message' => 'system/modules/core/library/Contao/Message.php', 'Contao\\Model\\Collection' => 'system/modules/core/library/Contao/Model/Collection.php', 'Contao\\Model\\QueryBuilder' => 'system/modules/core/library/Contao/Model/QueryBuilder.php', 'Contao\\Model\\Registry' => 'system/modules/core/library/Contao/Model/Registry.php', 'Contao\\Model' => 'system/modules/core/library/Contao/Model.php', 'Contao\\ModuleLoader' => 'system/modules/core/library/Contao/ModuleLoader.php', 'Contao\\Pagination' => 'system/modules/core/library/Contao/Pagination.php', 'Contao\\Picture' => 'system/modules/core/library/Contao/Picture.php', 'Contao\\Request' => 'system/modules/core/library/Contao/Request.php', 'Contao\\RequestToken' => 'system/modules/core/library/Contao/RequestToken.php', 'Contao\\Search' => 'system/modules/core/library/Contao/Search.php', 'Contao\\Session' => 'system/modules/core/library/Contao/Session.php', 'Contao\\SortedIterator' => 'system/modules/core/library/Contao/SortedIterator.php', 'Contao\\String' => 'system/modules/core/library/Contao/String.php', 'Contao\\StringUtil' => 'system/modules/core/library/Contao/StringUtil.php', 'Contao\\System' => 'system/modules/core/library/Contao/System.php', 'Contao\\Template' => 'system/modules/core/library/Contao/Template.php', 'Contao\\TemplateLoader' => 'system/modules/core/library/Contao/TemplateLoader.php', 'Contao\\User' => 'system/modules/core/library/Contao/User.php', 'Contao\\Validator' => 'system/modules/core/library/Contao/Validator.php', 'Contao\\Widget' => 'system/modules/core/library/Contao/Widget.php', 'Contao\\ZipReader' => 'system/modules/core/library/Contao/ZipReader.php', 'Contao\\ZipWriter' => 'system/modules/core/library/Contao/ZipWriter.php', 'Contao\\ArticleModel' => 'system/modules/core/models/ArticleModel.php', 'Contao\\ContentModel' => 'system/modules/core/models/ContentModel.php', 'Contao\\FilesModel' => 'system/modules/core/models/FilesModel.php', 'Contao\\FormFieldModel' => 'system/modules/core/models/FormFieldModel.php', 'Contao\\FormModel' => 'system/modules/core/models/FormModel.php', 'Contao\\ImageSizeItemModel' => 'system/modules/core/models/ImageSizeItemModel.php', 'Contao\\ImageSizeModel' => 'system/modules/core/models/ImageSizeModel.php', 'Contao\\LayoutModel' => 'system/modules/core/models/LayoutModel.php', 'Contao\\MemberGroupModel' => 'system/modules/core/models/MemberGroupModel.php', 'Contao\\MemberModel' => 'system/modules/core/models/MemberModel.php', 'Contao\\ModuleModel' => 'system/modules/core/models/ModuleModel.php', 'Contao\\PageModel' => 'system/modules/core/models/PageModel.php', 'Contao\\SessionModel' => 'system/modules/core/models/SessionModel.php', 'Contao\\StyleModel' => 'system/modules/core/models/StyleModel.php', 'Contao\\StyleSheetModel' => 'system/modules/core/models/StyleSheetModel.php', 'Contao\\ThemeModel' => 'system/modules/core/models/ThemeModel.php', 'Contao\\UserGroupModel' => 'system/modules/core/models/UserGroupModel.php', 'Contao\\UserModel' => 'system/modules/core/models/UserModel.php', 'Contao\\Module' => 'system/modules/core/modules/Module.php', 'Contao\\ModuleArticle' => 'system/modules/core/modules/ModuleArticle.php', 'Contao\\ModuleArticleList' => 'system/modules/core/modules/ModuleArticleList.php', 'Contao\\ModuleArticlenav' => 'system/modules/core/modules/ModuleArticlenav.php', 'Contao\\ModuleBooknav' => 'system/modules/core/modules/ModuleBooknav.php', 'Contao\\ModuleBreadcrumb' => 'system/modules/core/modules/ModuleBreadcrumb.php', 'Contao\\ModuleChangePassword' => 'system/modules/core/modules/ModuleChangePassword.php', 'Contao\\ModuleCloseAccount' => 'system/modules/core/modules/ModuleCloseAccount.php', 'Contao\\ModuleCustomnav' => 'system/modules/core/modules/ModuleCustomnav.php', 'Contao\\ModuleFlash' => 'system/modules/core/modules/ModuleFlash.php', 'Contao\\ModuleHtml' => 'system/modules/core/modules/ModuleHtml.php', 'Contao\\ModuleLogin' => 'system/modules/core/modules/ModuleLogin.php', 'Contao\\ModuleLogout' => 'system/modules/core/modules/ModuleLogout.php', 'Contao\\ModuleMaintenance' => 'system/modules/core/modules/ModuleMaintenance.php', 'Contao\\ModuleNavigation' => 'system/modules/core/modules/ModuleNavigation.php', 'Contao\\ModulePassword' => 'system/modules/core/modules/ModulePassword.php', 'Contao\\ModulePersonalData' => 'system/modules/core/modules/ModulePersonalData.php', 'Contao\\ModuleQuicklink' => 'system/modules/core/modules/ModuleQuicklink.php', 'Contao\\ModuleQuicknav' => 'system/modules/core/modules/ModuleQuicknav.php', 'Contao\\ModuleRandomImage' => 'system/modules/core/modules/ModuleRandomImage.php', 'Contao\\ModuleRegistration' => 'system/modules/core/modules/ModuleRegistration.php', 'Contao\\ModuleRssReader' => 'system/modules/core/modules/ModuleRssReader.php', 'Contao\\ModuleSearch' => 'system/modules/core/modules/ModuleSearch.php', 'Contao\\ModuleSitemap' => 'system/modules/core/modules/ModuleSitemap.php', 'Contao\\ModuleUser' => 'system/modules/core/modules/ModuleUser.php', 'Contao\\PageError403' => 'system/modules/core/pages/PageError403.php', 'Contao\\PageError404' => 'system/modules/core/pages/PageError404.php', 'Contao\\PageForward' => 'system/modules/core/pages/PageForward.php', 'Contao\\PageRedirect' => 'system/modules/core/pages/PageRedirect.php', 'Contao\\PageRegular' => 'system/modules/core/pages/PageRegular.php', 'Contao\\PageRoot' => 'system/modules/core/pages/PageRoot.php', 'Contao\\CheckBox' => 'system/modules/core/widgets/CheckBox.php', 'Contao\\CheckBoxWizard' => 'system/modules/core/widgets/CheckBoxWizard.php', 'Contao\\ChmodTable' => 'system/modules/core/widgets/ChmodTable.php', 'Contao\\FileSelector' => 'system/modules/core/widgets/FileSelector.php', 'Contao\\FileTree' => 'system/modules/core/widgets/FileTree.php', 'Contao\\ImageSize' => 'system/modules/core/widgets/ImageSize.php', 'Contao\\InputUnit' => 'system/modules/core/widgets/InputUnit.php', 'Contao\\KeyValueWizard' => 'system/modules/core/widgets/KeyValueWizard.php', 'Contao\\ListWizard' => 'system/modules/core/widgets/ListWizard.php', 'Contao\\MetaWizard' => 'system/modules/core/widgets/MetaWizard.php', 'Contao\\ModuleWizard' => 'system/modules/core/widgets/ModuleWizard.php', 'Contao\\OptionWizard' => 'system/modules/core/widgets/OptionWizard.php', 'Contao\\PageSelector' => 'system/modules/core/widgets/PageSelector.php', 'Contao\\PageTree' => 'system/modules/core/widgets/PageTree.php', 'Contao\\Password' => 'system/modules/core/widgets/Password.php', 'Contao\\RadioButton' => 'system/modules/core/widgets/RadioButton.php', 'Contao\\RadioTable' => 'system/modules/core/widgets/RadioTable.php', 'Contao\\SelectMenu' => 'system/modules/core/widgets/SelectMenu.php', 'Contao\\TableWizard' => 'system/modules/core/widgets/TableWizard.php', 'Contao\\TextArea' => 'system/modules/core/widgets/TextArea.php', 'Contao\\TextField' => 'system/modules/core/widgets/TextField.php', 'Contao\\TextStore' => 'system/modules/core/widgets/TextStore.php', 'Contao\\TimePeriod' => 'system/modules/core/widgets/TimePeriod.php', 'Contao\\TrblField' => 'system/modules/core/widgets/TrblField.php', 'Contao\\Upload' => 'system/modules/core/widgets/Upload.php'));
/**
 * Register the templates
 */
TemplateLoader::addFiles(array('analytics_google' => 'system/modules/core/templates/analytics', 'analytics_piwik' => 'system/modules/core/templates/analytics', 'be_changelog' => 'system/modules/core/templates/backend', 'be_confirm' => 'system/modules/core/templates/backend', 'be_diff' => 'system/modules/core/templates/backend', 'be_error' => 'system/modules/core/templates/backend', 'be_forbidden' => 'system/modules/core/templates/backend', 'be_help' => 'system/modules/core/templates/backend', 'be_incomplete' => 'system/modules/core/templates/backend', 'be_install' => 'system/modules/core/templates/backend', 'be_live_update' => 'system/modules/core/templates/backend', 'be_login' => 'system/modules/core/templates/backend', 'be_main' => 'system/modules/core/templates/backend', 'be_maintenance' => 'system/modules/core/templates/backend', 'be_navigation' => 'system/modules/core/templates/backend', 'be_no_active' => 'system/modules/core/templates/backend', 'be_no_forward' => 'system/modules/core/templates/backend', 'be_no_layout' => 'system/modules/core/templates/backend', 'be_no_page' => 'system/modules/core/templates/backend', 'be_no_root' => 'system/modules/core/templates/backend', 'be_pagination' => 'system/modules/core/templates/backend', 'be_password' => 'system/modules/core/templates/backend', 'be_picker' => 'system/modules/core/templates/backend', 'be_popup' => 'system/modules/core/templates/backend', 'be_preview' => 'system/modules/core/templates/backend', 'be_purge_data' => 'system/modules/core/templates/backend', 'be_rebuild_index' => 'system/modules/core/templates/backend', 'be_referer' => 'system/modules/core/templates/backend', 'be_switch' => 'system/modules/core/templates/backend', 'be_unavailable' => 'system/modules/core/templates/backend', 'be_welcome' => 'system/modules/core/templates/backend', 'be_widget' => 'system/modules/core/templates/backend', 'be_widget_chk' => 'system/modules/core/templates/backend', 'be_widget_pw' => 'system/modules/core/templates/backend', 'be_widget_rdo' => 'system/modules/core/templates/backend', 'be_wildcard' => 'system/modules/core/templates/backend', 'block_searchable' => 'system/modules/core/templates/block', 'block_section' => 'system/modules/core/templates/block', 'block_sections' => 'system/modules/core/templates/block', 'block_unsearchable' => 'system/modules/core/templates/block', 'ce_accordion' => 'system/modules/core/templates/elements', 'ce_accordion_start' => 'system/modules/core/templates/elements', 'ce_accordion_stop' => 'system/modules/core/templates/elements', 'ce_code' => 'system/modules/core/templates/elements', 'ce_download' => 'system/modules/core/templates/elements', 'ce_downloads' => 'system/modules/core/templates/elements', 'ce_gallery' => 'system/modules/core/templates/elements', 'ce_headline' => 'system/modules/core/templates/elements', 'ce_html' => 'system/modules/core/templates/elements', 'ce_hyperlink' => 'system/modules/core/templates/elements', 'ce_hyperlink_image' => 'system/modules/core/templates/elements', 'ce_image' => 'system/modules/core/templates/elements', 'ce_list' => 'system/modules/core/templates/elements', 'ce_markdown' => 'system/modules/core/templates/elements', 'ce_player' => 'system/modules/core/templates/elements', 'ce_slider_start' => 'system/modules/core/templates/elements', 'ce_slider_stop' => 'system/modules/core/templates/elements', 'ce_table' => 'system/modules/core/templates/elements', 'ce_teaser' => 'system/modules/core/templates/elements', 'ce_text' => 'system/modules/core/templates/elements', 'ce_toplink' => 'system/modules/core/templates/elements', 'form' => 'system/modules/core/templates/forms', 'form_captcha' => 'system/modules/core/templates/forms', 'form_checkbox' => 'system/modules/core/templates/forms', 'form_explanation' => 'system/modules/core/templates/forms', 'form_fieldset' => 'system/modules/core/templates/forms', 'form_headline' => 'system/modules/core/templates/forms', 'form_hidden' => 'system/modules/core/templates/forms', 'form_html' => 'system/modules/core/templates/forms', 'form_message' => 'system/modules/core/templates/forms', 'form_password' => 'system/modules/core/templates/forms', 'form_radio' => 'system/modules/core/templates/forms', 'form_row' => 'system/modules/core/templates/forms', 'form_row_double' => 'system/modules/core/templates/forms', 'form_select' => 'system/modules/core/templates/forms', 'form_submit' => 'system/modules/core/templates/forms', 'form_textarea' => 'system/modules/core/templates/forms', 'form_textfield' => 'system/modules/core/templates/forms', 'form_upload' => 'system/modules/core/templates/forms', 'form_widget' => 'system/modules/core/templates/forms', 'form_xml' => 'system/modules/core/templates/forms', 'fe_page' => 'system/modules/core/templates/frontend', 'gallery_default' => 'system/modules/core/templates/gallery', 'j_accordion' => 'system/modules/core/templates/jquery', 'j_colorbox' => 'system/modules/core/templates/jquery', 'j_mediaelement' => 'system/modules/core/templates/jquery', 'j_slider' => 'system/modules/core/templates/jquery', 'j_tablesort' => 'system/modules/core/templates/jquery', 'mail_default' => 'system/modules/core/templates/mail', 'member_default' => 'system/modules/core/templates/member', 'member_grouped' => 'system/modules/core/templates/member', 'mod_article' => 'system/modules/core/templates/modules', 'mod_article_list' => 'system/modules/core/templates/modules', 'mod_article_nav' => 'system/modules/core/templates/modules', 'mod_article_plain' => 'system/modules/core/templates/modules', 'mod_article_teaser' => 'system/modules/core/templates/modules', 'mod_booknav' => 'system/modules/core/templates/modules', 'mod_breadcrumb' => 'system/modules/core/templates/modules', 'mod_change_password' => 'system/modules/core/templates/modules', 'mod_flash' => 'system/modules/core/templates/modules', 'mod_html' => 'system/modules/core/templates/modules', 'mod_login_1cl' => 'system/modules/core/templates/modules', 'mod_login_2cl' => 'system/modules/core/templates/modules', 'mod_logout_1cl' => 'system/modules/core/templates/modules', 'mod_logout_2cl' => 'system/modules/core/templates/modules', 'mod_message' => 'system/modules/core/templates/modules', 'mod_navigation' => 'system/modules/core/templates/modules', 'mod_password' => 'system/modules/core/templates/modules', 'mod_quicklink' => 'system/modules/core/templates/modules', 'mod_quicknav' => 'system/modules/core/templates/modules', 'mod_random_image' => 'system/modules/core/templates/modules', 'mod_search' => 'system/modules/core/templates/modules', 'mod_search_advanced' => 'system/modules/core/templates/modules', 'mod_search_simple' => 'system/modules/core/templates/modules', 'mod_sitemap' => 'system/modules/core/templates/modules', 'moo_accordion' => 'system/modules/core/templates/mootools', 'moo_chosen' => 'system/modules/core/templates/mootools', 'moo_mediabox' => 'system/modules/core/templates/mootools', 'moo_slider' => 'system/modules/core/templates/mootools', 'moo_slimbox' => 'system/modules/core/templates/mootools', 'moo_tablesort' => 'system/modules/core/templates/mootools', 'nav_default' => 'system/modules/core/templates/navigation', 'pagination' => 'system/modules/core/templates/pagination', 'picture_default' => 'system/modules/core/templates/picture', 'rss_default' => 'system/modules/core/templates/rss', 'rss_items_only' => 'system/modules/core/templates/rss', 'search_default' => 'system/modules/core/templates/search'));
Ejemplo n.º 26
0
<?php

/**
 * Contao Open Source CMS
 *
 * @copyright  inspiredminds.at 2014
 * @author     Fritz Michael Gschwantner <*****@*****.**>
 * @package    moo_fancyselect
 * @license    GNU GPL v2.0
 */
/**
 * Register the templates
 */
TemplateLoader::addFiles(array('moo_fancyselect' => 'system/modules/moo_fancyselect/templates'));
Ejemplo n.º 27
0
<?php

/**
 * Contao Open Source CMS
 *
 * Copyright (c) 2005-2015 Leo Feyer
 *
 * @license LGPL-3.0+
 */
/**
 * Register the classes
 */
ClassLoader::addClasses(array('Contao\\FaqCategoryModel' => 'system/modules/faq/models/FaqCategoryModel.php', 'Contao\\FaqModel' => 'system/modules/faq/models/FaqModel.php', 'Contao\\ModuleFaq' => 'system/modules/faq/modules/ModuleFaq.php', 'Contao\\ModuleFaqList' => 'system/modules/faq/modules/ModuleFaqList.php', 'Contao\\ModuleFaqPage' => 'system/modules/faq/modules/ModuleFaqPage.php', 'Contao\\ModuleFaqReader' => 'system/modules/faq/modules/ModuleFaqReader.php'));
/**
 * Register the templates
 */
TemplateLoader::addFiles(array('mod_faqlist' => 'system/modules/faq/templates/modules', 'mod_faqpage' => 'system/modules/faq/templates/modules', 'mod_faqreader' => 'system/modules/faq/templates/modules'));
Ejemplo n.º 28
0
<?php

/**
 * ajaxform extension for Contao Open Source CMS
 *
 * @copyright  Copyright (c) 2009-2014, terminal42 gmbh
 * @author     terminal42 gmbh <*****@*****.**>
 * @license    http://opensource.org/licenses/lgpl-3.0.html LGPL
 * @link       http://github.com/aschempp/contao-ajaxform
 */
/**
 * Register the classes
 */
ClassLoader::addClasses(array('AjaxForm' => 'system/modules/ajaxform/AjaxForm.php'));
/**
 * Register the templates
 */
TemplateLoader::addFiles(array('ajaxform_confirm' => 'system/modules/ajaxform/templates', 'ajaxform_inline' => 'system/modules/ajaxform/templates', 'ajaxform' => 'system/modules/ajaxform/templates'));
Ejemplo n.º 29
0
echo TemplateLoader::getTemplate('logout');
$worlds = load(['controller' => 'editor', 'action' => 'index'])['worlds'];
?>

<div style="margin-bottom: 3vh" layout>
	<h1>Select a world!</h1>
</div>

<div id="world-list" layout="row" flex-wrap>
	<?php 
foreach ($worlds as $world) {
    ?>
		<div class="world-item" layout world-id="<?php 
    echo $world['id'];
    ?>
">
			<?php 
    echo $world['name'];
    ?>
		</div>
	<?php 
}
?>
	<div class="world-item new-world" layout world-id="new">
		New!
	</div>
</div>

<?php 
echo TemplateLoader::getTemplate('footer');
<?php

/**
 * @package    contao-leaflet-metamodels
 * @author     David Molineus <*****@*****.**>
 * @copyright  2015-2016 netzmacht David Molineus
 * @license    LGPL 3.0
 * @filesource
 *
 */
TemplateLoader::addFile('mm_attr_leaflet_map', 'system/modules/leaflet-metamodels/templates');