Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Picture info and rating, swapping places.  (Read 2716 times)

0 Members and 1 Guest are viewing this topic.

laurenz

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 17
    • Jernbane.net
Picture info and rating, swapping places.
« 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
Logged

Nibbler

  • Guest
Re: Picture info and rating, swapping places.
« Reply #1 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;
Logged

laurenz

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 17
    • Jernbane.net
Re: Picture info and rating, swapping places.
« Reply #2 on: August 17, 2004, 08:27:54 pm »

I tried doing this several ways.
Here is the original:
Code: [Select]
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.

Code: [Select]
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://forum.coppermine-gallery.net/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
Logged
Pages: [1]   Go Up
 

Page created in 0.015 seconds with 15 queries.