Table spacing on image display page problem Table spacing on image display page problem
 

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

Table spacing on image display page problem

Started by yamtunbo, December 07, 2007, 06:47:17 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

yamtunbo

I'm having a problem with my theme - I'm 90% there but I can't figure this last thing out.

On the main listing page ( http://chris-beaumont.com/cm/index.php ) and the album thumbnail page ( http://chris-beaumont.com/cm/thumbnails.php?album=1 ) the scripts are throwing a spacer in between each maintable with the following code:

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

However when we go to the image display page ( http://chris-beaumont.com/cm/displayimage.php?album=1&pos=0 ) the spacers are missing.

I can't figure out where in the scripts or the theme implementations they're being dropped in.

Where should I be looking?

Many thanks and apologies if this has been covered already.  I had a search through the forums but couldn't find anything.

Chris

yamtunbo

I figured something out, not sure if it's the best way to do it.

Added the following in theme.php


// Function to start a 'standard' table
function starttable($width = '-1', $title = '', $title_colspan = '1')
{
    global $CONFIG;

    if ($width == '-1') $width = $CONFIG['picture_table_width'];
    if ($width == '100%') $width = $CONFIG['main_table_width'];
    if (isset($_REQUEST['pos'])) {
    echo <<<EOT

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

<!-- Start standard table -->
<table align="center" width="$width" cellspacing="0" cellpadding="0" class="maintable">

EOT;
} else {
echo <<<EOT

<!-- Start standard table -->
<table align="center" width="$width" cellspacing="0" cellpadding="0" class="maintable">

EOT;
}
    if ($title) {
        echo <<<EOT
        <tr>
                <td class="tableh1" colspan="$title_colspan">$title</td>
        </tr>

EOT;
    }
}