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.

sticky 04-14-2010 07:14 AM

Anyone? Does it resize attachments and links?

Does it work with the CMS?

Morsolo 04-14-2010 10:59 AM

Quote:

Originally Posted by sticky (Post 2020948)
Anyone? Does it resize attachments and links?

Does it work with the CMS?

Osayidan added to the code to allow it to function with the CMS, seen only a few posts above...
https://vborg.vbsupport.ru/showpost....8&postcount=46

vBulletin resizes attachments itself and ... how can you resize a link?

mofeu 04-17-2010 03:15 PM

how is this image resizer work?

djbaxter 04-17-2010 03:27 PM

Quote:

Originally Posted by mofeu (Post 2022696)
how is this image resizer work?

It works well. :)

sticky 04-21-2010 08:04 AM

Quote:

Originally Posted by Morsolo (Post 2021067)
Osayidan added to the code to allow it to function with the CMS, seen only a few posts above...
https://vborg.vbsupport.ru/showpost....8&postcount=46

vBulletin resizes attachments itself and ... how can you resize a link?

I meant resizing linked images.

Big_Jason 04-23-2010 07:35 PM

Quote:

Originally Posted by Alucard^ (Post 2020922)
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.

x2 on that request. You'd solve my #1 headache if this could independently resize signatures to a different size than posts in images and blogs.

Any thoughts on making that a reality? Pretty please?

Oh and installed :)

MikeWarner 04-24-2010 07:49 AM

I love this hack - other resizers make something that should be simple into something complicated. This hack keeps it nice and simple!

Quick question though - on trying to improve my YSlow score, it is saying that the ncode js file reference should be moved to the footer. How can I do this?

Sworm 04-26-2010 09:00 AM

anybody has tried to use it on 4.0.3?

djbaxter 04-26-2010 09:16 AM

Quote:

Originally Posted by Sworm (Post 2027481)
anybody has tried to use it on 4.0.3?

Yep. Working fine for me on 4.03.

Alex@Mk3OC 04-26-2010 02:30 PM

Working fine on 4.0.3 here as well

ps2wiz 04-26-2010 09:23 PM

Has anyone else experienced this problem?

After I move a thread that has a resized image, the image appears in its original size. Almost like after moving any thread, this mod excludes it... Any help please?

Manoel J?nior 04-27-2010 12:16 AM

VERY, VERY Thanks!!!!!

Great bro!

ps2wiz 04-27-2010 02:05 AM

Quote:

Originally Posted by ps2wiz (Post 2027811)
Has anyone else experienced this problem?

After I move a thread that has a resized image, the image appears in its original size. Almost like after moving any thread, this mod excludes it... Any help please?

In addition to this, if a user edits their post and adds a new image, that new image will not be resiszed.

Manoel J?nior 04-27-2010 02:44 AM

Would not add to the bar the original image size and for how much it was resized?

cvn 04-27-2010 04:54 AM

Seven Skins made another mod named "Image Resizer - CMS | Blogs | Posts | Signatures | Albums | VM's | PM's" that resizes images in CMS, Blogs, posts... I installed it in 4.0.2 PL1 and it works well. But I'm not sure if it works with 4.0.3, any one knows?

The mod is already moved to the Modification Graveyard, do you know the reason?

edwinlar 04-27-2010 05:35 AM

me funciono perfecto

Sworm 04-28-2010 12:36 PM

Don't work for me is it not retroactive. Uninstalled

ToNetU 04-29-2010 12:27 AM

thanks but what about profile? and why when i post a pic and then when i want to edit that post to add new picture or write something, the picture i have posted disappear?

any update for this?

installed..

nick682 05-03-2010 08:06 PM

Is there any way I can use this mod to resize images in my VSa - ChatBox (AJAX) https://vborg.vbsupport.ru/showthread.php?t=235271 ?

doraj 05-04-2010 07:49 PM

Hello,

is this Hack compatible also with vB CMS?

Thank you

Seven Skins 05-04-2010 08:35 PM

Hack description is:

Quote:

This hack resizes images in posts, signatures, blog home page and blog entry page.

doraj 05-05-2010 08:26 PM

I understand, Seven could you update the Hack and make it compatible also with vB CMS?
It's very used and will be a great news for all member that use it.
Thank you :)

sticky 05-05-2010 10:09 PM

Quote:

Originally Posted by doraj (Post 2032294)
I understand, Seven could you update the Hack and make it compatible also with vB CMS?
It's very used and will be a great news for all member that use it.
Thank you :)

Is there an image resizer that works with the CMS?

Manoel J?nior 05-05-2010 10:34 PM

1 Attachment(s)
How to with information image real:

Attachment 116741

Xencored 05-07-2010 04:58 PM

Quote:

Originally Posted by Seven Skins (Post 2001515)
I am making another hack and it seems to work on CMS and albums. I will post it when I complete the hack.
.

Hi mate cant wait for this but is that the one in the graveyard?

sticky 05-09-2010 07:53 AM

Quote:

Originally Posted by Animemike (Post 2033251)
Hi mate cant wait for this but is that the one in the graveyard?

Same question.

Seven Skins 05-09-2010 04:00 PM

No that is a different one.
I asked that to be moved to graveyard due to it was resizing all the images including banners etc.

Xencored 05-09-2010 04:11 PM

Quote:

Originally Posted by Seven Skins (Post 2034168)
No that is a different one.
I asked that to be moved to graveyard due to it was resizing all the images including banners etc.

Ah right awesome mate when can we hope for the cms /album one :D

janslu 05-10-2010 12:09 PM

I think that's still the best image resizer. Thanks for your work.

Has anyone been able to enable this for group discussions? I've tried creating a plugin hooked to group_discussionbit_display_complete with the following code:

Code:

if($vbulletin->options['sevenskins_imageresizer_enabled']) {
    $message['message'] = preg_replace('/<img src="([^"]*)" border="0" alt="" \/>/', '<img src="\\1" border="0" alt="" onload="NcodeImageResizer.createOn(this);" />', $message['message']);
}

but it doesn't seem to work. Any help will be appreciated.

murekhalir 05-11-2010 05:49 AM

sexy


All times are GMT. The time now is 12:03 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.01585 seconds
  • Memory Usage 1,829KB
  • 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
  • (3)bbcode_code_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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