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
Image Resizer - Using nCode Script Details »»
Image Resizer - Using nCode Script
Version: 1.6, by Seven Skins Seven Skins is offline
Developer Last Online: Sep 2022 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 4.x.x Rating:
Released: 03-05-2010 Last Update: 09-02-2012 Installs: 1502
Uses Plugins Auto-Templates
Additional Files  
No support by the author.

Image resizer using nCode script

This hack resizes external images (not attachments) in cms, blogs, posts, new thread preview, signatures, private messages, visitor messages and vBadvanced CMPS.

You have the option to:
Disable the hack.
Choose the resize mode.
Default Maximum width.
Enable and disable cms resize option.
Enable and disable postbit resize option.
Enable and disable signature resize option.
Enable and disable blogs resize option.
Enable and disable private messages resize option.
Enable and disable visitor messages resize option.
Enable and disable vBadvanced CMPS resize option.


This hack has been tested:
- Using IE, FF, Chrome and Opera using default skin.

Installation:
- Upload the contents of upload folder to the root of your forum.
- Import the XML file via Plugins & Products > Manage Products > Add/Import Products.
- If you want to use "Enlarge in the same window" option you must edit "Image Medium Max" stylevar for the style you are using. Set this stylevar to high number e.g. 2000px or more if needed.

Upgrade:
- Upload the contents of upload folder to the root of your forum overwriting the existing file.
- Remove old product from AdminCP produact Manager.
- Import the XML file via Plugins & Products > Manage Products > Add/Import Products.

PS. This hack adds one link in the footer to SevenSkins website.


_________________________________ _________________________________

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


03 Sep 2012
Version 1.6
-Added functionality: Resizing of the images in vBadvanced CMPS.

Total Installs to date: 1248
Total Downloads to date: 7068


31 July 2011
Version 1.5


29 Jun 2011
Version: 1.4

-Fixed to work with vBulletin 4.1.4
-remove yellow bar as it was causing issue with vBulletin 4.1.4.
-Added functionality: Resizing of the images in CMS comments.
-Added functionality: Resizing of the images in BLOG comments.


21 Dec 2010
Version: 1.3

Thanks to ZexTasy for cms plugin code.

Added these option:
-Enable and disable cms resize option.
-Enable and disable postbit resize option.
-Enable and disable signature resize option.
-Enable and disable blogs resize option.
-Enable and disable private messages resize option.
-Enable and disable visitor messages resize option.


25 June 2010
Version: 1.2.0
Fixed to work with vBulletin 404.

06 March 2010
Version: 1.0.0 Released



.

Download Now

File Type: zip product-sevenskins_imageresizer_v1.6.zip (6.1 KB, 3388 views)

Screenshots

File Type: png image-resizer-1.png (102.6 KB, 0 views)
File Type: png image-resizer-2.png (45.2 KB, 0 views)
File Type: png image-resizer-3.png (83.4 KB, 0 views)
File Type: png image-resizer-4.png (68.1 KB, 0 views)
File Type: png image-resizer-5.png (85.2 KB, 0 views)
File Type: png image-resizer-6.png (195.8 KB, 0 views)

Show Your Support

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

Comments
  #42  
Old 04-03-2010, 08:35 PM
The_Hawk The_Hawk is offline
 
Join Date: Aug 2009
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Fantastic little mod, just what I needed. I can't wait till it works on the CMS side of things too
Reply With Quote
  #43  
Old 04-04-2010, 11:37 PM
nul7 nul7 is offline
 
Join Date: Sep 2006
Location: USA
Posts: 71
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

so I take it this doesn't scale images that use the [img] bbc code function correct?
Reply With Quote
  #44  
Old 04-05-2010, 01:03 PM
customcolor customcolor is offline
 
Join Date: Mar 2010
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

installed and works great!

i use photobucket to host my photos and i posted a fyi to my members and they love this mod!!!

image fyi
Reply With Quote
  #45  
Old 04-05-2010, 09:26 PM
osayidan osayidan is offline
 
Join Date: Sep 2006
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This appears to be the best of the image resizers working for 4.x, but does it work in the CMS? And if not is there an edit we can do ourselves to make it work in CMS?

The images posted in articles in the CMS sometimes are too big, and not only does it look ugly but there is no scroll bar or any way of seeing the full image. I don't think I'm the only one with this problem, a solution would be very nice.

Edit: nevermind, found one that does the CMS, and pretty much anywhere else on the site.
Reply With Quote
  #46  
Old 04-07-2010, 10:49 PM
meissenation meissenation is offline
 
Join Date: Apr 2005
Posts: 476
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there any way to make it so that if you click the bar to expand the image and then click the image (not the bar) again it will open in a new window?
Reply With Quote
  #47  
