Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 05-11-2003, 11:57 PM   #1
Validus
Confirmed User
 
Industry Role:
Join Date: Jul 2001
Location: Calgary, Canada
Posts: 4,012
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
Validus is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-11-2003, 11:57 PM   #2
BJ
Confirmed User
 
BJ's Avatar
 
Join Date: Mar 2002
Location: asia
Posts: 5,590
lets all eat ham?
BJ is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-12-2003, 12:02 AM   #3
michaelw
Confirmed User
 
Join Date: May 2002
Location: Calgary, Canada
Posts: 1,342
whats $target
__________________
<b><a href="http://www.hotlinkprotector.com"><font color="yellow">Hotlink Protector</font></a> - Protect all your file types from hotlinking the professional way. <br>
See a demo <a href="http://www.hotlinkprotector.com/demo.html"><font color="yellow">here</font></a>, and testimonials <a href="http://www.hotlinkprotector.com/testimonials.html"><font color="yellow">here</font></a><br>ICQ: 146423631
michaelw is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-12-2003, 12:02 AM   #4
Alky
Confirmed User
 
Alky's Avatar
 
Join Date: Apr 2002
Location: Houston
Posts: 5,651
im confused, what is it not doing?
Alky is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-12-2003, 12:03 AM   #5
Validus
Confirmed User
 
Industry Role:
Join Date: Jul 2001
Location: Calgary, Canada
Posts: 4,012
Quote:
Originally posted by michaelw
whats $target
It is the path to the picture I believe... well the file name of the picture :-)
Validus is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-12-2003, 12:05 AM   #6
Validus
Confirmed User
 
Industry Role:
Join Date: Jul 2001
Location: Calgary, Canada
Posts: 4,012
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.
Validus is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-12-2003, 12:08 AM   #7
michaelw
Confirmed User
 
Join Date: May 2002
Location: Calgary, Canada
Posts: 1,342
$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\">"
__________________
<b><a href="http://www.hotlinkprotector.com"><font color="yellow">Hotlink Protector</font></a> - Protect all your file types from hotlinking the professional way. <br>
See a demo <a href="http://www.hotlinkprotector.com/demo.html"><font color="yellow">here</font></a>, and testimonials <a href="http://www.hotlinkprotector.com/testimonials.html"><font color="yellow">here</font></a><br>ICQ: 146423631
michaelw is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-12-2003, 12:08 AM   #8
Alky
Confirmed User
 
Alky's Avatar
 
Join Date: Apr 2002
Location: Houston
Posts: 5,651
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.
Alky is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-12-2003, 12:11 AM   #9
Validus
Confirmed User
 
Industry Role:
Join Date: Jul 2001
Location: Calgary, Canada
Posts: 4,012
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 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-12-2003, 12:11 AM   #10
Validus
Confirmed User
 
Industry Role:
Join Date: Jul 2001
Location: Calgary, Canada
Posts: 4,012
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!
Validus is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-12-2003, 12:13 AM   #11
michaelw
Confirmed User
 
Join Date: May 2002
Location: Calgary, Canada
Posts: 1,342
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
__________________
<b><a href="http://www.hotlinkprotector.com"><font color="yellow">Hotlink Protector</font></a> - Protect all your file types from hotlinking the professional way. <br>
See a demo <a href="http://www.hotlinkprotector.com/demo.html"><font color="yellow">here</font></a>, and testimonials <a href="http://www.hotlinkprotector.com/testimonials.html"><font color="yellow">here</font></a><br>ICQ: 146423631
michaelw is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-12-2003, 12:15 AM   #12
Validus
Confirmed User
 
Industry Role:
Join Date: Jul 2001
Location: Calgary, Canada
Posts: 4,012
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>"
Validus is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-12-2003, 12:18 AM   #13
Alky
Confirmed User
 
Alky's Avatar
 
Join Date: Apr 2002
Location: Houston
Posts: 5,651
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

Last edited by Alky; 05-12-2003 at 12:20 AM..
Alky is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-12-2003, 12:30 AM   #14
Validus
Confirmed User
 
Industry Role:
Join Date: Jul 2001
Location: Calgary, Canada
Posts: 4,012
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 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-12-2003, 12:46 AM   #15
Validus
Confirmed User
 
Industry Role:
Join Date: Jul 2001
Location: Calgary, Canada
Posts: 4,012
all working... super thanks again... :-)
Validus is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-12-2003, 12:48 AM   #16
Alky
Confirmed User
 
Alky's Avatar
 
Join Date: Apr 2002
Location: Houston
Posts: 5,651
uh huh..
Alky is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-19-2003, 07:43 AM   #17
Dragon Curve
Confirmed User
 
Join Date: Oct 2002
Posts: 252
Some hahahahahahahahahaha here would enable you to modify the background of the opened window. *sigh*
Dragon Curve is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-19-2003, 08:14 AM   #18
dimonka
Confirmed User
 
Join Date: Oct 2002
Posts: 477
Can't catch the point of the problem...try reading manual for GetImageSize function...
__________________

Find out what REBILLS are!
dimonka is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.