this is how i currently have it set up...
query:
Code: Select all
$query = " SELECT * FROM images ";
$result = mysql_query($query);
while ($row = mysql_fetch_array($result))
{
$popheight = $row["iheight"]+'16';
$popwidth = $row["iwidth"]+'16';
$wintitle = $row["name"];Code: Select all
$body = preg_replace("|\[image=[\"\']?(.+?)[\"\']?\](.+?)\[/image\]|i","<a href=\"javascript:;\" onClick=\"image(\'/idisplay.php?name=$1\',\'$wintitle\',\'scrollbars=no,toolbar=yes,status=yes,resizable=yes,left=100,top=100,width=$popwidth,height=$popheight\')\">$2</a>",$body);I also tried putting a javascript in the idisplay.php to resize the window to the iheight and iwidth dimensions, but that didn't give me the correct window size.
basically my question is: how can i select the correct image dimensions for the appropriate images while maintaining the proper regex code?
i confuse myself just trying to put this in the right words, but if you have a solution for me please help.
here's the website i'm working on...
http://www.skateaz.com