Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons

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
  #22  
Old 09-28-2011, 08:53 PM
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 DNN View Post
does this mod also resize video that are inside of forum posts?
Not at the moment. That might be a good idea, only all videos are embed differently. Especially when you take everyone's diff video bb tags into perspective.
Reply With Quote
  #23  
Old 09-28-2011, 08:54 PM
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 Quest2be1 View Post
Hey Gio, I wanted to ask you one more thing. Is there a line I can remove from your xml file so that your plug-in will only work for signatures? I don't know if being able to set a limit for posts and then a separate limit for sigs is still keeping it lite, but if so that would be cool.

Example...
I might want pictures in user's post to be able to go up to 700px wide.
Yet, for sigs I might only want it set to 400px wide.
As of right now I have it set to 550 to meet in between and I don't like it lol.
You would have to rename the variables and split up the file.
Reply With Quote
  #24  
Old 09-28-2011, 11:33 PM
thecore762 thecore762 is offline
 
Join Date: Jul 2008
Posts: 510
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

tagged
Reply With Quote
  #25  
Old 10-19-2011, 06:22 PM
synseal's Avatar
synseal synseal is offline
 
Join Date: Apr 2009
Posts: 334
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Exactly what I wanted 5 stars *installed

Thank you.
Reply With Quote
  #26  
Old 12-12-2011, 09:17 PM
Sworm Sworm is offline
 
Join Date: Feb 2008
Posts: 422
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Gio , great work ... to resize images, i'm actually using this add at the end of my style postbit.css (Zer query)...:
Code:
/* BEGIN Image resize */ 
#posts IMG { 
    max-width: 640px; 

} 
#collapseobj_threadreview IMG { 
    max-width: 640px; 

} 
/* END Image resize */  
It is better to use this one or your one? thanks
Reply With Quote
  #27  
Old 01-02-2012, 12:30 PM
depalaza depalaza is offline
 
Join Date: Feb 2011
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice one but it's didn't work for gif file format
Reply With Quote
  #28  
Old 01-09-2012, 04:23 PM
snerd snerd is offline
 
Join Date: Apr 2007
Location: Oklahoma
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've been using this from the 3.xx vBulletin mod section for over a year. How did I miss it over here in the 4.xx section?! LOL!

Great, simple mod that does the job it's designed for.
Reply With Quote
  #29  
Old 01-26-2012, 10:55 PM
gamaken gamaken is offline
 
Join Date: Aug 2010
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't know if this is a bug or expected, but this mod is giving certain graphics the onclick javascript.
Smileys, the quote icon...they become clickable links opening a new page/tab and show the graphic. Any fix for this because we like the mod a lot.
Reply With Quote
  #30  
Old 02-13-2012, 09:37 AM
motorhaven motorhaven is offline
 
Join Date: Jul 2002
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by gamaken View Post
I don't know if this is a bug or expected, but this mod is giving certain graphics the onclick javascript.
Smileys, the quote icon...they become clickable links opening a new page/tab and show the graphic. Any fix for this because we like the mod a lot.
Found the same bug. Change this in the plug-in:

$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']);
$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 this:

$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']);
$post['message'] = str_replace('onclick="window.open(this.src)" class="inlineimg" src="images/buttons/', 'class="inlineimg" src="images/buttons/', $post['message']);
$post['message'] = str_replace('onclick="window.open(this.src)" src="images/smilies', 'src="images/smilies/', $post['message']);
$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']);

Not the most efficient way but its 4:30 in the morning, I'm groggy and just wrote it.
Reply With Quote
  #31  
Old 04-19-2012, 09:05 PM
AndrewRich's Avatar
AndrewRich AndrewRich is offline
 
Join Date: Dec 2007
Location: Palo Alto, CA
Posts: 67
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here is a version with the following modifications:
  • applies to signatures only
  • doesn't apply to smilies (motorhaven's fix above)
Attached Files
File Type: xml product-gquick_autoresize_signatu.xml (2.0 KB, 27 views)
Reply With Quote
Reply

Thread Tools

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 04:32 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06483 seconds
  • Memory Usage 2,339KB
  • Queries Executed 26 (?)
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
  • (1)bbcode_code
  • (3)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
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (6)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (2)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)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_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