#top_display_media and #cpgMessageBlock #top_display_media and #cpgMessageBlock
 

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

#top_display_media and #cpgMessageBlock

Started by ljmonaco, October 21, 2012, 05:11:07 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ljmonaco

I've been searching through the forums and found a couple of posts about removing these, but I just want to move them. Can anyone provide assistance on how to move these so that when called, we can still see the navigation links (curve theme)? I don't mind the main header disappearing, but I would like for the links to always be visible.

ljmonaco

I think I figured out #cpgMessageBlock. I just moved {MESSAGE_BLOCK} above {SYS_MENU} and it now behaves as desired.
I still need assistance with #top_display_media.

Jeff Bailey

Please post a link.
http://forum.coppermine-gallery.net/index.php/topic,55415.msg270616.html#msg270616

add this to your custom themes 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
******************************************************************************/

and modify the placement of
echo '<a name="top_display_media"></a>'; // set the navbar-anchor
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

ljmonaco

Some progress... Thanks for the assistance Jeff.
http://monacolabs.com/

I moved it slightly and can now see the breadcrumbs, but I can't quite figure out where to place it to be able to see the menu. Also, this does not seem to have an effect when running the slideshow.

Thanks,
LM

Jeff Bailey

you don't have to keep echo '<a name="top_display_media"></a>'; in those theme sections.
You can comment it out //echo '<a name="top_display_media"></a>'; and just put
<a name="top_display_media"></a> in your template.html so that it is above all the menus.

For the slideshow:

/******************************************************************************
** Section <<<theme_slideshow>>> - START
******************************************************************************/
function theme_slideshow($start_img,$title)
{
    global $CONFIG, $lang_display_image_php, $template_display_media, $lang_common, $album, $pid, $slideshow;
    global $cat, $date, $THEME_DIR;

    pageheader($lang_display_image_php['slideshow']);
    template_extract_block($template_display_media, 'img_desc', $start_slideshow);

    /** set styles to slideshow background */
    $setDimentionW= $CONFIG['picture_width'] + 100;
    $setDimentionH= $CONFIG['picture_width'] + 10;

    if (defined('THEME_HAS_PROGRESS_GRAPHICS')) {
        $prefix = $THEME_DIR;
    } else {
        $prefix = '';
    }

    $params = array(
        '{SLIDESHOW_STYLE}' => 'width:' .$setDimentionW. 'px; height: '.$setDimentionH.'px; position: relative;' ,
        '{IMAGE}' => '<img id="showImage" src="' . $start_img . '" class="image" alt="" border="" /><br />',
        '{ADMIN_MENU}' => '',
        '{LOADER_ICON_PATH}' => $prefix . 'images/loader.gif',
    );

    echo '<a name="top_display_media"></a>';
    starttable();
    echo <<<EOT
        <tr class="noscript">
            <td align="center" class="tableh2">
              <noscript>
                  {$lang_common['javascript_needed']}
              </noscript>
            </td>
        </tr>
        <tr>
            <td align="center" class="navmenu" style="white-space: nowrap;">
                <div id="title">{$title}</div>
            </td>
        </tr>
EOT;
    endtable();

    starttable();
    echo template_eval($template_display_media, $params);
    endtable();

    starttable();
    echo <<<EOT
        <tr>
                <td align="center" id="back-to" class="navmenu" >
                        <a class="navmenu" style="cursor:pointer">{$lang_display_image_php['stop_slideshow']}</a>
                </td>
        </tr>

EOT;
    endtable();
    pagefooter();
}
/******************************************************************************
** Section <<<theme_slideshow>>> - END
******************************************************************************/
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

ljmonaco


Jeff Bailey

No problem.
Please resolve your thread.
Quote from: Joachim Müller on September 28, 2008, 12:46:26 PM
Resolve your threads
If you have found an answer to your question, resolve your thread. Don't just post "I have found the answer", but tell others what you actually did to solve your issues. Posting a link to the page where you found the answer might help. Describing what you did might help as well. Finally, you can tag your answer as "solved" by clicking on the "Topic Solved" button on the bar at the left hand side at the bottom of your thread.
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

ljmonaco

Topic has been marked resolved. Thanks again.