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: filmstrip on the right  (Read 4726 times)

0 Members and 1 Guest are viewing this topic.

Heroe

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 124
    • abroadbg.com
filmstrip on the right
« on: November 09, 2009, 08:33:01 pm »

How can i place the filmstrip on the right,i try to find in theme.php  but without success :-\

gallery link http://abroadbg.com
demo account:
user:test
password:123654
theme.php
Code: [Select]
<?php
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2009 Coppermine Dev Team
  v1.1 originally written by Gregory DEMAR

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License version 3
  as published by the Free Software Foundation.
  
  ********************************************
  Coppermine version: 1.4.24
  $HeadURL: https://coppermine.svn.sourceforge.net/svnroot/coppermine/trunk/cpg1.4.x/themes/water_drop/theme.php $
  $Revision: 5969 $
  $Author: gaugau $
  $Date: 2009-05-21 22:03:33 +0200 (Do, 21 Mai 2009) $
**********************************************/

//define('THEME_IS_XHTML10_TRANSITIONAL',1);

// HTML template for filmstrip display
$template_film_strip = <<<EOT
<tr><td>
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" style="background-image: url({TILE1});"><img src="{TILE1}" alt="" border="0" /></td>
<td>
          {THUMB_STRIP}
</td> 
<td valign="top" style="background-image: url({TILE2});"><img src="{TILE2}" alt="" border="0" /></td>
         </tr>
</table>
</td></tr>

<!-- BEGIN thumb_cell -->
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td align="center" valign="bottom">
<a href="{LINK_TGT}">{THUMB}</a>
</td>
</tr>
</table>
{CAPTION}
{ADMIN_MENU}
<!-- END thumb_cell -->
<!-- BEGIN empty_cell -->
                <td valign="top" align="center">&nbsp;</td>
<!-- END empty_cell -->

EOT;


// HTML template for intermediate image display - HS: valign
$template_display_media = <<<EOT
                <td align="center" valign="top" class="display_media" height="{CELL_HEIGHT}" style="white-space: nowrap; padding: 0px;">
                        <table cellspacing="2" cellpadding="0" class="imageborder">
                               <tr>
                                        <td align="center">
                                                {IMAGE}
                                                {ADMIN_MENU}
                                        </td>
                               </tr>
                        </table>
<!-- BEGIN img_desc -->
                        <table cellpadding="0" cellspacing="0" class="tableb">
<!-- BEGIN title -->
                                <tr>
                                        <td class="tableb"><center><b>
                                                {TITLE}
                                        </b></center></td>
                                </tr>
<!-- END title -->
<!-- BEGIN caption -->
                                <tr>
                                        <td class="tableb"><center>
                                                {CAPTION}
                                        </center></td>
                                </tr>
<!-- END caption -->
                        </table>
<!-- END img_desc -->
                </td>
EOT;

// Added to display film_strip
function theme_display_film_strip(&$thumb_list$nbThumb$album_name$aid$cat$pos$sort_options$mode 'thumb')
{
    global 
$CONFIG$THEME_DIR;
    global 
$template_film_strip$lang_film_strip;

    static 
$template '';
    static 
$thumb_cell '';
    static 
$empty_cell '';
    static 
$spacer '';

    if ((!
$template)) {
        
$template $template_film_strip;
        
$thumb_cell template_extract_block($template'thumb_cell');
        
$empty_cell template_extract_block($template'empty_cell');
    }

    
$cat_link is_numeric($aid) ? '' '&cat=' $cat;

    
$thumbcols $CONFIG['thumbcols'];
    
$cell_width ceil(100 $CONFIG['max_film_strip_items']) . '%';

    
$i 0;
    
$thumb_strip '';
    foreach(
$thumb_list as $thumb) {
        
$i++;
        if (
$mode == 'thumb') {
            
$params = array('{CELL_WIDTH}' => $cell_width,
                
'{LINK_TGT}' => "displayimage.php?album=$aid$cat_link&pos={$thumb['pos']}",
                
'{THUMB}' => $thumb['image'],
                
'{CAPTION}' => '',
                
'{ADMIN_MENU}' => ''
                
);
        } else {
            
$params = array('{CELL_WIDTH}' => $cell_width,
                
'{LINK_TGT}' => "index.php?cat={$thumb['cat']}",
                
'{THUMB}' => $thumb['image'],
                
'{CAPTION}' => '',
                
'{ADMIN_MENU}' => ''
                
);
        }
        
$thumb_strip .= template_eval($thumb_cell$params);
    }

    if (
defined('THEME_HAS_FILM_STRIP_GRAPHICS')) {
        
$tile1 $THEME_DIR 'images/tile.gif';
        
$tile2 $THEME_DIR 'images/tile.gif';
    } elseif (
defined('THEME_HAS_FILM_STRIP_GRAPHIC')) {
        
$tile1=$tile2=$THEME_DIR 'images/tile.gif';
    } else {
        
$tile1=$tile2'images/tile.gif';
    }

    
$params = array('{THUMB_STRIP}' => $thumb_strip,
        
'{COLS}' => $i,
        
'{TILE1}' => $tile1,
        
'{TILE2}' => $tile2,
        );

    
ob_start();
    
starttable('');
      echo 
template_eval($template$params);
    
endtable();
    
$film_strip ob_get_contents();
    
ob_end_clean();

    return 
$film_strip;
}

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

    
starttable();
    echo $nav_menu;
    
