...

View Full Version : Opening images in a new HTML Page



jseek
08-02-2010, 08:55 AM
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-launches-new-deo-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)

abduraooft
08-02-2010, 09:02 AM
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

<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>

djh101
08-02-2010, 09:55 AM
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.

jseek
08-02-2010, 02:26 PM
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..




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. :confused:

djh101
08-02-2010, 08:10 PM
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:


<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.

Major Payne
08-03-2010, 07:34 PM
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>

jseek
08-04-2010, 08:36 AM
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 :D I only have ideas of doing this but don't know how to implement it..


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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum