PDA

View Full Version : Major Additions - Image Resizer - CMS | Blogs | Posts | Signatures | Albums | VM's | PM's


Seven Skins
03-12-2010, 10:00 PM
Image Resizer - CMS | Blogs | Posts | Signatures | Albums | VM's | PM's - Using JQuery Script


This hack resizes LARGE images in CMS, Blogs, Posts, Signatures, Albums, Visitor Messages, Private Messages ...


Warning: Please note that this hack will resize all LARGE images in the IMG tags.
If you are using large images for your logo or background and they are in IMG tags they will be resized too.
This hack works perfectly fine with default vBulletin styles and in Internet Explorer 8, FireFox 3.5, Chrome and Opera.


You have the option to:

Disable the hack.
Choose default message for warning bar.
Option to choose the height and width in CMS.
Option to choose the height and width in Blogs.
Option to choose the height and width in Posts.
Option to choose the height and width in Albums.
Option to choose the height and width in VM's.
Option to choose the height and width in PM's.




LIVE DEMO (http://www.sevenskins.com/testvb/index.php)
Username: demo
Password: demo



Installation:

Upload jquery.min.js to clientscript folder.
Import the XML file via Plugins & Products > Manage Products > Add/Import Products.

Note #1. This script will work after page is fully loaded. While the images are being downloaded they will be seen in full size.
Note #2. At the moment there is option to resize/exclude images in signatures. Signatures will be resized to the same size as posts.


If you have a LARGE LOGO and you dont want resized, do this:

In the header template find:
<div><a name="top" href="{vb:raw vboptions.forumhome}.php{vb:raw session.sessionurl_q}" class="logo-image"><img src="{vb:stylevar titleimage}" alt="{vb:rawphrase x_powered_by_vbulletin, {vb:raw vboptions.bbtitle}}" /></a></div>


Replace it with: (Edit the height and width in the above code to the size of your logo.)
<div><a name="top" href="{vb:raw vboptions.forumhome}.php{vb:raw session.sessionurl_q}" class="logo-image" title="{vb:rawphrase x_powered_by_vbulletin, {vb:raw vboptions.bbtitle}}">
<span style="background: url({vb:stylevar titleimage}) no-repeat; width:600px; height:120px; display:block"></span></a></div>



And this for other images you don't want resized:
Normal img tag:
<img src="image.png" width="600" height="120" border="0" alt="" />

Edit it to for this hack:
<span style="background: url(image.png) no-repeat; width:600px; height:120px; display:block"></span>


_________________________________ _________________________________

Please nominate this modification for the MOTM.
Please support me by donating ... click the link on the right. (Support Developer)
Please remember to click Mark as Installed if you use this hack.
_________________________________ _________________________________


13 March 2010
Version: 1.0 Released


.

Stifler
03-13-2010, 09:58 PM
didn't work for cms posts already existing.

Seven Skins
03-13-2010, 10:03 PM
Did you upload the jquery.min.js to clientscript folder?

tecnozul
03-13-2010, 10:36 PM
It works with vBadvanced ?

Extra PC
03-13-2010, 10:41 PM
tested but it's not work like your old Mod https://vborg.vbsupport.ru/showthread.php?t=237650

it's open the image in new window not in the same page

Forum Lover
03-13-2010, 10:42 PM
KJ, I am using other mod. What is the major difference?

SwollenCranium
03-13-2010, 10:50 PM
Holy crap ...

This mod RE-SIZES my FORUM LOGO. ( On the forum home only )

UNINSTALLED.

Dr.osamA
03-14-2010, 01:44 AM
Reserved

Stifler
03-14-2010, 03:06 AM
yes it was.. but seriously didnt work at all..

johnny713
03-14-2010, 05:48 AM
This is a nice mod, but I wait until the stable version. Because right now, I see too many complainer :D.

Diablotic
03-14-2010, 08:26 AM
Tagged for future use when this mod is polished

Honk0815
03-14-2010, 02:19 PM
Holy crap ...


This mod RE-SIZES my FORUM LOGO. ( On the forum home only )

UNINSTALLED.
Reply With Quote

self Problem

Kolbi
03-14-2010, 03:12 PM
Thank you!

Will install it in a few minutes.

Kolbi
03-14-2010, 06:30 PM
Can you minimize the jquery.min.js file?

Because it is loaded on every page.

Seven Skins
03-14-2010, 06:31 PM
.



LIVE DEMO adeed.




tested but it's not work like your old Mod https://vborg.vbsupport.ru/showthread.php?t=237650

it's open the image in new window not in the same page

I may add this in the update.

KJ, I am using other mod. What is the major difference?

This hack does all CMS,Albums, etc .... where as other does not.

Holy crap ...
This mod RE-SIZES my FORUM LOGO. ( On the forum home only )
UNINSTALLED.

I have updated the hack Info ... read info about how to sort out LARGE logo's.

Seven Skins
03-14-2010, 06:34 PM
Can you minimize the jquery.min.js file?

Because it is loaded on every page.

I will add conditional in the next update to exclude this from some pages.

tafreeh
03-14-2010, 06:49 PM
good one.. but here is what i want...

I want signatures to resize, but i do not want to show that yellow strip on top of the image, that says "click here to view the full size image" .. but at the same time i want that to show to in post...

Is it possible to do that?

AzzidReign
03-14-2010, 07:02 PM
Just what I was looking for!

Seven Skins
03-14-2010, 09:12 PM
good one.. but here is what i want...

I want signatures to resize, but i do not want to show that yellow strip on top of the image, that says "click here to view the full size image" .. but at the same time i want that to show to in post...

Is it possible to do that?

Not with this hack. You may reduce the size of warning box or remove the warning box and just leave the message only.

ximcix
03-14-2010, 10:11 PM
I'm using the other hack & loving it. the only downside it has is that i can only set width

I would love to be able to limit both the height & width (which this new version allows) but without having to manually make template changes. Most of the themes I use have large headers & my forum has several themes.

Even though the addition of lightbox would help make it more fancy (would be sweet if it could be coded to make use of vB's lightbox), it really isn't needed.

Just a simple hack that resizes large images posted by the members in specified regions is all we need.

RaceJunkie
03-15-2010, 12:51 AM
This seems like a good hack but having to add every image you don't want to re size to your header is really a hassle. :down:

This mod also will re size any images you have in your advertisement blocks. So how do you prevent it from resizing your ads?

valendono
03-15-2010, 02:44 AM
can u set if 728x90px ignored ?

Athena1984
03-15-2010, 08:25 AM
Why is this making my images smaller than the specified height and width?

EDIT: No worries, I fixed the issue. I'll be marking this as installed. Thank you for this! :)

AndrewDavis
03-15-2010, 03:56 PM
Question: It's not better to give the image, there not to resized a class? For example :

<img src="example.pic" class="notresized" /> ?

Cheers AndrewD

RaceJunkie
03-16-2010, 01:26 AM
uninstalled:down:

KURTZ
03-17-2010, 11:27 AM
This seems like a good hack but having to add every image you don't want to re size to your header is really a hassle. :down:

This mod also will re size any images you have in your advertisement blocks. So how do you prevent it from resizing your ads?

need some improvements ... :) hope the dev will release an upgrade soon ...

argothiusz
03-17-2010, 01:00 PM
What about option to define the size of signature?