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: Film Strip - Move It  (Read 2750 times)

0 Members and 1 Guest are viewing this topic.

DangRabbit

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Film Strip - Move It
« on: January 04, 2007, 07:31:11 pm »

I'm using a classic theme, modified.

All I want to do is move the location of the film strip down... I can't for the life of me figure out how.

I want the film strip to be moved between the comments already submitted and the form for new comments. So it will be the 2nd to last "block" on the page.

Please help :)



« Last Edit: January 05, 2007, 10:17:42 am by GauGau »
Logged

DangRabbit

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: Film Strip - Move It
« Reply #1 on: January 04, 2007, 08:20:56 pm »

Figured it out.

For anyone else who needs it.

in /include/themes.inc.php find:

Code: [Select]
if (!function_exists('theme_display_image')) {  //{THEMES}
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";

}
}  //{THEMES}

copy it into /themes/YOUR_THEME/theme.php
and make modifications.

Here it is with the blocks separated a bit so it's easier...

Code: [Select]
if (!function_exists('theme_display_image')) {  //{THEMES}
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";

}
}  //{THEMES}

keep the "blocks" of code together, but you can rearrange them however you like.

Here's what mine looks like:

Code: [Select]
if (!function_exists('theme_display_image')) {  //{THEMES}
function theme_display_image($nav_menu, $picture, $votes, $pic_info, $comments, $film_strip)
{
    global $CONFIG;

    $width = $CONFIG['picture_table_width'];
   
    echo $votes;

    starttable();
    echo $picture;
    endtable();
   
    starttable();
    echo $nav_menu;
    endtable();
   
    $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";
       
    if ($CONFIG['display_film_strip'] == 1) {
        echo $film_strip;
    }

}
}  //{THEMES}
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Film Strip - Move It
« Reply #2 on: January 05, 2007, 10:17:30 am »

Do not edit include/themes.inc.php, under no circumstances. Apply your custom code to themes/yourtheme/theme.php instead.
Logged

DangRabbit

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: Film Strip - Move It
« Reply #3 on: January 11, 2007, 04:58:14 am »

uh, isn't that what I said?  ;)
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Film Strip - Move It
« Reply #4 on: January 11, 2007, 08:37:41 am »

Yes, sorry - I have just not read your posting carefully enough. We recommend copying code from themes/sample/theme.php, but that's basically the same as the code contained in include/themes.inc.php, minus the conditional that checks if a custom definition exists.
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 15 queries.