This topic is locked

thumbnail for see details

11/1/2005 2:57:50 AM
PHPRunner General questions
samsp author

Hi every body.

first at all i like to say is: this is a very good programm with a lot of potential.
now my question: i have for exampel a list of artikels and on the beginning of the line there is a thumbnail 67x50. how can i make this klickable instead of the "view" button for see the details.
thanks from sunny spain
samsp

500365 11/2/2005

hello,
is there no answer?? no suggestion? no hints?

admin 11/2/2005

Hi,
this can be done with a small modifications of generated ..._list.php file.

However the modifications strongly depend on your table structure and layout.
Please show me your table creation script.

You may post it here or send it to support@xlinesoft.com

Also please tell me what key fields do you use and what field you use to show thumbnails.

samsp author 11/3/2005

i have found out the following solution between the lines 842 to 871 in the ..._list.php:
// show thumbnail

$thumbname=$data["img1"];

$lasti = strrpos($thumbname,".");

if(!($lasti===false))

$thumbname=substr($thumbname,0,$lasti);

$thumbname.=".gif";

$thumbname=$thumbnail_prefixes["img1"].$thumbname;

if(file_exists(GetUploadFolder("img1").$thumbname))

{

echo "<a target=_blank href=\"".htmlspecialchars(AddLinkPrefix("img1",$data["img1"]))."\"><img width=67 height=50 border=0 src=\"".htmlspecialchars(AddLinkPrefix("img1",$thumbname))."\"></a>";

$thumbnailed=true;

}

}

if(!$thumbnailed)

{ ?>

<a href="casas_view.php"

onClick="java script:

document.forms.viewform.editid.value = '<?php echo db_addslashes($data[$strKeyField]);?>';

<?php if($strKeyField2) { ?>

document.forms.viewform.editid2.value = '<?php echo db_addslashes($data[$strKeyField2]);?>';

<?php } ?>

<?php if($strKeyField3) { ?>

document.forms.viewform.editid3.value = '<?php echo db_addslashes($data[$strKeyField3]);?>';

<?php } ?>

document.forms.viewform.submit();

return false;"><img width=67 height=50 border=0 src="<?php echo htmlspecialchars(AddLinkPrefix("img1",$data["img1"]));?>"></a>

<?php }

}

?>

</td>
greetings
sam