{MY_GAL_LNK} | {MEMBERLIST_LNK} | {MY_PROF_LNK} | {FAQ_LNK} | {ADM_MODE_LNK} | {USR_MODE_LNK} | {UPL_PIC_LNK} | {REGISTER_LNK} | {LOGIN_LNK} | {LOGOUT_LNK} | EOT; $template_main_menu2 = << {ALB_LIST_LNK}
@
{LASTUP_LNK}
{LASTCOM_LNK}
{TOPN_LNK}
{TOPRATED_LNK}
{FAV_LNK}
{SEARCH_LNK} EOT; // HTML template for gallery admin menu $template_gallery_admin_menu = <<
{UPL_APP_LNK} {CONFIG_LNK} {ALBUMS_LNK} {CATEGORIES_LNK} {USERS_LNK} {GROUPS_LNK} {BAN_LNK} {DB_ECARD_LNK} {COMMENTS_LNK} {SEARCHNEW_LNK} {UTIL_LNK} {MY_PROF_LNK}
EOT; // HTML template for user admin menu $template_user_admin_menu = <<
{ALBMGR_LNK} {MODIFYALB_LNK} {MY_PROF_LNK}
EOT; // HTML template for the category list $template_cat_list = << {CATEGORY} {ALBUMS} {PICTURES}
{CAT_THUMB}{CAT_TITLE}{CAT_DESC}
{CAT_THUMB}{CAT_TITLE}{CAT_DESC}
{ALB_COUNT} {PIC_COUNT} {CAT_ALBUMS} {STATISTICS}
EOT; // HTML template for Breadcrumb $template_breadcrumb = << {BREADCRUMB}
111{BREADCRUMB} {STATISTICS}
EOT; // HTML template for the album list $template_album_list = << {STATISTICS}
{ALBUM_TITLE}


{ALB_LINK_PIC}
{ADMIN_MENU}

{ALB_DESC}

{ALB_INFOS}

 

 
{TABS}

EOT; // HTML template for the album list $template_album_list_cat = << {STATISTICS}
{ALBUM_TITLE}


{ALB_LINK_PIC}
{ADMIN_MENU}

{ALB_DESC}

{ALB_INFOS}

 

 
{TABS}

EOT; // HTML template for the ALBUM admin menu displayed in the album list $template_album_admin_menu = << {DELETE} {MODIFY} {EDIT_PICS} EOT; // HTML template for title row of the thumbnail view (album title + sort options) $template_thumb_view_title_row = << {ALBUM_NAME} {TITLE}  +   -     {NAME}  +   -     {DATE}  +   -  EOT; // HTML template for title row of the fav thumbnail view (album title + download) $template_fav_thumb_view_title_row = <<

{ALBUM_NAME}

{DOWNLOAD_ZIP}
EOT; // HTML template for thumbnails display $template_thumbnail_view = <<
{THUMB}
{CAPTION} {ADMIN_MENU}
  {TABS}

EOT; // HTML template for filmstrip display $template_film_strip = <<   {THUMB_STRIP}   {THUMB}  {CAPTION} {ADMIN_MENU} EOT; // HTML template for the thumbnail view when there is no picture to show $template_no_img_to_display = << {TEXT}
EOT; // HTML template for the USER info box in the user list view $template_user_list_info_box = << {USER_NAME} {ALBUMS} {PICTURES} EOT; // HTML template for the image navigation bar $template_img_navbar = << {THUMB_TITLE} {PIC_INFO_TITLE} {SLIDESHOW_TITLE} {PIC_POS} {ECARD_TITLE} {PREV_TITLE} {NEXT_TITLE} EOT; // HTML template for intermediate image display $template_display_picture = <<
{IMAGE} {ADMIN_MENU}
{TITLE}
{CAPTION}
EOT; // HTML template for the image rating box $template_image_rating = << {TITLE} {VOTES} {RUBBISH}
{POOR}
{FAIR}
{GOOD}
{EXCELLENT}
{GREAT}
EOT; // HTML template for the display of comments $template_image_comments = <<
{MSG_AUTHOR} ({HDR_IP} [{RAW_IP}]) [{MSG_DATE}]
{MSG_BODY}
EOT; $template_add_your_comment = << {ADD_YOUR_COMMENT}
{NAME} {COMMENT}
{SMILIES} EOT; // HTML template used by the cpg_die function $template_cpg_die = << {MESSAGE}

