MyBB Community Forums

Full Version: attachments not working correctly
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
so i'm on godaddy's free hosting which displays ads. everything works perfectly, except attachments...

attachments show up in a post as a little questionmark as if its not found. when clicking it, you're brought to a page with an ad and some random characters. i tried changing this to show full size images, as well as the other two options. its currently set to download, and i installed the pro attachments plugin because i hoped that would help.

for example, clicking on a pdf brings up a page with an ad and the following text:

%PDF-1.5 %äãÏÒ 1 0 obj [/PDF/ImageB/ImageC/ImageI/Text] endobj 4 0 obj <> stream xœ

clicking on a jpg brings up a page with an ad and the following text:

ÿØÿá"$Exif

i understand that the ads may be interfering with this, but how can i modify some html so that they will display correctly when pulled from the database? is there a line of attachments.php that we can change to fix this?

i can verify that they're uploading correctly because they're being placed in the upload directory, and their correct information is shown in the post, as shown in the image that i attached here....

please help! this is for my boss's boss and migrating hosts is an absolute last case scenario.

thanks guys.
also, a txt file that contained the html text for a facebook badge was uploaded and when clicking on that attachment you're brought to a page with an ad up top and then it actually shows the facebook badge, i.e. the html is rendered.
I believe the free GoDaddy hosting adds advert code to the bottom of every page on your forum. It's not something you can do anything about, it's added to every page no matter what it is, and if that file is used to output an image, it'll still be added, and it'll break it.
(2011-02-09, 06:30 PM)MattRogowski Wrote: [ -> ]I believe the free GoDaddy hosting adds advert code to the bottom of every page on your forum. It's not something you can do anything about, it's added to every page no matter what it is, and if that file is used to output an image, it'll still be added, and it'll break it.

everything else works perfectly... i dont see why i cant load an image when the whole forum is loading image after image... the only difference is that my image information is being pulled from a database.... is there anything i can do here? and kind of work around? what if i inserted some html to close the ad banner prematurely.... all i want to do is show an image that was attached.... :-(
It's because it's a PHP file. Loading _an image_ on the forum, i.e. images for the theme, is different, that's just HTML to show an image. This is a PHP script that is generating an image, and because it's a PHP script, GoDaddy add their advert code to it, and it breaks the image. Adding HTML to it is not going to do anything, it's precisely because there's HTML there in the first place that it's not working, HTML can not go in a PHP file that is outputting an image.
i understand now, so is there anything i can do? the only solution i can think of is ftp'ing images in and then hyperlinking to them.... this forum that i've got is for the purpose of viewing work schedules and posting for coverage and such. once a week i guess i can get my dm to email me the image of the schedule and i'll create a hyperlink to it...

now is this reason that you're talking about the same reason why i can't get thumbnails to work either?

and can you think of anything better than the solution i just mentioned?