vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Show Thread Enhancements - Image resizer (https://vborg.vbsupport.ru/showthread.php?t=118048)

Spleasure 06-07-2006 10:00 PM

Image resizer
 
This mod is not supported anymore by Spleasure/nCode, please look at these threads:
https://vborg.vbsupport.ru/external/2010/11/2.gif Image Resizer
https://vborg.vbsupport.ru/external/2010/11/2.gif The Image Resizer. Powered with Lytebox / Highslide / Lightview / and many more!
https://vborg.vbsupport.ru/external/2010/11/2.gif 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:

Yorixz 06-08-2006 06:56 PM

Great addon, thanks a lot for releasing it here!

Tralala 06-08-2006 07:07 PM

Wow. This looks completely sweet. A perfect solution for image resizing blues. I especially like how there's a user preference!

I'd like to see another option, if that's possible, and that is, to turn images off completely, when using certain skins. That would be useful when someone's using a mobile skin, for example.

Spleasure 06-08-2006 07:11 PM

Is that because you don't want them to download the images or you want them to have such wide images?

I was also thinking about making the maximum height and width settable for users, what do you think about that.

Tralala 06-08-2006 07:18 PM

Quote:

Originally Posted by Spleasure
Is that because you don't want them to download the images or you want them to have such wide images?

It's because they're on a mobile device, typically using a mobile skin... and loading images slows them down immeasurably. So they end up just avoiding threads that may have inline images in them. Cell data speeds aren't typically broadband, so every kb saved, counts!

The mobile skin typically has avatars turned off, but inline images are still included. And yes, the user can turn images off in the VB UserCP, but that setting will apply to ALL skins.

I just thought that since your advanced hack was dealing with images and user preferences, that it might provide (finally) an intelligent way to deal with this.

Quote:

Originally Posted by Spleasure
I was also thinking about making the maximum height and width settable for users, what do you think about that.

That'd be kinda cool. :)

Allan 06-08-2006 07:26 PM

Yep, great hack, very nice ;)

Click Install ^^

Your hack work with IE and Firefox ?

utw-Mephisto 06-08-2006 07:32 PM

Quote:

Originally Posted by Allan
Your hack work with IE and Firefox ?

Important one

[high]* utw-Mephisto wants to know too[/high]

Pathor 06-08-2006 07:39 PM

Very very nice and useful. :)

The image-weight doesn?t appear in firefox 1.5.0.4.
Is this fixable?

imported_predatorkill 06-08-2006 07:43 PM

Already installed few days ago,the best and most "user likeable" product among all the other image resizer products!

Good work Jorrit!

Spleasure 06-08-2006 07:55 PM

It's supposed to work with Opera, IE and FireFox. If it doesn't, that doesn't mean I don't support it, but it means that there is a bug.
This script is mostly clientside, so for mobile users it's pointless. Putting that in a separate plugin might me more appropriate.
Pathor: what exactly do you mean?

Tralala 06-08-2006 08:00 PM

Quote:

Originally Posted by Spleasure
This script is mostly clientside, so for mobile users it's pointless. Putting that in a separate plugin might me more appropriate.

Ah, I gotcha. Thanks for the explanation and for sharing this hack.

Quote:

Originally Posted by imported_predatorkill
Already installed few days ago,the best and most "user likeable" product among all the other image resizer products!

Agreed!

Spleasure 06-08-2006 08:34 PM

Quote:

Originally Posted by Pathor
Very very nice and useful. :)

The image-weight doesn?t appear in firefox 1.5.0.4.
Is this fixable?

I now know what you mean by this. I'm sorry, only IE supports reading this. See it as an extra for IE users, not as something left out for Firefox users.

To all: Thanks for the great comments by the way

I also have a 3.5.4 compatible version lying around here, should I put it on here too?

El-Gazaly 06-08-2006 08:57 PM

Thanks For It
Installed

Pathor 06-08-2006 09:20 PM

Quote:

Originally Posted by Spleasure
See it as an extra for IE users[...]

Unfortunately... ;) :D

