Change some code? 改变按钮的位置?

Phoca Gallery - image gallery extension
hanlz
Phoca Member
Phoca Member
Posts: 32
Joined: 19 Apr 2010, 09:47
Contact:

Change some code? 改变按钮的位置?

Post by hanlz »

Hello!

Sorry to trouble you again, I have a problem, I want to change the "Next image " position, How to change.


Thank you!
Last edited by hanlz on 10 Jul 2010, 04:27, edited 1 time in total.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49299
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Change some code!!

Post by Jan »

Hi, which "next" position you mean?
If you find Phoca extensions useful, please support the project
hanlz
Phoca Member
Phoca Member
Posts: 32
Joined: 19 Apr 2010, 09:47
Contact:

Re: Change some code!!

Post by hanlz »

Hello, Jan
Please check thsi site:
http://www.herohome.com.cn/index.php?op ... 79&lang=en
"Next iamge"、"Previous iamge"、"Start slidewindow" and other, they are the most below, I want it on top position on the text, in other words, I want to place it on the big picture below, how to do.
Thank you 谢谢
hanlz
Phoca Member
Phoca Member
Posts: 32
Joined: 19 Apr 2010, 09:47
Contact:

Re: Change some code!!

Post by hanlz »

Hello Jan
Do you understand what I said, if you do not understand, please give me a message
Thank you 谢谢.
imperialWicket
Phoca Enthusiast
Phoca Enthusiast
Posts: 78
Joined: 28 Feb 2010, 15:39

Re: Change some code? 改变按钮的位置?

Post by imperialWicket »

Edit the /components/com_phocagallery/views/detail/tmpl/default.php file.

Move the entire 'detailbuttons' code block to the top of the table. I'm looking at an older version of phoca gallery (2.7.1), but this change should be pretty consistent to the 2.7.3 version.

The original start of the file looks like:

Code: Select all

echo '<div id="phocagallery">';
if ($this->tmpl['backbutton'] != '') {
	echo $this->tmpl['backbutton'];
}

echo '<center style="padding-top:10px">'
	.'<table border="0" width="100%">'
	.'<tr>'
	.'<td colspan="6" align="center" valign="middle" height="'.$this->tmpl['largeheight'].'"'
	.' style="height:'.$this->tmpl['largeheight'].'px" >'
	.'<div id="image-box" style="width:'.$this->item->realimagewidth.'px;">'
	.'<a href="#" onclick="'.$this->tmpl['detailwindowclose'].'">'.$this->item->linkimage.'</a>';
Change it to include that lower code block that outputs the buttons like:

Code: Select all

echo '<div id="phocagallery">';
if ($this->tmpl['backbutton'] != '') {
	echo $this->tmpl['backbutton'];
}

echo '<center style="padding-top:10px">'
	.'<table border="0" width="100%">' ;
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>'
	.'<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>';
	}
	echo '<td align="right" width="30%" style="padding-right:48px">'.$this->item->nextbutton.'</td>'
	.'</tr>';
}		
echo '<tr>'
	.'<td colspan="6" align="center" valign="middle" height="'.$this->tmpl['largeheight'].'"'
	.' style="height:'.$this->tmpl['largeheight'].'px" >'
	.'<div id="image-box" style="width:'.$this->item->realimagewidth.'px;">'
	.'<a href="#" onclick="'.$this->tmpl['detailwindowclose'].'">'.$this->item->linkimage.'</a>';


Be sure to comment out or remove the detailbuttons block from the bottom of the file, or you will have duplicates at the top and bottom.
hanlz
Phoca Member
Phoca Member
Posts: 32
Joined: 19 Apr 2010, 09:47
Contact:

Re: Change some code? 改变按钮的位置?

Post by hanlz »

Hello imperialWicket
Thanks very much, it is ok. :D
谢谢,非常感谢 :D
Post Reply