Old 04-09-2010, 04:34 PM
osayidan osayidan is offline
 
Join Date: Sep 2006
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So in the end this is actually the best and simplest image resizer. I've now tried all of them, and played around with the code on each, and this one is the winner.

I managed to create a very crude fix for enabling CMS resizing on this one. Problem with it is that the warning bar on top becomes over-sized, probably some CSS issue. Here is an example:


If you do not mind this, do not want to wait for a new hack or update to this one, and understand that you are doing this at your own risk, then here is how I did this:

Open: product-sevenskins_imageresizer-v1.0.0.xml

Find:
Code:
		<plugin active="1" executionorder="5">
			<title>Image Resizer: Postbit and Signatures</title>
			<hookname>postbit_display_complete</hookname>
			<phpcode><![CDATA[if($vbulletin->options['sevenskins_imageresizer_enabled']) {

    $post['message'] = preg_replace('/<img src="([^"]*)" border="0" alt="" \/>/', '<img src="\\1" border="0" alt="" onload="NcodeImageResizer.createOn(this);" />', $post['message']);

    if($vbulletin->options['sevenskins_imageresizer_resizesignatures']) {
    $post['signature'] = preg_replace('/<img src="([^"]*)" border="0" alt="" \/>/', '<img src="\\1" border="0" alt="" onload="NcodeImageResizer.createOn(this);" />', $post['signature']);
    }
}]]></phpcode>
		</plugin>
Bellow this, and above "</plugins>, add:

Code:
		<plugin active="1" executionorder="5">
			<title>Image Resizer: CMS</title>
			<hookname>global_complete</hookname>
			<phpcode><![CDATA[
			global $vbulletin;
			if($vbulletin->options['sevenskins_imageresizer_enabled']){
//Resize Images in message
	$output = preg_replace('/<img src="([^"]*)" border="0" alt="" \/>/', '<img src="\\1" border="0" alt="" onload="NcodeImageResizer.createOn(this);" />', $output);

}]]></phpcode>
		</plugin>
Save as a NEW file, this way you have the original to go back to if needed.
Uninstal/delete the old hack, you do not need to delete the contents of "upload" folder.
Import the edited one, you do not need to reupload the "upload" folder.

Check if it works for you.

If not, to revert to the old version, uninstal/delete this one. Import the original.


This is likely a very crude method of accomplishing this, and I'm only sharing this for those desperate for a good resizer that works on CMS. For me this is a temporary fix until the author of this hack releases something better.

Note: this was done on 4.0.2, I have no idea how it will behave on any other variation, or if any other mods will interfere.
Reply With Quote
  #48  
Old 04-09-2010, 05:12 PM
murekhalir murekhalir is offline
 
Join Date: Oct 2006
Posts: 254
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does this work on the CMS?
Reply With Quote
  #49  
Old 04-09-2010, 05:32 PM
osayidan osayidan is offline
 
Join Date: Sep 2006
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by murekhalir View Post
Does this work on the CMS?
Not by default but see my post right above yours and see if that helps you.
Reply With Quote
  #50  
Old 04-12-2010, 03:00 AM
Morsolo's Avatar
Morsolo Morsolo is offline
 
Join Date: Aug 2006
Location: Melbourne, Australia
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have always been a fan of the nCode resizer, primarily because of the bar above the image, which allows users to wrap [URL] around the image. Most - if not, all - resizers make the image clickable to enlarge, so wrapping [URL] has no effect; and a lot of my members do that.

I'd like to see multiple inputs on the AdminCP with multiple locations of images. (For example, being able to set a different max width for CMS, Blog, Posts, PM's, etc.)... Also, I've noticed that it doesn't resize [SIGPIC], which is a minor annoyance.

Also, any know how to set a different width if an image is quoted? My forum is fixed at 900px wide, so my images are resized down to 500px, but then if quoted, they stick out, so I make them set at about 460px... I'd like to be able to utilize max available area.

Even better, is it at all possible to just make max width "100%", so that it'll just resize down to the available area?

...But I'm just nitpicking here, brilliant mod
Reply With Quote
  #51  
Old 04-14-2010, 05:54 AM
Alucard^'s Avatar
Alucard^ Alucard^ is offline
 
Join Date: Feb 2008
Location: Argentina
Posts: 124
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Best image resizer!

But i have a suggestion (that i need) so if you can add it, would be really cool.

I want to use the plugin for signatures too, but with another width and height max.

Sry for my english.

Installed, ofcourse.
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:28 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.05558 seconds
  • Memory Usage 2,368KB
  • 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
  • (2)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
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (15)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
  • (7)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