vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Add-On Releases - Image Resizer (https://vborg.vbsupport.ru/showthread.php?t=176531)

Marc118 06-20-2008 02:18 PM

Hey guys, a quick question.

I would like my members to upload larger images than my forum width. So I have set the max image size to 1024x768. Is there anyway to have the resizer resize to my forum width? Or a but smaller?

Smitty 06-20-2008 09:36 PM

I admit not reading the whole thread, but will someone please tell me if this works in blog posts and such, or is it only for forum posts?

tmiland 06-20-2008 09:55 PM

Quote:

Originally Posted by Smitty (Post 1554937)
I admit not reading the whole thread, but will someone please tell me if this works in blog posts and such, or is it only for forum posts?

Take a look here --> https://vborg.vbsupport.ru/showpost....&postcount=171 :)

Smitty 06-20-2008 10:07 PM

Thank you! I did start back through the thread and found some references, but the post you linked to was what I needed. I appreciate your help!

kambing 06-22-2008 06:39 PM

Quote:

Originally Posted by Ninth Dimension (Post 1535640)
Hi, just installed - I love this script, having used it on my 3.6.8 forum. But I have a problem - "This image has been resized. Click this bar to view the full image. The original image is sized %1%2" - as seen here: http://arathor.net/showpost.php?p=226982&postcount=8

Any ideas?

Quote:

Originally Posted by Jase2 (Post 1535694)
What's the problem? I see this:

i believe the earlier version of ncode also was having this problem..
i am also having this problem..
i uninstalled my old ncode and installed this new one..
uninstall reinstall use old one again and so forth..
until i dun remember which version of ncode i have on now :o
but still coming out with %1%2..

googled out what could be wrong..
saw in Spleasure's thread, KURTz mentioned it most likely is due to vbadvanced..

well i disable vbadvanced for a while, load a page.. and the numbers were there..
enable vbadvanced.. and it became %1%2 and weight %3
tested with IE & firefox..

any ideas how to get around this..
or where to edit the top bar text so i can remove the image original size thingy text..

Much Appreciated,
kambing

Jase2 06-22-2008 07:49 PM

Yes, that is down to vbadvanced (I think).

Hmm...not too sure what could be causing that atm. I don't use vbadvanced, either. I'll take a look shortly.

Marcus_Fenix 06-26-2008 07:00 AM

Hi,

We've got a problem with the image resizer on our forum. I wanted to set the size a little lower than 650 pixels, but when I tried to change it to 600 pixels. I got this error:

Fatal error: Call to a member function query_write() on a non-object in /var/www/includes/adminfunctions_options.php(490) : eval()'d code on line 64

The funny thing is that I can change it to a higher value and now it?s up to 700 pixels... oops :D

Any clues?
Using vbulletin 3.7.1

GoNz00 06-26-2008 05:09 PM

great mod thanks, is there any way to stop the resized image centering as its throwing the formatting off ?

dklassen 06-26-2008 08:13 PM

Same here. I'm running vbadvanced and I also have %1%2 and weight %3. Any fix?

Raptor 06-26-2008 11:09 PM

works great however doesn't resize if an image is within spoiler tags

here is the BB code for my spoiler tags - what would i need to change to sort this ?

many thanks :)

Code:

<div style="margin:5px 20px 20px 20px">
        <div class="smallfont" style="margin-bottom:2px"><b>Spoiler:</b> <input type="button" value="Show" style="width:45px;font-size:10px;margin:0px;padding:0px;" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }"></div>
        <div class="alt2" style="margin: 0px; padding: 6px;">
                <div style="display: none;">
                {param}
                </div>
        </div>
</div>


RACHR 06-27-2008 07:44 PM

Work on 3.7.2?

It doesnt work, i have the ald attachements and no image resizer, in acp i have the Add on and i can choose any options.

Thx

frankenberrie 06-27-2008 08:53 PM

Perfect for every board out there!!

ALil'Hope 06-27-2008 08:59 PM

Fatal error: Call to a member function query_write() on a non-object in /public_html/forums/includes/adminfunctions_options.php(490) : eval()'d code on line 11

Black Widow 06-28-2008 10:52 AM

Quote:

Originally Posted by Marcus_Fenix (Post 1559269)
Hi,

We've got a problem with the image resizer on our forum. I wanted to set the size a little lower than 650 pixels, but when I tried to change it to 600 pixels. I got this error:

