Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New Coder
    Join Date
    Mar 2005
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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?

  • #2
    Regular Coder Crake's Avatar
    Join Date
    Dec 2004
    Location
    Loose, Maidstone, KENT
    Posts
    577
    Thanks
    0
    Thanked 3 Times in 3 Posts
    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

  • #3
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,802
    Thanks
    19
    Thanked 157 Times in 148 Posts
    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 and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!

  • #4
    New Coder
    Join Date
    Mar 2005
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #5
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,802
    Thanks
    19
    Thanked 157 Times in 148 Posts
    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 and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!

  • #6
    New Coder
    Join Date
    Mar 2005
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts
    bumpity bumpity

  • #7
    New to the CF scene
    Join Date
    Jun 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #8
    New Coder
    Join Date
    Mar 2005
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Exactly what I needed! Thanks for the help!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •