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)

bchertov 04-04-2007 04:31 PM

Hi,

Great Pluggin! Works great for online display! However, I have modified my site so it sends out HTML email notification. When parsing the message from bbcode to HTML for emails I want to turn off the resizer because the javascript is not supported and can sometime cause problems.

I am currently instantiating the parser and then trying to turn off the resizer like so:

Code:

        $postbit->bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
        $postbit->ncode_imageresizer_do = false;
        ...
        $pagetext_cache["$touser[languageid]"] = $postbit->bbcode_parser->parse($pagetext_orig, $foruminfo['forumid']);

However this is not defeating the resizer, the onload code is still being added. Can you help me?

Thanks!

rknight111 04-05-2007 01:07 AM

I have installed and still cant get it to work, and I did turn the CSS store on and no problems, now I want to fiqure out how to get this working.

RON

AllenMead 04-07-2007 08:37 AM

Fantastic add on. I have RC 2 installed on another site, not updated to RC4 yet. However, I have just installed RC4 onto a new site and my index.php page is showing an error on the status bar.

Line: 333
Char: 1
Error: 'NcodeImageResizer' is undefined
Code: 0
URL: http://www.worldrallyforum.com/index.php

I am using CMPS ver: 2.2.1 (vb3.6) and vBulletin 3.6.5.

It doesn't show the error anywhere else on the forum. any help would be much appreciated.

Thanks

menababu 04-08-2007 04:31 AM

I dont see any option in admin cp-even tho it is working good v3.6.5.it resized by it self and when click it gets original size

check on www.desividesimasti.net

Thanks

morrow 04-09-2007 03:27 PM

I installed this today and recieve the same error...

I'm running the same as you (CMPS 2.2.1 / vB 3.6.1)

Line:303 = NcodeImageResizer.MODE = 'enlarge';

Quote:

Originally Posted by AllenMead (Post 1221739)
Fantastic add on. I have RC 2 installed on another site, not updated to RC4 yet. However, I have just installed RC4 onto a new site and my index.php page is showing an error on the status bar.

Line: 333
Char: 1
Error: 'NcodeImageResizer' is undefined
Code: 0
URL: http://www.worldrallyforum.com/index.php

I am using CMPS ver: 2.2.1 (vb3.6) and vBulletin 3.6.5.

It doesn't show the error anywhere else on the forum. any help would be much appreciated.

Thanks


bchertov 04-12-2007 12:13 AM

Would you please add a way that the pluggin can be turned off, particularly the ncode_imageresizer_replace function, programatically?

I want to be able to parse a given piece of a post and not have the replace being made (because its being sent in an HTML email). Thanks!

jahshaka 04-12-2007 07:34 AM

i would love to be able to control the size of the resized images on a per forum basis - some of my forums use the regular postbit and some use the legacy postbit...

as7aab 04-12-2007 07:39 AM

just upload the ncode_imageresizer.js to the forum folder "webite/forum"
upload product-ncode_imageresizer.xml from admincp...

if its that simple why doest it work for me?
i can see the settings in the admincp and in the usercp
but it doesnt resize any images

DJ XtAzY 04-14-2007 08:37 AM

I noticed this hack kinda cause the board to freeze/pause for a few seconds. Maybe it's because it's trying to anaylze all da images. If i disabled the product, the site loads smoothly. Is there a way to optimize the code a bit better so it doesnt lag?

testebr 04-16-2007 03:46 AM

when will you correct the mistake with the accentuated characters?

And can you load the .js file only in topic pages in next version?

funkmeister 04-17-2007 03:14 PM

Have this installed on 3.6.5 and it works perfectly - thanks.

Although I do have one question - how can I remove the "alt" text of "onload" appearing in those images that are within the width dimensions - so for example I have 800 set as max. width and any image below that such as 640 is getting the "alt" text specified as "onload". How to make it just blank?

Here is an example html source - the code looks like it should make it blank, but for some reason it's inserting "onload" for the "alt" text.

Code:

<img src="http://www.mydomain/images/image1.jpg" border="0" alt="" onload="NcodeImageResizer.createOn(this);" />
See also attached example screenshot.

Any ideas? Thanks in advance.

gg_luna128 04-18-2007 11:36 AM

Firebug extension for Firefox gaves me a JavaScript error, you might want to check that.

tehPARADOX 04-19-2007 02:56 PM

