Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » General » PHP discussions » need help. please!
Show: Today's Messages :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
need help. please! [message #34476] Fri, 03 November 2006 23:57
justinryan is currently offline  justinryan   United States
Messages: 1
Registered: November 2006
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
Hey everyone,

I am currently working on a gallery for a friend using a script that i am assuming is named CustomGallery.

i have used it on a few different sites, you can see the script on www.mattparkerweddings.com and www.itakebandphotos.com.

the problem i am having is this,
my client wants to have it so that if you click the thumbnail, it opens in a new window. inside that window would be the buttons to go to the next one. the pop up would have to resize with the size of the image.

is there any code i can add to a php file to make images open in a new window on click?

here is the php for the include file


Class Gallery {

	var $photo_array;
	var $image_directory;
	var $active_index;
	function Gallery(){
		$this->photo_array = array();
		$this->image_directory = "";
		$this->active_index = null;
	// set data
	function addPhoto($image, $thumb, $text){
		$photo = array("image" => $image, "thumb" => $thumb, "text" => $text);
		array_push($this->photo_array, $photo);
	// get data
	function getActiveText(){
		return $this->photo_array[$this->getActive()]["text"];
	function getActiveImage(){
		return $this->getDirectory() . $this->photo_array[$this->getActive()]["image"];
	function getThumbnails(){
		$result = array();
		for($i = 0; $i < $this->getCount(); $i++){
			array_push($result, $this->getDirectory() . $this->photo_array[$i]["thumb"]);
		return $result;
	// get/set directory
	function setDirectory($directory){
		$this->image_directory = $directory;
	function getDirectory(){
		return $this->image_directory;
	// get/set index
	function setActive($index){
		$this->active_index = $index;
	function getActive(){
		return $this->active_index;
	function getPrevious(){
		$index = $this->getActive();
		return ($index > 0) ? $index-1 : null;
	function getNext(){
		$index = $this->getActive();
		return ($index < $this->getCount()-1) ? $index+1 : null;
	function getCount(){
		return count($this->photo_array);


i'm just not sure which part of that code to add to in order to make the thumbs open a popup on click.

thanks in advance!
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
Previous Topic: Newbie Question - Ignore missing ? links in URL
Next Topic: Message Tree
Goto Forum:

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Jul 16 21:42:36 EDT 2018

Total time taken to generate the page: 0.00571 seconds