need a little help with coding the next image, or previous need a little help with coding the next image, or previous
 

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

need a little help with coding the next image, or previous

Started by bit bit spears, October 17, 2004, 08:13:57 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bit bit spears

hey everyone! i have run into a problem while modding my midsize image display (what you would call "displayimage.php").

i have tried modding it to look like this:
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.tangiblebrit.com%2FTangibleImage%2F92001939%2F01%2F&hash=cf43185ebb7e5680ef374757431b7ef1f23d2340)

here's how far i've gotten:

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.tangiblebrit.com%2FTangibleImage%2F92001939%2F02%2F&hash=5a5f0cee5fe0b37f6dad7cefa09f08ebc57bb1e2)

does any one know how they can help me achieve this?:

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.tangiblebrit.com%2FTangibleImage%2F92001939%2F03%2F&hash=aca3ce624a9bb423a5b63220b184746e16b05f0a)

Joachim Müller

this section is labelled "filmstrip" in Coppermine. Adjust your theme by looking into theme.php, search for the "filmstrip" definition and move it around accordingly.

Joachim

bit bit spears

k i'll play with it gaugau thanks- i'll update on here once it works ;)

bit bit spears

ok i've gotten further, and played around with the code, but it just won't work!

I'm almost for certain that this is what i need to edit, but i can't edit it right-i just doesn't work.
(in functions.inc.php)

function display_film_strip($album, $cat, $pos)
{
        global $CONFIG, $AUTHORIZED, $HTTP_GET_VARS;
        global $album_date_fmt, $lang_display_thumbnails, $lang_errors, $lang_byte_units;
        $max_item=$CONFIG['max_film_strip_items'];
        //$thumb_per_page = $pos+$CONFIG['max_film_strip_items'];
        $thumb_per_page = $max_item*2;
        $l_limit = max(0,$pos-$CONFIG['max_film_strip_items']);
        $new_pos=max(0,$pos-$l_limit);

        $pic_data = get_pic_data($album, $thumb_count, $album_name, $l_limit, $thumb_per_page);

        if (count($pic_data) < $max_item ){
                $max_item = count($pic_data);
        }
        $lower_limit=3;

        if(!isset($pic_data[$new_pos+1])) {
           $lower_limit=$new_pos-$max_item+1;
        } else if(!isset($pic_data[$new_pos+2])) {
           $lower_limit=$new_pos-$max_item+2;
        } else if(!isset($pic_data[$new_pos-1])) {
           $lower_limit=$new_pos;
        } else {
          $hf=$max_item/2;
          $ihf=(int)($max_item/2);
          if($new_pos > $hf ) {
             //if($max_item%2==0) {
               //$lower_limit=
             //} else {
             {
               $lower_limit=$new_pos-$ihf;
             }
          }
          elseif($new_pos < $hf ) { $lower_limit=0; }
        }

        $pic_data=array_slice($pic_data,$lower_limit,$max_item);
        $i=$l_limit;
        if (count($pic_data) > 0) {
                foreach ($pic_data as $key => $row) {
                        $hi =(($pos==($i + $lower_limit)) ? '1': '');
                        $i++;


What i want to do is have a maximum of 3 images in the film strip, but remove the current image from that, now leaving 2 images, a back and next image. (refer to the first picture posted) can anyone please help me?

Tranz

In config, you can set the number of images that display, so you don't have to code that. As for hiding the current image, you could use a conditional so that the current image doesn't get displayed in the filmstrip.

bit bit spears

i'm not that good at php, can you show me what a conditional is? and where to put it into the code?

kegobeer

Conditional statements are like this:  if ($somevariable) then ...

Visit the online php documentation at www.php.net for more info.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

bit bit spears

i understand that, but i don't understand the meaning of the variables in that code that i posted. i know that gaugau wants us to have fun coding and figuring stuff out, but i have reached my maximum coding ability. If someone out there knows how to hide the current image, can you please post?