Just wanted to say thanks, been using this for awhile. Hoping support for image resize on vBadvance portal come soon.

DJ XtAzY 04-19-2007 10:50 PM

Quote:

Originally Posted by andrewkhunn (Post 1186169)
Here's how we managed to get it working with vbadvanced. Open up modules\news.php. On or around line 214, you should see this block of code:
Code:

// Parse bb code if necessary
if ($news['pagetext_html'])
{
        $news['message'] = $news['pagetext_html'];
}
else
{
        $news['message'] = $bbcode_parser->do_parse($news['pagetext'], $mod_options['portal_news_enablehtml'], $news['allowsmilie'], $mod_options['portal_news_enablevbcode'], $mod_options['portal_news_enablevbimage']);
}

Replace this chunk of code with:
Code:

// Parse bb code if necessary
if ($news['pagetext_html'])
{
        $news['message'] = $news['pagetext_html'];
}
else
{
        $news['message'] = $bbcode_parser->do_parse($news['pagetext'], $mod_options['portal_news_enablehtml'], $news['allowsmilie'], $mod_options['portal_news_enablevbcode'], $mod_options['portal_news_enablevbimage']);
        $news['message'] = preg_replace('/<img src="([^"]*)" border="0" alt="" \/>/', '<img src="\\1" border="0" alt="" onload="NcodeImageResizer.createOn(this);" />', $news['message']);
}

Basically, after it's all been parsed, you just run the same preg_replace that this module runs on regular posts. It's pretty straightforward.

That's how u make it vbadvanced compatible guys.. Works on my vbadvanced

Amenadiel 04-20-2007 03:26 AM

I don't know if this would be the right place to ask for it, but since ncode has proven proficient with image handling on the fly, I will.

How difficult would it be to implement a restriction which disables or strips out image tags when quoting a message?

It's annoying when an user posts 10 large images and then the next one quotes the entire message just to add a one line comment.

gg_luna128 04-20-2007 07:24 PM

Before I forget again, this plugin does not validate XHTML 1.0 Transitional. That's another thing that should be fixed.

Tralala 04-21-2007 02:39 AM

Quote:

Originally Posted by Amenadiel (Post 1231688)
I don't know if this would be the right place to ask for it, but since ncode has proven proficient with image handling on the fly, I will.

How difficult would it be to implement a restriction which disables or strips out image tags when quoting a message?

It's annoying when an user posts 10 large images and then the next one quotes the entire message just to add a one line comment.

Here's a hack that converts quoted IMG tags to URL tags instead:
https://vborg.vbsupport.ru/showthread.php?t=107022

It's even user-configurable with a UserCP pref.

testebr 04-22-2007 07:33 AM

Quote:

Originally Posted by testebr (Post 1228743)
when will you correct the mistake with the accentuated characters?

And can you load the .js file only in topic pages in next version?

please dont ignore me

Spleasure 04-24-2007 01:14 PM

I have finally released version 1.0 of the Image Resizer.
Changes are:
- added code to make phrases javascript safe, multiline phrases and phrases with accents
should work now.
- added compatibility with vBAdvanced
- improved installation procedure

I hope it works well for you.

Jorrit

PS: Donations are welcome: paypal / moneybookers: jorrit@ncode.nl

Mrdby 04-24-2007 01:16 PM

so download all the files again?

TrIn@dOr 04-24-2007 01:24 PM

thanks for the update!

Panagioths 04-24-2007 01:27 PM

Quote:

Originally Posted by Spleasure (Post 1234634)
I have finally released version 1.0 of the Image Resizer.
Changes are:
- added code to make phrases javascript safe, multiline phrases and phrases with accents
should work now.
- added compatibility with vBAdvanced
- improved installation procedure

I hope it works well for you.

Jorrit

PS: Donations are welcome: paypal / moneybookers: jorrit@ncode.nl

How can we do the update?

itsblack 04-24-2007 02:01 PM

wonderful! Thank you for the update.

tehPARADOX 04-24-2007 02:03 PM

Quote:

Originally Posted by Panagioths (Post 1234643)
How can we do the update?

Download the 1.0 package, then:

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

Crazy Serb 04-24-2007 02:39 PM

I still don't get it how this is supposed to work...

I've uploaded the .js file, imported the .xml, the javascript shows up in the pages defining the stylesheets and a few vbphrases/functions...

but that's about it.