{FILE_TXT}{FILE} - {LINE_TXT}{LINE}

{OUTPUT_BUFFER}


EOT; // HTML template used by the msg_box function $template_msg_box = << {MESSAGE}
{TEXT}
EOT; // HTML template for e-cards $template_ecard = << {TITLE}

{VIEW_ECARD_LNK}



{GREETINGS}

{MESSAGE}

{SENDER_NAME} ({SENDER_EMAIL})

{VIEW_MORE_LNK}

EOT; // Template used for tabbed display $template_tab_display = array('left_text' => '{LEFT_TEXT}' . "\n", 'tab_header' => '', 'tab_trailer' => '', 'active_tab' => '' . "\n" . '%d', 'inactive_tab' => '' . "\n" . '%d' . "\n" ); function pageheader($section, $meta = '') { global $CONFIG, $THEME_DIR; global $template_header, $lang_charset, $lang_text_dir; $charset = ($CONFIG['charset'] == 'language file') ? $lang_charset : $CONFIG['charset']; header('P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"'); header("Content-Type: text/html; charset=$charset"); user_save_profile(); $template_vars = array('{LANG_DIR}' => $lang_text_dir, '{TITLE}' => $CONFIG['gallery_name'] . ' - ' . $section, '{CHARSET}' => $charset, '{META}' => $meta, '{GAL_NAME}' => $CONFIG['gallery_name'], '{GAL_DESCRIPTION}' => $CONFIG['gallery_description'], '{MAIN_MENU1}' => theme_main_menu1(), '{MAIN_MENU2}' => theme_main_menu2(), '{ADMIN_MENU}' => theme_admin_mode_menu() ); echo template_eval($template_header, $template_vars); } // Function for writing a pagefooter function pagefooter() { global $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_SERVER_VARS; global $USER, $ALBUM_SET, $CONFIG, $time_start, $query_stats, $queries; global $template_footer; if ($CONFIG['debug_mode']==1 || ($CONFIG['debug_mode']==2 && GALLERY_ADMIN_MODE)) { cpg_debug_output(); } echo "" . $template_footer; } // Function to start a 'standard' table function starttable($width = '-1', $title = '', $title_colspan = '1') { global $CONFIG; if ($width == '-1') $width = $CONFIG['picture_table_width']; if ($width == '100%') $width = $CONFIG['main_table_width']; if ($title) { echo <<
$title  
EOT; } else { echo <<
EOT; } } function endtable() { echo << EOT; } function theme_main_menu1() { global $CONFIG, $album, $actual_cat, $cat, $REFERER, $HTTP_SERVER_VARS; global $lang_main_menu, $template_main_menu1; static $main_menu = ''; if ($main_menu != '') return $main_menu; $album_l = isset($album) ? "?album=$album" : ''; $cat_l = (isset($actual_cat))? "?cat=$actual_cat" : (isset($cat) ? "?cat=$cat" : ''); $my_gallery_id = FIRST_USER_CAT + USER_ID; $template_main_menu = &$template_main_menu1; if (USER_ID) { template_extract_block($template_main_menu, 'login'); } else { template_extract_block($template_main_menu, 'logout'); template_extract_block($template_main_menu, 'my_profile'); } if (GALLERY_ADMIN_MODE || USER_ADMIN_MODE) { template_extract_block($template_main_menu, 'enter_admin_mode'); } elseif (USER_CAN_CREATE_ALBUMS || USER_IS_ADMIN) { template_extract_block($template_main_menu, 'leave_admin_mode'); } if (!USER_CAN_CREATE_ALBUMS && !USER_IS_ADMIN) { template_extract_block($template_main_menu, 'enter_admin_mode'); template_extract_block($template_main_menu, 'leave_admin_mode'); } if (!USER_CAN_CREATE_ALBUMS) { template_extract_block($template_main_menu, 'my_gallery'); } if (USER_CAN_CREATE_ALBUMS) { template_extract_block($template_main_menu, 'my_profile'); } if (!USER_CAN_UPLOAD_PICTURES) { template_extract_block($template_main_menu, 'upload_pic'); } if (USER_ID || !$CONFIG['allow_user_registration']) { template_extract_block($template_main_menu, 'register'); } if (!USER_ID || !$CONFIG['allow_memberlist']) { template_extract_block($template_main_menu, 'allow_memberlist'); } if (!$CONFIG['display_faq']) { template_extract_block($template_main_menu, 'faq'); } $param = array('{MY_GAL_TGT}' => "index.php?cat=$my_gallery_id", '{MY_GAL_TITLE}' => $lang_main_menu['my_gal_title'], '{MY_GAL_LNK}' => $lang_main_menu['my_gal_lnk'], '{MEMBERLIST_TGT}' => "usermgr.php", '{MEMBERLIST_TITLE}' => $lang_main_menu['memberlist_title'], '{MEMBERLIST_LNK}' => $lang_main_menu['memberlist_lnk'], '{MY_PROF_TGT}' => "profile.php?op=edit_profile", '{MY_PROF_LNK}' => $lang_main_menu['my_prof_lnk'], '{FAQ_TGT}' => "faq.php", '{FAQ_TITLE}' => $lang_main_menu['faq_title'], '{FAQ_LNK}' => $lang_main_menu['faq_lnk'], '{ADM_MODE_TGT}' => "admin.php?admin_mode=1&referer=$REFERER", '{ADM_MODE_TITLE}' => $lang_main_menu['adm_mode_title'], '{ADM_MODE_LNK}' => $lang_main_menu['adm_mode_lnk'], '{USR_MODE_TGT}' => "admin.php?admin_mode=0&referer=$REFERER", '{USR_MODE_TITLE}' => $lang_main_menu['usr_mode_title'], '{USR_MODE_LNK}' => $lang_main_menu['usr_mode_lnk'], '{UPL_PIC_TGT}' => "upload.php", '{UPL_PIC_TITLE}' => $lang_main_menu['upload_pic_title'], '{UPL_PIC_LNK}' => $lang_main_menu['upload_pic_lnk'], '{REGISTER_TGT}' => "register.php", '{REGISTER_TITLE}' => $lang_main_menu['register_title'], '{REGISTER_LNK}' => $lang_main_menu['register_lnk'], '{LOGIN_TGT}' => "login.php?referer=$REFERER", '{LOGIN_LNK}' => $lang_main_menu['login_lnk'], '{LOGOUT_TGT}' => "logout.php?referer=$REFERER", '{LOGOUT_LNK}' => $lang_main_menu['logout_lnk'] . " [" . USER_NAME . "]", ); $main_menu = template_eval($template_main_menu, $param); return $main_menu; } function theme_main_menu2() { global $CONFIG, $album, $actual_cat, $cat, $REFERER, $HTTP_SERVER_VARS; global $lang_main_menu, $template_main_menu2; static $main_menu = ''; if ($main_menu != '') return $main_menu; $cat_l = isset($actual_cat) ? "?cat=$actual_cat" : (isset($cat) ? "?cat=$cat" : ''); $cat_l2 = isset($cat) ? "&cat=$cat" : ''; $template_main_menu = &$template_main_menu2; $param = array('{ALB_LIST_TGT}' => "index.php$cat_l", '{ALB_LIST_TITLE}' => $lang_main_menu['alb_list_title'], '{ALB_LIST_LNK}' => $lang_main_menu['alb_list_lnk'], '{LASTUP_TGT}' => "thumbnails.php?album=lastup$cat_l2", '{LASTUP_LNK}' => $lang_main_menu['lastup_lnk'], '{LASTCOM_TGT}' => "thumbnails.php?album=lastcom$cat_l2", '{LASTCOM_LNK}' => $lang_main_menu['lastcom_lnk'], '{TOPN_TGT}' => "thumbnails.php?album=topn$cat_l2", '{TOPN_LNK}' => $lang_main_menu['topn_lnk'], '{TOPRATED_TGT}' => "thumbnails.php?album=toprated$cat_l2", '{TOPRATED_LNK}' => $lang_main_menu['toprated_lnk'], '{FAV_TGT}' => "thumbnails.php?album=favpics", '{FAV_LNK}' => $lang_main_menu['fav_lnk'], '{SEARCH_TGT}' => "search.php", '{SEARCH_LNK}' => $lang_main_menu['search_lnk'], ); $main_menu = template_eval($template_main_menu, $param); return $main_menu; } function theme_admin_mode_menu() { global $cat; global $lang_gallery_admin_menu, $lang_user_admin_menu; global $template_gallery_admin_menu, $template_user_admin_menu; $cat_l = isset($cat) ? "?cat=$cat" : ''; if (GALLERY_ADMIN_MODE) { $param = array('{CATL}' => $cat_l, '{UPL_APP_LNK}' => $lang_gallery_admin_menu['upl_app_lnk'], '{CONFIG_LNK}' => $lang_gallery_admin_menu['config_lnk'], '{ALBUMS_LNK}' => $lang_gallery_admin_menu['albums_lnk'], '{CATEGORIES_LNK}' => $lang_gallery_admin_menu['categories_lnk'], '{USERS_LNK}' => $lang_gallery_admin_menu['users_lnk'], '{GROUPS_LNK}' => $lang_gallery_admin_menu['groups_lnk'], '{COMMENTS_LNK}' => $lang_gallery_admin_menu['comments_lnk'], '{SEARCHNEW_LNK}' => $lang_gallery_admin_menu['searchnew_lnk'], '{MY_PROF_LNK}' => $lang_user_admin_menu['my_prof_lnk'], '{UTIL_LNK}' => $lang_gallery_admin_menu['util_lnk'], '{BAN_LNK}' => $lang_gallery_admin_menu['ban_lnk'], '{DB_ECARD_LNK}' => $lang_gallery_admin_menu['db_ecard_lnk'], ); $html = template_eval($template_gallery_admin_menu, $param); } elseif (USER_ADMIN_MODE) { $param = array('{ALBMGR_LNK}' => $lang_user_admin_menu['albmgr_lnk'], '{MODIFYALB_LNK}' => $lang_user_admin_menu['modifyalb_lnk'], '{MY_PROF_LNK}' => $lang_user_admin_menu['my_prof_lnk'] ); $html = template_eval($template_user_admin_menu, $param); } else { $html = ''; } return $html; } function theme_display_cat_list($breadcrumb, &$cat_data, $statistics) { global $template_cat_list, $lang_cat_list; starttable('100%'); if (count($cat_data) > 0) { $template = template_extract_block($template_cat_list, 'header'); $params = array('{CATEGORY}' => $lang_cat_list['category'], '{ALBUMS}' => $lang_cat_list['albums'], '{PICTURES}' => $lang_cat_list['pictures'], ); echo template_eval($template, $params); } $template_noabl = template_extract_block($template_cat_list, 'catrow_noalb'); $template = template_extract_block($template_cat_list, 'catrow'); foreach($cat_data as $category) { if (count($category) == 3) { $params = array('{CAT_TITLE}' => $category[0], '{CAT_THUMB}' => $category['cat_thumb'], '{CAT_DESC}' => $category[1] ); echo template_eval($template_noabl, $params); } else { $params = array('{CAT_TITLE}' => $category[0], '{CAT_DESC}' => $category[1], '{CAT_THUMB}' => $category['cat_thumb'], '{CAT_ALBUMS}' => $category['cat_albums'], '{ALB_COUNT}' => $category[2], '{PIC_COUNT}' => $category[3], ); echo template_eval($template, $params); } } if ($statistics && count($cat_data) > 0) { $template = template_extract_block($template_cat_list, 'footer'); $params = array('{STATISTICS}' => $statistics); echo template_eval($template, $params); } endtable(); if (count($cat_data) > 0) echo template_extract_block($template_cat_list, 'spacer'); } function theme_display_breadcrumb($breadcrumb, &$cat_data) { /** * ** added breadcrumb as a seperate element */ global $template_breadcrumb, $lang_breadcrumb; starttable('100%'); if ($breadcrumb) { $template = template_extract_block($template_breadcrumb, 'breadcrumb'); $params = array('{BREADCRUMB}' => $breadcrumb ); echo template_eval($template, $params); } endtable(); } function theme_display_album_list(&$alb_list, $nbAlb, $cat, $page, $total_pages) { global $CONFIG, $STATS_IN_ALB_LIST, $statistics, $template_tab_display, $template_album_list, $lang_album_list; $theme_alb_list_tab_tmpl = $template_tab_display; $theme_alb_list_tab_tmpl['left_text'] = strtr($theme_alb_list_tab_tmpl['left_text'], array('{LEFT_TEXT}' => $lang_album_list['album_on_page'])); $theme_alb_list_tab_tmpl['inactive_tab'] = strtr($theme_alb_list_tab_tmpl['inactive_tab'], array('{LINK}' => 'index.php?cat=' . $cat . '&page=%d')); $tabs = create_tabs($nbAlb, $page, $total_pages, $theme_alb_list_tab_tmpl); $album_cell = template_extract_block($template_album_list, 'album_cell'); $empty_cell = template_extract_block($template_album_list, 'empty_cell'); $tabs_row = template_extract_block($template_album_list, 'tabs'); $stat_row = template_extract_block($template_album_list, 'stat_row'); $spacer = template_extract_block($template_album_list, 'spacer'); $header = template_extract_block($template_album_list, 'header'); $footer = template_extract_block($template_album_list, 'footer'); $rows_separator = template_extract_block($template_album_list, 'row_separator'); $count = 0; $columns = $CONFIG['album_list_cols']; $column_width = ceil(100 / $columns); $thumb_cell_width = $CONFIG['alb_list_thumb_size'] + 2; starttable('100%'); if ($STATS_IN_ALB_LIST) { $params = array('{STATISTICS}' => $statistics, '{COLUMNS}' => $columns, ); echo template_eval($stat_row, $params); } echo $header; if (is_array($alb_list)) { foreach($alb_list as $album) { $count ++; $params = array('{COL_WIDTH}' => $column_width, '{ALBUM_TITLE}' => $album['album_title'], '{THUMB_CELL_WIDTH}' => $thumb_cell_width, '{ALB_LINK_TGT}' => "thumbnails.php?album={$album['aid']}", '{ALB_LINK_PIC}' => $album['thumb_pic'], '{ADMIN_MENU}' => $album['album_adm_menu'], '{ALB_DESC}' => $album['album_desc'], '{ALB_INFOS}' => $album['album_info'], ); echo template_eval($album_cell, $params); if ($count % $columns == 0 && $count < count($alb_list)) { echo $rows_separator; } } } $params = array('{COL_WIDTH}' => $column_width); $empty_cell = template_eval($empty_cell, $params); while ($count++ % $columns != 0) { echo $empty_cell; } echo $footer; // Tab display $params = array('{COLUMNS}' => $columns, '{TABS}' => $tabs, ); echo template_eval($tabs_row, $params); endtable(); echo $spacer; } // Function to display first level Albums of a category function theme_display_album_list_cat(&$alb_list, $nbAlb, $cat, $page, $total_pages) { global $CONFIG, $STATS_IN_ALB_LIST, $statistics, $template_tab_display, $template_album_list_cat, $lang_album_list; if (!$CONFIG['first_level']) { return; } // $theme_alb_list_tab_tmpl = $template_tab_display; // $theme_alb_list_tab_tmpl['left_text'] = strtr($theme_alb_list_tab_tmpl['left_text'],array('{LEFT_TEXT}' => $lang_album_list['album_on_page'])); // $theme_alb_list_tab_tmpl['inactive_tab'] = strtr($theme_alb_list_tab_tmpl['inactive_tab'],array('{LINK}' => 'index.php?cat='.$cat.'&page=%d')); // $tabs = create_tabs($nbAlb, $page, $total_pages, $theme_alb_list_tab_tmpl); // echo $template_album_list_cat; $template_album_list_cat1 = $template_album_list_cat; $album_cell = template_extract_block($template_album_list_cat1, 'c_album_cell'); $empty_cell = template_extract_block($template_album_list_cat1, 'c_empty_cell'); $tabs_row = template_extract_block($template_album_list_cat1, 'c_tabs'); $stat_row = template_extract_block($template_album_list_cat1, 'c_stat_row'); $spacer = template_extract_block($template_album_list_cat1, 'c_spacer'); $header = template_extract_block($template_album_list_cat1, 'c_header'); $footer = template_extract_block($template_album_list_cat1, 'c_footer'); $rows_separator = template_extract_block($template_album_list_cat1, 'c_row_separator'); $count = 0; $columns = $CONFIG['album_list_cols']; $column_width = ceil(100 / $columns); $thumb_cell_width = $CONFIG['alb_list_thumb_size'] + 2; starttable('100%'); if ($STATS_IN_ALB_LIST) { $params = array('{STATISTICS}' => $statistics, '{COLUMNS}' => $columns, ); echo template_eval($stat_row, $params); } echo $header; if (is_array($alb_list)) { foreach($alb_list as $album) { $count ++; $params = array('{COL_WIDTH}' => $column_width, '{ALBUM_TITLE}' => $album['album_title'], '{THUMB_CELL_WIDTH}' => $thumb_cell_width, '{ALB_LINK_TGT}' => "thumbnails.php?album={$album['aid']}", '{ALB_LINK_PIC}' => $album['thumb_pic'], '{ADMIN_MENU}' => $album['album_adm_menu'], '{ALB_DESC}' => $album['album_desc'], '{ALB_INFOS}' => $album['album_info'], ); echo template_eval($album_cell, $params); if ($count % $columns == 0 && $count < count($alb_list)) { echo $rows_separator; } } } $params = array('{COL_WIDTH}' => $column_width); $empty_cell = template_eval($empty_cell, $params); while ($count++ % $columns != 0) { echo $empty_cell; } echo $footer; // Tab display $params = array('{COLUMNS}' => $columns, '{TABS}' => $tabs, ); echo template_eval($tabs_row, $params); endtable(); echo $spacer; } function theme_display_thumbnails(&$thumb_list, $nbThumb, $album_name, $aid, $cat, $page, $total_pages, $sort_options, $display_tabs, $mode = 'thumb') { global $CONFIG, $CURRENT_ALBUM_DATA; global $template_thumb_view_title_row, $template_fav_thumb_view_title_row, $lang_thumb_view, $template_tab_display, $template_thumbnail_view; static $header = ''; static $thumb_cell = ''; static $empty_cell = ''; static $row_separator = ''; static $footer = ''; static $tabs = ''; static $spacer = ''; if ($header == '') { $thumb_cell = template_extract_block($template_thumbnail_view, 'thumb_cell'); $tabs = template_extract_block($template_thumbnail_view, 'tabs'); $header = template_extract_block($template_thumbnail_view, 'header'); $empty_cell = template_extract_block($template_thumbnail_view, 'empty_cell'); $row_separator = template_extract_block($template_thumbnail_view, 'row_separator'); $footer = template_extract_block($template_thumbnail_view, 'footer'); $spacer = template_extract_block($template_thumbnail_view, 'spacer'); } $cat_link = is_numeric($aid) ? '' : '&cat=' . $cat; $theme_thumb_tab_tmpl = $template_tab_display; if ($mode == 'thumb') { $theme_thumb_tab_tmpl['left_text'] = strtr($theme_thumb_tab_tmpl['left_text'], array('{LEFT_TEXT}' => $lang_thumb_view['pic_on_page'])); $theme_thumb_tab_tmpl['inactive_tab'] = strtr($theme_thumb_tab_tmpl['inactive_tab'], array('{LINK}' => 'thumbnails.php?album=' . $aid . $cat_link . '&page=%d')); } else { $theme_thumb_tab_tmpl['left_text'] = strtr($theme_thumb_tab_tmpl['left_text'], array('{LEFT_TEXT}' => $lang_thumb_view['user_on_page'])); $theme_thumb_tab_tmpl['inactive_tab'] = strtr($theme_thumb_tab_tmpl['inactive_tab'], array('{LINK}' => 'index.php?cat=' . $cat . '&page=%d')); } $thumbcols = $CONFIG['thumbcols']; $cell_width = ceil(100 / $CONFIG['thumbcols']) . '%'; $tabs_html = $display_tabs ? create_tabs($nbThumb, $page, $total_pages, $theme_thumb_tab_tmpl) : ''; // The sort order options are not available for meta albums if ($sort_options) { $param = array('{ALBUM_NAME}' => $album_name, '{AID}' => $aid, '{PAGE}' => $page, '{NAME}' => $lang_thumb_view['name'], '{TITLE}' => $lang_thumb_view['title'], '{DATE}' => $lang_thumb_view['date'], '{SORT_NA}' => $lang_thumb_view['sort_na'], '{SORT_ND}' => $lang_thumb_view['sort_nd'], '{SORT_TA}' => $lang_thumb_view['sort_ta'], '{SORT_TD}' => $lang_thumb_view['sort_td'], '{SORT_DA}' => $lang_thumb_view['sort_da'], '{SORT_DD}' => $lang_thumb_view['sort_dd'], ); $title = template_eval($template_thumb_view_title_row, $param); } else if ($aid == 'favpics' && $CONFIG['enable_zipdownload'] == 1) { //Lots of stuff can be added here later $param = array('{ALBUM_NAME}' => $album_name, '{DOWNLOAD_ZIP}'=>$lang_thumb_view['download_zip'] ); $title = template_eval($template_fav_thumb_view_title_row, $param); } else { $title = $album_name; } if ($mode == 'thumb') { starttable('100%', $title, $thumbcols); } else { starttable('100%'); } echo $header; echo ""; $i = 0; foreach($thumb_list as $thumb) { $i++; if ($mode == 'thumb') { if ($aid == 'lastalb') { $params = array('{CELL_WIDTH}' => $cell_width, '{LINK_TGT}' => "thumbnails.php?album={$thumb['aid']}", '{THUMB}' => $thumb['image'], '{CAPTION}' => $thumb['caption'], '{ADMIN_MENU}' => $thumb['admin_menu'] ); } else { $params = array('{CELL_WIDTH}' => $cell_width, '{LINK_TGT}' => "displayimage.php?album=$aid$cat_link&pos={$thumb['pos']}", '{THUMB}' => $thumb['image'], '{CAPTION}' => $thumb['caption'], '{ADMIN_MENU}' => $thumb['admin_menu'] ); } } else { $params = array('{CELL_WIDTH}' => $cell_width, '{LINK_TGT}' => "index.php?cat={$thumb['cat']}", '{THUMB}' => $thumb['image'], '{CAPTION}' => $thumb['caption'], '{ADMIN_MENU}' => '' ); } echo template_eval($thumb_cell, $params); if ((($i % $thumbcols) == 0) && ($i < count($thumb_list))) { echo $row_separator; } } for (;($i % $thumbcols); $i++) { echo $empty_cell; } echo $footer; if ($display_tabs) { $params = array('{THUMB_COLS}' => $thumbcols, '{TABS}' => $tabs_html ); echo template_eval($tabs, $params); } endtable(); echo $spacer; } // Added to display flim_strip function theme_display_film_strip(&$thumb_list, $nbThumb, $album_name, $aid, $cat, $pos, $sort_options, $mode = 'thumb') { global $CONFIG; global $template_film_strip, $lang_film_strip; static $template = ''; static $thumb_cell = ''; static $empty_cell = ''; static $spacer = ''; if ((!$template)) { $template = $template_film_strip; $thumb_cell = template_extract_block($template, 'thumb_cell'); $empty_cell = template_extract_block($template, 'empty_cell'); // $spacer = template_extract_block($template, 'spacer'); } if ($header == '') { } $cat_link = is_numeric($aid) ? '' : '&cat=' . $cat; $theme_thumb_tab_tmpl = $template_tab_display; if ($mode == 'thumb') { $theme_thumb_tab_tmpl['left_text'] = strtr($theme_thumb_tab_tmpl['left_text'], array('{LEFT_TEXT}' => $lang_thumb_view['pic_on_page'])); $theme_thumb_tab_tmpl['inactive_tab'] = strtr($theme_thumb_tab_tmpl['inactive_tab'], array('{LINK}' => 'thumbnails.php?album=' . $aid . $cat_link . '&page=%d')); } else { $theme_thumb_tab_tmpl['left_text'] = strtr($theme_thumb_tab_tmpl['left_text'], array('{LEFT_TEXT}' => $lang_thumb_view['user_on_page'])); $theme_thumb_tab_tmpl['inactive_tab'] = strtr($theme_thumb_tab_tmpl['inactive_tab'], array('{LINK}' => 'index.php?cat=' . $cat . '&page=%d')); } $thumbcols = $CONFIG['thumbcols']; $cell_width = ceil(100 / $CONFIG['max_film_strip_items']) . '%'; $i = 0; $thumb_strip = ''; foreach($thumb_list as $thumb) { $i++; if ($mode == 'thumb') { $params = array('{CELL_WIDTH}' => $cell_width, '{LINK_TGT}' => "displayimage.php?album=$aid$cat_link&pos={$thumb['pos']}", '{THUMB}' => $thumb['image'], '{CAPTION}' => '', '{ADMIN_MENU}' => '' ); } else { $params = array('{CELL_WIDTH}' => $cell_width, '{LINK_TGT}' => "index.php?cat={$thumb['cat']}", '{THUMB}' => $thumb['image'], '{CAPTION}' => '', '{ADMIN_MENU}' => '' ); } $thumb_strip .= template_eval($thumb_cell, $params); // if ((($i % $thumbcols) == 0) && ($i < count($thumb_list))) { // echo $row_separator; // } } // for (;($i % $thumbcols); $i++){ // echo $empty_cell; // } $params = array('{THUMB_STRIP}' => $thumb_strip, '{COLS}' => $i); ob_start(); starttable(''); echo template_eval($template, $params); endtable(); $film_strip = ob_get_contents(); ob_end_clean(); return $film_strip; } function theme_no_img_to_display($album_name) { global $lang_errors, $template_no_img_to_display; static $template = ''; static $spacer; if ((!$template)) { $template = $template_no_img_to_display; $spacer = template_extract_block($template, 'spacer'); } $params = array('{TEXT}' => $lang_errors['no_img_to_display']); starttable('100%', $album_name); echo template_eval($template, $params); endtable(); } function theme_display_image($nav_menu, $picture, $votes, $pic_info, $comments, $film_strip) { global $HTTP_COOKIE_VARS, $CONFIG; echo <<
".$CURRENT_ALBUM_DATA['description']."
EOT; echo $nav_menu; endtable(); starttable(); echo $picture; endtable(); if ($CONFIG['display_film_strip'] == 1) { // starttable(); echo $film_strip; // endtable(); } starttable(); echo $votes; endtable(); $picinfo = isset($HTTP_COOKIE_VARS['picinfo']) ? $HTTP_COOKIE_VARS['picinfo'] : ($CONFIG['display_pic_info'] ? 'block' : 'none'); echo "
\n"; starttable(); echo $pic_info; endtable(); echo "
\n"; starttable(); echo $comments; endtable(); } function theme_html_picinfo(&$info) { global $lang_picinfo; $html = ''; $html .= " \n"; $template = " \n"; foreach ($info as $key => $value) $html .= sprintf($template, $key, $value); return $html; } ?>
{$lang_picinfo['title']}
%s:%s