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

Reply
 
Thread Tools
Image resizer Details »»
Image resizer
Version: 1.0.1, by Spleasure Spleasure is offline
Developer Last Online: Nov 2013 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 3.6.1 Rating:
Released: 06-07-2006 Last Update: 05-05-2007 Installs: 1296
DB Changes Uses Plugins Template Edits
Additional Files Translations  
No support by the author.

This mod is not supported anymore by Spleasure/nCode, please look at these threads:
Image Resizer
The Image Resizer. Powered with Lytebox / Highslide / Lightview / and many more!
Probably many more. Have one to put here? Contact me using the PM feature.




NCODE IMAGE RESIZER FOR VBULLETIN 3.6.0
version: 1.0.1

I. What does it do
This plugin enables you to automatically resize every user-posted image which is larger than given dimensions. Users can choose the maximum dimensions and the resize method to use.
The resize methods are:
- No resizing
- Enlargement in the same document
- Enlargement in the same window (replacing the forum thread document)
- Enlargement in a new window

It also adds an information bar (which is not displayed when the image is too small) giving information about the original dimensions and filesize. Filesize is only supported on Internet Explorer, other browsers don't reveal this information through javascript.

II. What does it not do
- It does not do server side resizing of images. Everything is done clientside
- It does not prevent long loading times. The images have to be downloaded completely by the client before the script can resize them.

III. Installation / Upgrade
1. Upload "ncode_imageresizer.js" to the clientscript directory in your vBulletin installation.
2. Import "product-ncode_imageresizer.xml" in your vBulletin forum. Enter your AdminCP and go to Plugins & Products -> Manage Products. Click on [Add/Import Product] and refer to the XML file.
The installation script will detect which database modifications have to be performed and will display the query that is going to perform these modifications.
If something fails, execute that query yourself.
3. The file "vbulletin-language-nl.xml" can be used to import dutch versions of the used phrases. Import it in your language manager and overwrite the installed language "Nederlands". It will not remove any phrases, just add new ones.

The installation adds a couple of settings, phrases, templates and plugins, all of which are easily recognizable. It also adds the fields `ncode_imageresizer_mode`, `ncode_imageresizer_maxwidth` and `ncode_imageresizer_maxheight` to your `user` table, in which the resizesettings are saved. These fields are removed when the plugin is removed.

IV. Configuration
Administrators can change the maximum dimensions and resize mode in the options window. These values will be the default for users without a setting of their own and anonymous users.
The installation script creates a new option group called "nCode Image Resizer Options" in which you can enter these values.
As said in section I, users can edit their preference in their User Control Panel at the Options page in the "Thread Display Options" section. The administrator can however limit the options the user can set. The administrator can choose between letting the user change all options, no options at all, only the resize mode, or all options except that the maximum dimensions can't exceed the default dimensions.

V. Version history
1.0.1 (May 6th, 2007)
- fixed javascript file version
- fixed vBAdvanced compatibility problem

1.0 (April 24th 2007, 2007)
- added code to make phrases javascript safe, multiline phrases and phrases with accents
should work now.
- added compatibility with vBAdvanced
- improved installation procedure

1.0 release candidate 4 (February 21th, 2007)
- improved speed for posts with many small images
- work around for text display problem in Safari
- Improved installer
- Improved user control panel options: added information about default settings and option to explicitly use the default resize mode.
- Added option to disable the system
- Added option to reset all user specific settings

1.0 release candidate 3 (February 4th, 2007)
- added warning on installation when javascript is not present.
- removed redundant plugins
- small bugfixes
- signature resizing is optional. turn resizing of hotlinked images on or off in the control panel
- improvements in javascript code
- changed hook method so all bbcode class users get resize functionality automatically

1.0 release candidate 2 (October 3rd, 2006)
- images weren't correctly resized when both height and width restrictions were in effect.
- added robustness for IE flaws, not perfect yet
- images in post previews get resized as well

1.0 release candidate 1 (Juli 16th, 2006)
- bug preventing proper uninstallation fixed

1.0 beta 3 (June 23th, 2006)
- Bugfixes
- Now resizes signaturepictures too
- Administrators can limit the user-settable options

