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)

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?


All times are GMT. The time now is 03:19 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.02055 seconds
  • Memory Usage 1,745KB
  • 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
  • (3)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