Mod Name / Version: Inline Photo Hack for 6.2 version 2 Version 2 adds the option to constrain the width of the displayed attachment, thus protecting your layout.
Description: This hack will display the attached image to registered users that are loggin in provided that the attachment contains the correct extensions. The Photo will appear below the body of the message.
Working under: UBB.threads 6.1 and verifited to work with 6.2
Any pre-requisites: none
Author(s): JustDave, ExcelsiorDDZ, JoshPet
Credits: JoshPet suggested and JustDave developed for version 5. ExcelsiorDDZ modified for version 6. JoshPet revised instructions for version 6.1 and 6.2. Many others have worked on variations of this over time.
Problem: You are running this hack, and it's great until some ejit (to steal Allen's word) comes along and posts a picture which is 9 billion pixels wide, and screws up your layout.
Solution: Version 2 of this hack - attached to main post which allows you to specify a maximum width in pixels for inline attachments. If the image is less that the maximum, it'll appear actual size. If the attached image is more than the maximum, then it'll get constrained with the "width" tag to preserve your layout.
I think this will fix the only problem with using this hack.
Thanks to Dave_L for recently pointing out the getimagesize function to someone over at infopop community. It sort of gave me the inspiration to get this done.
There is a bug with certain images edited in the latest photoshop (when they "save for web) that freaks out IE on the PC. I learned about that the hard way. I kept having to go into my photo galleries with my mac and delete the offending graphics.
The inline not showing for unregistered users is by design to save bandwidth. If they want to see without clicking, they can register.
I didn't write the original... but that's just carried along. It would be easy enough to make it work with anonymous users too though.
You'd just remove the if ($Username) part and the } at the end of the clause.
I under stand the point about not having guests see images inline. That's cool. but oodly registerd users were prevented from even opening a thread. And it broke on Safari, Chameria, IE and OmniWeb... Just an fyi...
That's really odd... doesn't soudn like the photoshop thing, as that only affected IE on the PC.
We're using it here, and I'm using it at several other sites.
I'd see if you could pin it to a specific file, then see if there's anything wierd about it.... for example, is it named .jpg but it's really a different file type. That migth freak out the browser.
Is it possible to use this mod to show inline video? I need something that does exactly what this mod does, but allows video (or just audio) files to be displayed inline.
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.