Custom Thumbnails for Albums? Custom Thumbnails for Albums?
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Custom Thumbnails for Albums?

Started by floatingworld, March 07, 2007, 09:01:48 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

floatingworld

Hi,

I found this thread about creating customized thumbnails to be displayed for each album: http://forum.coppermine-gallery.net/index.php?topic=8238.0

Is this still the only way to do this?

Thanks in advance.

Aaron

Nibbler

If you want to use a picture that's not in the album, yes. You could try using bbcode in the album description instead.

floatingworld

Thanks for the quick reply... When you say bbcode, do you mean I could insert a file link to a thumbnail image there?

Aaron

Nibbler


floatingworld

Thanks again for the quick reply ;D

Using bbcode looks like the easiest way to go- But that means I have to disable thumbnails for Albums. Do I do this in Config>Album list?

floatingworld

I disbale thumbnails for albums but they are still showing ???

Nibbler

Copy $template_album_list from the sample theme to your theme.php and remove the thumbnail image from the code. Look for {ALB_LINK_PIC}

floatingworld

Where is the "sample theme?" I am using Coppermine as an intergation in Joomla using the intergation component from http://www.joombla.com....

I have three themes showing:
classic
joombla
joombla_black


Where is the "sample theme" located?

Thanks in advance,

Nibbler


floatingworld

Strange, but my theme.php is very simple:

<?php

/*************************

  Coppermine Photo Gallery

  ************************

  Copyright (c) 2003-2005 Coppermine Dev Team

  v1.1 originaly written by Gregory DEMAR



  This program is free software; you can redistribute it and/or modify

  it under the terms of the GNU General Public License as published by

  the Free Software Foundation; either version 2 of the License, or

  (at your option) any later version.

  ********************************************

  Coppermine version: 1.4.1

  $Source: /cvsroot/coppermine/devel/themes/classic/theme.php,v $

  $Revision: 1.70 $

  $Author: donnoman $

  $Date: 2005/04/10 16:24:27 $

**********************************************/



// ------------------------------------------------------------------------- //

// This theme has most CORE items removed                                     //

// ------------------------------------------------------------------------- //

define('THEME_IS_XHTML10_TRANSITIONAL',1);



$template_film_strip = <<<EOT



        <tr>

         <td valign="top" style="background-image: url(themes/joombla/{TILE1}); background-repeat: repeat-x;"><img src="{TILE1}" alt="" border="0" /></td>

        </tr>

        <tr>

        <td valign="bottom" class="thumbnails" align="center">

          <table width="100%" cellspacing="0" cellpadding="3" border="0">

              <tr>

                 <td width="50%"></td>

                 {THUMB_STRIP}

                 <td width="50%"></td>

              </tr>

          </table>

        </td>

        </tr>

        <tr>

         <td valign="top" style="background-image: url(themes/joombla/{TILE2}); background-repeat: repeat-x;"><img src="{TILE2}" alt="" border="0" /></td>

        </tr>

<!-- BEGIN thumb_cell -->

                <td valign="top" align="center">

                                     <a href="{LINK_TGT}">{THUMB}</a>
                           
                                        {CAPTION}

                                        {ADMIN_MENU}

                </td>

<!-- END thumb_cell -->

<!-- BEGIN empty_cell -->

                <td valign="top" align="center" >&nbsp;</td>

<!-- END empty_cell -->



EOT;



?>

I can't see where I'd add the $template_album_list....

Furthermore... I erased part of this file, such as the table cell with the thumbnail class, and nothing happened...

I'm confused.

floatingworld

I have attached a screenshot of what I'm seeing... notice the empty table cell on the left. I want to remove this from the layout.

I searched through the sample theme.php, but I was a bit confused. I pasted what I think to be the correct code in the theme.php I am using here it it. Can anyone tell me what's wrong?:

<?php

/*************************

  Coppermine Photo Gallery

  ************************

  Copyright (c) 2003-2005 Coppermine Dev Team

  v1.1 originaly written by Gregory DEMAR



  This program is free software; you can redistribute it and/or modify

  it under the terms of the GNU General Public License as published by

  the Free Software Foundation; either version 2 of the License, or

  (at your option) any later version.

  ********************************************

  Coppermine version: 1.4.1

  $Source: /cvsroot/coppermine/devel/themes/classic/theme.php,v $

  $Revision: 1.70 $

  $Author: donnoman $

  $Date: 2005/04/10 16:24:27 $

**********************************************/