BTW: Installed on my local testboard. :)

Mr Chad 06-08-2006 09:34 PM

you should put the notice and the image in a 1 cell 1 row table with a boarder.

It would look a lil more clean for transparent images.

Deska 06-09-2006 03:46 AM

Is this work for image attachment also?

Spleasure 06-09-2006 06:18 AM

Quote:

Originally Posted by Deska
Is this work for image attachment also?

No, but you usually can use thumbnails for those images

Snake 06-10-2006 01:30 PM

Thank you, been waiting for this!

Royal 06-14-2006 06:53 AM

This is not working in 3.5.4 right?

Since i get this error:

Quote:

Database error in vBulletin 3.5.4:

Invalid SQL:

### INSERT QUERY GENERATED BY fetch_query_sql() ###
INSERT INTO plugin
(`active`, `executionorder`, `title`, `hookname`, `phpcode`, `product`)
VALUES
('1', '5', 'nCode Image Resizer: Initialization I', 'cache_templates', 'if($vbulletin->userinfo[\'ncode_imageresizer_mode\'] == \'\') {\r\n $vbulletin->userinfo[\'ncode_imageresizer_mode\'] = $vbulletin->options[\'ncode_imageresizer_defaultmode\'];\r\n}\r\n\r\nif($vbulletin->userinfo[\'ncode_imageresizer_mode\'] != \'none\') {\r\n define(\'NCODE_IMAGERESIZER_INIT\', 1);\r\n $globaltemplates[] = \'ncode_imageresizer_headinclude\';\r\n}', 'ncode_imageresizer');

MySQL Error : Unknown column 'executionorder' in 'field list'
Error Number : 1054
Date : Wednesday, June 14th 2006 @ 09:39:36 AM
Script : http://forum....com/admincp/plugin.php
Referrer : http://forum....com/admincp/plugin.php?do=productadd
IP Address : ..
Username : roy
Classname : vb_database
Been looking for a hack like this, allways loved it at xbw ;-) Would appreciate it when you post a version for 3.5.4 !

Spleasure 06-14-2006 06:55 AM

Quote:

Originally Posted by Royal
This is not working in 3.5.4 right?

Since i get this error:



Been looking for a hack like this, allways loved it at xbw ;-) Would appreciate it when you post a version for 3.5.4 !

It's indeed not working in 3.6.0. Contact me at the XBW forum with you email address to get the latest 3.5.4 version. I have a zipfile lying

Royal 06-14-2006 07:13 AM

Quote:

Originally Posted by Spleasure
It's indeed not working in 3.6.0. Contact me at the XBW forum with you email address to get the latest 3.5.4 version. I have a zipfile lying

Done, thanks!

Ohiosweetheart 06-14-2006 04:30 PM

I'm assuming (hoping) that this is for use on those HUGE images that members like to hot-link in their posts?

Ommand 06-16-2006 05:01 AM

Any chance you could upload the 3.54 version? I'm sure there would be many people very interested in it..

Spleasure 06-16-2006 05:36 AM

Quote:

Originally Posted by Ohiosweetheart
I'm assuming (hoping) that this is for use on those HUGE images that members like to hot-link in their posts?

Indeed
Quote:

Originally Posted by Ommand
Any chance you could upload the 3.54 version? I'm sure there would be many people very interested in it..

I've uploaded it, it's downloadablein the files section.

Ommand 06-16-2006 02:15 PM

Quote:

Originally Posted by Spleasure
I've uploaded it, it's downloadablein the files section.

Thank you, very much appreciated :)

Spleasure 06-20-2006 04:25 PM

I've uploaded beta 2 to vBulletin.org. The changelog is short, but I think you'll like it:

Quote:

1.0 beta 2 (June 20th, 2006)
- Made maximum width and height userspecific and editable
Resizing of signature images is something I consider for next versions, but I think 3.6 provides sufficient tools for managing that.

Pathor 06-20-2006 09:50 PM

I canĀ“t save my own settings in the usercp (Images In Posts).
Maximum width and height works perfect.

