Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
otvaranje slika kao na mi3-ju

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side
View previous topic :: View next topic  
Author Message
Pekx



Joined: 09 Sep 2004
Posts: 559

PostPosted: 29.01.2006 15:57    Post subject: otvaranje slika kao na mi3-ju Add user to your forum ignore list Reply with quote

nisam mogao nikako drukcije to opisati, pisem naslov vec 5 min Very Happy

znaci kako napraviti to da kad imam recimo neki thumb i da kad kliknem na njega otvori neku sliku u nekom php, html,.. fajlu.
ziher mi treba neki dodatni file koji ce povuci sliku i onda ju importirati u taj html/php file, ali uopce nemam ideja kako to izvesti, može pomoc?

hvala"

_________________
mp3hr.com
Back to top
View user's profile Send private message Send e-mail
Tedius



Joined: 22 Dec 2003
Posts: 149
Location: Zagreb

PostPosted: 29.01.2006 16:56    Post subject: Add user to your forum ignore list Reply with quote

Napravi si file tipa display.php i u njega stavi html stranicu sa nekom slikom i zatim putanju do te slike zamijeni sa npr:
Code:
<img src="<?php echo $_GET['slika']; ?>" alt="">

Poslije linkas thumb da otvara tu stranicu a link ti glasi href="display.php?slika=tvojaslika.jpg"
Back to top
View user's profile Send private message Visit poster's website
Pekx



Joined: 09 Sep 2004
Posts: 559

PostPosted: 29.01.2006 22:40    Post subject: Add user to your forum ignore list Reply with quote

tnx Smile

_________________
mp3hr.com
Back to top
View user's profile Send private message Send e-mail
FlocK



Joined: 03 Nov 2003
Posts: 252
Location: Split

PostPosted: 30.01.2006 13:34    Post subject: Add user to your forum ignore list Reply with quote

..ja nisam bas skroz skuzija pa ako ti nie problem malko detaljnije..

jer meni bas sad triba nesto slicno.. tocnije ja bi u javi da mi se otvaraju slike kad kliknem na thumb ali da ne trebam svaki put odrjedjivat visinu širinu itd... nego jel ima neki nacin da kliknem i on mi otvori pop up i širina visina se automatski odrede po potrebi... odnosno veličini slike..
Back to top
View user's profile Send private message Send e-mail
vedran



Joined: 08 Sep 2003
Posts: 458

PostPosted: 30.01.2006 13:40    Post subject: Add user to your forum ignore list Reply with quote

FlocK wrote:
..ja nisam bas skroz skuzija pa ako ti nie problem malko detaljnije..

jer meni bas sad triba nesto slicno.. tocnije ja bi u javi da mi se otvaraju slike kad kliknem na thumb ali da ne trebam svaki put odrjedjivat visinu širinu itd... nego jel ima neki nacin da kliknem i on mi otvori pop up i širina visina se automatski odrede po potrebi... odnosno veličini slike..

Javascript:
Code:
function slika(imageURL) {
   var imgWin = window.open('about:blank','imgWin','width=200, height=200, left=100, top=100');

   with (imgWin.document) {
      writeln('<html><head><title>Loading...</title>');
      writeln('<style type="text/css">body { margin: 0px; padding: 0px } </style></head>');
      writeln('<body onload="self.focus();"><img alt="Klikni da zatvoriš pop-up prozor" style="cursor: pointer" onClick="window.close()" window.close() id="pic" style="display:none" /></body></html>');
      close();      
      }
   var img = new Image();
        img.onload = function() { sizeImgWin(imgWin, img) };
   img.src = imageURL;
}
   
function sizeImgWin(win, img) {
      var new_w = img.width;
   var new_h = img.height;
   var old_w = win.innerWidth || win.document.body.offsetWidth;
   var old_h = win.innerHeight || win.document.body.offsetHeight;
   if (!new_w) { new_w = old_w; }
   if (!new_h) { new_h = old_h; }
   new_w -= old_w; new_h -= old_h;
   win.resizeBy(new_w,new_h);
   win.document.title = "Pregled slike";
   var pic = win.document.getElementById('pic');
   pic.src = img.src;
   pic.style.display = 'block';
}


Primjer korištenja:
Code:
 
<a onclick="slika(this.href); return false;" href="slika_velika.jpg"><img border="0" src="slika_mala.jpg"></a>
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group