Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Quick Auto Image-Resize (Posts & Signature) Details »»
Quick Auto Image-Resize (Posts & Signature)
Version: 1.00, by Gio~Logist Gio~Logist is offline
Developer Last Online: Oct 2022 Show Printable Version Email this Page

Category: Mini Mods - Version: 4.1.4 Rating:
Released: 09-05-2011 Last Update: Never Installs: 98
Auto-Templates
 
No support by the author.

Brought To You By
ModernvB - Vbulletin Solutions & Services
http://www.modernvb.com

Here's a very simple mini-mod that will resize all images in posts & signatures by using a max-width css attribute, along with an onclick function to open the normal-sized picture in a new window.

This product is super simple and has only a few lines of code. Keep in mind that as far as I know, max-width still gets rendered a tad off on IE (not much of a fan with ie anyway, but that's beside the point) on certain versions. Although i tested on IE7 with only a few images and it didn't look so bad at all. Perfect for me on firefox, chrome, etc.

If you're looking for something with a bit more options and functionality (javascript effects, more options, etc.) please take a look at:
Image Resizer.

Install
1. Import Product
2. Set a Maximum Width in Admincp, under Quick Auto Image-Resize (Posts & Signature)

This really is just a simple mini-mod. Nothing too fancy at all. Had someone who wanted the resizing done strictly with css and suggested I do something like this and offer it as well - so here ya go.

Download Now

File Type: xml product-gquick_autoresize_postvB4.xml (2.0 KB, 781 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
6 благодарности(ей) от:
beertruck, powerwheelie, RichieBoy67, shiraz sat, SKIDROW, synseal

Comments
  #32  
Old 08-26-2012, 02:09 PM
Mr GRiM's Avatar
Mr GRiM Mr GRiM is offline
 
Join Date: Jul 2011
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any chance of one that only does the attachments and images in posts excluding the sigs lol
Reply With Quote
  #33  
Old 09-10-2012, 01:42 PM
powerwheelie powerwheelie is offline
 
Join Date: Apr 2009
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Awesome mod!
Reply With Quote
  #34  
Old 01-16-2013, 07:32 PM
gamaken gamaken is offline
 
Join Date: Aug 2010
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have a quick fix for preventing all post (and/or sig) images opening in new tabs.
Change:
Code:
$post['message'] = str_replace('<img', '<img style="max-width: ' . $this->registry->options['gquick_autoresize_maxwidth'] . 'px; cursor: pointer;" onclick="window.open(this.src)" ', $post['message']);
To:
Code:
$post['message'] = str_replace('<img', '<img style="max-width: ' . $this->registry->options['gquick_autoresize_maxwidth'] . 'px; " ', $post['message']);
For signatures....
Change:
Code:
$post['signature'] = str_replace('<img', '<img style="max-width: ' . $this->registry->options['gquick_autoresize_maxwidth'] . 'px; cursor: pointer;" onclick="window.open(this.src)" ', $post['signature']);
To:
Code:
$post['signature'] = str_replace('<img', '<img style="max-width: ' . $this->registry->options['gquick_autoresize_maxwidth'] . 'px; "  ', $post['signature']);
That fixes the problem, but in order to see a full size image you have to middle mouse or right-click to open, which for me was a good trade-off.
Reply With Quote
  #35  
Old 03-19-2013, 11:16 AM
Gio~Logist's Avatar
Gio~Logist Gio~Logist is offline
 
Join Date: Jun 2004
Location: San Francisco
Posts: 2,575
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by powerwheelie View Post
Awesome mod!
:up::up:
Reply With Quote
  #36  
Old 03-24-2013, 04:26 PM
Replicators's Avatar
Replicators Replicators is offline
 
Join Date: Jul 2005
Location: Jamestown, NY
Posts: 344
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does this also work for images in cms articles?

EDIT: No it doesn't, could you also work on a seperate addon which would do cms and blog's aswell?
Reply With Quote
  #37  
Old 08-19-2013, 01:27 AM
kylek kylek is offline
 
Join Date: Oct 2003
Location: British Columbia, Canada
Posts: 798
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone figure out a way to have it say something like click to view full size?
Reply With Quote
  #38  
Old 02-24-2015, 12:52 AM
uspatriot00 uspatriot00 is offline
 
Join Date: Feb 2015
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can anyone explain barney style on how to install this mod?
Reply With Quote
Reply


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. The time now is 07:25 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05446 seconds
  • Memory Usage 2,310KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (8)post_thanks_box
  • (6)post_thanks_box_bit
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (8)post_thanks_postbit_info
  • (7)postbit
  • (1)postbit_attachment
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete