It is currently Sun Aug 19, 2018 5:37 am

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Sun Sep 08, 2013 7:07 pm 
Offline

Joined: Sat Aug 31, 2013 6:51 pm
Posts: 2
Hi

I would like to know how can I retrieve the Captions of the folders and use them as breadcrumb elements.

Can you advice?

By the way Great Component!!!


Top
 Profile  
 
 Post subject: Use caption in breadcrumb
PostPosted: Sun Sep 08, 2013 7:07 pm 
Top  
PostPosted: Fri Sep 13, 2013 11:00 am 
Offline
Developer
Developer
User avatar

Joined: Sat Aug 14, 2010 9:31 pm
Posts: 1241
Location: Novi Sad, Serbia
Hmm, well there is no easy solution for this.

You could check agGallery.php function initGallery
Code:
            // Album Support
            $this->albumParentLink = '';
            $this->albumInitFolders[] = "";
            $this->albumInitFolders[$this->index] = $this->imagesFolderName; // Set init folders
            if (!empty($_GET['AG_form_albumInitFolders_' . $this->articleID])) {
                $AG_form_albumInitFolders_array = explode(",", $_GET['AG_form_albumInitFolders_' . $this->articleID]);
                $this->albumInitFolders[$this->index] = $AG_form_albumInitFolders_array[$this->index];
                $this->imagesFolderName = $AG_form_albumInitFolders_array[$this->index];
                // Support for Album Parent Link
                if ($this->imagesFolderName != $this->imagesFolderNameOriginal) {
                    $this->albumParentLink = '
                        <a href="#" onClick="AG_form_submit_' . $this->articleID . '(' . $this->index . ',1,\'' . dirname($this->imagesFolderName) . '\'); return false;" class="AG_album_parent">
                            <span>
                                ' . basename(dirname($this->imagesFolderName)) . '
                            </span>
                        </a>
                        <br style="clear:both;" />
                        ';
                }
            }

            // Breadcrump Support           
            if (JFactory::getApplication()->getMenu()->getActive()->query['view'] == "layout") {
                $this->writeBreadcrum();
            }

At the end you see that we call $this->writeBreadcrum();

Code:
    /**
     * Breadcrump Support
     * Author: Lee Anderson
     * Authors e-mail: landerson@atlas-tech.com
     */
    function writeBreadcrum() {
        $folderNames = str_replace('//', '/', $this->imagesFolderName);
        $albumName = explode("/", $folderNames);
        $folderNumber = count($albumName) - 1;
        $linkFolderName = '';
        for ($i = 0; $i <= $folderNumber; $i++) {
            $linkFolderName .= $albumName[$i] . '/';
            $linkFolderName = str_replace('//', '/', $linkFolderName);
            if ($albumName[$i] != '' && $i != 0) {
                $this->events['name'] = $albumName[$i];
                $link = 'Javascript: AG_form_submit_' . $this->articleID . '(' . $this->index . ',1,\'' . $linkFolderName . '\');';
                $mainframe = JFactory::getApplication();
                $document = JFactory::getDocument();
                $pathway = $mainframe->getPathway();
                $document->setTitle($this->events['name']);
                $pathway->addItem($this->events['name'], $link);
            }
        }
    }


So in your case you should edit writeBreadcrum to your needs.

But for this to work, you should have some array that would hold album names, for example if you open Albums->Vacation->Summer2013, you should have $breadcrums = {"My albums","Vacation pictures", " Carribiens"}

Bottom end is, it is possible, but requires some work :)

_________________
Help Admiror Gallery become even better,
give us a review on JED


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

 


All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

This is the official Admiror Joomla! Community Forum. You are welcome to join the Admiror Joomla! Community. All Admiror Joomla! Extensions Users, Joomla! Developers, PHP or mySQL Developers are welcome to support & contribute to Admiror Joomla! Projects.

Joomla! is a free and open source content management system (CMS) for publishing content on the World Wide Web and intranets. With a vibrant volunteer community, user-friendly features and plenty of power, Joomla is perfect for your website!

Joomla! is written in PHP, uses object-oriented programming (OOP) techniques and software patterns, stores data in a MySQL database, and includes features such as page caching, RSS feeds, printable versions of pages, news flashes, blogs, polls, search, and support for language internationalization.

Joomla! is the property of Open Source Matters, Inc. All rights reserved. Read more about Joomla! at http://www.joomla.org/.


Protected by Anti-Spam ACP Powered by phpBB® Forum Software © phpBB Group