phpnewbei Posted September 9, 2011 Share Posted September 9, 2011 I need help with my webpage here, how do you get so if you are at http://www.blabla.com/account.php and then click on a photo, it will go to www.blabla.com/photo.php?id=1 but still be at account.php? Just like facebook shows their photos. I dont know how to think nor to get it work. Would appreciate some help! ThNXX 1n 4dv4nc3 // Machram! Quote Link to comment https://forums.phpfreaks.com/topic/246774-help-popup-window-like-facebook-photos/ Share on other sites More sharing options...
9mileshq Posted September 9, 2011 Share Posted September 9, 2011 I think your after a lightbox type affect: http://orangebox.davidpaulhamilton.net/ This is a good one to use, you just have to put the path of the image into the link and it will open up... Hope that is of some help. Quote Link to comment https://forums.phpfreaks.com/topic/246774-help-popup-window-like-facebook-photos/#findComment-1267281 Share on other sites More sharing options...
phpnewbei Posted September 9, 2011 Author Share Posted September 9, 2011 Thanks for a fast reply! That was what I was looking for, but do you know if I can use MySQL commands in there also? Cuz it's pretty much needed I'm going to use it for a photo that you can choose to make as profile picture In the meantime, i'll try to fix it on my own! Thanks in advance! / Machram Quote Link to comment https://forums.phpfreaks.com/topic/246774-help-popup-window-like-facebook-photos/#findComment-1267282 Share on other sites More sharing options...
Adam Posted September 9, 2011 Share Posted September 9, 2011 I don't go on Facebook very often (or are even able to access it at this moment), but somewhere in the URL they will have a hash. The hash allows you to alter the address without actually navigating away from the page. Only newer browsers support an event to to detect said changes, but there's a jQuery plug-in available that will make it all effortless, and also allow you to support the back-button navigation. Just note that whatever appears in the hash is not sent to the web server - i.e. you can't get the value of it within PHP. Quote Link to comment https://forums.phpfreaks.com/topic/246774-help-popup-window-like-facebook-photos/#findComment-1267287 Share on other sites More sharing options...
9mileshq Posted September 9, 2011 Share Posted September 9, 2011 If it was to just open up a large picture you wouldn't need 'SQL commands' within the said window... although if it was a specific persons profile picture just to enlarge you could get the image from the database and just put it in the path: off the top of the head i can't remember exactly how to reference orange box but you would do this to get your picture (only as an example) $sql = 'SELECT image FROM profiles WHERE username "' . $_GET['userid'] . '"'; // userID would be in the query string in the URL // fetch the array from the SQL $row = mysql_fetch_array($sql); and this would be the html for the image tag to actually call in your own image from database... <img src="/path/images/<?= $row['image']; ?>" > Quote Link to comment https://forums.phpfreaks.com/topic/246774-help-popup-window-like-facebook-photos/#findComment-1267358 Share on other sites More sharing options...
ZulfadlyAshBurn Posted September 9, 2011 Share Posted September 9, 2011 phpnewbei, i know what you are trying to do. you want to do a fanybox/lightbox something similar to facebook photo view and the url changes to the photo url with the page actually redirecting. i was also trying to achieve the same thing... Quote Link to comment https://forums.phpfreaks.com/topic/246774-help-popup-window-like-facebook-photos/#findComment-1267414 Share on other sites More sharing options...
Adam Posted September 10, 2011 Share Posted September 10, 2011 phpnewbei, i know what you are trying to do. you want to do a fanybox/lightbox something similar to facebook photo view and the url changes to the photo url with the page actually redirecting. i was also trying to achieve the same thing... Have a look at the jQuery plug-in I linked to. Quote Link to comment https://forums.phpfreaks.com/topic/246774-help-popup-window-like-facebook-photos/#findComment-1267545 Share on other sites More sharing options...
phpnewbei Posted September 10, 2011 Author Share Posted September 10, 2011 Thanks for all the replies! Adam, I'll look at the jQuery-plugin you linked to and will try to work from that. Anyhow, I will try to get a grip about the MySQL part, I think it should work out just fine! //Machram Quote Link to comment https://forums.phpfreaks.com/topic/246774-help-popup-window-like-facebook-photos/#findComment-1267794 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.