coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: rctruckz on February 16, 2008, 05:47:05 AM

Title: Possible to add a *Close* button on intermediate image?
Post by: rctruckz on February 16, 2008, 05:47:05 AM
hi guys :)

at the moment to close my intermediate image (to take me back to thumbs page) the link is top left (far away from the pic & pretty hard to spot for the norms out there! ..is there a way to move the commands right above the image (such as Return to Thumbs / Slideshow / Previous / Next etc ?

ie: (how it looks atm) http://www.systekuk.co.uk/cmgall/displayimage.php?album=2&pos=0

ty in advance :)
Title: Re: Possible to add a *Close* button on intermediate image?
Post by: Joachim Müller on February 16, 2008, 01:29:59 PM
So you want the image navigation narrower?
Title: Re: Possible to add a *Close* button on intermediate image?
Post by: rctruckz on February 16, 2008, 03:17:43 PM
hi :)

yes that would help alot but if also possible lower too so it sits just above the image :) ?
Title: Re: Possible to add a *Close* button on intermediate image?
Post by: rctruckz on February 16, 2008, 06:18:21 PM
any ideas how to do this :) ?
Title: Re: Possible to add a *Close* button on intermediate image?
Post by: Joachim Müller on February 17, 2008, 02:19:29 AM
This is not a hotline. Allow days for answers, not just hours!

Edit themes/yourtheme/theme.php, find function theme_display_image and edit as suggested below. If that function definition doesn't exist in your custom theme, copy function theme_display_image($nav_menu, $picture, $votes, $pic_info, $comments, $film_strip)
{
    global $CONFIG;

    $width = $CONFIG['picture_table_width'];

    starttable();
    echo $nav_menu;
    endtable();

    starttable();
    echo $picture;
    endtable();
    if ($CONFIG['display_film_strip'] == 1) {
        echo $film_strip;
    }


    echo $votes;



    $picinfo = isset($_COOKIE['picinfo']) ? $_COOKIE['picinfo'] : ($CONFIG['display_pic_info'] ? 'block' : 'none');
    echo "<div id=\"picinfo\" style=\"display: $picinfo;\">\n";
    starttable();
    echo $pic_info;
    endtable();
    echo "</div>\n";

    echo "<div id=\"comments\">\n";
        echo $comments;
        echo "</div>\n";

}
from themes/sample/theme.php into a new line before?>of themes/yourtheme/theme.php and then do as suggested below.

Here's the section you will need to edit: replace    starttable();
    echo $nav_menu;
    endtable();
As you can see, the function call for starttable doesn't contain any attributes. Experiment with    starttable(-2);or    starttable(-1);or a fixed width in percent or pixels like    starttable('90%');or    starttable('600');




Quote from: rctruckz on February 16, 2008, 03:17:43 PMyes that would help alot but if also possible lower too so it sits just above the image :) ?
Edit your stylesheet to accomplish that. Reduce the top padding for the container that holds the image.
Title: Re: Possible to add a *Close* button on intermediate image?
Post by: rctruckz on February 17, 2008, 01:54:30 PM
thanks :)

will give it a try later, sorry about asking again, wasnt too sure how active these forums were!

Thanks again will let you know how i get on

Cheers ;)
Title: Re: Possible to add a *Close* button on intermediate image?
Post by: François Keller on February 17, 2008, 02:49:52 PM
Quotewasnt too sure how active these forums were!
[ot] hum, have a look to the forum stats and you will see  :D [/ot]