Go back to previous page
Forum URL: http://www.usanetcreations.com/cgi-bin/dcforum/dcboard.cgi
Forum Name: MakeBid Auction users addons and fixes
Topic ID: 75
Message ID: 4
#4, RE: Need Image Magick Help!
Posted by Jayzfury on Jul-04-02 at 04:09 AM
In response to message #3
Hello all,
This may help.. Hopefully you have ImageMagick on the server that you are hosted on. It won't work if not...

Follow the instructions from the text below... Good luck!
##############################################
Imagemagick software must be installed on your server or this won't work.
BACKUP ALL AUCTION FILES BEFORE YOU START!!

1. Open Auction.pl:
Add this line below to the other use commands at top:
use Image::Magick;

2. Goto sub procnew and find this line:
if ($form{'UPIMAGE1'} ne "") {
&File::Copy::move ("$config{'imagebase'}/temp/$form{'UPIMAGE1'}", "$config{'imagebase'}/$form{'UPIMAGE1'}") or oops ("Please notify the site admin that the image cannot be copied from the temp dir to the photo dir.");

3. Add these lines below it:
if ($form{'GALLERY'} eq "Yes" ) {
my ($q, $x);
$q= Image::Magick->new;
$x= $q->Read("$config{'imagebase'}/$form{'UPIMAGE1'}");
warn "$x" if "$x";
$x = $q->Resize(geometry=>'80x80');
warn "$x" if "$x";
$x=$q->Write("$config{'imagebase'}/$form{'UPIMAGE1'}t");
}

4. In the gallery area of auction.pl find the line:
my $timeremain = time_remain($file);
Below it add this line:
my $t = "t";

6. Edit the next line from:
my $imagedisp = "<IMG SRC=$image1 BORDER=\"0\" WIDTH=\"75\">";
To:
my $imagedisp = "<IMG SRC=$image1$t BORDER=\"0\" WIDTH=\"75\">";

7. Save the auction.pl file.

8. Now Open gallery sections in the dispallgallery.pl & dispcat7.pl, if you use dispcat7.
(the gallery disp files)

9. In the gallery area of these files find the line:
my $timeremain = time_remain($file);
Below it add this line:
my $t = "t";

10. Edit the next line from:
my $imagedisp = "<IMG SRC=$image1 BORDER=\"0\" WIDTH=\"75\">";
To:
my $imagedisp = "<IMG SRC=$image1$t BORDER=\"0\" WIDTH=\"75\">";

11. Save the gallery files.
Finally you upload both files and hopefully everything works.
Extra Note: It will not convert your current featured gallery to thumbs but will make thumbs for auctions posted after the editing.
##############################################
This will not make thumbnails for images if they are hosted somewhere else, only the uploaded images will make thumbs.
See http://specialengines.com/auction for a working example. We could definetly use the traffic!

Check with www.powweb.com, they have ImageMagick on their server. Rates are $7.77 per mo. for 200 meg and your own control panel. If you host there, let them know Jayzfury at SpecialEngines.com recommended you. I get a free month if you sign up. Thanks..
Jayzfury
jay@specialengines.com
at
http://specialengines.com