Put the image name in the lightbox

Phoca Gallery - image gallery extension
karaoke
Phoca Member
Phoca Member
Posts: 11
Joined: 07 Feb 2010, 11:47

Put the image name in the lightbox

Post by karaoke »

Hi,

I was wondering if it's possible to delete "reload"(icon-reload.gif) and "exit"(icon-exit.gif) icons and put the image name between "next"(icon-next-grey.gif) and "previous"(icon-prev-grey.gif) icons in the lightbox view.

Thanks
karaoke
Phoca Member
Phoca Member
Posts: 11
Joined: 07 Feb 2010, 11:47

Re: Put the image name in the lightbox

Post by karaoke »

Anybody?
imperialWicket
Phoca Enthusiast
Phoca Enthusiast
Posts: 78
Joined: 28 Feb 2010, 15:39

Re: Put the image name in the lightbox

Post by imperialWicket »

I am assuming your configuration under Detail View Settings: Detail Window is "Modal Popup Box" (I think that is the only popup that uses the images you referenced). This change is accomplished in the com_phocagallery/views/detail/tmpl/default.php file. Around line 51 there is check to see if detail buttons are configured to display, a change like the following adds the title text and removes the reload/close buttons:

Code: Select all

if ($this->tmpl['detailbuttons'] == 1){
	echo '<tr>'
	.'<td align="left" width="30%" style="padding-left:48px">'.$this->item->prevbutton.'</td>'
	.'<td align="center">'.$this->item->slideshowbutton.'</td>'
	// COMMENT OUT THE RELOAD AND EXIT BUTTONS
  //.'<td align="center">'.str_replace("%onclickreload%", $this->tmpl['detailwindowreload'], $this->item->reloadbutton).'</td>';
	//if ($this->tmpl['detailwindow'] == 4 || $this->tmpl['detailwindow'] == 5 || $this->tmpl['detailwindow'] == 7) {
	//} else {	
	//	echo '<td align="center">' . str_replace("%onclickclose%", $this->tmpl['detailwindowclose'], $this->item->closebutton). '</td>';
	//}
	// ADD THE TITLE TEXT
	.'<td>'.$this->item->title.'</td>';
  
  echo '<td align="right" width="30%" style="padding-right:48px">'.$this->item->nextbutton.'</td>'
	.'</tr>';
}
You will need to play with the positioning a little, but this should get you started.

It is worth noting that if you start the slideshow, the template file default.php is no longer used. During an active slideshow, Phoca Gallery uses the default_slideshow.php file. A similar code change will display a title and remove the reload/exit buttons, but the filename will not change as the slideshow progresses - you will always see the title of the first image.
karaoke
Phoca Member
Phoca Member
Posts: 11
Joined: 07 Feb 2010, 11:47

Re: Put the image name in the lightbox

Post by karaoke »

Thank you so much imperialWicket . You're the man :|
Post Reply