GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Playing with PHP, maybe some help. (https://gfy.com/showthread.php?t=133123)

Validus 05-11-2003 11:57 PM

Playing with PHP, maybe some help.
 
I am just playing around with some PHP script I found. Already modified it a little but this part I am just not happy with.

PHP Code:

$output .= "<a href=\"hahahahahahahahahaha:windowHandle = window.open('".$target."','".md5($target.time())."','width=".($size[0]+20).",height=".($size[1]+25).",location=no,resizable=no'); windowHandle.focus();\"><img src=\"thumb$jpegs[$picnum]\" border=\"0\" alt=\"Click to view $jpegs[$picnum]\"></a>"

I would like it to open in a new window, as it does now but load the full sized picture within a HTML page, so I can change background color and such things.

Any ideas? I am not a programmer so for me it is just click and type and play and fail? sometimes it works.. but sometimes it doesn?t

BJ 05-11-2003 11:57 PM

lets all eat ham?

michaelw 05-12-2003 12:02 AM

whats $target

Alky 05-12-2003 12:02 AM

im confused, what is it not doing?

Validus 05-12-2003 12:03 AM

Quote:

Originally posted by michaelw
whats $target
It is the path to the picture I believe... well the file name of the picture :-)

Validus 05-12-2003 12:05 AM

Quote:

Originally posted by Alky
im confused, what is it not doing?
Well it just opens in a new window, but I got almost no control over that window. No background color and such and I can?t add any other small things.

michaelw 05-12-2003 12:08 AM

$target is the page youre opening..

my suggestion would be to change $target to point to a php page, right now its opening up just the picture..

make it open something like
$target = "page.php?image=thumb$jpegs[$picnum]"

then make a new php script page.php, and make it show whatever image was passed - ie
PHP Code:

echo "<img src=\"$image\" border=\"0\">"


Alky 05-12-2003 12:08 AM

Quote:

Originally posted by Validus


Well it just opens in a new window, but I got almost no control over that window. No background color and such and I can?t add any other small things.

all of the colors of that window are controlled in the html of the page in your $target variable.

Validus 05-12-2003 12:11 AM

Quote:

Originally posted by Alky
all of the colors of that window are controlled in the html of the page in your $target variable.
Hmm.. look at the code again, then you know what I mean. If there is a way to control the window.. let me know what tags to use.. thanks.

Validus 05-12-2003 12:11 AM

Quote:

Originally posted by michaelw
$target is the page youre opening..

my suggestion would be to change $target to point to a php page, right now its opening up just the picture..

make it open something like
$target = "page.php?image=thumb$jpegs[$picnum]"

then make a new php script page.php, and make it show whatever image was passed - ie
PHP Code:

echo "<img src=\"$image\" border=\"0\">"


ahhh.. nice.. ok.. let me try... thank you!

michaelw 05-12-2003 12:13 AM

theres no real way to control it with tags.. youre going to have to do some hefty dhtml work to get it to work the way you want it to, and that wont even work properly with other browsers

right now, youre opening up the image itself.. you cant change the background if u open an image in a new window.

you have to point it to a php page, and pass a variable to tell the php script what image to load. in that php script, u can change all the backgound and other goodness

Validus 05-12-2003 12:15 AM

Hm, ok. I am still confused about it.

on how to implement that code...

Here is more of my script...


PHP Code:


$size 
getimagesize($jpegs[$picnum]);
$target str_replace('%picname%'$jpegs[$picnum], $linkurl);
$output .= "<a href=\"hahahahahahahahahaha:windowHandle = window.open('".$target."','".md5($target.time())."','width=".($size[0]+20).",height=".($size[1]+25).",location=no,resizable=no'); windowHandle.focus();\"><img src=\"thumb$jpegs[$picnum]\" border=\"0\" alt=\"Click to view $jpegs[$picnum]\"></a>"


Alky 05-12-2003 12:18 AM

Quote:

Originally posted by Validus
Hm, ok. I am still confused about it.
this way:
PHP Code:


$size 
getimagesize($jpegs[$picnum]);
$target str_replace('%picname%'$jpegs[$picnum], $linkurl);
$output .= "<a href=\"hahahahahahahahahaha:windowHandle = window.open('".$target."','".md5($target.time())."','width=".($size[0]+20).",height=".($size[1]+25).",location=no,resizable=no'); windowHandle.focus();\"><img src=\"thumb$jpegs[$picnum]\" border=\"0\" alt=\"Click to view $jpegs[$picnum]\"></a>";
echo 
$output


Validus 05-12-2003 12:30 AM

Quote:

Originally posted by Alky

this way:
PHP Code:


$size 
getimagesize($jpegs[$picnum]);
$target str_replace('%picname%'$jpegs[$picnum], $linkurl);
$output .= "<a href=\"hahahahahahahahahaha:windowHandle = window.open('".$target."','".md5($target.time())."','width=".($size[0]+20).",height=".($size[1]+25).",location=no,resizable=no'); windowHandle.focus();\"><img src=\"thumb$jpegs[$picnum]\" border=\"0\" alt=\"Click to view $jpegs[$picnum]\"></a>";
echo 
$output


Now I am really list, don't know if its just because I can't see how that code is different.. or cause I missed something.

Validus 05-12-2003 12:46 AM

all working... super thanks again... :-)

Alky 05-12-2003 12:48 AM

uh huh..

Dragon Curve 05-19-2003 07:43 AM

Some hahahahahahahahahaha here would enable you to modify the background of the opened window. *sigh*

dimonka 05-19-2003 08:14 AM

Can't catch the point of the problem...try reading manual for GetImageSize function...


All times are GMT -7. The time now is 11:50 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123