Looking for a script [PHP]

SpaceshipSpaceship
SpaceshipSpaceship
Namecheap AuctionsNamecheap Auctions
Watch

Cooper

Established Member
Impact
2
Okay, I’m looking for a simple gallery script.
I need it to make auto thumbs, and when clicked opens full size in a new window. It also has to be easy to update (EG: Just upload a picture into the directory) Also, i want it to be simply included into a webpage.
I've looked at HotScrips but couldn't find anything and I’ve also tried Google =p

Any recommendations?
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Last edited:
0
Close
Yeah thanks, that'd be great
 
0
Close
0
Close
Thanks so much. Is it okay if i edit the script a little bit?
 
0
Close
0
Close
Amnezia said:
how does your script create thumbnails??
Dang, It dont. Sorry PoorDoggie, cant use it. Thanks anyway :)
 
0
Close
Cooper said:
Dang, It dont. Sorry PoorDoggie, cant use it. Thanks anyway :)


i have one you can use it has an upload function and a thumbnail creator but it requires an sql database to keep track of the images uploaded
 
0
Close
That would be great. Thanks
 
0
Close
Cooper said:
That would be great. Thanks

i can't let it go for free, it took quite a few hours to make.

make me an offer, if its reasonalbe, il create you an install script and help you set it up.
 
0
Close
:(
*Has no Money*

Nevermind, thanks for the offer anyway
 
0
Close
0
Close
I could make it do the thumbnail thing, but I don't know how it would have to do it. How can I make a thumbnail of an image in php?

By the way - it is free to use, edit, and pass on as you please! :)
 
0
Close
I'd assume it has something to do with the gd_image library.
 
0
Close
0
Close
0
Close
PoorDoggie said:
I could make it do the thumbnail thing, but I don't know how it would have to do it. How can I make a thumbnail of an image in php?

By the way - it is free to use, edit, and pass on as you please! :)


PHP:
<?

function make_thumb($imageName){

	$imagePath = '../site_images/gallery/';
	$imageURL = $imagePath.$imageName;
	$thumbPath = '../site_images/gallery/thumbs/';
	$thumbName = 'tn_'.$imageName;
	$thumbURL = $thumbPath.$thumbName;
	$maxXY = 140;
	
	//read source file
	$sourceImage = imagecreatefromjpeg($imageURL);
	$sourceWidth = imagesx($sourceImage);
	$sourceHeight = imagesy($sourceImage);
	
	//determine dimensions
	if ($sourceWidth<$sourceHeight){
		$ratio = $sourceHeight/$maxXY;
		$thumbHeight=$maxXY;
		$thumbWidth = $sourceWidth/$ratio;
	}
	
	elseif ($sourceWidth>$sourceHeight){
		$ratio = $sourceWidth/$maxXY;
		$thumbWidth=$maxXY;
		$thumbHeight = $sourceHeight/$ratio;
	}
	
	elseif (($sourceWidth<$maxXY)&&(sourceHeight<$maxXY)){
        $thumbWidth=$sourceWidth;
		$thumbHeight =$sourceHeight;
    }

	else{ 
		$thumbWidth=$thumbHeight=$maxXY;
	}

	//create blank thumb
	$targetImage = imagecreatetruecolor($thumbWidth,$thumbHeight);

	//copy resized image into thumb
	imagecopyresampled($targetImage,$sourceImage,0,0,0,0,$thumbWidth,
	$thumbHeight,$sourceWidth,$sourceHeight);
	imagejpeg($targetImage, $thumbURL);

	return $thumbName;
}

?>

Im feeling generous today so here is a script i wrote to create thumbnails of jpgs. It should be pretty much self explanitory to those with a basic knowledge of php. Anyone may use it. If you can afford it a donation of a few nps would be welcomed.
 
0
Close
Appraise.net

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back