Page 1 of 1

Back button position

Posted: 09 Jan 2010, 01:26
by abhijack
I like to know whether possible to change the position of the back button inside the gallery page

Thanks in advance , please help

Re: Back button position

Posted: 09 Jan 2010, 19:35
by abhijack
Hi Jan and others...

My problem is unresolved yet unfortunately...

I am using Modalbox..

I have opted for a back button to go in my gallery pages.. It is to take the user back to main gallery options..

The back button appears as the first icon inside the gallery page ..

I wanted to place this at the end of the icons for my galleries..

I cant find such a parameter setting.. Can someone suggest where I can edit the code to get this done..

Pls help me to make this possible . Your help is much appreciated..

Re: Back button position

Posted: 09 Jan 2010, 23:48
by Jan
Hi, you can place the back icon into two position - as first image or above images, see:

https://www.phoca.cz/wallpapers/gallery/ ... y/7-prague

For now I don't know how to add it into the last position as I didn't do such modification yet (and have no idea how to solve the problem with pagination - which is not fixed :( )

Jan

Re: Back button position

Posted: 10 Jan 2010, 00:16
by abhijack
Thanks for the reply.

Can you tell how I can set the parameter to show theback button above the images as in the link you have given..

Thanks again..

Re: Back button position

Posted: 12 Jan 2010, 00:54
by Jan
Hi, you should see the parameters - Categories View in Category View, see:
https://www.phoca.cz/documents/2-phoca-g ... -menu-item

Jan

Re: Back button position

Posted: 29 Jun 2010, 11:53
by klevis miho
I have the same problem, to put the back button in the end of the thumbnails...

Re: Back button position

Posted: 29 Jun 2010, 23:39
by imperialWicket
This is by no means a good solution, but it is a functional hack.

The bulk of the /components/com_phocagallery/views/category/tmpl/default.php file is a foreach loop that iterates through the images for a given category. At the beginning of the loop, check if the item has a filename associated, and if it does not, store the item and then add it to the end of the listing after the loop is finished.

At the beginning of the loop change the code to match:

Code: Select all

// Images	
if (!empty($this->items)) {
	foreach($this->items as $key => $value) {
    
    // HACK TO MOVE BACK BUTTON TO END OF IMAGES -- BEGIN
    // If there is no filename available, skip the loop and store this item for later.
    if(!isset($value->filename)){
        $back_item = $value;
        continue;
    }
    // HACK TO MOVE BACK BUTTON TO END OF IMAGES -- END
    ...
After the end of the loop add:

Code: Select all

...
// HACK TO MOVE BACK BUTTON TO END OF IMAGES -- BEGIN
	if($back_item != null){
    echo '
          <!-- BACK BUTTON HACK -->
    
          <div class="phocagallery-box-file" style="height:'. $imageHeight['boxsize'].'px; width:'.$imageWidth['boxsize'].'px;">';
		echo '<div class="phocagallery-box-file-first" style="height:'.$imageHeight['size'].'px;width:'.$imageWidth['size'].'px;">';
		echo '<div class="phocagallery-box-file-second">';
		echo '<div class="phocagallery-box-file-third">';
		
    echo '<a class="'.$back_item->button->methodname.'"';
		if ($back_item->type == 2) {
			if ($back_item->overlib == 0) {
				echo ' title="'. $back_item->title.'"';
			}
		}
		echo ' href="'. $back_item->link.'"';
		echo JHTML::_( 'image.site', $back_item->linkthumbnailpath, '', '', '', $back_item->altvalue );
		echo '</a>';
		echo '</div></div></div></div>'. "\n\n";
			
  }
  // HACK TO MOVE BACK BUTTON TO END OF IMAGES -- END


} else {
	// Will be not displayed
	//echo JText::_('There is no image in this category');
}
I did not test this extensively, but it seems to work fine when pagination occurs and in categories with sub-categories. At any rate, it should get you started for moving the back button.

Re: Back button position

Posted: 29 Nov 2011, 02:41
by melanie0662
Hi the post is a little bit old, so maybe no one can give me an answer. I try to put the code on my file but doesn't work. i think i don't understand everything. for the first step you say " change the code " but what code all the code in the loop ? just the beggining or maybe you just want to say "put at the begining ? "
i wish you can undersand my request. thanks