Trying to mod amazon.com block

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Trying to mod amazon.com block
Mojoski
CZ Newbie
Mojoski has been a member for over 19 year's 19 Year Member
Status: Offline
Joined: Aug 29, 2004
0.00 posts per day
Posts: 1
Points: 130
   
I have a big batch of pics on my webspace that I have thumbnail duplicates of. What I'm trying to do is alter the amazon.com block so that it shows a file with a thumb_ prefix on the page, and links to a file of the same name that hasn't got the prefix.

I'm pretty darn new to PhP but there has got to be a way. The syntax for a random file starting in thumb_ should be easy enough to find, but the problem is how do I make it so that it links to that files bigger image

mt_srand((double)microtime()*1000000);
$imgs = dir('copper/albums/userpics/');
while ($file = $imgs->read()) {
if (eregi("gif", $file) || eregi("jpg", $file)) {
$imglist .= "$file ";
}
}
closedir($imgs->handle);
$imglist = explode(" ", $imglist);
$a = sizeof($imglist)-2;
$random = mt_rand(0, $a);
$image = $imglist[$random];
$asin = explode(".", $image);
$content = "
<center><a href=\"copper/albums/userpics/$image\" target=\"_blank\">";
$content .= "\"\"

</center>";

?>

That is the (slightly altered) stuff for the Amazon block.

Any kind of help would be very much apreciated.



Back to top Reply with quote
#2   
trusted-host
CZ Super Newbie
trusted-host has been a member for over 19 year's 19 Year Member
canada.gif
Occupation: Self Employeed
Age: 37
Gender: Male
Fav. Sports Team: Toronto Maple Leafs
Website:
Status: Offline
Joined: Sep 06, 2004
0.01 posts per day
Posts: 49
Points: 2,410
   
Hello

Not sure if this is what your trying to do, but modify the following lines

find:

$imgs = dir('copper/albums/userpics/');


and change it to your own image directory you want it to be directed to.

and just find:

<center><a href=\"copper/albums/userpics/$image\" target=\"_blank\">";


and delete it, unless you want it to stay there, but direct it to a different directory. If it gives you a error, let me know the nuke version your using, then directory for both files, and ill modify it for yea.

Trusted-Host


Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum