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: Album thumbnail position  (Read 4457 times)

0 Members and 1 Guest are viewing this topic.

arbortek

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Album thumbnail position
« on: June 15, 2007, 09:51:06 am »

I want to center the position of the album thumbnail and put the album statistic
below the thumbnail instaed of to the right.

I already changed the stylesheet but done nothing yet with the template.html
and the theme.php.

If someone code help me with the right code to put in one these files I will be
very grateful.

http://www.johnstuij.nl/Gallery/copgallery.html

Cheers,
Arbortek
Logged

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: Album thumbnail position
« Reply #1 on: June 15, 2007, 11:00:46 am »

Open your theme.php and find this block

Code: [Select]
<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 />
                        <a href="{ALB_LINK_TGT}" class="albums">{ALB_LINK_PIC}<br /></a>
                </td>

Change it to:

Code: [Select]
<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 />
                        <a href="{ALB_LINK_TGT}" class="albums">{ALB_LINK_PIC}<br /></a>
<p class="album_stat">{ALB_INFOS}</p>
                </td>

Worked for me. Give it a try.
Logged

arbortek

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: Album thumbnail position
« Reply #2 on: June 15, 2007, 11:40:51 am »

Thanks Hein, but my theme.php is empty and if I add your code I get an error message.

The code in my theme.php:


<?php
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2006 Coppermine Dev Team
  v1.1 originally 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.10
  $Source$
  $Revision: 3275 $
  $Author: gaugau $
  $Date: 2006-09-03 12:10:47 +0200 (So, 03 Sep 2006) $
**********************************************/

define('THEME_IS_XHTML10_TRANSITIONAL',1); // Remove this if you edit this template until
                                           // you have validated it. See docs/theme.htm.

// HTML template for template sys_menu spacer
$template_sys_menu_spacer ='<img src="themes/water_drop/images/orange_carret.gif" width="8" height="8" border="0" alt="" />';

?>


I am not sure where to put the code.

Cheers,
Arbortek
Logged

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: Album thumbnail position
« Reply #3 on: June 15, 2007, 11:58:12 am »

My bad. Open your theme.php and paste this codeblock before the ?>

Code: [Select]
<!-- 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 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 />
                        <a href="{ALB_LINK_TGT}" class="albums">{ALB_LINK_PIC}<br /></a>
<p class="album_stat">{ALB_INFOS}</p>
                </td>
                <td>
                        <img src="images/spacer.gif" width="1" height="1" border="0" alt="" />
                </td>
                <td width="100%" valign="top" align="left" class="tableb_compact">
                        {ADMIN_MENU}
                        <p>{ALB_DESC}</p>
                </td>
        </tr>
        </table>
        </td>
<!-- END album_cell -->

That should do it. Keep in mind that if you add Album Info it will appear on the right side of the thumbnail. If you want to avoid that and you want no Album Info to appear ever then remove or comment out this line
Code: [Select]
   <p>{ALB_DESC}</p>
« Last Edit: June 15, 2007, 01:02:04 pm by Hein »
Logged

arbortek

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: Album thumbnail position
« Reply #4 on: June 15, 2007, 12:19:05 pm »

Hein,

I put the code as you said but I then get the following error:

Parse error: syntax error, unexpected '<' in /home/arbortek/domains/johnstuij.nl/public_html/Coppermine/themes/johnstuij/theme.php on line 22

Cheers,
Arbortek
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Album thumbnail position
« Reply #5 on: June 15, 2007, 01:00:53 pm »

if code doesn't exist in your theme.php then copy it from themes/sample/theme.php to the theme.php you're actually using.

In this example it's the var
Code: [Select]
$template_album_listyou need everything from $template_album_list to the next
Code: [Select]
EOT;
now make your changes as Hein suggested

arbortek

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: Album thumbnail position
« Reply #6 on: June 15, 2007, 02:34:53 pm »

Thanks,

I now got the album statistics below the thumbnail, but the thumbnail an the album statistics are still on
the leftside of the cell. How do I get them in the middle of the cell?

Thanks.

Cheers,
Arbortek
Logged

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: Album thumbnail position
« Reply #7 on: June 15, 2007, 03:11:37 pm »

In that codeblock try changing this

Code: [Select]
<td colspan="3" height="1" align="left" valign="top" class="tableh2">
to this

Code: [Select]
<td colspan="3" height="1" align="center" valign="top" class="tableh2">
See if that works.
Logged

arbortek

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: Album thumbnail position
« Reply #8 on: June 15, 2007, 03:43:33 pm »

I have tried this but that does not seem to work.
Some other options?

The thumbnails in the other sections are centered.

Cheers,
Arbortek
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Logged
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 19 queries.