coppermine-gallery.com/forum

Support => cpg1.5.x Support => cpg1.5 themes (visuals) => Topic started by: ljmonaco on October 21, 2012, 05:11:07 PM

Title: #top_display_media and #cpgMessageBlock
Post by: ljmonaco on October 21, 2012, 05:11:07 PM
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.
Title: Re: #top_display_media and #cpgMessageBlock
Post by: ljmonaco on October 21, 2012, 05:30:38 PM
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.
Title: Re: #top_display_media and #cpgMessageBlock
Post by: Jeff Bailey on October 22, 2012, 09:11:48 PM
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
Title: Re: #top_display_media and #cpgMessageBlock
Post by: ljmonaco on October 23, 2012, 01:14:14 AM
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
Title: Re: #top_display_media and #cpgMessageBlock
Post by: Jeff Bailey on October 23, 2012, 01:26:54 AM
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
******************************************************************************/
Title: Re: #top_display_media and #cpgMessageBlock
Post by: ljmonaco on October 23, 2012, 01:33:14 AM
SWEET!!! Thank you so much...
Title: Re: #top_display_media and #cpgMessageBlock
Post by: Jeff Bailey on October 23, 2012, 01:38:48 AM
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.
Title: Re: #top_display_media and #cpgMessageBlock
Post by: ljmonaco on October 23, 2012, 01:43:48 AM
Topic has been marked resolved. Thanks again.