endtable();
    
starttable();
    if (
$CONFIG['display_film_strip'] == 1) {
echo "<tr><td width='200' class='tableb' valign='middle' ><!-- gb before film_strip -->";
        echo $film_strip;
echo "</td><!-- gb after film_strip -->";
    }
echo "<!-- gb before picture -->";
    echo 
$picture;
    echo 
"</tr><!-- gb after picture -->";
    
endtable();

    
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();
}
function 
theme_create_tabs($items$curr_page$total_pages$template)
{
global $CONFIG$lang_create_tabs;

    
$maxTab $CONFIG['max_tabs'];

    
$tabs sprintf($template['right_text'], $items$total_pages);
    if ((
$total_pages == 1))
    
return $tabs;

    
$tabs .= $template['tab_header'];
    
//start
$prev $curr_page 1;
$p = array('{PREV}' => $lang_create_tabs['previous']);
if ($prev 1)
$tabs .= strtrsprintf($template['active_prev_tab']), $p);
else
$tabs .= strtrsprintf($template['inactive_prev_tab'],$prev), $p);
//end

    
if ($curr_page == 1) {
        
$tabs .= sprintf($template['active_tab'], 1);
    } else {
        
$tabs .= sprintf($template['inactive_tab'], 11);
        if (
$curr_page floor($maxTab 2) >= 2)  //
       
$tabs .= $template['dotdotdot']; //
    
}

    if (
$total_pages $maxTab){
        
$start max(2$curr_page floor(($maxTab 2) / 2));
        
$start min($start$total_pages $maxTab 2);
        
$end $start $maxTab 3;
    } else {
        
$start 2;
        
$end $total_pages 1;
    }

    for (
$page $start$page <= $end$page++) {
        if (
$page == $curr_page) {
$tabs .= sprintf($template['active_tab'], $page);
        } else {
$tabs .= sprintf($template['inactive_tab'], $page$page);
        }
    }

    if (
$total_pages 1) {
if ($curr_page == $total_pages) {
$tabs .= sprintf($template['active_tab'], $total_pages);

} else {
if ($curr_page + ($maxTab 2) <= $total_pages) //
        $tabs .= $template['dotdotdot']; //
$tabs .= sprintf($template['inactive_tab'], $total_pages$total_pages);
}
    }

//start
$next $curr_page 1;
$n = array('{NEXT}' => $lang_create_tabs['next']);
if ($next $total_pages)
$tabs .= strtrsprintf($template['active_next_tab']), $n);
else
$tabs .= strtrsprintf($template['inactive_next_tab'],$next), $n);
//end

    
return $tabs $template['tab_trailer'];
}
function 
assemble_template_buttons($template_buttons,$buttons) {
    
$counter=0;
    
$output='';

    foreach (
$buttons as $button)  {
      if (isset(
$button[4])) {
         
$spacer=$button[4];
      } else {
      
$spacer='';
      }

        
$params = array(
            
'{SPACER}'     => $spacer,
            
'{BLOCK_ID}'   => $button[3],
            
'{HREF_TGT}'   => $button[2],
            
'{HREF_TITLE}' => $button[1],
            
'{HREF_LNK}'   => $button[0]
            );
        
$output.=template_eval($template_buttons$params);
    }
    return 
$output;
}

