Example #1
0
 /**
  * Generate module
  */
 protected function compile()
 {
     $this->Template = new FrontendTemplate('ce_galerie');
     $this->import('Database');
     $galleria = new Galleria();
     $galleria->getOptions($this->Database, $this->galerie, $this->Template);
     $galleria->getPictures($this->Database, $this->galerie, $this->Template, $this->imagesFolder, $this->imgSortBy, $this->galFileName);
     $galleria->getGalleriaTheme($this->Database, $this->galerie);
     // Use specific CSS and JS when the CTE is loaded
     if (TL_MODE == 'FE') {
         // From the extension - Galleria script
         $GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/galerie/html/external/galleria/galleria-1.2.8.min.js';
         // Flickr Plugin
         if ($galleria->isFlickrEnabled($this->Database, $this->galerie, $this->Template)) {
             $GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/galerie/html/external/plugins/flickr/galleria.flickr.min.js';
         }
         // History Plugin
         if ($galleria->isHistoryEnabled($this->Database, $this->galerie)) {
             $GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/galerie/html/external/plugins/history/galleria.history.min.js';
         }
         // Picasa Plugin
         if ($galleria->isPicasaEnabled($this->Database, $this->galerie, $this->Template)) {
             $GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/galerie/html/external/plugins/picasa/galleria.picasa.min.js';
         }
     }
 }
Example #2
0
 /**
  * Return the name of the video sharing website
  * 
  * @access protected
  * @param String
  * @return String
  */
 protected function videoSharingWebsiteName($url)
 {
     $videoSharingWebsiteName = '';
     $url = Galleria::urlVerification($url);
     // Extract the hostname of the url.
     $url_parsed = parse_url($url);
     $domain = $url_parsed['host'];
     // Delete the prefix www.
     $domain = preg_replace('/www./', '', $domain);
     switch ($domain) {
         case $domain == 'dai.ly' || $domain == 'dailymotion.com':
             $videoSharingWebsiteName = 'dailymotion';
             break;
         case $domain == 'youtu.be' || $domain == 'youtube.com':
             $videoSharingWebsiteName = 'youtube';
             break;
         case $domain == 'vimeo.com':
             $videoSharingWebsiteName = 'vimeo';
             break;
         default:
             $videoSharingWebsiteName = 'undefined';
     }
     return $videoSharingWebsiteName;
 }