Hardwired Theme autoscrolls down when logged in Hardwired Theme autoscrolls down when logged in
 

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

Main Menu

Hardwired Theme autoscrolls down when logged in

Started by skiahh, August 16, 2010, 05:25:47 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

skiahh

Hi folks -

My gallery is at www.teamnavycycling.org/photos and works fine when not logged in.  When you log in, however, it scrolls you down to the welcome message and below, hiding all the tools you logged in for unless you scroll up.  My new, non-tech users are asking where their controls are once they log in!

At the end of the login string in the title bar is "message_icon=info#cpgMessageBlock" which I think is the offending section.  Is there a way to have the page just stay at the top once logged in? 

Thank you.


Αndré

Just remove the anchor
<a name="cpgMessageBlock"></a>

skiahh

Quote from: Αndré on September 01, 2010, 04:42:25 PM
Just remove the anchor
<a name="cpgMessageBlock"></a>

OK, thanks.  Can you tell me where to find that anchor, please?

Αndré

Search in the theme.php file of your theme. If you don't find it there, copy this to your theme.php:
function theme_display_message_block() {
    global $lang_gallery_admin_menu, $lang_common, $CONFIG, $message_id;

    $superCage = Inspekt::makeSuperCage();
    $return = '';
    $message_id = '';
    $message_icon = '';
    $message_style = '';

    if ($superCage->get->keyExists('message_id')) {
      $message_id = $superCage->get->getEscaped('message_id');
    }

    if ($superCage->get->keyExists('message_icon')) {
        $message_icon = $superCage->get->getAlpha('message_icon');
    }

    if ($message_icon == 'error') {
        $message_style = 'cpg_message_error';
    } elseif ($message_icon == 'warning') {
        $message_style = 'cpg_message_warning';
    } elseif ($message_icon == 'validation') {
        $message_style = 'cpg_message_validation';
    } elseif ($message_icon == 'success') {
        $message_style = 'cpg_message_success';
    } else {
        $message_style = 'cpg_message_info';
    }

    if ($message_id != '') {
        $tempMessage = cpgFetchTempMessage($message_id);
        if ($tempMessage != '') {
            //$return .= '<a name="cpgMessageBlock"></a>';
            $return .= <<< EOT
            <div id="cpgMessage" class="cpg_user_message {$message_style}">
              {$tempMessage}
            </div>
EOT;
        }
    }
    if (GALLERY_ADMIN_MODE) {
        cpgCleanTempMessage(); // garbage collection: when the admin is logged in, old messages that failed to display for whatever reason are being removed to keep the temp_messages table clean
        $return .= cpg_alert_dev_version();
        // $return .= cpg_display_rss(); //add RSS feed from coppermine-gallery.net later
    } else { // not in admin mode
        //$return = '';
    }
    return $return;
}