1.0 beta 2 (June 20th, 2006)
- Made maximum width and height userspecific and editable

1.0 beta 1 (June 8th, 2006)
- First public release

VI. Incompatibilities
Incompatibilities have been reported with:
"Transparency PNG pictures with Internet Explorer 6 (server-side solution)"
(https://vborg.vbsupport.ru/showthread.php?t=93415)

VI. Copyright
please keep in mind that:
THIS IS NOT FREE SOFTWARE

You are allowed to install this in your forum, and you are allowed to make suggestions for improvements. It is not allowed to redistribute the files in any other way than as a zipfile with the XML and this readme in original state.

(c) 2005 - 2007 nCode - www.ncode.nl - info@ncode.nl

Support site:
http://www.ncode.nl/vbulletinplugins/

Like it? Please donate
You can donate by PayPal: USD or EUR
Alternatively, you can donate using MoneyBookers to account jorrit[at]ncode.nl.

Thanks to Xboxworld.nl, rage3d.com, insomnia.gr, myxbox.gr and Distance for testing this mod

Previews:

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #292  
Old 02-14-2007, 06:19 PM
wacodep wacodep is offline
 
Join Date: Mar 2005
Posts: 65
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nevermind ... I see ... the resized image was too small ...
Reply With Quote
  #293  
Old 02-14-2007, 07:33 PM
wacodep wacodep is offline
 
Join Date: Mar 2005
Posts: 65
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would like to send a few bucks, but your PayPal link goes to the a non-English/non-US display. I don't have any Euros to send you, and can't read it anyways ...

Can I just PayPal some $US from the US PayPal to jorrit [at] ncode [dot] nl ??
Reply With Quote
  #294  
Old 02-15-2007, 01:12 AM
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Location: New York
Posts: 1,834
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just checked a site that was running this mod and the text is not viewable when browsing with safari. Any chance of getting that fixed?
Reply With Quote
  #295  
Old 02-15-2007, 06:50 PM
ReQueM ReQueM is offline
 
Join Date: Dec 2006
Location: Turkey
Posts: 98
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thank u
*installed*
Reply With Quote
  #296  
Old 02-16-2007, 12:15 PM
Eagle Creek's Avatar
Eagle Creek Eagle Creek is offline
 
Join Date: Jan 2004
Location: Netherlands
Posts: 742
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Problem!

http://www.nucia.nl/forum/showthread.php?p=222209 (post #4 and #10)

As u can see, the picture isn't resize properly. It looks like the resize to keep the height-width-ratio. Can somebody confirm this?
That shouldn't happen because I gave up a MAXIMUM height and WIDTH in my ACP. So it shouldn't be wider then X, even if that means the picture isn't shown "nice" anymore.

EDIT:
I fixed it jusing this code in the JS file:
Code:
NcodeImageResizer.prototype.scale = function() {
	var cs = 0;
	cs += NcodeImageResizer.MAXWIDTH  > 0 && this.originalWidth  > NcodeImageResizer.MAXWIDTH  ? 1 : 0;
	cs += NcodeImageResizer.MAXHEIGHT > 0 && this.originalHeight > NcodeImageResizer.MAXHEIGHT ? 2 : 0;
	if (cs == 3) cs -= this.originalWidth / NcodeImageResizer.MAXWIDTH > this.originalHeight / NcodeImageResizer.MAXHEIGHT ? 2 : 1;
	switch (cs) {
      	case 1:
			resized = true;
			this.img.width = NcodeImageResizer.MAXWIDTH;
			this.img.height = (NcodeImageResizer.MAXWIDTH / this.originalWidth) * this.originalHeight;
			break;
		case 2:
			resized = true;
			this.img.height = NcodeImageResizer.MAXHEIGHT;
			this.img.width = (NcodeImageResizer.MAXHEIGHT / this.originalHeight) * this.originalWidth;
			break;
		}



	this.warning.width = this.img.width;
	this.warning.onclick = function() { return this.resize.unScale(); }
Reply With Quote
  #297  
Old 02-16-2007, 02:30 PM
Spleasure's Avatar
Spleasure Spleasure is offline
 
Join Date: Jun 2002
Location: Enschede, the Netherlands
Posts: 144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Eagle Creek View Post
Dude.. You are making it so confusing with all those seperate files and then the zip file.. I just want to make in in Dutch, what should I do. Where could I upload the seperate Dutch file? Or the zip Dutch file? Why is there a size difference??
The -nl file contains just phrases, it should be imported separately in the language manager.
Quote:
Originally Posted by wacodep View Post
I would like to send a few bucks, but your PayPal link goes to the a non-English/non-US display. I don't have any Euros to send you, and can't read it anyways ...

Can I just PayPal some $US from the US PayPal to jorrit [at] ncode [dot] nl ??
Yes you can, and I have updated the paypal links. Thanks by the way I really appreciate it
Reply With Quote
  #298  
Old 02-16-2007, 04:57 PM
Tralala's Avatar
Tralala Tralala is offline
 
Join Date: Jan 2006
Posts: 1,207
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Spleasure View Post
The lightbox effect is something I consider for a future version.
Spleasure, another coder by the name of mini2 (who uses this ncode image resizer, BTW) has the best lightbox effect for vBulletin, called highslide. It works really nicely for attachments.

mini2 has posted that he's trying to make it work with the [img] tag... and I thought your two scripts might be a marriage made in vb modding heaven.

Just throwing out the idea and good karma.

Paypal donation is also on the way.
Reply With Quote
  #299  
Old 02-16-2007, 06:09 PM
Spleasure's Avatar
Spleasure Spleasure is offline
 
Join Date: Jun 2002
Location: Enschede, the Netherlands
Posts: 144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Tralala View Post
Spleasure, another coder by the name of mini2 (who uses this ncode image resizer, BTW) has the best lightbox effect for vBulletin, called highslide. It works really nicely for attachments.

mini2 has posted that he's trying to make it work with the [img] tag... and I thought your two scripts might be a marriage made in vb modding heaven.

Just throwing out the idea and good karma.

Paypal donation is also on the way.
I like the effects definitely I don't like the fact that for his mod you have to do all kinds of edits yourself, I like to make everything as easy as possible for users. I will have a look into integrating highslide after 1.0. I want to have 1.0 finished soon with the current features and as stable as possible.
Reply With Quote
  #300  
Old 02-16-2007, 06:17 PM
fly fly is offline
 
Join Date: Oct 2003
Posts: 1,215
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Spleasure View Post
I like the effects definitely I don't like the fact that for his mod you have to do all kinds of edits yourself, I like to make everything as easy as possible for users. I will have a look into integrating highslide after 1.0. I want to have 1.0 finished soon with the current features and as stable as possible.
Did you happen to see my message regarding the 'bug' with IE?
Reply With Quote
  #301  
Old 02-16-2007, 06:28 PM
Spleasure's Avatar
Spleasure Spleasure is offline
 
Join Date: Jun 2002
Location: Enschede, the Netherlands
Posts: 144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by flypaper View Post
Did you happen to see my message regarding the 'bug' with IE?
yes, and the slowdowns at posts with many small images which do not have to be resized anyway is gone in the upcoming version.
Quote:
Originally Posted by mini2 View Post
The only file edits you have to do yourself are if you want extra functions. Sadly hooks are not in the right places for some things such as altering pre-defined bbcodes.

You also have to customise the highslide files to match your own URLs, no more difficult than setting your preferences in the admin control panel.

The template mods could maybe be packaged up as a product though, I'm not generally a mod releaser, I just thought the highslide thing worked well and seemed to fill a demand.

I'm not sure how highslide would help this mod really, as it's just a resizer, maybe if you shrank every attached image above the limits down to a thumbnail with a highslide zoom code that could work, but the thing I like about this image resizer is it's very simple in the way it works. Does what it should with little fuss.
Regarding rewriting predefined tags: I rewrote the img tag, and that's quite possible. I'm still thinking how this should be done.
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 04:41 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.05329 seconds
  • Memory Usage 2,339KB
  • 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
  • (1)bbcode_code
  • (7)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete