coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: rrwwxx on July 22, 2007, 01:44:02 PM

Title: minor slideshow design improvement
Post by: rrwwxx on July 22, 2007, 01:44:02 PM
For me it was a little irritating that I couldn't see which album gallery I am actually watching while the slideshow is running. There was no album title displayed so I wanted to have that nav title bar above the images like they are shown on the normal display view. Having that I can also always leave the slideshow and switch to another gallery or the main page directly.

I found the appropriate code in include/themes.inc.php:

Find:

if (!function_exists('theme_slideshow')) {  //{THEMES}
function theme_slideshow()
{
    global $CONFIG, $lang_display_image_php, $template_display_media;


replace with:

if (!function_exists('theme_slideshow')) {  //{THEMES}
function theme_slideshow()
{
    global $CONFIG, $lang_display_image_php, $template_display_media, $breadcrumb, $cat_data;


and a couple of lines below find

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


just add this line before it:

    theme_display_breadcrumb($breadcrumb, $cat_data);

An example can be seen here (http://www.hair-factory10.de/xg/displayimage.php?album=15&pid=383&slideshow=3000).
cu,
rrwwxx
°¿°
Title: Re: minor slideshow design improvement
Post by: Joachim Müller on July 23, 2007, 08:15:13 AM
Quote from: rrwwxx on July 22, 2007, 01:44:02 PM
I found the appropriate code in include/themes.inc.php:
Don't edit include/themes.inc.php - under no circumstances! Instead, edit themes/yourtheme/theme.php. If a function of variable declaration doesn't exist in your custom theme, copy it from themes/sample/theme.php.

If a function/variable exists in your custom theme, it will take precedence over the definition in themes.inc.php

Moving to themes sub-board
Title: Re: minor slideshow design improvement
Post by: rrwwxx on July 23, 2007, 03:11:36 PM
Fine, could you please give me an example of how to add a function in themes/yourtheme/theme.php that would lead to the desired result?

I know there is a mod somewhere explaining how to display the image titles during the slideshow, but I don't want these titles to appear, instead I want the gallery names. And I have no clue at the moment how to include a function in theme.php.

Wait... are you saying I can copy the whole function theme_slideshow() into themes/yourtheme/theme.php ?

Thanks for an answer ... - perhaps I should better try this first instead of waiting on a reply.
cu,
rrwwxx
°¿°

Title: Re: minor slideshow design improvement
Post by: Joachim Müller on July 23, 2007, 04:02:42 PM
Quote from: rrwwxx on July 23, 2007, 03:11:36 PM
Thanks for an answer ... - perhaps I should better try this first instead of waiting on a reply.
Yes, please go ahead and try it.

Just copyfunction theme_slideshow()
{
    global $CONFIG, $lang_display_image_php, $template_display_media;

    pageheader($lang_display_image_php['slideshow']);

    include "include/slideshow.inc.php";

    $start_slideshow = '<script language="JavaScript" type="text/JavaScript">runSlideShow()</script>';
    template_extract_block($template_display_media, 'img_desc', $start_slideshow);

    $params = array('{CELL_HEIGHT}' => $CONFIG['picture_width'] + 100,
        '{IMAGE}' => '<img src="' . $start_img . '" name="SlideShow" class="image" /><br />',
        '{ADMIN_MENU}' => '',
        );

    starttable();
    echo template_eval($template_display_media, $params);
    endtable();
    starttable();
    echo <<<EOT
        <tr>
                <td align="center" class="navmenu" style="white-space: nowrap;">
                        <a href="javascript:endSlideShow()" class="navmenu">{$lang_display_image_php['stop_slideshow']}</a>
                </td>
        </tr>

EOT;
    endtable();
    pagefooter();
}
from themes/sample/theme.php into a new line before?>in themes/your_theme/theme.php, then modify as you suggested above.