// ------------------------------------------------------------------------- //

// This theme has most CORE items removed                                     //

// ------------------------------------------------------------------------- //

define('THEME_IS_XHTML10_TRANSITIONAL',1);



$template_film_strip = <<<EOT



        <tr>

         <td valign="top" style="background-image: url(themes/joombla/{TILE1}); background-repeat: repeat-x;"><img src="{TILE1}" alt="" border="0" /></td>

        </tr>

        <tr>

        <td valign="bottom" class="thumbnails" align="center">

          <table width="100%" cellspacing="0" cellpadding="3" border="0">

              <tr>

                 <td width="50%"></td>

                 {THUMB_STRIP}

                 <td width="50%"></td>

              </tr>

          </table>

        </td>

        </tr>

        <tr>

         <td valign="top" style="background-image: url(themes/joombla/{TILE2}); background-repeat: repeat-x;"><img src="{TILE2}" alt="" border="0" /></td>

        </tr>

<!-- BEGIN thumb_cell -->

                <td valign="top" align="center">

                                        <a href="{LINK_TGT}">{THUMB}</a>

                                        {CAPTION}

                                        {ADMIN_MENU}

                </td>

<!-- END thumb_cell -->

<!-- BEGIN empty_cell -->

                <td valign="top" align="center" >&nbsp;</td>

<!-- END empty_cell -->



EOT;

// HTML template for the album list
$template_album_list_cat = <<<EOT

<!-- BEGIN c_stat_row -->
        <tr>
                <td colspan="{COLUMNS}" class="tableh1" align="center"><span class="statlink">{STATISTICS}</span></td>
        </tr>
<!-- END c_stat_row -->
<!-- BEGIN c_header -->
        <tr class="tableb_compact">
<!-- END c_header -->
<!-- BEGIN c_album_cell -->
        <td width="{COL_WIDTH}%" valign="top">
        <table width="100%" cellspacing="0" cellpadding="0">
        <tr>
                <td colspan="3" height="1" valign="top" class="tableh2">
                        <span class="alblink"><a href="{ALB_LINK_TGT}"><b>{ALBUM_TITLE}</b></a></span>
                </td>
        </tr>
        <tr>
                <td colspan="3">
                        <img src="images/spacer.gif" width="1" height="1" border="0" alt="" /><br />
                </td>
        </tr>
        <tr>
                <td align="center" valign="middle" class="thumbnails">
                        <img src="images/spacer.gif" width="{THUMB_CELL_WIDTH}" height="1" class="image" style="margin-top: 0px; margin-bottom: 0px; border: none;" alt="" /><br />
  //Commented out by me Is this right?                      <a href="{ALB_LINK_TGT}" class="albums">{ALB_LINK_PIC}<br /></a>
                </td>
                <td>
                        <img src="images/spacer.gif" width="1" height="1" border="0" alt="" />
                </td>
                <td width="100%" valign="top" class="tableb_compact">
                        {ADMIN_MENU}
                        <p>{ALB_DESC}</p>
                        <p class="album_stat">{ALB_INFOS}</p>
                </td>
        </tr>
        </table>
        </td>
<!-- END c_album_cell -->
<!-- BEGIN c_empty_cell -->
        <td width="{COL_WIDTH}%" valign="top">
        <table width="100%" cellspacing="0" cellpadding="0" >
        <tr>
                <td height="1" valign="top" class="tableh2">
                        <b>&nbsp;</b>
                </td>
        </tr>
        <tr>
                <td>
                        <img src="images/spacer.gif" width="1" height="1" border="0" alt="" /><br />
                </td>
        </tr>
        <tr>
                <td width="100%" valign="top" class="tableb_compact" >
                      <div class="thumbnails" style="background-color:transparent"><img src="images/spacer.gif" width="1" height="{SPACER}" border="0" class="image" style="border:0;margin-top:1px;margin-bottom:0" alt="" /></div>
                </td>
        </tr>
        </table>
        </td>