Fatal error: Call to a member function query_write() on a non-object in /var/www/includes/adminfunctions_options.php(490) : eval()'d code on line 64

The funny thing is that I can change it to a higher value and now it?s up to 700 pixels... oops :D

Any clues?
Using vbulletin 3.7.1

Quote:

Originally Posted by ALil'Hope (Post 1560674)
Fatal error: Call to a member function query_write() on a non-object in /public_html/forums/includes/adminfunctions_options.php(490) : eval()'d code on line 11

In order to fix the Fatal Error do the following:

Open the xml product file.
Search for:
Code:

<plugin active="1" executionorder="5">
                        <title>nCode Image Resizer: Enforce Maximum Dimensions</title>
                        <hookname>admin_options_processing</hookname>
                        <phpcode><![CDATA[if($vbulletin->GPC['setting']['ncode_imageresizer_useroptions'] == 'maxdimensions') {
        if($oldsetting['varname'] == 'ncode_imageresizer_maxwidth' && $oldsetting['value'] > intval($vbulletin->GPC['setting']['ncode_imageresizer_maxwidth']) && intval($vbulletin->GPC['setting']['ncode_imageresizer_maxwidth']) > 0) {
                $db->query_write('UPDATE `'.TABLE_PREFIX.'user` SET `ncode_imageresizer_maxwidth` = '.intval($vbulletin->GPC['setting']['ncode_imageresizer_maxwidth']));
        } elseif($oldsetting['varname'] == 'ncode_imageresizer_maxheight' && $oldsetting['value'] > intval($vbulletin->GPC['setting']['ncode_imageresizer_maxheight']) && intval($vbulletin->GPC['setting']['ncode_imageresizer_maxheight']) > 0) {
                $db->query_write('UPDATE `'.TABLE_PREFIX.'user` SET `ncode_imageresizer_maxheight` = '.intval($vbulletin->GPC['setting']['ncode_imageresizer_maxheight']));
        }
}

if($vbulletin->GPC['setting']['ncode_imageresizer_clearusersettings'] == '1') {
        $vbulletin->GPC['setting']['ncode_imageresizer_clearusersettings'] = '0';
        db->query_write('UPDATE `'.TABLE_PREFIX.'user` SET `ncode_imageresizer_maxheight` = NULL, `ncode_imageresizer_maxheight` = NULL, `ncode_imageresizer_maxwidth` = NULL, `ncode_imageresizer_mode` = NULL WHERE 1');
}]]></phpcode>
                </plugin>

Replace with:
Code:

<plugin active="1" executionorder="5">
                        <title>nCode Image Resizer: Enforce Maximum Dimensions</title>
                        <hookname>admin_options_processing</hookname>
                        <phpcode><![CDATA[if($vbulletin->GPC['setting']['ncode_imageresizer_useroptions'] == 'maxdimensions') {
        if($oldsetting['varname'] == 'ncode_imageresizer_maxwidth' && $oldsetting['value'] > intval($vbulletin->GPC['setting']['ncode_imageresizer_maxwidth']) && intval($vbulletin->GPC['setting']['ncode_imageresizer_maxwidth']) > 0) {
                $vbulletin->$db->query_write('UPDATE `'.TABLE_PREFIX.'user` SET `ncode_imageresizer_maxwidth` = '.intval($vbulletin->GPC['setting']['ncode_imageresizer_maxwidth']));
        } elseif($oldsetting['varname'] == 'ncode_imageresizer_maxheight' && $oldsetting['value'] > intval($vbulletin->GPC['setting']['ncode_imageresizer_maxheight']) && intval($vbulletin->GPC['setting']['ncode_imageresizer_maxheight']) > 0) {
                $vbulletin->$db->query_write('UPDATE `'.TABLE_PREFIX.'user` SET `ncode_imageresizer_maxheight` = '.intval($vbulletin->GPC['setting']['ncode_imageresizer_maxheight']));
        }
}

if($vbulletin->GPC['setting']['ncode_imageresizer_clearusersettings'] == '1') {
        $vbulletin->GPC['setting']['ncode_imageresizer_clearusersettings'] = '0';
        $vbulletin->db->query_write('UPDATE `'.TABLE_PREFIX.'user` SET `ncode_imageresizer_maxheight` = NULL, `ncode_imageresizer_maxwidth` = NULL, `ncode_imageresizer_mode` = NULL WHERE 1');
}]]></phpcode>
                </plugin>


