coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: DangRabbit on January 04, 2007, 07:31:11 PM

Title: Film Strip - Move It
Post by: DangRabbit 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 :)



Title: Re: Film Strip - Move It
Post by: DangRabbit on January 04, 2007, 08:20:56 PM
Figured it out.

For anyone else who needs it.

in /include/themes.inc.php find:

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...

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:

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}

Title: Re: Film Strip - Move It
Post by: Joachim Müller 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.
Title: Re: Film Strip - Move It
Post by: DangRabbit on January 11, 2007, 04:58:14 AM
uh, isn't that what I said?  ;)
Title: Re: Film Strip - Move It
Post by: Joachim Müller 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.