LocostUSA.com

Learning how to build Lotus Seven replicas...together!
It is currently June 20, 2018, 10:56 pm

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: February 18, 2013, 4:35 am 
Offline
User avatar

Joined: November 7, 2008, 4:48 am
Posts: 1097
Location: snow city - it's wet!
Is there BBCode available to display linked images in a "fit to the browser" mode? I recently posted links to some very large pictures, and while they are fine on my system, they will hard for someone with a narrow monitor to view. I would have preferred to add a bit of code to eliminate the width issue for others, but wasn't able to google up a solution.

_________________
.. in the world


Top
 Profile  
Reply with quote  
PostPosted: February 18, 2013, 9:29 am 
Offline
User avatar

Joined: October 19, 2012, 9:25 pm
Posts: 2692
Location: Summerville, SC
I haven't found a solution. I'll fire the question off to a computer geek buddy and see what he comes up with.

_________________
Too much week, not enough weekend.

OOPS I did it again
http://www.locostusa.com/forums/viewtopic.php?f=35&t=17496

Blood Sweat and Beers
http://www.locostusa.com/forums/viewtopic.php?f=35&t=15216


Top
 Profile  
Reply with quote  
PostPosted: February 18, 2013, 1:11 pm 
Offline
User avatar

Joined: July 4, 2006, 5:40 pm
Posts: 1906
Location: Novato, CA
Wow, there doesn't actually seem to be a way to resize photos. If you click the BBCode link under Options: in the lower right corner of the reply page, it takes you to a full tutorial of BBCode. You can resize text apparently, but not pictures. That's weak. I guess you'd have to download the pictures from the other site, resize them yourself, and post them on some other site.


Top
 Profile  
Reply with quote  
PostPosted: February 18, 2013, 1:20 pm 
Offline
User avatar

Joined: October 19, 2012, 9:25 pm
Posts: 2692
Location: Summerville, SC
auto-resize isn't easy.

_________________
Too much week, not enough weekend.

OOPS I did it again
http://www.locostusa.com/forums/viewtopic.php?f=35&t=17496

Blood Sweat and Beers
http://www.locostusa.com/forums/viewtopic.php?f=35&t=15216


Top
 Profile  
Reply with quote  
PostPosted: February 18, 2013, 1:23 pm 
Offline
User avatar

Joined: July 4, 2006, 5:40 pm
Posts: 1906
Location: Novato, CA
I wrote the forum for our Miata group, and it auto-resizes photos. If I can do it, it's not that tricky.


Top
 Profile  
Reply with quote  
PostPosted: February 18, 2013, 1:31 pm 
Offline
User avatar

Joined: July 17, 2008, 9:11 am
Posts: 4592
Location: West Chicago,IL
You probably already know this. I find that Windows' Snipping Tool works great. I view any picture any size I want on the screen with any program I want to use for viewing. Then I open the Snipping tool, and draw a window around what you want to upload on the screen. You can even crop out what you don't want. Save the new photo and then upload it. It comes in to the site at the same size you viewed it when you saved the picture. It would be great if you could just copy it to the clipboard and then paste it into the "post a reply" window, or click and drag, but we are only 32 years into PC computing and usefull things like that take a bit of time. :cheers:

_________________
Chuck.

“Any suspension will work if you don’t let it.” - Colin Chapman

Visit my active Cushman Truckster resurrection log: over HERE
or my archival Locost build log: over HERE


Top
 Profile  
Reply with quote  
PostPosted: February 18, 2013, 1:35 pm 
Offline
User avatar

Joined: October 19, 2012, 9:25 pm
Posts: 2692
Location: Summerville, SC
nick47 wrote:
I wrote the forum for our Miata group, and it auto-resizes photos. If I can do it, it's not that tricky.


Do you have some PHP bb3 code you can share? I'd like to be able to add this to my fishing forum. I've tried a bunch of things and can't get it to work.

_________________
Too much week, not enough weekend.

OOPS I did it again
http://www.locostusa.com/forums/viewtopic.php?f=35&t=17496

Blood Sweat and Beers
http://www.locostusa.com/forums/viewtopic.php?f=35&t=15216


Top
 Profile  
Reply with quote  
PostPosted: February 18, 2013, 2:07 pm 
Offline
User avatar

Joined: July 4, 2006, 5:40 pm
Posts: 1906
Location: Novato, CA
The code for resizing is just javascript:
Code:
function resizeImg(imgid)
{
   var maxwidth=800;
   imgobj=document.getElementById(imgid);
   if (imgobj.width>maxwidth)
   {
      imgobj.alt="Note: Photo has been resized from "+imgobj.width+" pixels by "+imgobj.height+" pixels to fit this space. Click to see full size.";
      imgobj.height = Math.round(imgobj.height*maxwidth/imgobj.width);
      imgobj.width  = maxwidth;
   }
}

You call this function in the onload event of the image tag:

<img src="..." id="img1" onload="resizeImg('img1')">


Last edited by nick47 on February 18, 2013, 2:09 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: February 18, 2013, 2:09 pm 
Offline
User avatar

Joined: October 19, 2012, 9:25 pm
Posts: 2692
Location: Summerville, SC
Thanks Nick. I'm going to attempt to embed that in the background of my fishing forum.

_________________
Too much week, not enough weekend.

OOPS I did it again
http://www.locostusa.com/forums/viewtopic.php?f=35&t=17496

Blood Sweat and Beers
http://www.locostusa.com/forums/viewtopic.php?f=35&t=15216


Top
 Profile  
Reply with quote  
PostPosted: February 18, 2013, 11:04 pm 
Offline
User avatar

Joined: November 7, 2008, 4:48 am
Posts: 1097
Location: snow city - it's wet!
All good responses, and stuff I'd come across while researching this. But it still doesn't address user-level BBCode to downsize an image to fit the browser width. I guess for now I'll assume there isn't a practical solution.

_________________
.. in the world


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
POWERED_BY