Coppermine Skips Header Coppermine Skips Header
 

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]

Main Menu

Coppermine Skips Header

Started by CanuckHQ, September 28, 2012, 02:37:48 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

CanuckHQ

Hello everyone. This is my first post here on the forums. I have a question about Coppermine's action of skipping the header and focusing on the image being displayed. This behavoir also happens when logging out of Coppermine in that the top of the page is not visible. You have to scroll up to see the top of the page.

My question is, does anyone have any idea how to stop this default behavior of skipping over the header and displaying the middle of the page? My viewers have to scroll up to see the top of the page.

Thanks!

Jeff Bailey

Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

ΑndrĂ©

Quote from: CanuckHQ on September 28, 2012, 02:37:48 AM
This behavoir also happens when logging out of Coppermine
Copy the function theme_display_message_block from themes/sample/theme.php to your theme's theme.php file if it doesn't exist. Then, find
$return .= '<a name="cpgMessageBlock"></a>';
and remove it completely.

CanuckHQ

Thanks Jeff and Andre. Both of your suggestions are essentially the same and both work great to resolve my login/logout issue. Now if could just figure out how to stop the same thing from happening when someone clicks on a thumbnail that would be great.

Here are the details of my installation since I failed to post it in the orginal post:
Coppermine version: 1.5.18 (stable)
Theme: Curve
PHP version: 5.3.14
MySQL version: 5.5.25-cll
Apache version: 2.2.22

Gallery URL: http://www.canuckhq.ca

Jeff Bailey

If the function theme_display_image() doesn't already exist in your custom theme, paste this in theme.php

/******************************************************************************
** Section <<<theme_display_image>>> - START
******************************************************************************/
function theme_display_image($nav_menu, $picture, $votes, $pic_info, $comments, $film_strip)
{
    global $CONFIG, $LINEBREAK;

    $superCage = Inspekt::makeSuperCage();

    $width = $CONFIG['picture_table_width'];

    //echo '<a name="top_display_media"></a>'; // set the navbar-anchor
    starttable();
    echo $nav_menu;
    endtable();

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


    echo $votes;

    $picinfo = $superCage->cookie->keyExists('picinfo') ? $superCage->cookie->getAlpha('picinfo') : ($CONFIG['display_pic_info'] ? 'block' : 'none');
    echo $LINEBREAK . '<div id="picinfo" style="display: '.$picinfo.';">' . $LINEBREAK;
    starttable();
    echo $pic_info;
    endtable();
    echo '</div>' . $LINEBREAK;

    echo '<a name="comments_top"></a>';
    echo '<div id="comments">' . $LINEBREAK;
        echo $comments;
        echo '</div>' . $LINEBREAK;

}
/******************************************************************************
** Section <<<theme_display_image>>> - END
******************************************************************************/


if it does exist
Find
    echo '<a name="top_display_media"></a>'; // set the navbar-anchor
Replace with
    //echo '<a name="top_display_media"></a>'; // set the navbar-anchor

You page shows a 500 error for me. But, if
Quote from: CanuckHQ on September 28, 2012, 03:54:23 PM
Coppermine version: 1.5.18 (stable)
is correct you need to upgrade.
http://forum.coppermine-gallery.net/index.php/topic,74682.0.html
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

CanuckHQ

Hi Jeff, Thanks for the info. Your suggestion worked perfectly! I now have my gallery working to my preferences.
I was getting the 500 error eariler today also. Now sure whats up with that but the site is working fine now.

I am a little aprehensive about upgrading the gallery to version 1.5.20 since I have made changes to some of the php files and would hate to loose all those changes. Not to mention all the time I have invested in tracking down solutions some of the problems I encountered with plugins.

Thanks for providing such a great gallery!

Jeff Bailey

Sorry but if you you don't upgrade, we can't support you any longer and you run the risk of being hacked and losing all your changes anyway.
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford