Mousing over diagrams
Posted: Sun Apr 25, 2010 12:26 am
When mousing over a diagram, it would be nice if the pop-up would contain a lot less information. As it is, the huge white window full of %20s is a bit bothersome.
Life in 19x19. Go, Weiqi, Baduk... Thats the life.
https://www.lifein19x19.com/
Code: Select all
http://www.lifein19x19.com/forum/example4.php?request=SGF&msg=$$Bcm151 Moves 151 to 160 This is a long title, which I am going to keep writing about. You can write paragraphs and paragraphs, and the captions should wrap correctly, and not overlap with the image. Hopefully this works on all diagram sizes. If it does, that would be cool. And nothing else to say here, I guess...
$$ ---------------------------------------
$$ | . . . . . . . . . . . . O . . . . . . |
$$ | . . . . O X . . . . X O X O O . O . . |
$$ | . O O O . X . . . X . . X X O O X . . |
$$ | . . X O . . . X . , X . . X X X O O . |
$$ | . . X O . X X X X O . O . . . X X O . |
$$ | . . . . O O O X O . . . . . X X O . . |
$$ | . . X . . . . O O . . O . . X O . O . |
$$ | . . . . O X . . . . . . X X O O . . . |
$$ | . X X . O 6 . O . O . X . . . O O . . |
$$ | . O X , X . X O . , . . . . X O X X . |
$$ | . O O X . . X O X X . X X X . X . . . |
$$ | . . . X . . . X O . . O X O X X 5 O . |
$$ | . . O X . . . X O . O . O O O . X 4 . |
$$ | . . O X . . . X O . . . O . X O O O . |
$$ | . . O . . . . O X O O . O . . X . . . |
$$ | . . O X X . . . X X X O . O . X O . . |
$$ | . . X O X . . . X . . X O . . X O . . |
$$ | . . O O X 3 . . . . . . X X . X O 0 . |
$$ | . . 2 C O . . . . . . . . . . 9 7 8 . |
$$ ---------------------------------------
Gresil beat me to it, was editing my post while he posted the above.Gresil wrote:Does your browser show image URLs when mousing over? Turn that off, because it looks like a diagram's URL encodes the entire diagram definition. Here's the URL of a random diagram:
Code: Select all
http://www.lifein19x19.com/forum/example4.php?request=SGF&msg=$$Bcm151 Moves 151 to 160 This is a long title, which I am going to keep writing about. You can write paragraphs and paragraphs, and the captions should wrap correctly, and not overlap with the image. Hopefully this works on all diagram sizes. If it does, that would be cool. And nothing else to say here, I guess... $$ --------------------------------------- $$ | . . . . . . . . . . . . O . . . . . . | $$ | . . . . O X . . . . X O X O O . O . . | $$ | . O O O . X . . . X . . X X O O X . . | $$ | . . X O . . . X . , X . . X X X O O . | $$ | . . X O . X X X X O . O . . . X X O . | $$ | . . . . O O O X O . . . . . X X O . . | $$ | . . X . . . . O O . . O . . X O . O . | $$ | . . . . O X . . . . . . X X O O . . . | $$ | . X X . O 6 . O . O . X . . . O O . . | $$ | . O X , X . X O . , . . . . X O X X . | $$ | . O O X . . X O X X . X X X . X . . . | $$ | . . . X . . . X O . . O X O X X 5 O . | $$ | . . O X . . . X O . O . O O O . X 4 . | $$ | . . O X . . . X O . . . O . X O O O . | $$ | . . O . . . . O X O O . O . . X . . . | $$ | . . O X X . . . X X X O . O . X O . . | $$ | . . X O X . . . X . . X O . . X O . . | $$ | . . O O X 3 . . . . . . X X . X O 0 . | $$ | . . 2 C O . . . . . . . . . . 9 7 8 . | $$ ---------------------------------------

You can use the "upload attachment" function below the main post writing area.daal wrote:I uploaded this to Imgur (thanks sol.ch), but is there a more direct way to post an image?
I'm using Opera too, but I'm not seeing it--but if I remember correctly, I've used versions of Opera that will use the image URL as the alt text if no alt text is specified. That means that this problem could be fixed by just adding some short alt text for the image (like "Go Diagram"), I'm guessing.daal wrote:I'm using Opera, and I don't have any idea how to turn off image urls.
Well, if I think about the actual implementation, there's a good chance that it does. Basically, we just use the php imagepng function, which outputs the raw image stream directly. I haven't looked into how php implements this.fwiffo wrote:Does the server side script even cache the generated images?
I'm wasn't seeing the behavior before, either, but I added the alt text like you suggested for now.ross wrote:I'm using Opera too, but I'm not seeing it--but if I remember correctly, I've used versions of Opera that will use the image URL as the alt text if no alt text is specified. That means that this problem could be fixed by just adding some short alt text for the image (like "Go Diagram"), I'm guessing.daal wrote:I'm using Opera, and I don't have any idea how to turn off image urls.
Doesn't seem to have done the trick, but thanks for the effort.Kirby wrote:I'm wasn't seeing the behavior before, either, but I added the alt text like you suggested for now.ross wrote:I'm using Opera too, but I'm not seeing it--but if I remember correctly, I've used versions of Opera that will use the image URL as the alt text if no alt text is specified. That means that this problem could be fixed by just adding some short alt text for the image (like "Go Diagram"), I'm guessing.daal wrote:I'm using Opera, and I don't have any idea how to turn off image urls.
It looks like your browser shows the URL regardless of the ALT text, then. I'm thinking that we're going to have to save the images on the server to adjust this, rather than generating them dynamically. I don't see how using an MD5 for a dynamically generated filename would allow for us to get around saving the images to disk since MD5 can have collisions. Perhaps we could save the files to the server using an MD5 hash for the filename, and if a duplicate filename existed, we could increment the filecount (eg. <md5-hash>1.gif, <md5-hash>2.gif, etc.). This would be inefficient for the cases where you have two of the same images (because we would generate separate, but identical images).daal wrote:
Doesn't seem to have done the trick, but thanks for the effort.