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: Display 'anycontent' next to 'alblist'  (Read 10654 times)

0 Members and 1 Guest are viewing this topic.

zenith

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Display 'anycontent' next to 'alblist'
« on: February 13, 2006, 02:35:58 pm »

I have been trying to display 'anycontent' (or even just a text string) to the right hand side of 'alblist' without any luck.

I assume i need to put them in a table together, but i cant work out where i need to be doing it.

can someone point me in the right direction?

cheers.

« Last Edit: February 16, 2006, 10:52:40 am by GauGau »
Logged

Nibbler

  • Guest
Re: Display 'anycontent' next to 'alblist'
« Reply #1 on: February 13, 2006, 03:02:47 pm »

Logged

zenith

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: Display 'anycontent' next to 'alblist'
« Reply #2 on: February 14, 2006, 05:08:40 pm »


Thankyou for the quick and useful reply.

It has led me to make the following change to my theme.php. This will now display a table to the left side of the album list, however i can't work out how to move it to the right hand side.

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;

//*********
echo '<table width="100%"><tr><td valign="top">';
starttable("100%");
echo <<< EOT

<tr>
<td class="tableh1"><b>News</b></td>
</tr>
<tr>
<td class="tableb">
Your content here
</td>
</tr>
<tr>
<td class="tableh1">&nbsp;</td>
</tr>

EOT;

endtable();
echo '</td><td>';
//********

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


Any idea how i can move the new table across to the other side?

Thankyou for your assistance.

zenith.

Logged

lordprodigy

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 228
    • B514 ///
Re: Display 'anycontent' next to 'alblist'
« Reply #3 on: February 14, 2006, 06:30:16 pm »

I have no idea how you can move it on the other side, but do what Nibbler says. his code worked perfect for me.
Logged

zenith

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: Display 'anycontent' next to 'alblist'
« Reply #4 on: February 15, 2006, 03:23:38 am »


That was nibblers mod. I just moved it from the cat_list function, to the album list.

Where the changes are currently it displays it the same way as you have yours set up, but if i try to put it after the album list (to the right of it), it inserts it underneath instead.

I've spent quite some time working on this issue without any luck.

zenith
Logged

Nibbler

  • Guest
Re: Display 'anycontent' next to 'alblist'
« Reply #5 on: February 15, 2006, 03:37:08 am »

Did you end the containing table ? I don't see any </td></tr></table> there.
Logged

zenith

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: Display 'anycontent' next to 'alblist'
« Reply #6 on: February 16, 2006, 01:45:26 am »


Ah, good point.

I added that and moved things around a bit, now its all looking how i wanted it.

thankyou very much for your help.

zenith.
Logged

lordprodigy

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 228
    • B514 ///
Re: Display 'anycontent' next to 'alblist'
« Reply #7 on: February 17, 2006, 11:17:53 pm »

can I take a look at what you have? Im still trying to fix the css of my table but its not working... did you use an IFrame?
Logged

lordprodigy

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 228
    • B514 ///
Re: Display 'anycontent' next to 'alblist'
« Reply #8 on: February 18, 2006, 12:05:53 am »

I found the solution to my problem. dont worry about the above. thanks anyways.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Display 'anycontent' next to 'alblist'
« Reply #9 on: February 18, 2006, 08:49:50 am »

if you manage to resolve your own question, it would be a nice gesture towards others if you posted what you did to solve it. You're asking a lot of questions on this board and expect answers, how about giving something back to the community?
Logged

lordprodigy

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 228
    • B514 ///
Re: Display 'anycontent' next to 'alblist'
« Reply #10 on: February 18, 2006, 07:41:56 pm »

The solution was so easy that I feel ashamed asking the question...Plus I am sure you knew it very well...

here was the original code:
Code: [Select]
//*********
echo '<table width="100%"><tr><td valign="top">';
starttable("100%");
echo <<< EOT

<tr>
<td class="tableh1"><b>News</b></td>
</tr>
<tr>
<td class="tableb">
Your content here
</td>
</tr>
<tr>
<td class="tableh1">&nbsp;</td>
</tr>

EOT;

endtable();
echo '</td><td>';
//********

    starttable('100%');
what I did was play around with the following values to get what i wanted:
Code: [Select]
<table width="100%">

starttable('100%');


for some reason, % werent working, so I added absolute values and everything worked fine.

Unrelated to this, I dont it was worth bringing my carma down. Most of my quesions here are valid and I am sure many users will find them useful too.
Logged

RihannaFan31

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Display 'anycontent' next to 'alblist'
« Reply #11 on: December 15, 2012, 06:46:01 am »

Did you end the containing table ? I don't see any </td></tr></table> there.

hi im new to coppermine and i was wondering how can i make a album list??? http://25.media.tumblr.com/eb1d0669a984d9a7ce61cd65caacab8f/tumblr_mf257mSVtQ1r8r8qpo1_500.png


like i have alot of alot of albums uploaded but they wont show it all...

can you tell me the step on how can i get the album list all on 1 page?

you can go to http://nicki-maraj.com/photos/index.php?cat=15 to see what im talking about..

Logged
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 20 queries.