Net-Moto :: Community :: Racing :: :: Racing Videos Sponsor :: Contact
 Forums   Features   Trackdays   Moto Crash Incidents   Race Team   CMSP Training   Sponsors      Donate   Terms of Service 
BARF - Bay Area Riders Forum  Home   UserCP   Register   Calendar   Members   FAQ   Search  AMA

Go Back   BARF - Bay Area Riders Forum > Community > Website / Geek Speak


Reply
 
Thread Tools Display Modes
Old 06-05-2016, 09:47 PM   #1
rodr
IBA # 56746
 
rodr's Avatar
 
AMA #: 2846730
Contributor + + + +

Join Date: Dec 2009
Location: Oz
Motorcycles: 2016 CB500XA
Name: Rod
How to fix huge posted images

This works with Firefox or Google Chrome. It fixes the problem of posted images that are too wide to fit your browser window. It also limits image height to 800 pixels (you might adjust that to your taste).

Instructions below are for Firefox. For Chrome see post #4.

First you have to install GreaseMonkey:

1. Go to Tools -> Add-ons -> Get Addons.
2. Search for GreaseMonkey.
3. Install, then Restart Now.

To install the magic BARF script:

1. Highlight the script code below and copy it into your clipboard with Ctrl-C or Edit -> Copy.
2. Click the dropdown arrow next to the monkey icon near the top right of your screen.
3. Select New User Script.
4. Click "Use Script from Clipboard".
5. Click Save.
6. Close the script window.
7. Go BARFing!

Code:
// ==UserScript==
// @name        resizeBARF
// @namespace   rodr
// @description Limit images in vBulletin 3 posts to available width.
// @include     http://bayarearidersforum.com/*
// @include     http://www.bayarearidersforum.com/*
// @require     http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// @version     1
// @grant       none
// ==/UserScript==
$(document).ready(function() {
  $('[id^="post_message_"] img').css("maxWidth", "100%");
  $('[id^="post_message_"] img').css("maxHeight", "800px");
});

Last edited by rodr; 06-13-2016 at 10:37 AM..
rodr is offline   Reply With Quote
Old 06-05-2016, 11:53 PM   #2
OldBlade
Cupid Stunt
 
OldBlade's Avatar
 
Contributor +++

Join Date: May 2006
Location: San Jose
Motorcycles: '93 CBR900RR
Name: James
Or, you can just right-click on the image and select 'View Image'.
OldBlade is offline   Reply With Quote
Old 06-06-2016, 05:15 AM   #3
rodr
IBA # 56746
 
rodr's Avatar
 
AMA #: 2846730
Contributor + + + +

Join Date: Dec 2009
Location: Oz
Motorcycles: 2016 CB500XA
Name: Rod
Well sure, if you like getting out of your car to open the garage door.
rodr is offline   Reply With Quote
Old 06-08-2016, 04:51 PM   #4
rodr
IBA # 56746
 
rodr's Avatar
 
AMA #: 2846730
Contributor + + + +

Join Date: Dec 2009
Location: Oz
Motorcycles: 2016 CB500XA
Name: Rod
Instructions for Google Chrome turn out to be very similar to Firefox:

First you have to install TamperMonkey:

1. Go to Settings -> Extensions -> Get more extensions
2. Search for TamperMonkey.
3. Install.

To install the magic BARF script:

1. Highlight the script in post #1 and copy it into your clipboard with Ctrl-C.
2. Click the TamperMonkey icon near the top right of your screen (black rectangle with two white dots).
3. Select "Add a new script...".
4. Hit Ctrl-A or otherwise highlight all the default script text and then Ctrl-V to paste in the script from your clipboard.
5. Click Save (the floppy disk icon).
6. Close the script tab and any other tabs you don't want any more.
7. Go BARFing!
rodr is offline   Reply With Quote
Old 07-03-2016, 03:38 PM   #5
budman
General Menace
 
budman's Avatar
 
AMA Life Member #203453
Highway Aviator
Founding Member
Top Percent Poster
Community Contributor + BB
Moto Junkie

Join Date: Apr 2002
Location: Palo Alto, Ca.
Motorcycles: A few here and there
Name: Budman
I am going to stick this so I can point to it easily in the future.
Not sure we can get folks to engage, but for rally pic threads having the pictures historically attached is such a hug win.
__________________
Your friendly neighborhood.... Budman
BARF Terms of Service Be a BARF Contributor!
Support those that support Barf! BARF Sponsors
Racism and RIP threads on Barf - FYI
Barf is more than a dub dub dub dealio
Group Rides-The info you need to know
Godspeed Mom
Godspeed Pit Ho
Godspeed Nicky #69
AMA #: 203453
budman is online now   Reply With Quote
Old 07-03-2016, 03:47 PM   #6
rodr
IBA # 56746
 
rodr's Avatar
 
AMA #: 2846730
Contributor + + + +

Join Date: Dec 2009
Location: Oz
Motorcycles: 2016 CB500XA
Name: Rod
Thanks Dennis. Yeah folks are smarter about posting pics now, but this should help with the older threads.
rodr is offline   Reply With Quote
Old 07-03-2016, 07:14 PM   #7
OneRedLT4
Veteran
 
OneRedLT4's Avatar
 