indie2industry 06-28-2008 10:58 AM

will this resize signature Pictures also??

Doctor Death 06-28-2008 09:51 PM

Quote:

Originally Posted by indie2industry (Post 1561123)
will this resize signature Pictures also??

I would like to know this as well. Specifically photo album photos?

EagleNick 06-29-2008 12:47 AM

Does it work on 3.7.2

indie2industry 06-29-2008 04:53 AM

Quote:

Originally Posted by Doctor Death (Post 1561583)
I would like to know this as well. Specifically photo album photos?

yep, it works on signatures. it includes an option.

And works perfectly with 3.7.2:up:

aramiK89 06-29-2008 10:45 AM

Hey, just need to check - once this is added it won't give birth to the security token error?

Has the line of code been added so that it works with the security token feature?

Just been having a lot of issues with this + mods

Thanks!

Ingress 06-29-2008 03:20 PM

Thanks, installed on 3.7.2 and working nicely ;-)

Noticed a minor CSS-flaw that caused the text-alignment of the warning to behave differently in Firefox and MSIE 7.

In MSIE it was centered, in FF it was not, fixed it this way:

In product-imageresizer.xml

search for

Code:

table.ncode_imageresizer_warning td {
        font-size: 10px;
        vertical-align: middle;


add after:

Code:

text-align: center;

The just upgrade the product and choose overwrite.

That's all ;-)

Ingress

D.Baker 06-30-2008 12:34 AM

Hey Jase, any luck getting it to work with Lightbox?

Jase2 06-30-2008 12:43 AM

Quote:

Originally Posted by Ingress (Post 1562135)
Thanks, installed on 3.7.2 and working nicely ;-)

Noticed a minor CSS-flaw that caused the text-alignment of the warning to behave differently in Firefox and MSIE 7.

In MSIE it was centered, in FF it was not, fixed it this way:

In product-imageresizer.xml

search for

Code:

table.ncode_imageresizer_warning td {
        font-size: 10px;
        vertical-align: middle;


add after:

Code:

text-align: center;

The just upgrade the product and choose overwrite.

That's all ;-)

Ingress

Good catch. Will include it in an update soon.

Quote:

Originally Posted by D.Baker (Post 1562551)
Hey Jase, any luck getting it to work with Lightbox?

No, sorry. I have 101 things going on at the moment. I should have an update soon to fix a few bugs and to clean a few things here and there, tho'.

Jase2 06-30-2008 12:44 AM

Quote:

Originally Posted by aramiK89 (Post 1561964)
Hey, just need to check - once this is added it won't give birth to the security token error?

Has the line of code been added so that it works with the security token feature?

Just been having a lot of issues with this + mods

Thanks!

Yes, it has been added.

TCattitude 06-30-2008 12:52 AM

I make it work with Lytebox and Highslide. You need some changes in the function that parse the "img tag" in the html, but is really simple.
Is a fork of this, so... Jase2, if you want, i can give you the details yo include those in the product. I don't want to release a separate one, cause still using the ncode's javascript to resize large images, i just change the way they open for the user.

Jase2 06-30-2008 12:53 AM

TCattitude, feel free to private message me the changes and I will review when time permits.

D.Baker 06-30-2008 01:28 AM

No probs Jase. I've PM'd tCat, maybe he can help.

Could you please add the 2px margin around the thumbnails at least? You images sit flush on top of each other, rather than have a 2px margin like attached images do. See here for example.

Dean C 06-30-2008 09:46 AM

I've just installed this and the images aren't resizing at all. What can I do to debug the problem?

Jase2 06-30-2008 10:15 AM

Hmmm.... what version of vBulletin are you running? Also, are you sure the image is bigger than the set dimensions in ACP?

Raptor 06-30-2008 11:24 AM

Quote:

Originally Posted by Raptor (Post 1559972)
works great however doesn't resize if an image is within spoiler tags

here is the BB code for my spoiler tags - what would i need to change to sort this ?

many thanks :)

Code:

<div style="margin:5px 20px 20px 20px">
        <div class="smallfont" style="margin-bottom:2px"><b>Spoiler:</b> <input type="button" value="Show" style="width:45px;font-size:10px;margin:0px;padding:0px;" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }"></div>
        <div class="alt2" style="margin: 0px; padding: 6px;">
                <div style="display: none;">
                {param}
                </div>
        </div>
