forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 themes (visuals) => Topic started by: SolidSnake2003 on December 27, 2013, 06:58:41 pm

Title: Breadcrumb like Site
Post by: SolidSnake2003 on December 27, 2013, 06:58:41 pm
Is it possible to change the theme_breadcrumb in coppermine to match my site's system.  I have the photo gallery as a different section of the site.  So I would like it to be like this

home img Solid Snake: A Hero's Legacy
sep img Photo Gallery
cur img gallery index/categories/albums/pics etc

http://www.solidsnakelegacy.net/gallery
Title: Re: Breadcrumb like Site
Post by: Αndré on December 30, 2013, 09:47:50 am
The answer is probably "yes", unfortunately I don't understand
home img Solid Snake: A Hero's Legacy
sep img Photo Gallery
cur img gallery index/categories/albums/pics etc
i.e. what exactly should be changed how.
Title: Re: Breadcrumb like Site
Post by: SolidSnake2003 on January 04, 2014, 07:47:41 am
Im wanting it to look like vBulletin's old version 3 breadcrumb

Ive attached an image example of how it looks.

Plus Im wanting the breadcrumb trail to match the site as well.  Instead of this

Home sep Category/Categories sep Current Location

I want it to look like this:

Solid Snake: A Hero's Legacy sep Photo Gallery sep Category/Categories
Current Location

Title: Re: Breadcrumb like Site
Post by: Αndré on January 04, 2014, 01:15:13 pm
So you actually want to replace the word "Home" with your website's name plus "Photo gallery" and move the current location one line below, correct?
Title: Re: Breadcrumb like Site
Post by: SolidSnake2003 on January 04, 2014, 07:12:10 pm
Exactly

Is it also possible for me to move it somewhere else in the html
Title: Re: Breadcrumb like Site
Post by: Αndré on January 06, 2014, 04:45:23 pm
Copy this to your theme's theme.php file:
Code: [Select]
function theme_breadcrumb($breadcrumb_links, $BREADCRUMB_TEXTS, &$breadcrumb, &$BREADCRUMB_TEXT)
{
    $breadcrumb = '';
    $BREADCRUMB_TEXT = '';
    global $CONFIG;
    $breadcrumb_links[0] = '<a href="../">'.$CONFIG['gallery_name'].'</a> > <a href="index.php">Photo gallery</a>';
    for ($i = 0; $i < count($breadcrumb_links)-1; $i++) {
        $breadcrumb .= ' > ' . $breadcrumb_links[$i];
    }
    $breadcrumb .= '<br /> &nbsp; > ' . $breadcrumb_links[$i];
    foreach ($BREADCRUMB_TEXTS as $BREADCRUMB_TEXT_elt) {
        $BREADCRUMB_TEXT .= ' > ' . $BREADCRUMB_TEXT_elt;
    }
    // We remove the first ' > '
    $breadcrumb = substr_replace($breadcrumb,'', 0, 3);
    $BREADCRUMB_TEXT = substr_replace($BREADCRUMB_TEXT,'', 0, 3);
}
Title: Re: Breadcrumb like Site
Post by: SolidSnake2003 on January 12, 2014, 12:32:30 pm
Thanks, worked exactly as I wanted, marking as solved.
Title: Re: Breadcrumb like Site
Post by: allvip on February 27, 2014, 05:45:09 pm
How to change the separator breadcrumb with a picture:

http://forum.coppermine-gallery.net/index.php/topic,77234.0.html (http://forum.coppermine-gallery.net/index.php/topic,77234.0.html)