Limit height of table for file display (classic theme) Limit height of table for file display (classic theme)
 

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

Limit height of table for file display (classic theme)

Started by sharpo, January 20, 2006, 11:09:01 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sharpo

In the configuration (image view) it is possible to set the width of the table for the file display, but with my intermediate images of 500 x 333 pixels there is some excess space above & below the image that I would like to eliminate. Is there any way to reduce that to the narrower strip to match that at the sides of the image.

I have searched for the answer but can't find it. If there is a solution here just point me in the right direction please.

Thank you.
Sharpo (not an expert, just a Coppermine user)
3 live galleries, first started in 2006.
http://www.sharpos-world.co.uk/BB3cpg/ with over 8,000 images.
http://www.sharpos-world.co.uk/cpg/ with over 25,000 images. 1.6.25
http://www.sharpos-world.co.uk/kc/ with over 300 images. 1.6.25

Paver

"View Source" on the web page you want to modify.  Look for the lines that create that extra space or for parameters that do the same.  Go to your theme.php and modify the appropriate section as desired.  If you don't have an appropriate section in your theme.php yet, go to the sample/theme.php and copy the section you want to modify into your theme.php.  If you are using the core classic theme, copy the classic folder to a new folder, name it as you wish, and modify that theme.php.

If you need additional help, please post a link to your site.

sharpo

Thanks for the reply Paver.

I've created a new theme, based on classic & that is what I am working on.

http://www.sharpos-world.co.uk/cpg/index.php

As you know, I'm trying to keep a 500 pixel image, but get rid of the wasted space above & below the intermediate image. I've spent ages studying the sample theme & realise I have to paste part of it, with alterations, into my theme to over-ride the setting as it stands at present. I'll admit I can't work it out.

Looking on the positive side, I have learnt how to restrict access to the full-size image and also add Casper's Paypal mod, so I am learning slowly, but still need a little help from time to time.

You never know, I might be able to write a brand new theme one day?
Sharpo (not an expert, just a Coppermine user)
3 live galleries, first started in 2006.
http://www.sharpos-world.co.uk/BB3cpg/ with over 8,000 images.
http://www.sharpos-world.co.uk/cpg/ with over 25,000 images. 1.6.25
http://www.sharpos-world.co.uk/kc/ with over 300 images. 1.6.25

Paver

You have three things to do:

(1) If you are using a copied classic theme, you need to change the link in your template.html to the stylesheet of your copied theme.  Right now it points to the classic theme stylesheet.

(2) Open your theme's stylesheet and find .imageborder and change the margin-top and margin-bottom to '0px'.

(3) Now you just have to remove the admin_menu cell used when you can do the admin things like Crop, Edit, Delete.  If you haven't modified your theme.php file much yet, you probably don't have the $template_display_media variable in there.  If that's true, go to the sample/theme.php and copy the block from this line:
// HTML template for intermediate image display
$template_display_media = <<<EOT

up to and including this line:
EOT;
which is just before this line:
// HTML template for the image rating box

Then add the first line and last line shown below (with BEGIN & END comments) around the lines in between:
<!-- BEGIN admin_menu -->
                                                <table width="100%" cellspacing="2px" cellpadding="0px" class="tableb">
                                <tr>
                                        <td align="center">

                                                {ADMIN_MENU}
                                        </td>
                                </tr>
                        </table>
<!-- END admin_menu -->


This marks the admin_menu block so you can remove it when it's blank.  To actually do this, you need to copy the function theme_html_picture().  It's a fairly large function and you need to copy it all.  For reference, the next function is theme_html_img_nav_menu().  Copy to just before function theme_html_img_nav_menu() and make sure to include the } curly brace that defines the end of the function.  Then in this function, go to the first line shown below, and add the next 3 lines as shown:
    $CURRENT_PIC_DATA['menu'] = html_picture_menu();

    if (!$CURRENT_PIC_DATA['menu']) {
template_extract_block($template_display_media, 'admin_menu');
    }


That should do it.  Hopefully from this, you'll learn how to do other customizations to your theme.

sharpo

Thanks Paver,

This is a very gradual learning curve, but I am getting there slowly. Your steps 1 & 2 did everything that was required, the height problem was not a problem to me, only to visitors with lower resolution screens, who only view the photos.

Hopefully this topic will also help other people with limited knowledge, like myself.

Thanks again!!

Sharpo (not an expert, just a Coppermine user)
3 live galleries, first started in 2006.
http://www.sharpos-world.co.uk/BB3cpg/ with over 8,000 images.
http://www.sharpos-world.co.uk/cpg/ with over 25,000 images. 1.6.25
http://www.sharpos-world.co.uk/kc/ with over 300 images. 1.6.25