</div>


anything guys ? im sure im not the only one with this small problem :)

Alliya 06-30-2008 12:03 PM

Is it possible to use this without the information bar on top of the image?

D.Baker 06-30-2008 02:25 PM

Hey Alliya, to remove the yellow warning box from images embedded using IMG tags, add the following CSS to your style.

Code:

.ncode_imageresizer_warning {
    display: none;
}

After doing that you will notice that there is no way to click on the image to enlarge it, so you'll need to do the following. I don't like doing it this way because it involves editing a core file, but it's the only way I could figure it out. Maybe Jase knows a better way.

Using FTP, browse to /includes/ and edit the following line of PHP code in the file "class_bbcode.php".

PHP Code:

return '<img src="' .  $link '" border="0" alt="" />'

change to:
PHP Code:

return '<a target="_blank" href="' $link '"><img src="' $link '" border="0" alt="" /></a>'


This should get it working, but you will then notice that the images sit flush on top of each other (they have no margin), which looks bad when they are posted in that way (see here for an example of what I am talking about, note that I have not disabled the warning box).

YuOr 07-01-2008 01:54 AM

Installed!
i was testing it out and the information on the bar says "The original image is sized %1%2." What is that?

Yarike 07-01-2008 05:15 PM

Using this but its not resizing images even though the image is double the size the limit is set at?

Alliya 07-02-2008 02:08 PM

Hi Baker,

thanks thats fine, we don't use many pictures so only the first code is fine just in case someone doesn't know how to resize them :rolleyes:

Alliya

TCattitude 07-03-2008 06:35 PM

Jase2, just PM you the packed mod ;)

Ingress 07-03-2008 07:24 PM

Just messed with the code again, I'm really sorry ;-)

I regularly copy my complete live-board into a test-environment, which resides under testboard.domain.com.

There is a problem with the code in product-imageresizer.xml (line 122) which is

Code:

<script type="text/javascript" src="$vboptions[bburl]/clientscript/ncode_imageresizer.js?v=1.0.1"></script>

Since I don't update my bburl when I copy (and never had to with other mods) your mod didn't work any more with that absolute link. I just made the link relative which eliminates the obligation to alter bburl in ACP-Options when you do such a copy (or when people just move their board and are lazy ...).

Making it relative won't hurt and is the best way in my opinion; if you also think so you will change line 122 to

Code:

<script type="text/javascript" src="clientscript/ncode_imageresizer.js?v=1.0.1"></script>

in your next release ;-).

Kind regards and thanks for maintaing this fine mod,

Ingress

<edit>

Just noticed you also need to change the URL to the tiny symbol in js-file to achieve full relativity ;-)

Change line 119 of ncode_imageresizer.js

Code:

mimg.src = NcodeImageResizer.BBURL+'/images/statusicon/wol_error.gif';

to

Code:

mimg.src = 'images/statusicon/wol_error.gif';

and the job is fully done.

</edit>

cartooner 07-04-2008 01:36 AM

I installed and so far so good. One question, instead of the information bar how about adding an option to have a "mouse over" info bar. In members Sigs my members don't go for anything like this cluttering up their Siggie. So why not have it that when you roll your mouse over the image the pointer changes and an info box pops up. One of the older Image Resizer hacks have that....https://vborg.vbsupport.ru/showthrea...=image+resizer. But It is an older hack and It was one of the hacks I think gave me problems with "security-token" error messages several of my members were getting.

Just wondering if a mouse over is doable. Thank you.

xoutlawz00x 07-04-2008 10:10 PM

Yea i would love a mouse over instead of the yellow bar tooo. thankssss

D.Baker 07-05-2008 02:08 AM

If you want a mouse over instead of a yellow bar read post 271, I provided a hack to do it.

cartooner 07-05-2008 02:29 PM

Quote:

Originally Posted by D.Baker (Post 1567077)
If you want a mouse over instead of a yellow bar read post 271, I provided a hack to do it.



Thank you.


All times are GMT. The time now is 07:43 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.01758 seconds
  • Memory Usage 1,856KB
  • 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
  • (13)bbcode_code_printable
  • (2)bbcode_php_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (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