Page 1 of 1

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

Posted: 08 Jul 2010, 03:26
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!

Re: Change some code!!

Posted: 08 Jul 2010, 22:13
by Jan
Hi, which "next" position you mean?

Re: Change some code!!

Posted: 09 Jul 2010, 03:21
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 谢谢

Re: Change some code!!

Posted: 10 Jul 2010, 04:25
by hanlz
Hello Jan
Do you understand what I said, if you do not understand, please give me a message
Thank you 谢谢.

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

Posted: 11 Jul 2010, 04:41
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.

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

Posted: 12 Jul 2010, 05:16
by hanlz
Hello imperialWicket
Thanks very much, it is ok. :D
谢谢,非常感谢 :D