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: how to make vertical film strip instead of horizontal  (Read 18373 times)

0 Members and 1 Guest are viewing this topic.

cong

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 49
how to make vertical film strip instead of horizontal
« on: April 01, 2007, 08:17:36 am »

hello,   :)

i want to make vertical film strip instead of horizontal as shown in picture
and how to remove file title from image view ??

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fimg374.imageshack.us%2Fimg374%2F7999%2Funtitled1jo8.th.jpg&hash=c5f39320e5af465c84a3e591d7c58d023bfbd9e9)
this is attached picture to explain what i need

thanx in advance  :)
« Last Edit: April 03, 2007, 07:46:33 am by GauGau »
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: how to make vertical film strip instead of horizontal
« Reply #1 on: April 01, 2007, 08:41:53 am »

here is Classic theme with vertical film strip download it and check theme.php for theme_display_film_strip function and $template_film_strip variable
Logged
‍I don't answer to PM with support question
Please post your issue to related board

cong

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 49
Re: how to make vertical film strip instead of horizontal
« Reply #2 on: April 01, 2007, 08:50:29 am »

here is Classic theme with vertical film strip download it and check theme.php for theme_display_film_strip function and $template_film_strip variable

i am very beginner with php i tried to make it but i cant .  can you advice me what codes i replace it ( find .... replace way )
thank you very much sami
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: how to make vertical film strip instead of horizontal
« Reply #3 on: April 01, 2007, 09:08:52 am »

- first if you have $template_film_strip variable on {gallery-root}/themes/your theme/theme.php replace it with
code below , if you didn't have it just copy this code before php end tag (?>)
Code: [Select]
// 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;

- if you have $template_display_media variable on {gallery-root}/themes/your theme/theme.php replace it with
code below , if you didn't have it just copy this code before php end tag (?>)
Code: [Select]
// 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;

- if you have theme_display_film_strip function on {gallery-root}/themes/your theme/theme.php replace it with
code below , if you didn't have it just copy this code before php end tag (?>)
Code: [Select]
// 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/tile1.gif';
        $tile2 = $THEME_DIR . 'images/tile2.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;
}

- if you have theme_display_image function on {gallery-root}/themes/your theme/theme.php replace it with
code below , if you didn't have it just copy this code before php end tag (?>)
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();
}

- Do not forget to create vertical film pic or copy it (tile.gif) from Classic theme with vertical film strip images folder to {gallery-root}/themes/your theme/images
Logged
‍I don't answer to PM with support question
Please post your issue to related board

cong

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 49
Re: how to make vertical film strip instead of horizontal
« Reply #4 on: April 01, 2007, 04:57:15 pm »

i applied your steps but i found this

there is spaces in sides of film strips and the place of old (horizontal ) one

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fimg486.imageshack.us%2Fimg486%2F6326%2Funtitled1jc8.jpg&hash=e80853f8d53f4cc48cc609ce8be52f5f69645676)
this picture show what i mean

and sorry sami i tired you
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: how to make vertical film strip instead of horizontal
« Reply #5 on: April 01, 2007, 07:38:10 pm »

This could be css style issue
- post a link to your gallery
Logged
‍I don't answer to PM with support question
Please post your issue to related board

cong

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 49
Logged

cong

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 49
Re: how to make vertical film strip instead of horizontal
« Reply #7 on: April 01, 2007, 09:09:46 pm »

my gallery is http:/photos.congland.com

you can review it but now a packed up old theme.php until annoy visitors what i do now with this spaces sami ???
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: how to make vertical film strip instead of horizontal
« Reply #8 on: April 02, 2007, 12:27:04 am »

I can't see vertical film strip at all !?
you should change it back to vertical version so I could find the problem ...
Logged
‍I don't answer to PM with support question
Please post your issue to related board

cong

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 49
Re: how to make vertical film strip instead of horizontal
« Reply #9 on: April 02, 2007, 12:28:25 am »

ok  2 minutes
i wil change it
Logged

cong

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 49
Re: how to make vertical film strip instead of horizontal
« Reply #10 on: April 02, 2007, 12:45:07 am »

i changed it now
and there is just the space above comments
what about it ??
and how to make the two spaces beside title and description to be white

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fimg142.imageshack.us%2Fimg142%2F6665%2Funtitled1rg4.jpg&hash=b070b0a20cbf6a1ab8bd70971b818f67944a7287)
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: how to make vertical film strip instead of horizontal
« Reply #11 on: April 02, 2007, 01:02:16 am »

Zip your theme and attach it to this thread by using Additional Options... I will take a look at that

[note]:In my timezone , Time is 2:31 AM and I should go to bed , So don't expect fast answer till morning ;)
Logged
‍I don't answer to PM with support question
Please post your issue to related board

cong

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 49
Re: how to make vertical film strip instead of horizontal
« Reply #12 on: April 02, 2007, 01:08:03 am »

here is my theme in attach
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: how to make vertical film strip instead of horizontal
« Reply #13 on: April 02, 2007, 01:20:08 am »

cong you should zip up your whole theme not just theme.php
Logged
‍I don't answer to PM with support question
Please post your issue to related board

cong

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 49
Re: how to make vertical film strip instead of horizontal
« Reply #14 on: April 02, 2007, 01:38:29 am »

ok sami here whole pages in my theme
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: how to make vertical film strip instead of horizontal
« Reply #15 on: April 02, 2007, 08:36:25 am »

Use attached theme.php instead of yours,
Problem was theme_display_image function
there was unnecessary table creation for Vote section and I remove that
Logged
‍I don't answer to PM with support question
Please post your issue to related board

cong

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 49
Re: how to make vertical film strip instead of horizontal
« Reply #16 on: April 03, 2007, 01:21:12 am »

it is worked perfect and thank you very much sami and you can mark it as solved.  :) :)
you are expert sami ;)
Logged

skidpics

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 223
Re: how to make vertical film strip instead of horizontal
« Reply #17 on: September 10, 2007, 04:52:00 pm »

It appears I do not have any of these listed, do I paste all of them into my theme.php, or just one of them to start the conversion process?  I use the sosuechtig theme.. 

- first if you have $template_film_strip variable on {gallery-root}/themes/your theme/theme.php replace it with
code below , if you didn't have it just copy this code before php end tag (?>)
Code: [Select]
// 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;

- if you have $template_display_media variable on {gallery-root}/themes/your theme/theme.php replace it with
code below , if you didn't have it just copy this code before php end tag (?>)
Code: [Select]
// 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;

- if you have theme_display_film_strip function on {gallery-root}/themes/your theme/theme.php replace it with
code below , if you didn't have it just copy this code before php end tag (?>)
Code: [Select]
// 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/tile1.gif';
        $tile2 = $THEME_DIR . 'images/tile2.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;
}

- if you have theme_display_image function on {gallery-root}/themes/your theme/theme.php replace it with
code below , if you didn't have it just copy this code before php end tag (?>)
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();
}

- Do not forget to create vertical film pic or copy it (tile.gif) from Classic theme with vertical film strip images folder to {gallery-root}/themes/your theme/images
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: how to make vertical film strip instead of horizontal
« Reply #18 on: September 10, 2007, 09:55:56 pm »

copy all of them to your theme.php
Logged
‍I don't answer to PM with support question
Please post your issue to related board
Pages: [1]   Go Up
 

Page created in 0.029 seconds with 19 queries.