<!-- END c_empty_cell -->
<!-- BEGIN c_row_separator -->
        </tr>
        <tr class="tableb_compact">
<!-- END c_row_separator -->
<!-- BEGIN c_footer -->
        </tr>
<!-- END c_footer -->
<!-- BEGIN c_tabs -->
        <tr>
                <td colspan="{COLUMNS}" style="padding: 0px;">
                        <table width="100%" cellspacing="0" cellpadding="0">
                                <tr>
                                       {TABS}
                                </tr>
                        </table>
                </td>
        </tr>
<!-- END c_tabs -->
<!-- BEGIN c_spacer -->
        <img src="images/spacer.gif" width="1" height="7" border="" alt="" /><br />
<!-- END c_spacer -->

EOT;


?>



Joachim Müller


floatingworld

I added this to the theme.php file and it seemed to work!:

// HTML template for the album list
if (!isset($template_album_list))  //{THEMES}

$template_album_list = <<<EOT



<!-- BEGIN stat_row -->

        <tr>

                <td colspan="{COLUMNS}" class="tableh1" align="center"><span class="statlink">{STATISTICS}</span></td>

        </tr>

<!-- END stat_row -->

<!-- BEGIN header -->

        <tr class="tableb_compact">

<!-- END header -->

<!-- BEGIN album_cell -->

        <td width="{COL_WIDTH}%" valign="top">

        <table width="100%" cellspacing="0" cellpadding="0">

        <tr>

                <td colspan="3" height="1" align="left" valign="top" class="tableh2">

                        <span class="alblink"><a href="{ALB_LINK_TGT}"><b>{ALBUM_TITLE}</b></a></span>

                </td>

        </tr>

        <tr>

                <td colspan="3">

                        <img src="images/spacer.gif" width="1" height="1" border="0" alt="" /><br />

                </td>

        </tr>

        <tr>

               

                <td width="100%" valign="top" align="left" class="tableb_compact">

                        {ADMIN_MENU}

                        <p>{ALB_DESC}</p>

                        <p class="album_stat">{ALB_INFOS}</p>

                </td>

        </tr>

        </table>

        </td>

<!-- END album_cell -->

<!-- BEGIN empty_cell -->

        <td width="{COL_WIDTH}%" valign="top">

        <table width="100%" cellspacing="0" cellpadding="0">

        <tr>

                <td height="1" valign="top" class="tableh2">

                        <b>&nbsp;</b>

                </td>

        </tr>

        <tr>

                <td>

                        <img src="images/spacer.gif" width="1" height="1" border="0" alt="" /><br />

                </td>

        </tr>

        <tr>

                <td width="100%" valign="top" class="tableb_compact">

                    <div class="thumbnails" style="background-color:transparent"><img src="images/spacer.gif" width="1" height="{SPACER}" border="0" class="image" style="border:0;margin-top:1px;margin-bottom:0" alt="" /></div>

                </td>

        </tr>

        </table>

        </td>

<!-- END empty_cell -->

<!-- BEGIN row_separator -->

        </tr>

        <tr class="tableb_compact">

<!-- END row_separator -->

<!-- BEGIN footer -->

        </tr>

<!-- END footer -->

<!-- BEGIN tabs -->

        <tr>

                <td colspan="{COLUMNS}" style="padding: 0px;">

                        <table width="100%" cellspacing="0" cellpadding="0">

                                <tr>

                                       {TABS}

                                </tr>

                        </table>

                </td>

        </tr>

<!-- END tabs -->

<!-- BEGIN spacer -->

        <img src="images/spacer.gif" width="1" height="7" border="" alt="" /><br />

<!-- END spacer -->



EOT;

Joachim Müller

Will definitely not work - if (!isset($template_album_list))  //{THEMES}is not suppossed to go into theme.php. If you have pasted the full code into your posting, you should have gotten an error message.

Joachim

P.S. Please use the code-button (the one with the #-sign on it) to post code on this board.

floatingworld

I did not get an error message.... But I have removed that part as suggetsed. Thanks!