vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Miscellaneous Hacks - Image Resizer - Using nCode Script (https://vborg.vbsupport.ru/showthread.php?t=237650)

The_Hawk 04-03-2010 08:35 PM

Fantastic little mod, just what I needed. I can't wait till it works on the CMS side of things too :D

nul7 04-04-2010 11:37 PM

so I take it this doesn't scale images that use the [img] bbc code function correct?

customcolor 04-05-2010 01:03 PM

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

osayidan 04-05-2010 09:26 PM

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.

meissenation 04-07-2010 10:49 PM

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?

osayidan 04-09-2010 04:34 PM

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:
https://vborg.vbsupport.ru/external/2010/04/65.png

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.

murekhalir 04-09-2010 05:12 PM

Does this work on the CMS?

osayidan 04-09-2010 05:32 PM

Quote:

Originally Posted by murekhalir (Post 2018458)
Does this work on the CMS?

Not by default but see my post right above yours and see if that helps you.

Morsolo 04-12-2010 03:00 AM

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 :)

Alucard^ 04-14-2010 05:54 AM

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.


All times are GMT. The time now is 07: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
  • Page Generation 0.01616 seconds
  • Memory Usage 1,744KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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