Album thumbnail position Album thumbnail position
 

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]

Main Menu

Album thumbnail position

Started by arbortek, June 15, 2007, 09:51:06 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

arbortek

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

Hein Traag

Open your theme.php and find this block

<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:

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

arbortek

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

Hein Traag

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

<!-- 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    <p>{ALB_DESC}</p>


arbortek

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

Stramm

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
$template_album_list
you need everything from $template_album_list to the next
EOT;

now make your changes as Hein suggested

arbortek

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

Hein Traag

In that codeblock try changing this

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

to this

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

See if that works.

arbortek

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

The thumbnails in the other sections are centered.

Cheers,
Arbortek

Joachim Müller