forum.coppermine-gallery.net
Support => cpg1.3.x Support => Older/other versions => cpg1.3 Themes/Skins/Templates => Topic started by: bit bit spears on October 17, 2004, 08:13:57 pm
-
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:
(http://www.tangiblebrit.com/TangibleImage/92001939/01/)
here's how far i've gotten:
(http://www.tangiblebrit.com/TangibleImage/92001939/02/)
does any one know how they can help me achieve this?:
(http://www.tangiblebrit.com/TangibleImage/92001939/03/)
-
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
-
k i'll play with it gaugau thanks- i'll update on here once it works ;)
-
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?
-
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.
-
i'm not that good at php, can you show me what a conditional is? and where to put it into the code?
-
Conditional statements are like this: if ($somevariable) then ...
Visit the online php documentation at www.php.net for more info.
-
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?