Advanced search  

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

Pages: [1]   Go Down

Author Topic: Custom Thumbnails for Albums?  (Read 5049 times)

0 Members and 1 Guest are viewing this topic.

floatingworld

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Custom Thumbnails for Albums?
« on: March 07, 2007, 09:01:48 pm »

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
« Last Edit: March 08, 2007, 06:58:42 pm by Nibbler »
Logged

Nibbler

  • Guest
Re: Custom Thumbnails for Albums?
« Reply #1 on: March 07, 2007, 09:58:30 pm »

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

floatingworld

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Re: Custom Thumbnails for Albums?
« Reply #2 on: March 07, 2007, 10:04:39 pm »

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

Aaron
Logged

Nibbler

  • Guest
Re: Custom Thumbnails for Albums?
« Reply #3 on: March 07, 2007, 10:06:49 pm »

Yeah, using an [img] tag.
Logged

floatingworld

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Re: Custom Thumbnails for Albums?
« Reply #4 on: March 07, 2007, 10:20:02 pm »

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?
Logged

floatingworld

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Re: Custom Thumbnails for Albums?
« Reply #5 on: March 07, 2007, 10:46:01 pm »

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

Nibbler

  • Guest
Re: Custom Thumbnails for Albums?
« Reply #6 on: March 07, 2007, 10:57:27 pm »

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}
Logged

floatingworld

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Re: Custom Thumbnails for Albums?
« Reply #7 on: March 07, 2007, 11:12:10 pm »

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,
Logged

Nibbler

  • Guest
Re: Custom Thumbnails for Albums?
« Reply #8 on: March 07, 2007, 11:13:45 pm »

themes/sample
Logged

floatingworld

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Re: Custom Thumbnails for Albums?
« Reply #9 on: March 07, 2007, 11:54:39 pm »

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.
Logged

floatingworld

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Re: Custom Thumbnails for Albums?
« Reply #10 on: March 08, 2007, 03:20:35 am »

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;


?>


Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Custom Thumbnails for Albums?
« Reply #11 on: March 08, 2007, 08:51:59 am »

Logged

floatingworld

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Re: Custom Thumbnails for Albums?
« Reply #12 on: March 08, 2007, 06:38:08 pm »

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;
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Custom Thumbnails for Albums?
« Reply #13 on: March 08, 2007, 07:54:42 pm »

Will definitely not work -
Code: [Select]
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.
Logged

floatingworld

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Re: Custom Thumbnails for Albums?
« Reply #14 on: March 08, 2007, 08:00:07 pm »

I did not get an error message.... But I have removed that part as suggetsed. Thanks!
Logged
Pages: [1]   Go Up
 

Page created in 0.028 seconds with 20 queries.