public static function ClassicNavTable($the_gallery_list, $width, $number_of_columns, &$videolist_row, &$theme_row, $AllowPagination, $videoid, $custom_itemid = 0) { require_once JPATH_SITE . DS . 'components' . DS . 'com_youtubegallery' . DS . 'includes' . DS . 'misc.php'; $misc = new YouTubeGalleryMisc(); $misc->videolist_row = $videolist_row; $misc->theme_row = $theme_row; if ($theme_row->prepareheadtags > 0) { $curPageUrl = YoutubeGalleryLayoutRenderer::curPageURL(); $document = JFactory::getDocument(); } $catalogresult = ''; $paginationcode = ''; $w_str = 'width:' . $width . (strpos($width, '%') === false ? 'px' : '') . ';'; $catalogresult .= '<table cellspacing="0" ' . ($theme_row->navbarstyle != '' ? 'style="' . $w_str . 'padding:0;border:none;' . $theme_row->navbarstyle . '" ' : 'style="' . $w_str . 'padding:0;border:none;margin:0 auto;"') . '> <tbody>'; $column_width = floor(100 / $number_of_columns) . '%'; $gallery_list = $the_gallery_list; $getinfomethod = YouTubeGalleryMisc::getSettingValue('getinfomethod'); $misc->RefreshVideoData($gallery_list, $getinfomethod); $tr = 0; $count = 0; $bgcolor = $theme_row->bgcolor; $item_index = 1; foreach ($gallery_list as $listitem) { if (strpos($listitem['title'], '***Video not found***') === false) { if ($getinfomethod == 'js') { $thumbnail_item = 'updater'; if ($tr == 0) { $catalogresult .= '<tr style="border:none;" >'; } $catalogresult .= '<td style="width:' . $column_width . ';vertical-align:top;text-align:center;border:none;' . ($bgcolor != '' ? ' background-color: #' . $bgcolor . ';' : '') . '">' . $thumbnail_item . '</td>'; $tr++; if ($tr == $number_of_columns) { $catalogresult .= ' </tr> '; if ($count + 1 < count($gallery_list)) { $catalogresult .= ' <tr style="border:none;"><td colspan="' . $number_of_columns . '" style="border:none;" ><hr' . ($theme_row->linestyle != '' ? ' style="' . $theme_row->linestyle . '" ' : '') . ' /></td></tr>'; } $tr = 0; } $count++; } else { $aLinkURL = ''; if ($theme_row->openinnewwindow == 4 or $theme_row->openinnewwindow == 5) { //$title=str_replace('"','ygdoublequote',$listitem['title']); //$description=str_replace('"','ygdoublequote',$listitem['description']); //$title=str_replace('\'','ygsinglequote',$title); //$description=str_replace('\'','ygsinglequote',$description); //$aLink='javascript:YoutubeGalleryHotVideoSwitch'.$videolist_row->id.'(\''.$listitem['videoid'].'\',\''.$listitem['videosource'].'\',\''.$title.'\',\''.$description.'\')'; $aLink = 'javascript:YoutubeGalleryHotVideoSwitch' . $videolist_row->id . '(\'' . $listitem['videoid'] . '\',\'' . $listitem['videosource'] . '\',' . $listitem['id'] . ')'; } else { $aLink = YoutubeGalleryLayoutRenderer::makeLink($listitem, $theme_row->rel, $aLinkURL, $videolist_row->id, $theme_row->id, $custom_itemid); } $isForShadowBox = false; if (isset($theme_row)) { if ($theme_row->rel != '') { $isForShadowBox = true; } } if ($isForShadowBox and $theme_row->rel != '' and $theme_row->openinnewwindow != 4 and $theme_row->openinnewwindow != 5) { $aLink .= '&tmpl=component'; } if ($theme_row->hrefaddon != '' and $theme_row->openinnewwindow != 4 and $theme_row->openinnewwindow != 5) { $hrefaddon = str_replace('?', '', $theme_row->hrefaddon); if ($hrefaddon[0] == '&') { $hrefaddon = substr($hrefaddon, 1); } if (strpos($aLink, $hrefaddon) === false) { if (strpos($aLink, '?') === false) { $aLink .= '?'; } else { $aLink .= '&'; } $aLink .= $hrefaddon; } } if ($theme_row->openinnewwindow != 4 and $theme_row->openinnewwindow != 5) { if (strpos($aLink, '&') === false) { $aLink = str_replace('&', '&', $aLink); } $aLink = $aLink . (($theme_row->openinnewwindow == 2 or $theme_row->openinnewwindow == 3) ? '#youtubegallery' : ''); } //to apply shadowbox //do not route the link $aHrefLink = '<a href="' . $aLink . '"' . ($theme_row->rel != '' ? ' rel="' . $theme_row->rel . '"' : '') . (($theme_row->openinnewwindow == 1 or $theme_row->openinnewwindow == 3) ? ' target="_blank"' : '') . '>'; $thumbnail_item = YoutubeGalleryLayoutRenderer::renderThumbnailForNavBar($aHrefLink, $aLink, $videolist_row, $theme_row, $listitem, $videoid, $item_index, $gallery_list); if ($thumbnail_item != '') { if ($tr == 0) { $catalogresult .= '<tr style="border:none;" >'; } $catalogresult .= '<td style="width:' . $column_width . ';vertical-align:top;text-align:center;border:none;' . ($bgcolor != '' ? ' background-color: #' . $bgcolor . ';' : '') . '">' . $thumbnail_item . '</td>'; $tr++; if ($tr == $number_of_columns) { $catalogresult .= ' </tr> '; if ($count + 1 < count($gallery_list)) { $catalogresult .= ' <tr style="border:none;"><td colspan="' . $number_of_columns . '" style="border:none;" ><hr' . ($theme_row->linestyle != '' ? ' style="' . $theme_row->linestyle . '" ' : '') . ' /></td></tr>'; } $tr = 0; } $count++; } } $item_index++; } } if ($tr > 0) { $catalogresult .= '<td style="border:none;" colspan="' . ($number_of_columns - $tr) . '"> </td></tr>'; } $catalogresult .= '</tbody> </table> '; return $catalogresult; }