// HTML template for main menu
$template_sys_menu = <<<EOT
                <span class="topmenu">

<a href="index.php">Home</a><br /><br />

<!-- BEGIN my_gallery -->
                        <a href="{MY_GAL_TGT}" title="{MY_GAL_TITLE}">{MY_GAL_LNK}</a><br /><br />
<!-- END my_gallery -->

<!-- BEGIN allow_memberlist -->
                        <a href="{MEMBERLIST_TGT}" title="{MEMBERLIST_TITLE}">{MEMBERLIST_LNK}</a><br /><br />
<!-- END allow_memberlist -->

<!-- BEGIN my_profile -->
                        <a href="{MY_PROF_TGT}">{MY_PROF_LNK}</a><br /><br />
<!-- END my_profile -->

<!-- BEGIN faq -->
                        <a href="{FAQ_TGT}" title="{FAQ_TITLE}">{FAQ_LNK}</a><br /><br />
<!-- END faq -->

<!-- BEGIN enter_admin_mode -->
                        <a href="{ADM_MODE_TGT}" title="{ADM_MODE_TITLE}">{ADM_MODE_LNK}</a><br /><br />
<!-- END enter_admin_mode -->

<!-- BEGIN leave_admin_mode -->
                        <a href="{USR_MODE_TGT}" title="{USR_MODE_TITLE}">{USR_MODE_LNK}</a><br /><br />
<!-- END leave_admin_mode -->

<!-- BEGIN upload_pic -->
                        <a href="{UPL_PIC_TGT}" title="{UPL_PIC_TITLE}">{UPL_PIC_LNK}</a><br /><br />
<!-- END upload_pic -->

<!-- BEGIN register -->
                        <a href="{REGISTER_TGT}" title="{REGISTER_TITLE}">{REGISTER_LNK}</a><br /><br />
<!-- END register -->

<!-- BEGIN login -->
                        <a href="{LOGIN_TGT}" title="">{LOGIN_LNK}</a>
<!-- END login -->

<!-- BEGIN logout -->
                        <a href="{LOGOUT_TGT}" title="">{LOGOUT_LNK}</a><br />
<!-- END logout -->
</span>
EOT;

  
// HTML template for sub_menu
$template_sub_menu = <<<EOT

<!-- BEGIN custom_link -->
     <a href="{CUSTOM_LNK_TGT}" title="{CUSTOM_LNK_TITLE}">{CUSTOM_LNK_LNK}</a><br /><br />
<!-- END custom_link -->

<a href="location_map.php">Visited countries</a><br /><br />

<!-- BEGIN album_list -->
     <a href="{ALB_LIST_TGT}" title="{ALB_LIST_TITLE}">{ALB_LIST_LNK}</a><br /><br />
<!-- END album_list -->
<a href="{LASTUP_TGT}">{LASTUP_LNK}</a><br /><br />
<a href="{LASTCOM_TGT}">{LASTCOM_LNK}</a><br /><br />
<a href="{TOPN_TGT}">{TOPN_LNK}</a><br /><br />
<a href="{TOPRATED_TGT}">{TOPRATED_LNK}</a><br /><br />
<a href="{FAV_TGT}">{FAV_LNK}</a><br /><br />
<a href="{SEARCH_TGT}">{SEARCH_LNK}</a>

EOT;

?>
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1323
  • Fishing relaxes me.
    • Bailey Family Co.
Re: filmstrip on the right
« Reply #1 on: November 09, 2009, 09:57:54 pm »

Just to clarify..
Are you using the slider plugin? If so, is that what you want to move, because I don't see a "filmstrip".
If you have just turned off the filmstrip till you can figure out how to move it ... take a look at this thread.
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

Heroe

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 124
    • abroadbg.com
Re: filmstrip on the right
« Reply #2 on: November 10, 2009, 08:45:44 am »

Actually thats exactly what i want but no success, the part of the code that i need to edit as Nibbler wrote is:

Code: [Select]
    starttable();
    if ($CONFIG['display_film_strip'] == 1) {
echo "<tr><td width='200' class='tableb' valign='middle' ><!-- gb before film_strip -->";
        echo $film_strip;
echo "</td><!-- gb after film_strip -->";
    }
echo "<!-- gb before picture -->";
    echo $picture;
    echo "</tr><!-- gb after picture -->";
    endtable();

i try to place echo$picture; before echo$film_strip; the result is- filmstrip appear in the center under the display image :(
is it possible somebody to help please  ???

(i search the forum and i found 12 pages with results for "filmstrip" "right" but i didn't find the topic you post Jeff Balley, thank u for the link)

Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: filmstrip on the right
« Reply #3 on: November 10, 2009, 08:57:16 am »

Actually thats exactly what i want
You can't answer an either/or question with "yes". Clarify what you want. If you're refering to the slider on the index page, post a link to the thread that announces that slider (there are several of them). What you're looking for is not the film strip feature, but something else. That's why editing the section of the theme that defines the film strip output is not being taken into account. It doesn't make sense to refer to that.
Logged

Heroe

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 124
    • abroadbg.com
Re: filmstrip on the right
« Reply #4 on: November 10, 2009, 09:07:33 am »

OK i will try to explane more clear what i want. If u login and go to any album for example http://abroadbg.com/displayimage.php?album=17&pos=1#nav_pic (i have EnlargIit plugin and u have to click on "I" to see the filmstrip)u can see i have filmstrip on the left before the image, i want to place the lenght with the filmstrip images on the right.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: filmstrip on the right
« Reply #5 on: November 10, 2009, 01:45:14 pm »

OK, so this is not about alignment after all, but about the order of elements in your output: you have a vertical filmstrip at the left of the intermediate image, and you want it to appear at the right of the intermediate image. The term "alignment" means something different.

To accomplish what you're up to, edit themes/yourtheme/theme.php with a plain text editor, find the function definition for theme_display_image and edit as you see fit. If that function doesn't exist in your custom theme, copy
Code: [Select]
function theme_display_image($nav_menu, $picture, $votes, $pic_info, $comments, $film_strip)
{
    global $CONFIG;

    $width = $CONFIG['picture_table_width'];

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

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


    echo $votes;



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

    echo "<div id=\"comments\">\n";
        echo $comments;
        echo "</div>\n";

}
from themes/sample/theme.php into a new line before
Code: [Select]
?>into your custom theme file first.
As you can see by looking at the code, the film strip is inserted underneath the actual image. Come up with the needed table or alignment structures as you see fit.
In your initial posting you said you had
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();
    if ($CONFIG['display_film_strip'] == 1) {
echo "<tr><td width='200' class='tableb' valign='middle' ><!-- gb before film_strip -->";
       echo $film_strip;
echo "</td><!-- gb after film_strip -->";
    }
echo "<!-- gb before picture -->";
    echo $picture;
    echo "</tr><!-- gb after picture -->";
    endtable();

    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();
}
, so you already should know how to change that; just invert the order of table cells, so all this stuff becomes
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;
    if ($CONFIG['display_film_strip'] == 1) {
        echo $film_strip;
    }
    endtable();

    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();
}
You will then of course have to edit the definition for the variables $picture and $film_strip as well. Your edits in your theme.php file seem a bit unstructured. If you have issues figuring out the actual content of theme.php, zip your custom theme folder and attach the zip to your next posting.
« Last Edit: November 10, 2009, 04:43:39 pm by Joachim Müller »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: filmstrip on the right
« Reply #6 on: November 10, 2009, 04:44:16 pm »

You appear to have applied the changes already. We'd appreciate you resolving your threads...
Logged

Heroe

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 124
    • abroadbg.com
Re: filmstrip on the right
« Reply #7 on: November 10, 2009, 04:51:14 pm »

Thank you for the help GauGau, i did all what u say and now the filmstrip appear on the right :P

the changes i did are:

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;
    if ($CONFIG['display_film_strip'] == 1) {
    echo "<td width='150' class='tableb' valign='right' >";
        echo $film_strip;
    }
    endtable();

    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();
}

I will mark the thread as solved.
Thank u very much again and if the  changes are not enough let me know please :)

Logged
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 20 queries.