| 11:19 am on Nov 9, 2002 (gmt 0)|
Hi Asoza, welcome to WebmasterWorld ;)
I have no idea I'm afraid, but in case you've not seen it look at the last few msg's in This thread [webmasterworld.com]
Possibly you could adapt it to do something similar on you pages? Good luck!
| 2:26 pm on Nov 9, 2002 (gmt 0)|
|clicking on disc.jpg will show the disc.jpg in a new browser window with its original size. and not a disc.html |
You need to have your pop-up window load an HTML document that contains the disc.jpg, instead of just loading the jpg on its own. Then you can apply CSS to that HTML document.
| 2:36 pm on Nov 9, 2002 (gmt 0)|
Useing PHP all you need is a single picture viewing page that gets vars from a query string to know what pic to display.
Then you make the gallery links look something like this:
And on pic_show.php you would have:
<img src="<? echo $pic ?>.jpg">
You can format pic_show.php any way you want!
| 8:30 pm on Nov 9, 2002 (gmt 0)|
thank you for the welcome. :)
the php would work nicely. i will set one up right now.
however, do you know any good tutorials that will offer the basic about php? i know what php is and how it works. but i have never actually wrote one myself. but thank you for the help. at least i know it is possible :)
| 9:24 pm on Nov 9, 2002 (gmt 0)|
Undoutably the best source is he PHP maual at php.net
Don't be put off by the term 'manual' it's one of the most user friendly and easy resources on the net.
| 3:16 am on Nov 10, 2002 (gmt 0)|
What you want to do is really strait forward, your gallery page does not need to be PHP, only the picture viewing page.
So, as long as your pic links contain the query like above post and your picture viewing page has the extension of .php and contains this code:
<img src="<? echo $pic ?>.jpg">
you are all set.
You can also set the alt dynamicaly by doing the following
<img src="<? echo $pic ?>.jpg" alt="<? echo $alt ?>">
The query would look like this:
| 3:45 am on Nov 10, 2002 (gmt 0)|
Some places prefer that the code start <?php rather than just <?
No change to the end code... The line posted above, plus the basic html open/close tags and the link to the stylesheet should be about all that you need.
| 3:05 pm on Nov 10, 2002 (gmt 0)|
thank you for the replay. i am relatively stupid. could you give me an example? let say an image name called disc.jpg
where should i put it in the php tag?
<a href="pic_show.php?pic=3"> or
thank you for all the help once again :)
| 8:47 pm on Nov 10, 2002 (gmt 0)|
With the example dhdweb gave, you would need to use
if the image is 'disc.jpg'. The numbers probably stem from the fact that it is not uncommon to use a directory full of images with names like '1.jpg', '2.jpg', '3.jpg' and so on. How you name your files is up to you. Do something that makes sense to you.
<added> In addition to the assumption about short tags that has already been mentioned, dhdweb's code assumes that PHPs 'register globals' option is on. This isn't guaranteed, either, but it's easy to deal with if 'register_globals' is off. just add
<?php $pic = $_GET['pic'];?>
<?php $pic = $HTTP_GET_VARS['pic']'?>
somewhere earlier in the file than the line dhdweb gave you. The first line is best if it works, because in newer versions of PHP the second line is deprecated, and in future versions it may cease to work at all. On the other hand, older versions of PHP don't support the first line I provided.
| 10:59 pm on Nov 10, 2002 (gmt 0)|
Just a side note:
My code also assumes that all the picture files are .jpg
| 12:02 am on Nov 11, 2002 (gmt 0)|
you guys are the best! :) it works like a charm now. i will edit the CSS and make it looks nice then i will post up the link for you to check it out. where should i put the credits? :)
| 12:08 am on Nov 11, 2002 (gmt 0)|
I'm sure we all appreciate the sentiment, but you should probably skip the link. It's a violation of the TOS, so it'll just get snipped out anyway.
| 2:39 am on Nov 12, 2002 (gmt 0)|
You're welcome :)
<edit reason>can't type</edit>