The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
||||
|
||||
Images in attachment.php: not completely loaded
Hey
I'm working on a little modification which hooks into attachment.php "attachment_display", takes the $attachmentinfo array, loads the picture files and adds some text overlay, then saves them to disk for caching purpose, then it displays them in the browser. Right now, everything seems to work nicely, the image gets fetched, from db or filesystem depending on settings, the text gets applied properly and the cache file is created or read if it exists. But then there's a slight problem: When I view the image the attachment.php returns, the last 70 pixels or so get cut off at the bottom. The cached image file is complete -> The image processing by my script works fine! I tested the plugin code in a separat php file, let the script display the image, it works fine! Because the attachment.php uses some weird partial stuff where it might print the image in chunks, I set $startbyte and $lastbyte to 0, so the if-clause would not run, where the vb-intern echo functions are located. This is that the attachment.php file won't print the image, insted my plugin does. Later on I even added an "exit()" statement at the end of my plugin, so the code after the "attachment_display" hook won't execute. Again, image was only partial in my browser. I also tried removing the headers, maybe there is some header thing which still triggers the partial transfer. So I added: PHP Code:
When I disable my plugin, the picture is complete, but without text. To give you a better idea, here are two screenshots; left with plugin turned on, right with plugin turned off Attachment 128619 Attachment 128618 It's blue because I selected it with my mouse, so you can see the actual borders of the image file and the space which is free at the bottom. I'd like not to post much sourcecode, it basically does what I already described, the problem seems to be caused by vbulletin and some weird thing in the attachment.php I didn't find yet. Please, if you have any ideas, let me know! Don't know where else to ask //edit: Just noticed: The thumbs in my album view aren't fully loaded as well. Check attachment #3 I only viewed the 2 middle pictures with the plugin turned on at least 1 time. I seem to have forgotten to opt-out if the thumb param is set in $_GET, but this is an interesting detail; Because not only didn't it completely draw the image, it also didn't draw the box with the image info around the thumb. This is weird... Attachment 128620 |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|