Picture info and rating, swapping places. Picture info and rating, swapping places.
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Picture info and rating, swapping places.

Started by laurenz, August 17, 2004, 05:23:44 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

laurenz

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

Nibbler

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;

laurenz

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