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

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

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