Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-05-2005, 05:55 PM   PM User | #1
SCSS
New Coder

 
Join Date: Mar 2005
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
SCSS is an unknown quantity at this point
Generate page by image

I need a php script, something along the lines of images/image.php?page=whatever.jpg where clicking on a link to whatever.jpg would pop up a page with a black background and the image in the link centered. this way i dont have to make a separate page for each image. you know what i mean?
SCSS is offline   Reply With Quote
Old 06-05-2005, 05:59 PM   PM User | #2
Crake
Regular Coder

 
Crake's Avatar
 
Join Date: Dec 2004
Location: Loose, Maidstone, KENT
Posts: 577
Thanks: 0
Thanked 3 Times in 3 Posts
Crake is an unknown quantity at this point
i think you need to make a image for each page and then when clicking on the image it opens a javascript window

i have need come along a script wich does what your looking

hope you find what your looking for if you do find a script please let me knoW!
__________________
SteveO
Crake is offline   Reply With Quote
Old 06-05-2005, 06:05 PM   PM User | #3
chump2877
Senior Coder

 
chump2877's Avatar
 
Join Date: Dec 2004
Location: the U.S. of freakin' A.
Posts: 2,549
Thanks: 15
Thanked 131 Times in 124 Posts
chump2877 is on a distinguished road
I think I sort of know what you mean...maybe this would be better served with a little javascript? I'm no expert at javascript, but something like this:

Code:
<a href="picture.jpg" target="new" onClick='window.open("picture.jpg","","width=500px,height=500px,resizable=yes,scrollbars=yes"); return false;'>View this picture.</a>
would that work, dunno....
__________________
Regards, R.J.

---------------------------------------------------------

Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :)
[Related videos and tutorials are also available at my YouTube channel]
chump2877 is offline   Reply With Quote
Old 06-05-2005, 06:37 PM   PM User | #4
SCSS
New Coder

 
Join Date: Mar 2005
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
SCSS is an unknown quantity at this point
That should work, but I'm looking to put the pics on a black bg to match the rest of the site, but if I cant find anything else or if no one else can help me, I'll probably use that
SCSS is offline   Reply With Quote
Old 06-05-2005, 06:58 PM   PM User | #5
chump2877
Senior Coder

 
chump2877's Avatar
 
Join Date: Dec 2004
Location: the U.S. of freakin' A.
Posts: 2,549
Thanks: 15
Thanked 131 Times in 124 Posts
chump2877 is on a distinguished road
I would bet that there is a way to make a black background using some more javascript, but I don;t know how to do it....let me know if you find out..
__________________
Regards, R.J.

---------------------------------------------------------

Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :)
[Related videos and tutorials are also available at my YouTube channel]
chump2877 is offline   Reply With Quote
Old 06-06-2005, 04:04 AM   PM User | #6
SCSS
New Coder

 
Join Date: Mar 2005
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
SCSS is an unknown quantity at this point
bumpity bumpity
SCSS is offline   Reply With Quote
Old 06-06-2005, 07:05 PM   PM User | #7
goaltender
New to the CF scene

 
Join Date: Jun 2005
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
goaltender is an unknown quantity at this point
Howdy,
this should work for you. Here is the PHP page (called image.php):

PHP Code:
<?php
$output 
'<html><head></head><body bgcolor="#000000">';
$output.= '<div align="center"><img src="'.$_GET['filename'].'"></div>';
$output.= '</body></html>';

echo 
$output;
 
?>
and the link that opens the pic:

<a href="image.php?filename=MYFILE.JPG" target="_blank">View this picture.</a>

Replace MYFILE.JPG with the path & name of the image, e.g. pic001.jpg or images/PIC-002.JPG

cheers, hope this helps!
__________________
// km
If you don't believe that ninjas have REAL Ultimate Power you better get a life right now or they will chop your head off!!! It's an easy choice, if you ask me.
goaltender is offline   Reply With Quote
Old 06-06-2005, 10:39 PM   PM User | #8
SCSS
New Coder

 
Join Date: Mar 2005
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
SCSS is an unknown quantity at this point
Exactly what I needed! Thanks for the help!
SCSS is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:12 AM.


Advertisement
Log in to turn off these ads.