coppermine-gallery.com/forum

Support => Older/other versions => cpg1.3.x Support => Topic started by: laurenz on August 17, 2004, 05:23:44 PM

Title: Picture info and rating, swapping places.
Post by: laurenz on August 17, 2004, 05:23:44 PM
Hi!

I would like to make a change in the layout of displayimage.php. I want the file information and the picture rating to swap places. I tried swapping some blocks at the bottom of my theme.php. I manage to make the 2 to swap places but then the "display/hide" button above the photo will display/hide the rating block. Curtainly a nice feature wich I would like to have too, but I would still like to be able to show and hide the file information.
Anyone who can tell me what to do?

Apreciate it!
Laurenz Edelman
Title: Re: Picture info and rating, swapping places.
Post by: Nibbler on August 17, 2004, 07:03:21 PM
Take a look in your theme.php at the theme_display_image function. You should be able to simply swap around echo $pic_info; and echo $votes;
Title: Re: Picture info and rating, swapping places.
Post by: laurenz on August 17, 2004, 08:27:54 PM
I tried doing this several ways.
Here is the original:
function theme_display_image($nav_menu, $picture, $votes, $pic_info, $comments, $film_strip)
{
    global $HTTP_COOKIE_VARS, $CONFIG;

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

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

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

    starttable();
    echo $comments;
    endtable();
}


Here is one of my attempts.

function theme_display_image($nav_menu, $picture, $pic_info, $votes, $comments, $film_strip)
{
    global $HTTP_COOKIE_VARS, $CONFIG;

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

    starttable();
    echo $picture;
    endtable();
    if ($CONFIG['display_film_strip'] == 1) {
        echo $film_strip;
    }
    $picinfo = isset($HTTP_COOKIE_VARS['picinfo']) ? $HTTP_COOKIE_VARS['picinfo'] : ($CONFIG['display_pic_info'] ? 'block' : 'none');
    echo "<div id=\"picinfo\" style=\"display: $picinfo;\">\n";
    starttable();
    echo $pic_info;
    endtable();
    echo "</div>\n";

    starttable();
    echo $votes;
    endtable();

    starttable();
    echo $comments;
    endtable();
}


It does swap these two however, this button (https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.jernbane.net%2Fgalleri%2Fimages%2Finfo.gif&hash=6b7e7ad3d58a2593d4da3f446723adc47eec8d27) will the hide the voting section.
Obviously I don't understand much PHP. So that's why I cant see how that is possible. After the function of this button clearly links to the picture info: onClick="blocking('picinfo','yes', 'block');

Weird....  :-\\

Laurenz