all images are still regular sizes, no resize options are available... I'm totally clueless what to do now.

p.s. - i'm running vb 3.6.3 and vbadvanced 2.0.1 or something, if that helps at all.

Amenadiel 04-24-2007 02:53 PM

Quote:

Originally Posted by Tralala (Post 1232405)
Here's a hack that converts quoted IMG tags to URL tags instead:
https://vborg.vbsupport.ru/showthread.php?t=107022

It's even user-configurable with a UserCP pref.

Thank you!

I had to insert two fields to vb_profilefield for this mod to work in VB 3.6.5, but now it's ok and does exactly what I needed.

Spleasure 04-24-2007 03:04 PM

What is the URL to your board

tehPARADOX 04-24-2007 03:05 PM

Quote:

Originally Posted by Crazy Serb (Post 1234689)
I still don't get it how this is supposed to work...

I've uploaded the .js file, imported the .xml, the javascript shows up in the pages defining the stylesheets and a few vbphrases/functions...

but that's about it.

all images are still regular sizes, no resize options are available... I'm totally clueless what to do now.

p.s. - i'm running vb 3.6.3 and vbadvanced 2.0.1 or something, if that helps at all.

Look under vBulletin options > nCode Image Resizer Options.

gg_luna128 04-24-2007 05:25 PM

Still does not validate XHTML 1.0.

Spleasure 04-24-2007 06:24 PM

Quote:

Originally Posted by gg_luna128 (Post 1234823)
Still does not validate XHTML 1.0.

This release wasn't supposed to fix that.

Crazy Serb 04-24-2007 08:27 PM

Quote:

Originally Posted by tehPARADOX (Post 1234720)
Look under vBulletin options > nCode Image Resizer Options.

did.

still nothing.

changing settings around doesn't help.

disabling/enabling it doesn't help.

I have no idea what else to do...

is this browser specific? cuz I've tried it on FF2 and IE7, and no luck...

Mrdby 04-25-2007 12:02 AM

updated

AMG021 04-25-2007 12:42 AM

Quote:

Originally Posted by Crazy Serb (Post 1234689)
I still don't get it how this is supposed to work...

I've uploaded the .js file, imported the .xml, the javascript shows up in the pages defining the stylesheets and a few vbphrases/functions...

but that's about it.

all images are still regular sizes, no resize options are available... I'm totally clueless what to do now.

p.s. - i'm running vb 3.6.3 and vbadvanced 2.0.1 or something, if that helps at all.

I'm having the same problem. I don't know why but it doesn't resize in vBadvanced :confused:

Mrdby 04-25-2007 12:44 AM

well since you guys out it like that..i updated..and see no difference.

mktrilogy 04-25-2007 01:25 AM

The old version works well, when i updated and input the desired setting, nothing happens.

projectego 04-25-2007 03:25 AM

Thanks for the update, Spleasure! This hack rocks! ;)

cunder 04-25-2007 12:11 PM

Hello

Thank you man nice mod

But I use these mod vS-Hide.Hack.Resurrection.Expanded_2.8.1_by.Psionic.V ision

When someone presses on my site on the thanked button the pics reresize my images!

is there a way of changing wen someone press the thanks button en te pics don't stay resize !!!

thanks

KURTZ 04-25-2007 12:20 PM

i cant update this hack :(

i've got this error

Code:

Database error in vBulletin 3.6.5:

Invalid SQL:
ALTER TABLE `vBuser` ADD `ncode_imageresizer_mode` ENUM("none", "enlarge", "samewindow", "newwindow") DEFAULT "enlarge" NOT NULL;

MySQL Error  : Duplicate column name 'ncode_imageresizer_mode'
Error Number : 1060
Date        : Wednesday, April 25th 2007 @ 03:25:46 PM
Script      : http://www.XXX.com/board/admincp/plugin.php?do=productimport
Referrer    : http://www.XXX.com/board/admincp/plugin.php?do=productadd
IP Address  : XXX.XXX.XXX
Username    : KURTZ
Classname    : vb_database


AMG021 04-25-2007 12:44 PM

Try Uninstalling the old one and install this one ;)

Stifmeister2 04-25-2007 03:05 PM

Thx. :)


All times are GMT. The time now is 06:18 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.01793 seconds
  • Memory Usage 1,836KB
  • 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
  • (5)bbcode_code_printable
  • (11)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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