Portfolio Question

Moderators: Moderator, Global Moderator

Post Reply
us3rX
Hero Member
Hero Member
Posts: 1194
Joined: Thu May 06, 2004 6:11 am

Portfolio Question

Post by us3rX »

[url=\"http://us3rX.killagraphix.com/portfolio/\"]Click Me <img src=\'http://www.killanet.net/forum3/public/s ... iggrin.gif\' class=\'bbc_emoticon\' alt=\':D\' />[/url]

On my portfiolio i have it listing all my banners/bgs/sigs and etc... when they click a link to the picture it opens the picture in the iframe... what i was thinking about is when they click the image link it opens a popup or a new page to the [b][i][u]excact[/u][/i][/b] size of the image o.0 dont know if this is possible so...

1) Can this be done easily?
2) Would popup blockers block the popup?

us3rX <img src=\'http://www.killanet.net/forum3/public/s ... /ph34r.gif\' class=\'bbc_emoticon\' alt=\':ph34r:\' />
[align=center]

Image

"Time is never wasted, when your wasted all the time" ~ Radio Dj/Unknown Source

"Death is the inevitable end to the suffering of the living." ~Unknown

"You were born an original. Don't die a copy" ~Murdoc Niccals

[/align]
ner0
Hero Member
Hero Member
Posts: 982
Joined: Sat May 22, 2004 4:45 pm

Portfolio Question

Post by ner0 »

popup blockers will be able to block the popup... but most will allow it if the user initiates it (through clicking)

to determine the dimensions you should use something like...

[code]<?php
$dimensions = getimagesize("filename");
$width = $dimensions[0];
$height = $dimensions[1];
?>[/code]

put something like the following in your <head> (don\'t know if it\'s possible to have it anywhere else.)

[code]function pop(thewidth.theheight,thefilename)
{
  mywindow = window.open (thefilename,
 "Viewing Image [Portfolio]",
 "width=" + thewidth + ",height=" + theheight);
}[/code]

then in your php, all you\'ll need is something like this...

[code]<?php
$file = "filename";
$link = "javascript:pop({$width},{$height},{$file})";
$link = "<a href=\"{$link}\">View This Image</a>";
echo $link;[/code]

probably buggier than anything you\'ve ever seen, but it\'s a basis on which you can build I guess... the $height/width should work no probs... it\'s just the js which i\'m not too good at.

hope it helps <img src=\'http://www.killanet.net/forum3/public/s ... >/good.gif\' class=\'bbc_emoticon\' alt=\'(Y)\' /> and sexy portfolio

- <img src=\'http://www.killanet.net/forum3/public/s ... enguin.gif\' class=\'bbc_emoticon\' alt=\':penguin:\' />
[color=\"green\"]'class KPIM::ProcessManager' only defines private constructors and has no friends[/color] <- :( poor class



[18:09:00] * ~Moppy stews ner0 erotically 1 times.
Sp3culuM
Hero Member
Hero Member
Posts: 662
Joined: Mon May 17, 2004 2:36 pm

Portfolio Question

Post by Sp3culuM »

You could just use something like;

[code]<a href="image.php?src=test.jpg" target="_blank">Test.jpg!</a>[/code]

And then in image.php, where you want the image to display;

[code]<?php echo '<img src="'.$_GET['src'].'" />'; ?>[/code]

I'm sure someone could find a fault with that but it's probably the easiest way.
Image
ner0
Hero Member
Hero Member
Posts: 982
Joined: Sat May 22, 2004 4:45 pm

Portfolio Question

Post by ner0 »

yeah that\'d work fine sp3c, mine was just tryin to get the \"exact window size\" thing in there too... would work out much easier to do ^^ above
[color=\"green\"]'class KPIM::ProcessManager' only defines private constructors and has no friends[/color] <- :( poor class



[18:09:00] * ~Moppy stews ner0 erotically 1 times.
Post Reply

Return to “Coffee Room”