public static function renderThumbnailForNavBar($aHrefLink, $aLink, &$videolist_row, &$theme_row, $listitem, $videoid, $item_index, &$gallery_list)
 {
     $result = '';
     $thumbnail_layout = '';
     //------------------------------- title
     $thumbtitle = '';
     if ($listitem['title'] != '') {
         $thumbtitle = str_replace('"', '', $listitem['title']);
         $thumbtitle = str_replace('\'', '’', $listitem['title']);
         if (strpos($thumbtitle, '&') === false) {
             $thumbtitle = str_replace('&', '&', $thumbtitle);
         }
     }
     //------------------------------- add title and description hidden div containers if needed
     //------------------------------- end of image tag
     if ($theme_row->customnavlayout != '') {
         $result = YoutubeGalleryLayoutRenderer::renderThumbnailLayout($theme_row->customnavlayout, $listitem, $aHrefLink, $aLink, $videoid, $theme_row, $item_index, $gallery_list, $videolist_row);
     } else {
         $thumbnail_layout = '[a][image][/a]';
         //with link
         if ($theme_row->showtitle) {
             if ($thumbtitle != '') {
                 $thumbnail_layout .= '<br/>' . ($theme_row->thumbnailstyle == '' ? '<span style="font-size: 8pt;" >[title]</span>' : '<div style="' . $theme_row->thumbnailstyle . '">[title]</div>');
             }
         }
         $result = YoutubeGalleryLayoutRenderer::renderThumbnailLayout($thumbnail_layout, $listitem, $aHrefLink, $aLink, $videoid, $theme_row, $item_index, $gallery_list, $videolist_row);
     }
     if ($theme_row->openinnewwindow == 4 or $theme_row->openinnewwindow == 5) {
         $result .= '<div id="YoutubeGalleryThumbTitle' . $videolist_row->id . '_' . $listitem['id'] . '" style="display:none;visibility:hidden;">' . $listitem['title'] . '</div>';
         $result .= '<div id="YoutubeGalleryThumbDescription' . $videolist_row->id . '_' . $listitem['id'] . '" style="display:none;visibility:hidden;">' . $listitem['description'] . '</div>';
         $result .= '<div id="YoutubeGalleryThumbLink' . $videolist_row->id . '_' . $listitem['id'] . '" style="display:none;visibility:hidden;">' . $listitem['link'] . '</div>';
         $result .= '<div id="YoutubeGalleryThumbStartSecond' . $videolist_row->id . '_' . $listitem['id'] . '" style="display:none;visibility:hidden;">' . $listitem['startsecond'] . '</div>';
         $result .= '<div id="YoutubeGalleryThumbEndSecond' . $videolist_row->id . '_' . $listitem['id'] . '" style="display:none;visibility:hidden;">' . $listitem['endsecond'] . '</div>';
         if ($listitem['custom_imageurl'] != '' and strpos($listitem['custom_imageurl'], '#') === false) {
             $result .= '<div id="YoutubeGalleryThumbCustomImage' . $videolist_row->id . '_' . $listitem['id'] . '" style="display:none;visibility:hidden;">' . $listitem['custom_imageurl'] . '</div>';
         }
     }
     return $result;
 }
Exemplo n.º 2
0
 public static function renderThumbnailForNavBar($aHrefLink, $aLink, &$videolist_row, &$theme_row, $listitem, $videoid)
 {
     $thumbnail_layout = '';
     //------------------------------- title
     $thumbtitle = '';
     if ($listitem['title'] != '') {
         $thumbtitle = str_replace('"', '', $listitem['title']);
         $thumbtitle = str_replace('\'', '&rsquo;', $listitem['title']);
         if (strpos($thumbtitle, '&amp;') === false) {
             $thumbtitle = str_replace('&', '&amp;', $thumbtitle);
         }
     }
     //------------------------------- add title and description hidden div containers if needed
     $result = '';
     //------------------------------- end of image tag
     if ($theme_row->customnavlayout != '') {
         $result = YoutubeGalleryLayoutRenderer::renderThumbnailLayout($theme_row->customnavlayout, $listitem, $aHrefLink, $aLink, $videoid, $theme_row);
     } else {
         $thumbnail_layout = '[a][image][/a]';
         //with link
         if ($theme_row->showtitle) {
             if ($thumbtitle != '') {
                 //alteracao projeto portal padrao
                 $thumbnail_layout .= '<h3><a href="javascript:YoutubeGalleryHotVideoSwitch1(\'gPm0IMTI2ms\',\'youtube\',' . $listitem['id'] . ')">[title]</a></h3>';
             }
             //fim alteracao projeto portal padrao
         }
         $result = YoutubeGalleryLayoutRenderer::renderThumbnailLayout($thumbnail_layout, $listitem, $aHrefLink, $aLink, $videoid, $theme_row);
     }
     if ($theme_row->openinnewwindow == 4) {
         //alteracao projeto portal padrao
         $result .= '<div id="YoutubeGalleryThumbTitle' . $videolist_row->id . '_' . $listitem['id'] . '" class="hide">' . $listitem['title'] . '</div>';
         $result .= '<div id="YoutubeGalleryThumbDescription' . $videolist_row->id . '_' . $listitem['id'] . '" class="hide">' . $listitem['description'] . '</div>';
         $result .= '<div id="YoutubeGalleryThumbLink' . $videolist_row->id . '_' . $listitem['id'] . '" class="hide">' . $listitem['link'] . '</div>';
         $result .= '<div id="YoutubeGalleryThumbStartSecond' . $videolist_row->id . '_' . $listitem['id'] . '" class="hide">' . $listitem['startsecond'] . '</div>';
         $result .= '<div id="YoutubeGalleryThumbEndSecond' . $videolist_row->id . '_' . $listitem['id'] . '" class="hide">' . $listitem['endsecond'] . '</div>';
         if ($listitem['custom_imageurl'] != '' and strpos($listitem['custom_imageurl'], '#') === false) {
             $result .= '<div id="YoutubeGalleryThumbCustomImage' . $videolist_row->id . '_' . $listitem['id'] . '" style="display:none;visibility:hidden;">' . $listitem['custom_imageurl'] . '</div>';
         }
         // fim alteracao projeto portal padrao
     }
     return $result;
 }