Previous Thread
Next Thread
Print Thread
Hop To
#215272 07/07/2008 9:10 PM
Joined: Jun 2006
Posts: 287
enthusiast
enthusiast
Joined: Jun 2006
Posts: 287
This is not a customizing issue. I love having images allowed in posts in my forum because it adds so much to the content especially with technical images. I have PhotoPost integrated with my forum and most of my community that posts images uses it. I have it set up to automatically resize images to a size below 600 pixels wide to work well in the forums. I have one member that insists on posting pictures from his own host with large resolution/dimensions and it forces the forum to widen, most times off screen.

Is there a way to prevent the dynamic resizing of my forum when these images are posted? My forum dimensions are set to a specific dimension but when this happens that apparently gets ignored.

~or~

Is there a way to prevent images from anywhere but my server from displaying?

I suppose I could whip this member into submission but he is likely not going to be the last. Aside from that I don't want to be accused of bandwidth theft.


Ford diesel master technician by day...
Webmaster by night! cool
FordDoctorsDTS.com running UBB Threads 7.5.4.2p2
Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
add to the Extra Properties section in each style on your board.

.post-content img {
max-width: 600px;
}

save the style smile

you can also add a max-height, if he's posting very TALL pictures wink

SD #215277 07/08/2008 6:27 AM
Joined: Jun 2006
Posts: 287
enthusiast
enthusiast
Joined: Jun 2006
Posts: 287
That unfortunately did not work. I added it to all syles just to be sure. Tested it a few times with one of the offending photos as a reply, new post etc. Is it possible to use htaccess to simply block outside images and force the use of my site's gallery? I do like the idea of trying to do this from within UBB Threads though!


Ford diesel master technician by day...
Webmaster by night! cool
FordDoctorsDTS.com running UBB Threads 7.5.4.2p2
Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
um that should work.. can you point me to a thread in question ? i'll dally about with Firebug and should get it right. i might have a typo

not sure.. but i've done similar to this already and got good results..

SD #215303 07/08/2008 8:19 PM
Joined: Jun 2006
Posts: 287
enthusiast
enthusiast
Joined: Jun 2006
Posts: 287
I sent you a PM - thanx for messing with this!


Ford diesel master technician by day...
Webmaster by night! cool
FordDoctorsDTS.com running UBB Threads 7.5.4.2p2
Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
i'm guessing you are using IE6, which essentially ignores max-width and max-height..

SD #215307 07/08/2008 8:47 PM
Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
Originally Posted by Sirdude
i'm guessing you are using IE6, which essentially ignores max-width and max-height..
As does FFoX3 :snicker:


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
Originally Posted by Giz-UNiT
As does FFoX3 :snicker:
no FF3 does not ignore it. it does it right

i just verified this on his site, as would be expected

that's css2 stuff and all browsers should handle it smile

Workaround and it's ugly

another workaround that i've done for avatars on certain sites, which would apply here.. is to:

1) run a script that trundles thru all posts and searches for externally linked images.
2) that script then grabs each one and sizes them properly and stores them on your server
3) modify the img tag parser to do this for any [img] tag in the future..

i used that idea with avatars, to corral all the external ones, upload them, resize and then i turned off external avatars..

other option is to disallow IE5.5 and IE6, but it's prolly not a good idea laugh

SD #215312 07/08/2008 11:05 PM
Joined: Jun 2006
Posts: 287
enthusiast
enthusiast
Joined: Jun 2006
Posts: 287
Originally Posted by Sirdude
Workaround and it's ugly

I read through that but not sure where to place the code. It is not working anywhere I put it. If I read the info in the link it looks like I can place the code anywhere in the document I wish to control image size. I tried the header and in the style editor under post content... eek


Ford diesel master technician by day...
Webmaster by night! cool
FordDoctorsDTS.com running UBB Threads 7.5.4.2p2
Joined: Jun 2006
Posts: 287
enthusiast
enthusiast
Joined: Jun 2006
Posts: 287
Well the link you posted was a good start. I did some Googling and found several different methods of attempting this. I then stumbled upon a post on the Eve support forums and modified the code to work within UBB. I tested it in IE-6 and FF and it works in both but I can't test it in any other browsers so if anyone else tries this let us know that you verified that it works or not. Don't be impressed - I read a lot and try many times until something works or I step in shyt! laugh I hope someone else finds this helpful too.

Code
.post_inner img{
max-width:650px;
width: expression(this.width > 650 ? 650: true);
} 


Ford diesel master technician by day...
Webmaster by night! cool
FordDoctorsDTS.com running UBB Threads 7.5.4.2p2
Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
that's perfect, since ie6 will ignore the max-width and all other standards based browsers will handle it..

then IE6 comes along and evaluates the width line, while ignoring the max-width one smile

good show wink

SD #215378 07/10/2008 8:41 PM
Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
you'll find that if it works in FF, then you have a high probability it will work in ALL other browsers except IE laugh

matter of fact, when i do a site design (css), i'll design for it to look good in Firefox 1st, then i FIX the site for any IE quirks..

safari is the only one that is 'picky', but that is usually with regards javascript quirks, that i've found smile

Joined: Mar 2008
Posts: 262
enthusiast
enthusiast
Joined: Mar 2008
Posts: 262
Originally Posted by FordDoctor
Well the link you posted was a good start. I did some Googling and found several different methods of attempting this. I then stumbled upon a post on the Eve support forums and modified the code to work within UBB. I tested it in IE-6 and FF and it works in both but I can't test it in any other browsers so if anyone else tries this let us know that you verified that it works or not. Don't be impressed - I read a lot and try many times until something works or I step in shyt! laugh I hope someone else finds this helpful too.

Code
.post_inner img{
max-width:650px;
width: expression(this.width > 650 ? 650: true);
} 

I just tried it in IE7 and FF3 and it works great thanks!

Ian


Ian
http://www.firstgenmc.com/ubbthreads

"Experience is a hard teacher because she gives the test first, the lesson afterwords."
Joined: Jul 2006
Posts: 4,057
Joined: Jul 2006
Posts: 4,057
Thank you very much

i think i will be using this too smile

Ive just sent it too myself smile


BOOM !! Version v7.6.1.1
People who inspire me Isaac ME Gizmo
Joined: Dec 2003
Posts: 1,796
Pooh-Bah
Pooh-Bah
Joined: Dec 2003
Posts: 1,796
I believe someone I know asked for this too...


- Allen
- ThreadsDev | PraiseCafe
Joined: Nov 2006
Posts: 3,095
Likes: 1
Carpal Tunnel
Carpal Tunnel
Joined: Nov 2006
Posts: 3,095
Likes: 1
Not sure as I've not investigated the details of this subject but this article may be of some value on the subject.

When the Legend Won't Wrap - Revisited for Firefox 3




Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
Is UBB.threads still going?
by Aaron101 - 04/01/2022 8:18 AM
Who's Online Now
2 members (DennyP, 1 invisible), 969 guests, and 171 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)