Zubrag.com
January 16, 2018, 11:16:02 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Add thumbnail generator to random ad display  (Read 7986 times)
zubrag
Administrator
Hero Member
*****
Posts: 785


WWW
« on: April 04, 2007, 05:04:44 AM »

Moved from Thumbnail Generator comments.

Hello,
learning to create my own classified ad. see the following function to display
images, images are located(/images). how do i add your script to work in the
folowing function:

function random_ad_display($feature_result)
{   echo "<table width='500' align='center' border='0' cellspacing='0'
cellpadding='0'>";
    echo "<tr>";
    $i = 0;
    while($row1 = mysql_fetch_array($feature_result))
    {   if ($i == 2)
        {  echo "</tr>";
           echo "<tr>";
           $image1 = $row1["cf_images"];
           echo "<td width='250' height='120'> <div align='center'>
<p align='center'><IMG SRC='images/" . $image1 .
"'width='150' height='120' /></p> <p>description and
ad number</p></td>";
           $i = 0;
        }
        else
        {  $image2 = $row1["cf_images"];
           echo "<td width='250' height='120'> <div align='center'>
<p align='center'><IMG SRC='images/". $image2 . "'
width='150' height='120' /> </p> <p> test description 2
testing one two three four five </p></td>"; }
        $i++;
    }
    echo "</tr>";
    echo "</table>";
}

any help you can give me would be greatly appreciated.
thank you

Logged
zubrag
Administrator
Hero Member
*****
Posts: 785


WWW
« Reply #1 on: April 04, 2007, 05:19:21 AM »

Looks like you have to change this code
<IMG SRC='images/" . $image1 . "' width='150' height='120' />

to this
<IMG SRC='thumb.php?src=images/" . $image1 . "&x=50&y=50&f=0' />

Remember to put thumb.php one folder above images/ folder.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC