function wppa_theme()
{
    global $wppa_version;
    $wppa_version = '4-0-0';
    // The version number of this file, please change if you modify this file
    global $wppa;
    global $wppa_opt;
    global $wppa_show_statistics;
    // Can be set to true by a custom page template
    $curpage = wppa_get_curpage();
    // Get the page # we are on when pagination is on, or 1
    $didsome = false;
    // Required initializations for pagination
    $n_album_pages = '0';
    // "
    $n_thumb_pages = '0';
    // "
    wppa_container('open');
    // Open container
    if ($wppa_show_statistics) {
        wppa_statistics();
    }
    // Show statistics if set so by the page template
    wppa_breadcrumb('optional');
    // Display breadcrumb navigation only if it is set in the settings page
    if (wppa_page('albums')) {
        // Page 'Albums' requested
        $albums = wppa_get_albums();
        // Get the albums
        if ($albums) {
            $counter_albums = '0';
            $n_album_pages = wppa_get_npages('albums', $albums);
            wppa_album_list('open');
            // Open Albums sub-container
            foreach ($albums as $ta) {
                global $album;
                $album = $ta;
                // Loop the albums
                $counter_albums++;
                if (wppa_onpage('albums', $counter_albums, $curpage)) {
                    $didsome = true;
                    wppa_album_cover();
                    // Show the cover
                }
                // End if on page
            }
            wppa_album_list('close');
            // Close Albums sub-container
        }
        // If albums
        if ($wppa_opt['wppa_thumbtype'] != 'none') {
            $thumbs = wppa_get_thumbs();
            // Get the Thumbs
        } else {
            $thumbs = false;
        }
        $n_thumb_pages = wppa_get_npages('thumbs', $thumbs);
        // How many pages of thumbs will there be?
        if ($n_thumb_pages == '0') {
            $thumbs = false;
        }
        // No pages: no thumbs. Maybe want covers only
        if ($didsome && wppa_is_pagination()) {
            $thumbs = false;
        }
        // Pag on and didsome: pagebreak
        if (count($thumbs) <= wppa_get_mincount()) {
            $thumbs = false;
        }
        // Less than treshold value
        if ($thumbs) {
            $counter_thumbs = '0';
            if (get_option('wppa_thumbtype', 'default') == 'ascovers') {
                // Do the thumbs As covers
                wppa_thumb_list('open');
                // Open Thumblist sub-container
                foreach ($thumbs as $tt) {
                    global $thumb;
                    $thumb = $tt;
                    // Loop the Thumbs
                    $counter_thumbs++;
                    if (wppa_onpage('thumbs', $counter_thumbs, $curpage - $n_album_pages)) {
                        $didsome = true;
                        wppa_thumb_ascover();
                        // Show Thumb as cover
                    }
                    // End if on page
                }
                wppa_thumb_list('close');
                // Close Thumblist sub-container
            } else {
                // Do the thumbs As default
                wppa_thumb_area('open');
                // Open Thumbarea sub-container
                foreach ($thumbs as $tt) {
                    global $thumb;
                    $thumb = $tt;
                    // Loop the Thumbs
                    $counter_thumbs++;
                    if (wppa_onpage('thumbs', $counter_thumbs, $curpage - $n_album_pages)) {
                        $didsome = true;
                        wppa_thumb_default();
                        // Show Thumb as default
                    }
                    // End if on page
                }
                wppa_popup();
                // Prepare Popup box
                wppa_thumb_area('close');
                // Close Thumbarea sub-container
            }
            // As default
        }
        // If thumbs
        if (!wppa_is_pagination()) {
            $totpag = '1';
        } else {
            $totpag = $n_album_pages + $n_thumb_pages;
        }
        wppa_page_links($totpag, $curpage);
        // Show pages navigaion bar if needed
        if (!$didsome && $wppa['src']) {
            $wppa['out'] .= '<div class="center">' . __a('No albums or photos found matching your search criteria.', 'wppa_theme') . '</div>';
        }
    } elseif (wppa_page('oneofone')) {
        // Page 'Single image' requested
        wppa_slide_frame();
        // Setup slideframe
        wppa_run_slidecontainer('single');
        // Fill in the photo and display it
    } elseif (wppa_page('slide') || wppa_page('single')) {
        // Page 'Slideshow' or 'Single' in browsemode requested
        wppa_the_slideshow();
        // Producs all the html required for the slideshow
        wppa_run_slidecontainer('slideshow');
        // Fill in the photo array and display it.
    }
    // wppa_page('slide')
    wppa_container('close');
}
Example #2
0
function wppa_theme()
{
    global $wppa_version;
    $wppa_version = '6-1-15-000';
    // The version number of this file
    global $wppa;
    global $wppa_show_statistics;
    // Can be set to true by a custom page template
    $curpage = wppa_get_curpage();
    // Get the page # we are on when pagination is on, or 1
    $didsome = false;
    // Required initializations for pagination
    $n_album_pages = '0';
    // "
    $n_thumb_pages = '0';
    // "
    // Open container
    wppa_container('open');
    // Show statistics if set so by the page template
    if ($wppa_show_statistics) {
        wppa_statistics();
    }
    // Display breadcrumb navigation only if it is set in the settings page
    wppa_breadcrumb('optional');
    if (wppa_page('albums')) {
        // Page 'Albums' requested
        // Get the albums and the thumbs and the number of pages for each set
        $albums = wppa_get_albums();
        // Get the albums
        $n_album_pages = wppa_get_npages('albums', $albums);
        // Get the number of album pages
        if (wppa_opt('thumbtype') != 'none') {
            $thumbs = wppa_get_thumbs();
            // Get the Thumbs
        } else {
            $thumbs = false;
        }
        $wanted_empty = wppa_is_wanted_empty($thumbs);
        // See if we need to display an empty thumbnail area
        $n_thumb_pages = wppa_get_npages('thumbs', $thumbs);
        // Get the number of thumb pages
        if ($n_thumb_pages == '0' && !$wanted_empty) {
            $thumbs = false;
        }
        // No pages: no thumbs. Maybe want covers only
        if ($wanted_empty) {
            $n_thumb_pages = '1';
        }
        // Get total number of pages
        if (!wppa_is_pagination()) {
            $totpag = '1';
        } else {
            $totpag = $n_album_pages + $n_thumb_pages;
        }
        // Make pagelinkbar if requested on top
        if (wppa_opt('pagelink_pos') == 'top' || wppa_opt('pagelink_pos') == 'both') {
            wppa_page_links($totpag, $curpage);
        }
        // Process the albums
        if (!wppa_switch('wppa_thumbs_first')) {
            if ($albums) {
                $counter_albums = '0';
                wppa_album_list('open');
                // Open Albums sub-container
                foreach ($albums as $album) {
                    // Loop the albums
                    $counter_albums++;
                    if (wppa_onpage('albums', $counter_albums, $curpage)) {
                        wppa_album_cover($album['id']);
                        // Show the cover
                        $didsome = true;
                    }
                    // End if on page
                }
                wppa_album_list('close');
                // Close Albums sub-container
            }
            // If albums
        }
        if ($didsome && wppa_is_pagination()) {
            $thumbs = false;
        }
        // Pag on and didsome: force a pagebreak by faking no thumbs
        if (count($thumbs) <= wppa_get_mincount() && !$wanted_empty) {
            $thumbs = false;
        }
        // Less than treshold value
        if (wppa_switch('wppa_thumbs_first') && $curpage > $n_thumb_pages) {
            $thumbs = false;
        }
        // If thumbs done, do not display an empty thumbarea
        // Process the thumbs
        if ($thumbs || $wanted_empty) {
            if (!$wanted_empty || !wppa_switch('thumbs_first') || wppa_get_curpage() == '1') {
                if (!$wanted_empty || wppa_switch('thumbs_first') || wppa_get_curpage() == $totpag) {
                    // Init
                    $counter_thumbs = '0';
                    // As covers
                    if (wppa_opt('wppa_thumbtype') == 'ascovers' || wppa_opt('wppa_thumbtype') == 'ascovers-mcr') {
                        // Do the thumbs As covers
                        wppa_thumb_list('open');
                        // Open Thumblist sub-container
                        $relpage = wppa_switch('wppa_thumbs_first') ? $curpage : $curpage - $n_album_pages;
                        foreach ($thumbs as $tt) {
                            global $thumb;
                            $thumb = $tt;
                            // Loop the Thumbs
                            $counter_thumbs++;
                            if (wppa_onpage('thumbs', $counter_thumbs, $relpage)) {
                                $didsome = true;
                                wppa_thumb_ascover($thumb['id']);
                                // Show Thumb as cover
                            }
                            // End if on page
                        }
                        wppa_thumb_list('close');
                        // Close Thumblist sub-container
                    } elseif (wppa_opt('wppa_thumbtype') == 'masonry-v') {
                        // Masonry
                        // The header
                        wppa_thumb_area('open');
                        // Open Thumbarea sub-container
                        wppa_popup();
                        // Prepare Popup box
                        wppa_album_name('top');
                        // Optionally display album name
                        wppa_album_desc('top');
                        // Optionally display album description
                        // Init
                        $relpage = wppa_switch('wppa_thumbs_first') ? $curpage : $curpage - $n_album_pages;
                        $cont_width = wppa_get_container_width();
                        $count_cols = ceil($cont_width / (wppa_opt('wppa_thumbsize') + wppa_opt('wppa_tn_margin')));
                        $correction = wppa_opt('wppa_tn_margin') * ($cont_width / $count_cols) / 100;
                        // Init the table
                        wppa_out('<table class="wppa-masonry" style="margin-top:3px;" ><tbody class="wppa-masonry" ><tr class="wppa-masonry" >');
                        // Init the columns
                        $col_headers = array();
                        $col_contents = array();
                        $col_heights = array();
                        $col_widths = array();
                        for ($col = 0; $col < $count_cols; $col++) {
                            $col_headers[$col] = '';
                            $col_contents[$col] = '';
                            $col_heights[$col] = 0;
                            $col_widths[$col] = 100;
                        }
                        // Process the thumbnails
                        $col = '0';
                        if ($thumbs) {
                            foreach ($thumbs as $tt) {
                                $id = $tt['id'];
                                $counter_thumbs++;
                                if (wppa_onpage('thumbs', $counter_thumbs, $relpage)) {
                                    $col_contents[$col] .= wppa_get_thumb_masonry($id);
                                    $col_heights[$col] += ($correction + wppa_get_thumby($id)) / ($correction + wppa_get_thumbx($id)) * $col_widths[$col];
                                    $col += '1';
                                    if ($col == $count_cols) {
                                        $col = '0';
                                    }
                                    $didsome = true;
                                }
                            }
                        }
                        // Find longest column
                        $long = 0;
                        for ($col = 0; $col < $count_cols; $col++) {
                            if ($col_heights[$col] > $long) {
                                $long = $col_heights[$col];
                            }
                        }
                        // Adjust column widths to resize lengths to equal lengths
                        for ($col = 0; $col < $count_cols; $col++) {
                            if ($col_heights[$col]) {
                                $col_widths[$col] = $long / $col_heights[$col] * $col_widths[$col];
                            }
                        }
                        // Adjust column widths to total 100
                        $wide = 0;
                        for ($col = 0; $col < $count_cols; $col++) {
                            $wide += $col_widths[$col];
                        }
                        for ($col = 0; $col < $count_cols; $col++) {
                            $col_widths[$col] = $col_widths[$col] * 100 / $wide;
                        }
                        // Make column headers
                        for ($col = 0; $col < $count_cols; $col++) {
                            $col_headers[$col] = '<td style="width: ' . $col_widths[$col] . '%; vertical-align:top;" class="wppa-masonry" >';
                        }
                        // Add the columns to the output stream
                        for ($col = 0; $col < $count_cols; $col++) {
                            wppa_out($col_headers[$col]);
                            wppa_out($col_contents[$col]);
                            wppa_out('</td>');
                        }
                        // Close the table
                        wppa_out('</tr></tbody></table>');
                        // The footer
                        wppa_album_name('bottom');
                        // Optionally display album name
                        wppa_album_desc('bottom');
                        // Optionally display album description
                        wppa_thumb_area('close');
                        // Close Thumbarea sub-container
                    } elseif (wppa_opt('wppa_thumbtype') == 'masonry-h') {
                        // Masonry
                        // The header
                        wppa_thumb_area('open');
                        // Open Thumbarea sub-container
                        wppa_popup();
                        // Prepare Popup box
                        wppa_album_name('top');
                        // Optionally display album name
                        wppa_album_desc('top');
                        // Optionally display album description
                        // Init
                        $relpage = wppa_switch('wppa_thumbs_first') ? $curpage : $curpage - $n_album_pages;
                        $cont_width = wppa_get_container_width('netto');
                        $correction = wppa_opt('wppa_tn_margin');
                        // Init the table
                        wppa_out('<table class="wppa-masonry" style="margin-top:3px;" ><tbody class="wppa-masonry" >');
                        // Process the thumbnails
                        $row_content = '';
                        $row_width = 0;
                        $target_row_height = wppa_opt('wppa_thumbsize') * 0.75 + $correction;
                        $rw_count = 0;
                        $tr_count = '1';
                        $done_count = 0;
                        $last = false;
                        $max_row_height = $target_row_height * 0.8;
                        // Init keep track for last
                        if ($thumbs) {
                            foreach ($thumbs as $tt) {
                                $id = $tt['id'];
                                $counter_thumbs++;
                                if (wppa_onpage('thumbs', $counter_thumbs, $relpage)) {
                                    $row_content .= wppa_get_thumb_masonry($tt['id']);
                                    $rw_count += 1;
                                    $row_width += wppa_get_thumbratioxy($id) * ($target_row_height - $correction);
                                    $didsome = true;
                                }
                                $done_count += 1;
                                $last = $done_count == count($thumbs);
                                if ($row_width > $cont_width || $last) {
                                    $tot_marg = $rw_count * $correction;
                                    $row_height = $row_width ? ($target_row_height - $correction) * ($cont_width - '3' - $tot_marg) / $row_width + $correction : '0';
                                    if (!$last) {
                                        $max_row_height = max($max_row_height, $row_height);
                                    }
                                    if ($last && $row_height > wppa_get_thumby($id)) {
                                        $row_height = $max_row_height;
                                    }
                                    $row_height_p = $row_height / $cont_width * 100;
                                    wppa_out('<tr class="wppa-masonry" >' . '<td style="border:none;padding:0;margin:0" >' . '<div' . ' id="wppa-mas-h-' . $tr_count . '-' . wppa('mocc') . '"' . ' style="height:' . $row_height . 'px;"' . ' class="wppa-masonry"' . ' data-height-perc="' . $row_height_p . '"' . ' >');
                                    wppa_out($row_content);
                                    wppa_out('</div></td></tr>');
                                    $row_content = '';
                                    $row_width = 0;
                                    $row_height = wppa_opt('wppa_thumbsize');
                                    $rw_count = 0;
                                    $tr_count += '1';
                                }
                            }
                        }
                        wppa_out('</tbody></table>');
                        // The footer
                        wppa_album_name('bottom');
                        // Optionally display album name
                        wppa_album_desc('bottom');
                        // Optionally display album description
                        wppa_thumb_area('close');
                        // Close Thumbarea sub-container
                    } elseif (wppa_opt('wppa_thumbtype') == 'default') {
                        // Do the thumbs As default
                        // The header
                        wppa_thumb_area('open');
                        // Open Thumbarea sub-container
                        wppa_popup();
                        // Prepare Popup box
                        wppa_album_name('top');
                        // Optionally display album name
                        wppa_album_desc('top');
                        // Optionally display album description
                        // Init
                        $relpage = wppa_switch('wppa_thumbs_first') ? $curpage : $curpage - $n_album_pages;
                        // Process the thumbnails
                        if ($thumbs) {
                            foreach ($thumbs as $tt) {
                                $counter_thumbs++;
                                if (wppa_onpage('thumbs', $counter_thumbs, $relpage)) {
                                    $didsome = true;
                                    wppa_thumb_default($tt['id']);
                                    // Show Thumb as default
                                }
                                // End if on page
                            }
                        }
                        // The footer
                        wppa_album_name('bottom');
                        // Optionally display album name
                        wppa_album_desc('bottom');
                        // Optionally display album description
                        wppa_thumb_area('close');
                        // Close Thumbarea sub-container
                    } else {
                        wppa_out('Unimplemented thumbnail type');
                    }
                }
            }
        }
        // If thumbs
        if ($didsome && wppa_is_pagination()) {
            $albums = false;
        }
        // Pag on and didsome: force a pagebreak by faking no albums
        if (!wppa_is_pagination()) {
            $n_thumb_pages = '0';
        }
        // Still on page one
        // Process the albums
        if (wppa_switch('wppa_thumbs_first')) {
            if ($albums) {
                $counter_albums = '0';
                wppa_album_list('open');
                // Open Albums sub-container
                foreach ($albums as $album) {
                    // Loop the albums
                    $counter_albums++;
                    if (wppa_onpage('albums', $counter_albums, $curpage - $n_thumb_pages)) {
                        wppa_album_cover($album['id']);
                        // Show the cover
                        $didsome = true;
                    }
                    // End if on page
                }
                wppa_album_list('close');
                // Close Albums sub-container
            }
            // If albums
        }
        // Make pagelinkbar if requested on bottom
        if (wppa_opt('pagelink_pos') == 'bottom' || wppa_opt('pagelink_pos') == 'both') {
            wppa_page_links($totpag, $curpage);
        }
        // Empty results?
        if (!$didsome && !$wanted_empty) {
            if (wppa('photos_only')) {
                wppa_out(wppa_errorbox(__a('No photos found matching your search criteria.', 'wppa_theme')));
            } elseif (wppa('albums_only')) {
                wppa_out(wppa_errorbox(__a('No albums found matching your search criteria.', 'wppa_theme')));
            } else {
                wppa_out(wppa_errorbox(__a('No albums or photos found matching your search criteria.', 'wppa_theme')));
            }
        }
    } elseif (wppa_page('slide') || wppa_page('single')) {
        // Page 'Slideshow' or 'Single' in browsemode requested
        $thumbs = wppa_get_thumbs();
        wppa_dbg_msg('From theme: #thumbs=' . ($thumbs ? count($thumbs) : '0'));
        if ($thumbs) {
            wppa_the_slideshow();
            // Producs all the html required for the slideshow
            wppa_run_slidecontainer('slideshow');
            // Fill in the photo array and display it.
        } else {
            wppa_out(wppa_errorbox(__a('No photos found matching your search criteria.', 'wppa_theme')));
        }
    }
    // wppa_page( 'slide' )
    // Close container
    wppa_container('close');
}
function wppa_breadcrumb($opt = '')
{
    global $wpdb;
    global $wppa_session;
    // See if they need us
    // Check Table II-A1 a and b
    if ($opt == 'optional') {
        $pid = wppa_get_the_page_id();
        $type = $wpdb->get_var($wpdb->prepare("SELECT `post_type` FROM `" . $wpdb->posts . "` WHERE `ID` = %s", $pid));
        if ($type == 'post' && !wppa_switch('show_bread_posts')) {
            return;
            // Nothing to do here
        }
        if ($type != 'post' && !wppa_switch('show_bread_pages')) {
            return;
            // Nothing to do here
        }
    }
    // Check special cases
    if (wppa('is_single')) {
        return;
    }
    // A single image slideshow needs no navigation
    if (wppa_page('oneofone')) {
        return;
    }
    // Never at a single image page
    if (wppa('is_slideonly')) {
        return;
    }
    // Not when slideonly
    if (wppa_in_widget()) {
        return;
    }
    // Not in a widget
    if (is_feed()) {
        return;
    }
    // Not in a feed
    $thumbhref = '';
    // Any special selection has its own switch
    if (wppa('is_topten') && !wppa_switch('bc_on_topten')) {
        return;
    }
    if (wppa('is_lasten') && !wppa_switch('bc_on_lasten')) {
        return;
    }
    if (wppa('is_comten') && !wppa_switch('bc_on_comten')) {
        return;
    }
    if (wppa('is_featen') && !wppa_switch('bc_on_featen')) {
        return;
    }
    if (wppa('is_related') && !wppa_switch('bc_on_related')) {
        return;
    }
    if (wppa('is_tag') && !wppa_switch('bc_on_tag')) {
        return;
    }
    if (wppa('src') && !wppa_switch('bc_on_search')) {
        return;
    }
    // Get the album number
    $alb = wppa_is_int(wppa('start_album')) ? wppa('start_album') : '0';
    // A single album or all ( all = 0 here )
    if ($alb < '0') {
        $alb = '0';
    }
    $is_albenum = strlen(wppa('start_album')) > '0' && !wppa_is_int(wppa('start_album'));
    wppa_dbg_msg('alb=' . $alb . ', albenum=' . $is_albenum, 'green');
    $virtual = wppa_is_virtual() || wppa('last_albums');
    if (wppa('last_albums')) {
        $alb = wppa('last_albums_parent');
    }
    wppa_dbg_msg('alb=' . $alb . ', albenum=' . $is_albenum . ', l_a=' . wppa('last_albums') . ', l_a_p=' . wppa('last_albums_parent'), 'green');
    // See if the album is a 'stand alone' album
    $separate = wppa_is_separate($alb);
    // See if the album links to slides in stead of thumbnails
    $slide = wppa_get_album_title_linktype($alb) == 'slide' ? '&amp;wppa-slide' : '';
    // See if we link to covers or to contents
    $to_cover = wppa_opt('thumbtype') == 'none' ? '1' : '0';
    // Photo number?
    $photo = wppa('start_photo');
    wppa_dbg_msg('pid=' . $pid . ', type=' . $type . ', alb=' . $alb . ', sep=' . $separate . ', slide=' . $slide . ', t_c=0, ph=' . $photo, 'green');
    // Open the breadcrumb box
    wppa_out('<div' . ' id="wppa-bc-' . wppa('mocc') . '"' . ' class="wppa-nav wppa-box wppa-nav-text wppa-bc"' . ' style="' . __wcs('wppa-nav') . __wcs('wppa-box') . __wcs('wppa-nav-text') . '" >');
    // Do we need Home?
    if (wppa_switch('show_home')) {
        $value = __(wppa_opt('home_text'));
        $href = wppa_dbg_url(get_bloginfo('url'));
        $title = get_bloginfo('title');
        wppa_bcitem($value, $href, $title, 'b1');
    }
    // Page ( grand )parents ?
    if ($type == 'page' && wppa_switch('show_page')) {
        wppa_crumb_page_ancestors($pid);
    }
    // Do the post/page
    if (wppa_switch('show_page')) {
        $value = __(stripslashes($wpdb->get_var($wpdb->prepare("SELECT `post_title` FROM `" . $wpdb->posts . "` WHERE `post_status` = 'publish' AND `ID` = %s LIMIT 0,1", $pid))));
        if ($alb || $virtual || $is_albenum) {
            $href = wppa_get_permalink($pid, true);
            $ajax = '';
            //wppa_get_ajaxlink( $pid ); // fails
        } else {
            $href = '';
            $ajax = '';
        }
        $title = $type == 'post' ? __('Post:', 'wp-photo-album-plus') . ' ' . $value : __('Page:', 'wp-photo-album-plus') . ' ' . $value;
        $hash = '#wppa-container-';
        if (wppa_is_int($alb)) {
            if (wppa_get_parentalbumid($alb) < '1') {
                $hash = '#album-' . $alb . '-';
            } else {
                $p = wppa_get_parentalbumid($alb);
                while ($p > '0') {
                    $a = $p;
                    $p = wppa_get_parentalbumid($a);
                }
                $hash = '#album-' . $a . '-';
            }
        }
        wppa_bcitem($value, $href, $title, 'b3', $ajax, $hash);
    }
    // The album ( grand ) parents if not separate
    wppa_crumb_ancestors($alb, $to_cover);
    // The album and optional placeholder for photo
    // Supersearch ?
    if (wppa('supersearch')) {
        $value = ' ';
        $ss_data = explode(',', wppa('supersearch'));
        // To preserve comma's in data[3], reconstruct a possible exploded data
        $data = $ss_data;
        unset($data[0]);
        unset($data[1]);
        unset($data[2]);
        $data = implode(',', $data);
        $ss_data[3] = $data;
        switch ($ss_data['0']) {
            case 'a':
                $value .= ' ' . __('Albums', 'wp-photo-album-plus');
                switch ($ss_data['1']) {
                    case 'c':
                        $value .= ' ' . __('with category:', 'wp-photo-album-plus');
                        break;
                    case 'n':
                        $value .= ' ' . __('with name:', 'wp-photo-album-plus');
                        break;
                    case 't':
                        $value .= ' ' . __('with words:', 'wp-photo-album-plus');
                        break;
                }
                $value .= ' <b>' . str_replace('.', '</b> ' . __('and', 'wp-photo-album-plus') . ' <b>', $ss_data['3']) . '</b>';
                break;
            case 'p':
                $value .= ' ' . __('Photos', 'wp-photo-album-plus');
                switch ($ss_data['1']) {
                    case 'g':
                        $value .= ' ' . __('with tag:', 'wp-photo-album-plus') . ' <b>' . str_replace('.', '</b> ' . __('and', 'wp-photo-album-plus') . ' <b>', $ss_data['3']) . '</b>';
                        break;
                    case 'n':
                        $value .= ' ' . __('with name:', 'wp-photo-album-plus') . ' <b>' . $ss_data['3'] . '</b>';
                        break;
                    case 't':
                        $ss_data['3'] = str_replace('...', '***', $ss_data['3']);
                        $value .= ' ' . __('with words:', 'wp-photo-album-plus') . ' <b>' . str_replace('.', '</b> ' . __('and', 'wp-photo-album-plus') . ' <b>', $ss_data['3']) . '</b>';
                        $value = str_replace('***', '...', $value);
                        break;
                    case 'o':
                        $value .= ' ' . __('of owner:', 'wp-photo-album-plus') . ' <b>' . $ss_data['3'] . '</b>';
                        break;
                    case 'i':
                        $label = $wpdb->get_var($wpdb->prepare("SELECT `description` FROM `" . WPPA_IPTC . "` WHERE `tag` = %s AND `photo` = '0'", str_replace('H', '#', $ss_data['2'])));
                        $label = trim($label, ':');
                        $value .= ' ' . __('with iptc tag:', 'wp-photo-album-plus') . ' <b>' . __($label, 'wp-photo-album-plus') . '</b> ' . __('with content:', 'wp-photo-album-plus') . ' <b>' . $ss_data['3'] . '</b>';
                        break;
                    case 'e':
                        $label = $wpdb->get_var($wpdb->prepare("SELECT `description` FROM `" . WPPA_EXIF . "` WHERE `tag` = %s AND `photo` = '0'", str_replace('H', '#', $ss_data['2'])));
                        $label = trim($label, ':');
                        $value .= ' ' . __('with exif tag:', 'wp-photo-album-plus') . ' <b>' . __($label, 'wp-photo-album-plus') . '</b> ' . __('with content:', 'wp-photo-album-plus') . ' <b>' . $ss_data['3'] . '</b>';
                        break;
                }
                break;
        }
        if (wppa('is_slide')) {
            $thumbhref = wppa_get_permalink() . 'wppa-cover=0&amp;wppa-occur=' . wppa('occur') . '&amp;wppa-supersearch=' . stripslashes(wppa('supersearch'));
            $thumbajax = wppa_get_ajaxlink() . 'wppa-cover=0&amp;wppa-occur=' . wppa('occur') . '&amp;wppa-supersearch=' . stripslashes(wppa('supersearch'));
            $title = __('View the thumbnails', 'wp-photo-album-plus');
            wppa_bcitem($value, $thumbhref, $title, 'b8', $thumbajax);
        }
        $href = '';
        $title = '';
        wppa_bcitem($value, $href, $title, 'b9');
    } elseif (wppa('src') && !wppa('is_related')) {
        $searchroot = $wppa_session['search_root'];
        if (!$searchroot) {
            $searchroot = '-2';
            // To get 'All albums'
        }
        $albtxt = wppa('is_rootsearch') ? ' <span style="cursor:pointer;" title="' . esc_attr(sprintf(__('Searchresults from album %s and its subalbums', 'wp-photo-album-plus'), wppa_display_root($searchroot))) . '">*</span> ' : '';
        if (wppa('is_slide')) {
            $value = __('Searchstring:', 'wp-photo-album-plus') . ' ' . (isset($wppa_session['display_searchstring']) ? $wppa_session['display_searchstring'] : stripslashes(wppa('searchstring'))) . $albtxt;
            $thumbhref = wppa_get_permalink() . 'wppa-cover=0&amp;wppa-occur=' . wppa('occur') . '&amp;wppa-searchstring=' . stripslashes(str_replace(' ', '+', $wppa_session['use_searchstring']));
            $thumbajax = wppa_get_ajaxlink() . 'wppa-cover=0&amp;wppa-occur=' . wppa('occur') . '&amp;wppa-searchstring=' . stripslashes(str_replace(' ', '+', $wppa_session['use_searchstring']));
            $title = __('View the thumbnails', 'wp-photo-album-plus');
            wppa_bcitem($value, $thumbhref, $title, 'b8', $thumbajax);
        }
        $value = __('Searchstring:', 'wp-photo-album-plus') . ' ' . (isset($wppa_session['display_searchstring']) ? $wppa_session['display_searchstring'] : stripslashes(wppa('searchstring'))) . $albtxt;
        $href = '';
        $title = isset($wppa_session['display_searchstring']) ? wppa_dss_to_title($wppa_session['display_searchstring']) : '';
        wppa_bcitem($value, $href, $title, 'b9');
    } elseif (wppa('calendar')) {
        if (wppa('is_slide')) {
            switch (wppa('calendar')) {
                case 'exifdtm':
                    $value = __('Photos by EXIF date', 'wp-photo-album-plus') . ': ' . wppa('caldate');
                    break;
                case 'timestamp':
                    $value = __('Photos by date of upload', 'wp-photo-album-plus') . ': ' . date('M d D Y', wppa('caldate') * 24 * 60 * 60);
                    break;
                case 'modified':
                    $value = __('Photos by date last modified', 'wp-photo-album-plus') . ': ' . date('M d D Y', wppa('caldate') * 24 * 60 * 60);
                    break;
            }
            $thumbhref = '#';
            $title = 'T8';
            wppa_bcitem($value, $thumbhref, $title, 'b8');
        }
        switch (wppa('calendar')) {
            case 'exifdtm':
                $value = __('Photos by EXIF date', 'wp-photo-album-plus') . ': ' . wppa('caldate');
                break;
            case 'timestamp':
                $value = __('Photos by date of upload', 'wp-photo-album-plus') . ': ' . date('M d D Y', wppa('caldate') * 24 * 60 * 60);
                break;
            case 'modified':
                $value = __('Photos by date last modified', 'wp-photo-album-plus') . ': ' . date('M d D Y', wppa('caldate') * 24 * 60 * 60);
                break;
        }
        $href = '';
        $title = '';
        wppa_bcitem($value, $href, $title, 'b9');
    } elseif (wppa('is_upldr')) {
        $usr = get_user_by('login', wppa('is_upldr'));
        if ($usr) {
            $user = $usr->display_name;
        } else {
            $user = wppa('is_upldr');
        }
        if (wppa('is_slide')) {
            $value = sprintf(__('Photos by %s', 'wp-photo-album-plus'), $user);
            if (wppa('start_album')) {
                $thumbhref = wppa_get_permalink() . 'wppa-cover=0&amp;wppa-occur=' . wppa('occur') . '&amp;wppa-upldr=' . wppa('is_upldr') . '&amp;wppa-album=' . wppa('start_album');
                $thumbajax = wppa_get_ajaxlink() . 'wppa-cover=0&amp;wppa-occur=' . wppa('occur') . '&amp;wppa-upldr=' . wppa('is_upldr') . '&amp;wppa-album=' . wppa('start_album');
            } else {
                $thumbhref = wppa_get_permalink() . 'wppa-cover=0&amp;wppa-occur=' . wppa('occur') . '&amp;wppa-upldr=' . wppa('is_upldr');
                $thumbajax = wppa_get_ajaxlink() . 'wppa-cover=0&amp;wppa-occur=' . wppa('occur') . '&amp;wppa-upldr=' . wppa('is_upldr');
            }
            $title = __('View the thumbnails', 'wp-photo-album-plus');
            wppa_bcitem($value, $thumbhref, $title, 'b8', $thumbajax);
        }
        $value = sprintf(__('Photos by %s', 'wp-photo-album-plus'), $user);
        $href = '';
        $title = '';
        wppa_bcitem($value, $href, $title, 'b9');
    } elseif (wppa('is_topten')) {
        // TopTen
        if (wppa('start_album')) {
            $value = $is_albenum ? __('Various albums', 'wp-photo-album-plus') : wppa_get_album_name($alb);
            $href = wppa_get_permalink() . 'wppa-cover=0&amp;wppa-occur=' . wppa('occur') . '&amp;wppa-album=' . wppa('start_album');
            $ajax = wppa_get_ajaxlink() . 'wppa-cover=0&amp;wppa-occur=' . wppa('occur') . '&amp;wppa-album=' . wppa('start_album');
            $title = $is_albenum ? __('Albums:', 'wp-photo-album-plus') . ' ' . wppa('start_album') : __('Album:', 'wp-photo-album-plus') . ' ' . $value;
            wppa_bcitem($value, $href, $title, 'b7', $ajax);
        }
        if (wppa('is_slide')) {
            $value = __('Top rated photos', 'wp-photo-album-plus');
            $thumbhref = wppa_get_permalink() . 'wppa-cover=0&amp;wppa-occur=' . wppa('occur') . '&amp;wppa-topten=' . wppa('topten_count') . '&amp;wppa-album=' . wppa('start_album');
            $thumbajax = wppa_get_ajaxlink() . 'wppa-cover=0&amp;wppa-occur=' . wppa('occur') . '&amp;wppa-topten=' . wppa('topten_count') . '&amp;wppa-album=' . wppa('start_album');
            if (wppa('medals_only')) {
                $thumbhref .= '&amp;wppa-medals-only=1';
                $thumbajax .= '&amp;wppa-medals-only=1';
            }
            $title = __('View the thumbnails', 'wp-photo-album-plus');
            wppa_bcitem($value, $thumbhref, $title, 'b8', $thumbajax);
        }
        $value = __('Top rated photos', 'wp-photo-album-plus');
        $href = '';
        $title = '';
        wppa_bcitem($value, $href, $title, 'b9');
    } elseif (wppa('is_lasten')) {
        // Lasten
        if (wppa('start_album')) {
            $value = $is_albenum ? __('Various albums', 'wp-photo-album-plus') : wppa_get_album_name($alb);
            $href = wppa_get_permalink() . 'wppa-cover=0&amp;wppa-occur=' . wppa('occur') . '&amp;wppa-album=' . wppa('start_album');
            $ajax = wppa_get_ajaxlink() . 'wppa-cover=0&amp;wppa-occur=' . wppa('occur') . '&amp;wppa-album=' . wppa('start_album');
            $title = $is_albenum ? __('Albums:', 'wp-photo-album-plus') . ' ' . wppa('start_album') : __('Album:', 'wp-photo-album-plus') . ' ' . $value;
            wppa_bcitem($value, $href, $title, 'b7', $ajax);
        }
        if (wppa('is_slide')) {
            if (wppa_switch('lasten_use_modified')) {
                $value = __('Recently modified photos', 'wp-photo-album-plus');
            } else {
                $value = __('Recently uploaded photos', 'wp-photo-album-plus');
            }
            $thumbhref = wppa_get_permalink() . 'wppa-cover=0&amp;wppa-occur=' . wppa('occur') . '&amp;wppa-lasten=' . wppa('lasten_count') . '&amp;wppa-album=' . wppa('start_album');
            $thumbajax = wppa_get_ajaxlink() . 'wppa-cover=0&amp;wppa-occur=' . wppa('occur') . '&amp;wppa-lasten=' . wppa('lasten_count') . '&amp;wppa-album=' . wppa('start_album');
            $title = __('View the thumbnails', 'wp-photo-album-plus');
            wppa_bcitem($value, $thumbhref, $title, 'b8', $thumbajax);
        }
        if (wppa_switch('lasten_use_modified')) {
            $value = __('Recently modified photos', 'wp-photo-album-plus');
        } else {
            $value = __('Recently uploaded photos', 'wp-photo-album-plus');
        }
        $href = '';
        $title = '';
        wppa_bcitem($value, $href, $title, 'b9');
    } elseif (wppa('is_comten')) {
        // Comten
        if (wppa('start_album')) {
            $value = $is_albenum ? __('Various albums', 'wp-photo-album-plus') : wppa_get_album_name($alb);
            $href = wppa_get_permalink() . 'wppa-cover=0&amp;wppa-occur=' . wppa('occur') . '&amp;wppa-album=' . wppa('start_album');
            $ajax = wppa_get_ajaxlink() . 'wppa-cover=0&amp;wppa-occur=' . wppa('occur') . '&amp;wppa-album=' . wppa('start_album');
            $title = $is_albenum ? __('Albums:', 'wp-photo-album-plus') . ' ' . wppa('start_album') : __('Album:', 'wp-photo-album-plus') . ' ' . $value;
            wppa_bcitem($value, $href, $title, 'b7', $ajax);
        }
        if (wppa('is_slide')) {
            $value = __('Recently commented photos', 'wp-photo-album-plus');
            $thumbhref = wppa_get_permalink() . 'wppa-cover=0&amp;wppa-occur=' . wppa('occur') . '&amp;wppa-comten=' . wppa('comten_count') . '&amp;wppa-album=' . wppa('start_album');
            $thumbajax = wppa_get_ajaxlink() . 'wppa-cover=0&amp;wppa-occur=' . wppa('occur') . '&amp;wppa-comten=' . wppa('comten_count') . '&amp;wppa-album=' . wppa('start_album');
            $title = __('View the thumbnails', 'wp-photo-album-plus');
            wppa_bcitem($value, $thumbhref, $title, 'b8', $thumbajax);
        }
        $value = __('Recently commented photos', 'wp-photo-album-plus');
        $href = '';
        $title = '';
        wppa_bcitem($value, $href, $title, 'b9');
    } elseif (wppa('is_featen')) {
        // Featen
        if (wppa('start_album')) {
            $value = $is_albenum ? __('Various albums', 'wp-photo-album-plus') : wppa_get_album_name($alb);
            $href = wppa_get_permalink() . 'wppa-cover=0&amp;wppa-occur=' . wppa('occur') . '&amp;wppa-album=' . wppa('start_album');
            $ajax = wppa_get_ajaxlink() . 'wppa-cover=0&amp;wppa-occur=' . wppa('occur') . '&amp;wppa-album=' . wppa('start_album');
            $title = $is_albenum ? __('Albums:', 'wp-photo-album-plus') . ' ' . wppa('start_album') : __('Album:', 'wp-photo-album-plus') . ' ' . $value;
            wppa_bcitem($value, $href, $title, 'b7', $ajax);
        }
        if (wppa('is_slide')) {
            $value = __('Featured photos', 'wp-photo-album-plus');
            $thumbhref = wppa_get_permalink() . 'wppa-cover=0&amp;wppa-occur=' . wppa('occur') . '&amp;wppa-featen=' . wppa('featen_count') . '&amp;wppa-album=' . wppa('start_album');
            $thumbajax = wppa_get_ajaxlink() . 'wppa-cover=0&amp;wppa-occur=' . wppa('occur') . '&amp;wppa-featen=' . wppa('featen_count') . '&amp;wppa-album=' . wppa('start_album');
            $title = __('View the thumbnails', 'wp-photo-album-plus');
            wppa_bcitem($value, $thumbhref, $title, 'b8', $thumbajax);
        }
        $value = __('Featured photos', 'wp-photo-album-plus');
        $href = '';
        $title = '';
        wppa_bcitem($value, $href, $title, 'b9');
    } elseif (wppa('is_related')) {
        // Related photos
        if (wppa('is_slide')) {
            $value = __('Related photos', 'wp-photo-album-plus');
            $href = wppa_get_permalink() . 'wppa-cover=0&amp;wppa-occur=' . wppa('occur') . '&amp;wppa-tag=' . wppa('is_tag') . '&amp;wppa-album=' . wppa('start_album');
            $ajax = wppa_get_ajaxlink() . 'wppa-cover=0&amp;wppa-occur=' . wppa('occur') . '&amp;wppa-tag=' . wppa('is_tag') . '&amp;wppa-album=' . wppa('start_album');
            $title = __('View the thumbnails', 'wp-photo-album-plus');
            wppa_bcitem($value, $href, $title, 'b8', $ajax);
        }
        $value = __('Related photos', 'wp-photo-album-plus');
        $href = '';
        $title = '';
        wppa_bcitem($value, $href, $title, 'b9');
    } elseif (wppa('is_tag') && wppa('is_cat')) {
        if (wppa('is_slide')) {
            $value = __('Tagged photos:', 'wp-photo-album-plus') . '&nbsp;' . str_replace(';', ' ' . __('or', 'wp-photo-album-plus') . ' ', str_replace(',', ' ' . __('and', 'wp-photo-album-plus') . ' ', trim(wppa('is_tag'), ',;')));
            $value .= '&nbsp;' . __('From albums with', 'wp-photo-album-plus') . '&nbsp;';
            $value .= __('Category:', 'wp-photo-album-plus') . '&nbsp;' . str_replace(';', ' ' . __('or', 'wp-photo-album-plus') . ' ', str_replace(',', ' ' . __('and', 'wp-photo-album-plus') . ' ', trim(wppa('is_cat'), ',;')));
            $thumbhref = wppa_get_permalink() . 'wppa-cover=0&amp;wppa-occur=' . wppa('occur') . '&amp;wppa-cat=' . wppa('is_cat') . '&amp;wppa-album=' . wppa('start_album');
            $thumbajax = wppa_get_ajaxlink() . 'wppa-cover=0&amp;wppa-occur=' . wppa('occur') . '&amp;wppa-cat=' . wppa('is_cat') . '&amp;wppa-album=' . wppa('start_album');
            $title = __('View the thumbnails', 'wp-photo-album-plus');
            wppa_bcitem($value, $thumbhref, $title, 'b8', $thumbajax);
        }
        $value = __('Tagged photos:', 'wp-photo-album-plus') . '&nbsp;' . str_replace(';', ' ' . __('or', 'wp-photo-album-plus') . ' ', str_replace(',', ' ' . __('and', 'wp-photo-album-plus') . ' ', trim(wppa('is_tag'), ',;')));
        $value .= '&nbsp;' . __('From albums with', 'wp-photo-album-plus') . '&nbsp;';
        $value .= __('Category:', 'wp-photo-album-plus') . '&nbsp;' . str_replace(';', ' ' . __('or', 'wp-photo-album-plus') . ' ', str_replace(',', ' ' . __('and', 'wp-photo-album-plus') . ' ', trim(wppa('is_cat'), ',;')));
        $href = '';
        $title = '';
        wppa_bcitem($value, $href, $title, 'b9');
    } elseif (wppa('is_tag')) {
        // Tagged photos
        if (wppa('is_slide')) {
            $value = __('Tagged photos:', 'wp-photo-album-plus') . '&nbsp;' . str_replace(';', ' ' . __('or', 'wp-photo-album-plus') . ' ', str_replace(',', ' ' . __('and', 'wp-photo-album-plus') . ' ', trim(wppa('is_tag'), ',;')));
            if (wppa('start_album')) {
                $value .= ' ' . __('out of various albums', 'wp-photo-album-plus');
            }
            if (wppa_get_get('inv')) {
                $value .= ' (' . __('Inverted', 'wp-photo-album-plus') . ')';
            }
            $thumbhref = wppa_get_permalink() . 'wppa-cover=0&amp;wppa-occur=' . wppa('occur') . '&amp;wppa-tag=' . wppa('is_tag') . '&amp;wppa-album=' . wppa('start_album');
            $thumbajax = wppa_get_ajaxlink() . 'wppa-cover=0&amp;wppa-occur=' . wppa('occur') . '&amp;wppa-tag=' . wppa('is_tag') . '&amp;wppa-album=' . wppa('start_album');
            if (wppa('is_inverse')) {
                $thumbhref .= '&amp;wppa-inv=1';
                $thumbajax .= '&amp;wppa-inv=1';
            }
            $title = __('View the thumbnails', 'wp-photo-album-plus');
            wppa_bcitem($value, $thumbhref, $title, 'b8', $thumbajax);
        }
        $value = __('Tagged photos:', 'wp-photo-album-plus') . '&nbsp;' . str_replace(';', ' ' . __('or', 'wp-photo-album-plus') . ' ', str_replace(',', ' ' . __('and', 'wp-photo-album-plus') . ' ', trim(wppa('is_tag'), ',;')));
        if (wppa('start_album')) {
            $value .= ' ' . __('out of various albums', 'wp-photo-album-plus');
        }
        if (wppa_get_get('inv')) {
            $value .= ' (' . __('Inverted', 'wp-photo-album-plus') . ')';
        }
        $href = '';
        $title = '';
        wppa_bcitem($value, $href, $title, 'b9');
    } elseif (wppa('is_cat')) {
        // Categorized albums
        if (wppa('is_slide')) {
            $value = __('Category:', 'wp-photo-album-plus') . '&nbsp;' . str_replace(';', ' ' . __('or', 'wp-photo-album-plus') . ' ', str_replace(',', ' ' . __('and', 'wp-photo-album-plus') . ' ', trim(wppa('is_cat'), ',;')));
            $thumbhref = wppa_get_permalink() . 'wppa-cover=0&amp;wppa-occur=' . wppa('occur') . '&amp;wppa-cat=' . wppa('is_cat') . '&amp;wppa-album=' . wppa('start_album');
            $thumbajax = wppa_get_ajaxlink() . 'wppa-cover=0&amp;wppa-occur=' . wppa('occur') . '&amp;wppa-cat=' . wppa('is_cat') . '&amp;wppa-album=' . wppa('start_album');
            $title = __('View the thumbnails', 'wp-photo-album-plus');
            wppa_bcitem($value, $thumbhref, $title, 'b8', $thumbajax);
        }
        $value = __('Category:', 'wp-photo-album-plus') . '&nbsp;' . str_replace(';', ' ' . __('or', 'wp-photo-album-plus') . ' ', str_replace(',', ' ' . __('and', 'wp-photo-album-plus') . ' ', trim(wppa('is_cat'), ',;')));
        $href = '';
        $title = '';
        wppa_bcitem($value, $href, $title, 'b9');
    } elseif (wppa('last_albums')) {
        // Recently modified albums( s )
        if (wppa('last_albums_parent')) {
            $value = wppa_get_album_name($alb);
            $href = wppa_get_permalink() . 'wppa-cover=0&amp;wppa-occur=' . wppa('occur') . '&amp;wppa-album=' . wppa('start_album');
            $ajax = wppa_get_ajaxlink() . 'wppa-cover=0&amp;wppa-occur=' . wppa('occur') . '&amp;wppa-album=' . wppa('start_album');
            $title = __('Album:', 'wp-photo-album-plus') . ' ' . $value;
            wppa_bcitem($value, $href, $title, 'b7', $ajax);
        }
        if (wppa('is_slide')) {
            $value = __('Recently updated albums', 'wp-photo-album-plus');
            $thumbhref = wppa_get_permalink() . 'wppa-cover=0&amp;wppa-occur=' . wppa('occur') . '&amp;wppa-album=' . wppa('start_album');
            $thumbajax = wppa_get_ajaxlink() . 'wppa-cover=0&amp;wppa-occur=' . wppa('occur') . '&amp;wppa-album=' . wppa('start_album');
            $title = __('View the thumbnails', 'wp-photo-album-plus');
            wppa_bcitem($value, $thumbhref, $title, 'b8', $thumbajax);
        }
        $value = __('Recently updated albums', 'wp-photo-album-plus');
        $href = '';
        $title = '';
        wppa_bcitem($value, $href, $title, 'b9');
    } else {
        // Maybe a simple normal standard album???
        if (wppa('is_owner')) {
            $usr = get_user_by('login', wppa('is_owner'));
            if ($usr) {
                $dispname = $usr->display_name;
            } else {
                $dispname = wppa('is_owner');
            }
            // User deleted
            $various = sprintf(__('Various albums by %s', 'wp-photo-album-plus'), $dispname);
        } else {
            $various = __('Various albums', 'wp-photo-album-plus');
        }
        if (wppa('is_slide')) {
            $value = $is_albenum ? $various : wppa_get_album_name($alb);
            $href = wppa_get_permalink() . 'wppa-cover=0&amp;wppa-occur=' . wppa('occur') . '&amp;wppa-album=' . wppa('start_album');
            $ajax = wppa_get_ajaxlink() . 'wppa-cover=0&amp;wppa-occur=' . wppa('occur') . '&amp;wppa-album=' . wppa('start_album');
            $title = $is_albenum ? __('Albums:', 'wp-photo-album-plus') . ' ' . wppa('start_album') : __('Album:', 'wp-photo-album-plus') . ' ' . $value;
            wppa_bcitem($value, $href, $title, 'b7', $ajax);
        }
        $value = $is_albenum ? $various : wppa_get_album_name($alb);
        $href = '';
        $title = '';
        $class = 'b10';
        wppa_bcitem($value, $href, $title, $class);
    }
    // 'Go to thumbnail display' - icon
    if (wppa('is_slide') && !wppa('calendar')) {
        if (wppa_switch('bc_slide_thumblink')) {
            $pg = wppa_opt('thumb_page_size') == wppa_opt('slideshow_pagesize') && wppa_get_curpage() != '1' ? '&wppa-page=' . wppa_get_curpage() : '&wppa-page=1';
            $thumbhref .= $pg;
            //				wppa_out( '<script>wppaPageArg="' . $pg . ';"</script>' );
            if ($virtual) {
                if ($thumbhref) {
                    $thumbhref = wppa_trim_wppa_($thumbhref);
                    $fs = wppa_opt('fontsize_nav');
                    if ($fs != '') {
                        $fs += 3;
                    } else {
                        $fs = '15';
                    }
                    // iconsize = fontsize+3, Default to 15
                    $imgs = 'height: ' . $fs . 'px; margin:0 0 -3px 0; padding:0; box-shadow:none;';
                    wppa_out('<a' . ' href="' . $thumbhref . '"' . ' title="' . __('Thumbnail view', 'wp-photo-album-plus') . '"' . ' class="wppa-nav-text"' . ' style="' . __wcs('wppa-nav-text') . 'float:right; cursor:pointer; text-decoration:none;"' . ' >' . wppa_get_svghtml('Content-View', '1.5em', false, false, '10', '10', '10', '10') . '</a>');
                }
            } else {
                $s = wppa('src') ? '&wppa-searchstring=' . urlencode(wppa('searchstring')) : '';
                $onclick = "wppaDoAjaxRender( " . wppa('mocc') . ", '" . wppa_encrypt_url(wppa_get_album_url_ajax(wppa('start_album'), '0') . "&amp;wppa-photos-only=1" . $s) . "'+wppaPageArg, '" . wppa_convert_to_pretty(wppa_encrypt_url(wppa_get_album_url(wppa('start_album'), '0') . '&wppa-photos-only=1' . $s . $pg)) . "' )";
                $fs = wppa_opt('fontsize_nav');
                if ($fs != '') {
                    $fs += 3;
                } else {
                    $fs = '15';
                }
                // iconsize = fontsize+3, Default to 15
                $imgs = 'height: ' . $fs . 'px; margin:0 0 -3px 0; padding:0; box-shadow:none;';
                wppa_out('<span' . ' title="' . __('Thumbnail view', 'wp-photo-album-plus') . '"' . ' class="wppa-nav-text"' . ' style="' . __wcs('wppa-nav-text') . 'float:right; cursor:pointer;"' . ' onclick="' . $onclick . '"' . ' >' . wppa_get_svghtml('Content-View', '1.5em', false, false, '10', '10', '10', '10') . '</span>');
            }
        }
    }
    // Close the breadcrumb box
    wppa_out('<div style="clear:both;" ></div>');
    wppa_out('</div>');
}