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 7 of 7
  1. #1
    New to the CF scene
    Join Date
    Aug 2010
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Opening images in a new HTML Page

    Hi

    I want to open my images in a new page where i can place my website logo, advertising code and other text.

    Example
    http://www.bollyone.com/john-abraham...o-from-garnier

    In the above link when you click on any small thumbnail image then you will be redirected to a new page where you can see full size images with advertisements and other codes.

    I want to do something similar so please help me.

    (sorry for my bad english)
    Last edited by jseek; 08-04-2010 at 08:39 AM.

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,861
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    I want to open my images in a new page where i can place my website logo, advertising code and other text.
    Make use of firebug in Firefox. It'll show you the markup used by them by inspecting the elements. For example, in the given site, all images are enclosed by anchor tags like
    Code:
    <a href="http://www.bollyone.com/john-abraham-launches-new-deo-from-garnier/john-garnier-8"><img width="120" height="180" src="http://www.bollyone.com/wp-content/uploads/2010/04/John-Garnier-8-120x180.jpg"></a>
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    Regular Coder djh101's Avatar
    Join Date
    May 2009
    Location
    California
    Posts
    616
    Thanks
    48
    Thanked 65 Times in 65 Posts
    Just a new HTML page or something like Wikipedia or Photobucket where you can open click on an image to open the image file (.jpg, .gif, .png) that will have the site's basic design around the image, rather than just the image? A new HTML page is simple, all you need is a link to the page with the image inside it:
    <a href="imagepage.html" target="_blank"><img src="myimage.jpg" /></a>

    As for the page, just take your normal page and throw the image in wherever you want. If you plan on doing this with a lot of images, though, you may want to use, say, PHP and build yourself a remote layout to nest your images.

  • #4
    New to the CF scene
    Join Date
    Aug 2010
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by abduraooft View Post
    Make use of firebug in Firefox. It'll show you the markup used by them by inspecting the elements. For example, in the given site, all images are enclosed by anchor tags like
    I am using firebug but i dont know which code i have to steal from his website..

    Quote Originally Posted by djh101 View Post

    As for the page, just take your normal page and throw the image in wherever you want. If you plan on doing this with a lot of images, though, you may want to use, say, PHP and build yourself a remote layout to nest your images.
    I want to display full size images in my own customized page. My main aim is to show advertisements and other content along with the full size image.

    I am placing .html links instead of .jpg. It is working but i dont know this is the correct way to show images because i am working on a gallery site with lots of images.

    I dont know about php programming.

  • #5
    Regular Coder djh101's Avatar
    Join Date
    May 2009
    Location
    California
    Posts
    616
    Thanks
    48
    Thanked 65 Times in 65 Posts
    If you're working with HTML, that's all you really have to do- make your layout and then place the image where you want it. Using PHP (or another dynamic language) isn't necessary, but it allows for the use of including remote files, similar to the way you can include a remote CSS file. You actually don't even have to know PHP (or ASP or Ruby or Perl- lol, sounds like a Pokemon Game), all you need is a web host that supports the language you choose (most support ASP or PHP, although you have to choose between the two). When I first started using PHP in my files, the only command I used was the include command:
    PHP Code:
    <html>
    <head>
    <title>My Site</title>
    <link href="styles.css" type="text/css" rel="stylesheet">
    </head>
    <?php
    include('navbar.php') ;/*Your navigation bar code is contained in a file called navbar.php.
    This will take all the code in that file and place it on here, as if you copy and pasted it. */
    ?>
    <body>
    <p>This is a paragraph on your site, just an example of some content in your body.</p>
    <?php include('footer.html'); //You don't just have to include PHP files. Right now we are including an html file in our page.
    ?>
    </body>
    </html>
    So all you really need to remember is:
    1. All code written in PHP must be contained within <?php and ?> tags. HTML goes outside of these tags.
    2. Files that contain PHP code must be saved as .php. PHP is a server side language, though, so after the PHP code is processed by the server your page will be displayed just as if it was all written in HTML.
    "Yeah science!"
    Online Science Tools

  • Users who have thanked djh101 for this post:

    jseek (08-04-2010)

  • #6
    Regular Coder
    Join Date
    Aug 2005
    Location
    MS
    Posts
    837
    Thanks
    10
    Thanked 79 Times in 77 Posts
    They are basically using target="_blank" in all those links which is incorrectly used for that document type. Just because it works doesn't mean it is correct syntax. Theirs:

    <a href="http://del.icio.us/post?url=http://www.bollyone.com/john-abraham-launches-new-deo-from-garnier&title=John Abraham launches new deo from Garnier" title="Bookmark at Delicious" rel="nofollow" target="_blank"><img src="http://www.bollyone.com/wp-content/themes/convergence/images/ico-soc1.gif" alt="Icon" /></a>
    ☠ ☠RON☠ ☠

  • #7
    New to the CF scene
    Join Date
    Aug 2010
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by djh101 View Post
    So all you really need to remember is:
    1. All code written in PHP must be contained within <?php and ?> tags. HTML goes outside of these tags.
    2. Files that contain PHP code must be saved as .php. PHP is a server side language, though, so after the PHP code is processed by the server your page will be displayed just as if it was all written in HTML.
    Its still out of my mind I only have ideas of doing this but don't know how to implement it..

    Quote Originally Posted by Major Payne View Post
    They are basically using target="_blank" in all those links which is incorrectly used for that document type. Just because it works doesn't mean it is correct syntax. Theirs:
    Target=_blank will open that image in a new blank page but there are ads on that page. I have installed wordpress on my server to check if i can set a preview page but still no luck..

    I think i must buy a coder before my hosting period expires.


  •  

    Posting Permissions

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