Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Main page directly to intermediate images, Skip thumbnails?  (Read 4041 times)

0 Members and 1 Guest are viewing this topic.

Armstrong

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Main page directly to intermediate images, Skip thumbnails?
« on: September 08, 2006, 06:50:35 pm »

Hello,

I am trying to edit my Kubirk gallery version 1.4.x to navigate the following way.

Currently:

1. I start on my main page Image

2. Click on an album and it takes me to the album thumbnails Image

3. Upon clicking on a thumbnail it takes me to an intermediate picture Image

4. Clicking on the intermediate picture takes me to a full size picture

I want:
1. I start on my main page Image

2. Click on an album and it takes me to the album thumbnails Image

3. Upon clicking on a thumbnail
it takes me to an intermediate picture Image

4. Clicking on the intermediate picture takes me to a full size picture

In a nutshell, I want to go from main page, straight to the first image in an album and view its intermediate picture.

Let me know if you need any more information

« Last Edit: November 23, 2007, 08:18:07 am by GauGau »
Logged

Armstrong

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: Main page directly to intermediate images, Skip thumbnails?
« Reply #1 on: September 11, 2006, 05:07:38 pm »

Any ideas? If I need to re-word my issue please let me know...
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Main page directly to intermediate images, Skip thumbnails?
« Reply #2 on: September 11, 2006, 06:28:30 pm »

As far as I understand, you want to skip the step of clicking the thumbnails and go directly from album list to intermediate image, starting with the first intermediate image inside the album.
Subsequently, you'd have to modify the links from the album, making it point to an intermediate image.
Logged

Armstrong

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: Main page directly to intermediate images, Skip thumbnails?
« Reply #3 on: September 11, 2006, 10:45:04 pm »

that is correct. where would i find these links to change and what would i be changing them to?

thanks for your help!
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Main page directly to intermediate images, Skip thumbnails?
« Reply #4 on: September 12, 2006, 07:57:18 am »

edit themes/yourtheme/theme.php, find
Code: [Select]
function theme_display_album_list(&$alb_list, $nbAlb, $cat, $page, $total_pages)and edit as suggested below. If your theme doesn't contain that line, copy
Code: [Select]
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'));
    $theme_alb_list_tab_tmpl['inactive_next_tab'] = strtr($theme_alb_list_tab_tmpl['inactive_next_tab'], array('{LINK}' => 'index.php?cat=' . $cat . '&page=%d'));
    $theme_alb_list_tab_tmpl['inactive_prev_tab'] = strtr($theme_alb_list_tab_tmpl['inactive_prev_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,
          '{SPACER}' => $thumb_cell_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;
}
from themes/sample/theme.php into a new line of themes/yourtheme/theme.php before
Code: [Select]
?>and then modify as suggested below:

In above code, find
Code: [Select]
'{ALB_LINK_TGT}' => "thumbnails.php?album={$album['aid']}",and replace with
Code: [Select]
'{ALB_LINK_TGT}' => "displayimage.php?album={$album['aid']}&amp;pos=0",
If haven't actually tested this, but it should work. Please post your results.

Logged

Armstrong

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: Main page directly to intermediate images, Skip thumbnails?
« Reply #5 on: September 16, 2006, 05:22:29 pm »

I gave it a shot. it didn't seem to work. I tried a different mod on the board here and it solved it for the most part.

thanks
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Main page directly to intermediate images, Skip thumbnails?
« Reply #6 on: September 17, 2006, 01:43:52 pm »

It would be helpful for others if you posted a link to the thread that you're refering to.
Logged

Captain Bob

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Main page directly to intermediate images, Skip thumbnails?
« Reply #7 on: November 23, 2007, 08:17:06 am »

If haven't actually tested this, but it should work. Please post your results.

Others may like to know that I followed GauGau's instructions, and now it works exactly as expected for my own gallery: clicking on an album takes you to the intermediate image page for the first file in the album.  Thanks GauGau.
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 16 queries.