Join Date: Apr 2005
Location: Petalma
Motorcycles: '05 GSXR 1000 and '06 GSXR 750
Name:
IDK, still seems like a lot of clicking to scale down physical size. If the file size is too large, does it trim that too?

I've use Image Resizer (https://imageresizer.codeplex.com/) for years. Just right clickan image file, select resize image, check which size (it'll remember you choice from here after), and by default it creates a copy of the original, both smaller dimensions and file size.
You can select multiple files and resize all at once. I use it for forums emailing, etc
__________________
2006 Chrysler 300c HEMI
2005 GSXR 1000
2006 GSXR 750
2006 GSXR 600 (hers)

AFM# 77
OneRedLT4 is offline   Reply With Quote
Old 07-03-2016, 08:26 PM   #8
rodr
IBA # 56746
 
rodr's Avatar
 
AMA #: 2846730
Contributor + + + +

Join Date: Dec 2009
Location: Oz
Motorcycles: 2016 CB500XA
Name: Rod
If you are posting photos you should definitely resize them as appropriate. This tool is not for that; it's for easier viewing of the occasional pictures where that was not done.

Last edited by rodr; 07-03-2016 at 08:28 PM..
rodr is offline   Reply With Quote
Old 07-03-2016, 08:53 PM   #9
phocup
Veteran
 
phocup's Avatar
 
Contributor + + 6.5%

Join Date: Mar 2011
Location: SJ
Motorcycles: 09 SVS
Name:
Or perhaps since Budman seem to be in support of this workaround, BaRF can add those two lines to its CSS and save everyone that's not a webbie the trouble of dealing with greasemonkey ?
phocup is offline   Reply With Quote
Old 07-03-2016, 09:08 PM   #10
rodr
IBA # 56746
 
rodr's Avatar
 
AMA #: 2846730
Contributor + + + +

Join Date: Dec 2009
Location: Oz
Motorcycles: 2016 CB500XA
Name: Rod
Quote:
Originally Posted by phocup View Post
Or perhaps since Budman seem to be in support of this workaround, BaRF can add those two lines to its CSS and save everyone that's not a webbie the trouble of dealing with greasemonkey ?
If there's a sufficiently trusted techie who knows how to modify the CSS, that would be ideal.
rodr is offline   Reply With Quote
Old 07-04-2016, 11:00 AM   #11
EastBayDave
- Kawasaki Fanatic -
 
EastBayDave's Avatar
 
Founding Member
From the heart

Join Date: May 2002
Location: San Lorenzo, CA "The Mudflats"
Motorcycles: ZRX1200
Name: "Dave"
// ==UserScript==
// @name resizeBARF
// @namespace rodr
// @description Limit images in vBulletin 3 posts to available width.
// @include http://bayarearidersforum.com/*
// @include http://www.bayarearidersforum.com/*
// @require http://ajax.googleapis.com/ajax/libs.../jquery.min.js
// @version 1
// @grant none
// ==/UserScript==
$(document).ready(function() {
$('[id^="post_message_"] img').css("maxWidth", "100%");
$('[id^="post_message_"] img').css("maxHeight", "800px");
});

woops, no workie.....likely hard headed old rider...?
Attached Images
 
__________________
Enjoy the ride!

Last edited by EastBayDave; 07-04-2016 at 11:01 AM..
EastBayDave is offline   Reply With Quote
Old 07-04-2016, 11:41 AM   #12
rodr
IBA # 56746
 
rodr's Avatar
 
AMA #: 2846730
Contributor + + + +

Join Date: Dec 2009
Location: Oz
Motorcycles: 2016 CB500XA
Name: Rod
Go here to see if it's working. If you can see the panoramas without horizontal scrolling, it is.
rodr is offline   Reply With Quote
Old 08-17-2016, 10:04 AM   #13
ariacode
Veteran
 

Join Date: Aug 2015
Location: San Francisco
Motorcycles: R1200R
Name:
Quote:
Originally Posted by rodr View Post
If there's a sufficiently trusted techie who knows how to modify the CSS, that would be ideal.
I've never dealt with vbullitin, and I'm not much of a css person, but if you have a place to add custom css you'd want the css rules instead of javascript:

Code:
[id^="post_message_"] img {
 max-width: 100%;
 max-height: 800px;
}
You can also change max-height for different screen sizes (phone, etc...). Way overboard top 5 google result here.

Just mentioning incase this is not known/obvious.
ariacode is offline   Reply With Quote
Old 04-24-2017, 09:24 AM   #14
insyder
Like a Boss.
 
insyder's Avatar
 
Barf Tech Admin
Founding Member

Join Date: Feb 2002
Location: W. Sacramento
Motorcycles: Are dangerous
Name: Brian
No need for the OP workaround.

The autoresizing has been added to the CSS for images. If you encounter any "super wide" images, please let me know.
__________________
.
web design and app development of west sacramento
.
insyder is offline   Reply With Quote
Old 04-24-2017, 09:43 AM   #15
rodr
IBA # 56746
 
rodr's Avatar
 
AMA #: 2846730
Contributor + + + +

Join Date: Dec 2009
Location: Oz
Motorcycles: 2016 CB500XA
Name: Rod
rodr is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 01:52 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.