Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Coppermine Skips Header  (Read 3424 times)

0 Members and 1 Guest are viewing this topic.

CanuckHQ

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Coppermine Skips Header
« on: September 28, 2012, 02:37:48 am »

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!
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Coppermine Skips Header
« Reply #2 on: September 28, 2012, 10:12:36 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
Code: [Select]
$return .= '<a name="cpgMessageBlock"></a>';and remove it completely.
Logged

CanuckHQ

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Coppermine Skips Header
« Reply #3 on: September 28, 2012, 03:54:23 pm »

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
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: Coppermine Skips Header
« Reply #4 on: September 28, 2012, 09:16:36 pm »

If the function theme_display_image() doesn't already exist in your custom theme, paste this in theme.php
Code: [Select]
/******************************************************************************
** 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
Code: [Select]
    echo '<a name="top_display_media"></a>'; // set the navbar-anchorReplace with
Code: [Select]
    //echo '<a name="top_display_media"></a>'; // set the navbar-anchor
You page shows a 500 error for me. But, if
Coppermine version: 1.5.18 (stable)
is correct you need to upgrade.
http://forum.coppermine-gallery.net/index.php/topic,74682.0.html
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

CanuckHQ

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Coppermine Skips Header
« Reply #5 on: September 28, 2012, 10:41:43 pm »

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!
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: Coppermine Skips Header
« Reply #6 on: September 28, 2012, 10:46:30 pm »

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.
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 20 queries.