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: Change breadcrumb for albumlist with current album highlighted  (Read 3769 times)

0 Members and 1 Guest are viewing this topic.

frans01

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Change breadcrumb for albumlist with current album highlighted
« on: September 30, 2005, 05:04:22 pm »

Does anybody know how I can replace the breadcrumbs with an albumlist and highlight the current album?
I don't use categories and want to be able to navigate directly to an other album wherever I am. I only use album names and don't use the thumbnails with the albums.

I did find the following code but I know this isn't where I shouls actualy change it:

From theme.php

Breadcrumb:
Code: [Select]
<!-- BEGIN breadcrumb -->
        <tr>
                <td colspan="3" align="center" class="tableh1"><span class="statlink"><b>{BREADCRUMB}</b></span></td>
        </tr>
<!-- END breadcrumb -->

Albums:
Code: [Select]
<!-- BEGIN album_cell -->

        <td width="{COL_WIDTH}%" height="100%" align="center" valign="top">
   <a href="{ALB_LINK_TGT}" class="alblink"><b>{ALBUM_TITLE}</b></a> {ADMIN_MENU}
        </td>

<!-- END album_cell -->

Can anybody help me out plz?  ;D ;D  ;D  I'm working on this for days....  :-\\ :-\\

Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Change breadcrumb for albumlist with current album highlighted
« Reply #1 on: September 30, 2005, 05:08:29 pm »

theme.php
function theme_display_breadcrumb

here you start...

frans01

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Change breadcrumb for albumlist with current album highlighted
« Reply #2 on: September 30, 2005, 05:26:32 pm »

Ok, thank you

But still I don't know what to change here or how to...

Can you please give me some more pointers?

Code: [Select]
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();
}
« Last Edit: September 30, 2005, 05:36:14 pm by frans01 »
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Change breadcrumb for albumlist with current album highlighted
« Reply #3 on: September 30, 2005, 05:50:24 pm »

just do some try and fail.. eg. replace this
Code: [Select]
    if ($breadcrumb) {
        $template = template_extract_block($template_breadcrumb, 'breadcrumb');
        $params = array('{BREADCRUMB}' => $breadcrumb
            );
        echo template_eval($template, $params);
    }
with that and check the changes
Code: [Select]
    if ($breadcrumb) {
echo "Album 1&nbsp;&nbsp;-&nbsp;&nbsp;Album 2&nbsp;&nbsp;-&nbsp;&nbsp;Album 3<br>";
echo "No I just need to code eg. a dropdown box with a list of all my albums";
    }

frans01

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Change breadcrumb for albumlist with current album highlighted
« Reply #4 on: October 01, 2005, 01:10:08 pm »

So when I want to make it dynamicly I have to find and put the code of the album list in it.
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Change breadcrumb for albumlist with current album highlighted
« Reply #5 on: October 01, 2005, 02:06:39 pm »

yes, you have to put code in here that generates what you want to display

frans01

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Change breadcrumb for albumlist with current album highlighted
« Reply #6 on: October 02, 2005, 01:06:40 pm »

I've tryed lots of diffrent things bunt can't find the solution. I'm not really familiar with php.

I tryed to change theme_display_breadcrumb function with theme_display_album_list function but that gave some errors.

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'));

    $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;
}



Can someone help me out plz!!!
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 15 queries.