vB 3.6 beta 2

PHP 5.0.5
MySQL 5.0.15

Spleasure 06-21-2006 06:22 AM

Will be fixed in the next version, change in the "nCode Image Resizer: Process UserCP submission" plugin:

PHP Code:

$userdata->set('ncode_imageresizer_mode'$vbulletin->GPC['ncode_imageresizer_mode']); 

to
PHP Code:

$userdata->set('ncode_imageresizer_mode'$vbulletin->GPC['userfield']['ncode_imageresizer_mode']); 


Pathor 06-21-2006 11:10 AM

Perfect! Thanks! :)

Should be standard in vB. ;)

El-Gazaly 06-21-2006 10:31 PM

hello sir
this hack is fantastic
i am installed it before and i used it in my forums
but the signaure doesn't resized
i suggest you to add in the hack to resize sign
and put in control panel of this hack to choose resize sign or no
and use resize height and width
bye

Ommand 06-22-2006 02:23 AM

Hrmm, is there any way to make this work with vBAdvanced CMPS? The image resizing works great everywhere... except for on the portal.

Am I missing something, or is that simply not supported with your addon?

ggiersdorf 06-22-2006 11:54 AM

IM a bit confussed with this module I understand what it is supposed to do. But when I install it on my 3.6 Beta3 and setup the max width and height in the admincp 640x480 it seems to work for guests.

When I go into my user cp and set the setting its hit or miss. I posted a new message attached an image thats 1024x768 or larger and it puts the image in original size on the screen.

I want a way to fix it for ALL users mandatory that any image over 640 wide gets resized to 640 so it will not break my fixed width on the site.

Is there a way to universally make it all the same no user specific settings?

example: http://www.gentendo.com/forum/showth...?p=880#post880 thats works for you as a guest but for me It is always HUGE!

Spleasure 06-22-2006 12:07 PM

Quote:

Originally Posted by Ommand
Hrmm, is there any way to make this work with vBAdvanced CMPS? The image resizing works great everywhere... except for on the portal.

Am I missing something, or is that simply not supported with your addon?

I haven't tested it with that product.

Quote:

Originally Posted by ggiersdorf
When I go into my user cp and set the setting its hit or miss. I posted a new message attached an image thats 1024x768 or larger and it puts the image in original size on the screen.

What do you mean by hit or miss?

ggiersdorf 06-22-2006 04:12 PM

I mean I set the setting in my USER CP to 640 and 0 but when I look at the post the image is not resized like it should. If I am a guest it works fine.

CAN I FORCE ALL USERS to 640 x 0 regardless of there choices?
Guest and Users?

Spleasure 06-22-2006 04:18 PM

I'm working on that. Soon.

ggiersdorf 06-22-2006 04:30 PM

Thanks, I just wish I could get it to work correct all the time. its driving me nuts :) but I like your idea so I dont want to remove the mod.

aLReeMi 06-23-2006 05:42 PM

thanks

Spleasure 06-23-2006 05:59 PM

Beta 3 is now available for download:
Quote:

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

twitch 06-23-2006 06:30 PM

Awesome! Thanks for the update

Pathor 06-28-2006 09:15 AM

The uninstall doesn?t work.

Code:

Database error in vBulletin 3.6.0 Beta 3:

Invalid SQL:
ALTER TABLE `vb3_user` DROP `ncode_imageresizer_maxwidth`, `ncode_imageresizer_maxheight`;

MySQL Error  : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ncode_imageresizer_maxheight`' at line 1
Error Number : 1064
Date        : Wednesday, June 28th 2006 @ 12:11:41 PM
Script      : http://localhost/vb3/admincp/plugin.php?do=productkill
Referrer    : http://localhost/vb3/admincp/plugin.php?do=productdelete&productid=ncode_imageresizer&s=
IP Address  : 127.0.0.1
Username    : Pathor
Classname    : vB_Database

EDIT: MySQL 5.0.15


All times are GMT. The time now is 07:21 AM.

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.01839 seconds
  • Memory Usage 1,852KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (18)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete