Floatbox: The premier windowing system for web pages

Forum guidelines:

- Please read the docs first.

- The forum's search function can be very helpful.

- Give an online example of problems if you can.

- Try to behave.

Support & General Discussion » Strange non-resizing problem

Strange non-resizing problem

Page: 1

Author Post
Member
Registered: Jan 2010
Posts: 19
Hi guys

I have such a weird problem with my floatbox atm. It works fine on safari, but on two PCs that I have tried it on my Picture-Of-Week loads in a stretched out view.

The POW is created dynamically with PHP and the link is created dynamically too so I think it might be a problem relating to that.

The two image parts are:
http://www.thatsfishing.com.au/pweek/pthumb.jpg
http://www.thatsfishing.com.au/pweek/pfull.jpg
and both are sized normally

however loading from a floatbox on a PC the picture gets stretched out even though I don't have any size constraints set so it should just load the default size of the image.
Any ideas what might be causing this, or other information you want me to supply to help solve the problem would be much appreciated. Thankyou a lot!

The picture of the week is displayed on http://www.thatsfishing.com.au just underneath the flash menu. It works on one PC i've tried and doesn't work on two other PCs.
And the one it doesn't work on is my boss's computer haha :shock:
Administrator
Registered: Aug 2008
Posts: 1530
It's working fine for me (appropriate dimensions) in Chrome, Firefox and IE on Windows 7. What browser are you having trouble with on your PCs.

The only thing I notice is that the back-quoted caption has its closing backquote on a new line. I don't think this should be a problem, but it's conceivable that could throw off a parser somewhere making the subsequent width assignment for the infoOptions apply to the image.
Quote
caption:`Allistair's 60kg bluefin
` info....
Move that last backquote to the same line as "bluefin".

If that doesn't sort things out and the problem persists after a browser cache flush, please give me more details so that I might be able to reproduce what you are reporting.
Member
Registered: Jan 2010
Posts: 19
Just to add a picture, this is what it ends up looking like on the offending computers.

Very odd. It seems to retain the dimensions of the past picture of the week which definitely indicates a caching problem. However deleting all the cache files the problem still remains and on both computers.
User posted image

Do you know a coding method to force browsers to refresh their cache of a website if it is outdated? Maybe some part of the cache is not being deleted somehow.

On both offending computers that I tried, the users are on IE8 and IE7.

The third computer I tried it on / it worked was also IE8

What other information will you require?

Also the picture is squished and not just stretched so the width being a carry over from the infoOptions would not explaine the disproportion in width. If the height were to change it all you would think it would be change in proportion to the 400. Also neither of the dimensions of the stretched picture are 400, they are 750wX500h

The actual coding is
echo "<div id=\"information\" class=\"inline\">"; 
echo stripslashes($info);
echo "</div> <a href='http://www.thatsfishing.com.au/pweek/pfull.jpg' border=\"0\" class='floatbox' data-fb-options=\"color:blue caption:`";
echo stripslashes($unit);
echo "`"; if(strlen($info) > 2){
echo " info:#information infoOptions:`width:400 enableDragResize:false` type:img";}
echo "\"><img src=\"http://www.thatsfishing.com.au/pweek/pthumb.jpg\"/></a>";


It is pretty messy but that is why it echoes and the lines separate when you view-source.
« Last edit by thatsfishing on Thu Jul 08, 2010 5:05 am. »
Administrator
Registered: Aug 2008
Posts: 1530
If the picture changes, but it's always called pfull.jpg in the href then it sounds likely that it's a cache problem. Can you change the href when you change the pic? Even if by changing only a querystring appended to it. Something like href="pfull.jpg?week=49" then href="pfull.jpg?week=50.
Member
Registered: Jan 2010
Posts: 19
Yep it was definitely as you suggested, a caching problem.

I made a little code to append an increasing ID number to each new picture of the week as it is loaded and the id query number solved the caching problem.

I also cleaned up the php quote I left earlier by concatenating with periods.

$fi = "nameinfo.txt";
$fr = fopen($fi, 'r') or die("can't open file $fi");
$unit = fgets($fr);
$info = fgets($fr);
$lidden = fgets($fr);
echo "Lidden: " . $lidden . "<br>";
$nid = $lidden + 1;
$fo = fopen($fi, 'w+') or die("can't open file $fi");
$unit = $_POST["unit"];
$info = $_POST["info"];
fwrite($fo, "$unit");
fwrite($fo, "$info");
fwrite($fo, "$nid");
fclose($fo);
fclose($fr);

echo "Nid: " . $nid . "<br>";
$plopper = "";
if(strlen($info) > 2){ $plopper = "info:#information";} else { $plopper = "";}

echo "<div id=\"information\" class=\"inline\">" . stripslashes($info) . "</div><br><br><div align=\"center\"><table width=\"87%\" border=\"1\" cellpadding=\"1\" cellspacing=\"1\" bordercolor=\"#000000\">
<tr><td valign=\"middle\"><p align=\"center\" class=\"style1\"> GREAT SUCCESS! <br> <img src=\"borat.jpg\" width=\"107\" height=\"90\" /><br>

<a href='http://www.thatsfishing.com.au/pweek/pfull.jpg?week=$nid' class='floatbox' data-fb-options=\"caption:`" . stripslashes($unit) . "` $plopper infoOptions:`width:400 enableDragResize:false`\">Click here to view just your picture<br><img src=\"http://www.thatsfishing.com.au/pweek/pthumb.jpg\"/></a>


Thanks admin!
Rob

Page: 1

Support & General Discussion » Strange non-resizing problem

Floatbox Forum is powered by UseBB 1 Forum Software