![]() |
Quick Auto Image-Resize (Posts & Signature)
1 Attachment(s)
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. |
<font color="Red">INSTALLED & RATED *****</font>
Is it possible to make a note saying, click here to view the full size image?? |
I can, i just feel like that would take away from the simplicity of it, maybe an option for it? Hmm
|
Excellent Mod Gio. Keep it up. Installed and rated 5 stars.
Thanks. :) |
Quote:
|
Quote:
|
Nice hack bro. If you could also have the option to auto-resize by height that would be awesome.
|
Quote:
I just don't want to over complicate things, i could have gotten really crazy with this if i wanted and brought in all sorts of functions, but i kind of wanted a way for people to just be able to hit upload and go about their business. |
Thanks Gio, that's real cool man. I like the idea of keeping it lite too.
|
It´s working in my forum oK!! =)
But I´ve a problem when I do clic in the photo, it happen two things: -Open new windows with image + -In the same window show preview image... |
Anyone have an example of this running?
|
installed
thank you bro |
Quote:
Not sure exactly what you mean, you've lost me. Can you send me a pm perhaps? Quote:
|
Quote:
|
Quote:
|
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. |
Works well with 4.1.1 .. Just an FYI.. and THANKS!!
|
<i>Install
1. Import Product 2. Set a Maximum Width in Admincp, under Quick Auto Image-Resize (Posts & Signature) </i> I downloaded it but not sure how to import it, and 2) where do I set the Maximum Width. Where do I find that in the Admincp? Thanks! |
does this mod also resize video that are inside of forum posts?
|
Quote:
|
Quote:
|
Quote:
|
tagged
|
Exactly what I wanted 5 stars *installed
Thank you. |
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 */ |
nice one but it's didn't work for gif file format
|
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. |
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. |
Quote:
$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. |
1 Attachment(s)
Here is a version with the following modifications:
|
Any chance of one that only does the attachments and images in posts excluding the sigs lol
|
Awesome mod!
|
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']); Code:
$post['message'] = str_replace('<img', '<img style="max-width: ' . $this->registry->options['gquick_autoresize_maxwidth'] . 'px; " ', $post['message']); 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']); Code:
$post['signature'] = str_replace('<img', '<img style="max-width: ' . $this->registry->options['gquick_autoresize_maxwidth'] . 'px; " ', $post['signature']); |
Quote:
|
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? |
Anyone figure out a way to have it say something like click to view full size?
|
Can anyone explain barney style on how to install this mod?
|
All times are GMT. The time now is 03:41 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|