Jump to content


Photo

PHP Newbie here! Can someone please tell what is going on?!?


  • Please log in to reply
2 replies to this topic

#1 jandreoni

jandreoni
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 29 September 2006 - 06:12 PM

http://www.capturedi...ail002.php?id=3

I don't really know what I've done here to be getting this error. I had it working fine a little while ago, but now it's blowing out. I've only got the first 2 galleries going at this point, but they are giving the same error, and the NEXT and PREVIOUS show the same ID.

AAAGH!!

Can anyone help me??

#2 hostfreak

hostfreak
  • Members
  • PipPipPip
  • Advanced Member
  • 581 posts

Posted 29 September 2006 - 06:20 PM

Can you please post some code? The code for that page and all relevant code would help us to help you ;)

#3 jandreoni

jandreoni
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 29 September 2006 - 06:28 PM

Yeah, that would help, wouldn't it. =)

Here's the PHP code from the page the error is coming from:

(red text is the line of the error, 49)

Not sure what else I need to post from. I've got another class page and a definition page. Hope this helps. =)

<?php

include_once("includes/Gallery.class.php");

class CustomGallery001 extends Gallery {

var $title;

function CustomGallery(){
$this->Gallery();
$this->title = "";
$index = isset($_GET["id"]) ? $_GET["id"]-1 : 0;
Gallery::setActive($index);
}

// get/set title
function setTitle($title){
$this->title = $title;
}
function getTitle(){
return $this->title;
}

// get/set display index
function getActiveDisplay(){
return ($this->getActive()+1);
}
function getCountDisplay(){
return $this->getActiveDisplay() ." of ". $this->getCount();
}
function getPreviousDisplay(){
$index = $this->getPrevious();
if(is_int($index)) return "<a href=\"gallerydetail001.php?id=".($index+1)."\" title=\"Previous Photo\">Previous</a>";
else return "<span>Previous</span>";
}
function getNextDisplay(){
$index = $this->getNext();
if(is_int($index)) return "<a href=\"gallerydetail001.php?id=".($index+1)."\" title=\"Next Photo\">Next</a>";
else return "<span>Next</span>";
}

// get/set display data
function getActiveTextDisplay(){
return $this->getActiveText();
}
function getActiveImageDisplay(){
$image = $this->getActiveImage();
$index = $this->getActiveDisplay();
list($width, $height) = getimagesize($image);
return "<img src=\"$image\" width=\"$width\" height=\"$height\" alt=\"Photo $index\" />";
}
function getThumbnailsDisplay(){
$thumbnails = $this->getThumbnails();
$result = "";
for($i = 0; $i < count($thumbnails); $i++){
$index = $i+1;
$thumb = $thumbnails[$i];
list($width, $height) = getimagesize($thumb);
$result .= "<span><a href=\"gallerydetail001.php?id=$index\" title=\"View Photo $index\"><img src=\"$thumb\" width=\"$width\" height=\"$height\" alt=\"Thumbnail $index\" /></a></span>";
}
return $result;
}
}

?>






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users