vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Auto Resize Your Images 3.52 compliant (https://vborg.vbsupport.ru/showthread.php?t=103915)

skooby 05-23-2006 08:21 PM

I'm having a problem with my news portal in my CMPS.

When I added the code, it resizes images in the posts. But when the Module tries to grab the resized image to post it on the homepage, it won't display the image if it is over the size that I set for it.

I used S@NL - BlackBik code in post# 47

I basically want the news module to grab the information in a selected forum on my site which includes an image in each post, and post that image on the main page in the news module, but the images need to be resized to fit the page correctly. If the image is over the set width of 400, it won't resize and display, it just doesn't display it period. It does resize it though if I go to the actual post. I need it to resize the image so it is displayed correctly in the news module of my CMPS on the mainpage.

Any ideas how to fix this?

epicbear 05-24-2006 05:18 PM

Ok, I installed this and it works great on the images but the whole problem I was having hasn't gone away.

On this page,

http://forums.epicski.com/showthread.php?t=33971

the offending image was in post #6. As you can see, it's resized. If you're viewing the page with Firefox...it looks fine. If you're viewing the page in IE...the tables still blow out really wide and require much horizontal scrolling.

Any ideas what's going on here?

epicbear 05-24-2006 05:49 PM

Quote:

Originally Posted by epicbear
Ok, I installed this and it works great on the images but the whole problem I was having hasn't gone away.

On this page,

http://forums.epicski.com/showthread.php?t=33971

the offending image was in post #6. As you can see, it's resized. If you're viewing the page with Firefox...it looks fine. If you're viewing the page in IE...the tables still blow out really wide and require much horizontal scrolling.

Any ideas what's going on here?

Nevermind...:confused:

bada_bing 05-24-2006 06:17 PM

Installed and working good so far on vb 3.5.3

Thank You

blacklancer 05-26-2006 04:11 PM

Quote:

Originally Posted by SiMateoAko
Lots of info here. If you're like me and don't want to add 30 lines of code to your img tags, do what I did.

replace this:

Code:

return '<img src="' .  $link . '" border="0" alt="" />';
with this:

Code:

return '<img style="max-width:800px; width: expression(this.width > 800 ? 800: true);" src="' .  $link . '" border="0" alt="" />';
The code you want to replace is found in the function handle_bbcode_img_match() in class_bbcode.php. For me it was on line 1831.

This is fast and will work with either firefox or IE. It may even work with Opera, but I don't know.

thats where its at! perfect! doesn't mess with the sigs at all. thanks so much!

:banana::banana::banana:

Neurotoxin 05-28-2006 02:06 AM

Awesome mod, works perfect!

Bulent Tekcan 05-28-2006 08:07 PM

Quote:

Originally Posted by ggiersdorf
The problem I am running into now is basically Signatures are used with the IMG tag this mod changes anything that has the IMG tag.

We need to re-write the $signature to use an alternate img tag like [SIG] [SIG] or somehow have the field for signatures remove the script above and use the default one from Vb. Basically trick it in signatures to use original vb code.

PHP Code:

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

anyone want to help with this let me know I have some updated code than the above that works better but Im holding off posting it till were done here..

Same problem here....this hack removed :tired:

jags2ooo 05-29-2006 05:49 PM

SiMateoAko AWESOME IT WORKS PERFECT!!!!!!!!! i just opened up a new forums 1 hour ago and of course some dude had to post a image that was so FREaking big and fked up the boards so i cam ehere ran a search and bam your fix owns :) THANKS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!11

I recommend Simateoako's version of this mod his is posted at post number #106 its nice and short only 1 line :D

Djamil 06-03-2006 04:39 PM

Quote:

Originally Posted by S@NL - BlackBik
Find:
Code:

return '<a href="' .  $link . '" target="_blank"><img src="' .  $link . '" border="0" alt="' . $vbphrase['click_for_larger_image'] . '" style="width: expression(this.width > 600 ? 600 : true);" /></a>'; 
} else { 
return '<a href="' .  $link . '" target="_blank"><img src="' .  $link . '" border="0" alt="' . $vbphrase['click_for_larger_image'] . '" style="max-width: 600px;" /></a>'; 
}

and replace by:
Code:

return '<a href="' .  $link . '" target="_blank"><img src="' .  $link . '" border="0" alt="' . $vbphrase['click_for_larger_image'] . '" style="width: expression(this.width > 600 ? 600 : true);" /><br><br>' . $vbphrase['click_for_larger_image'] . '</a>'; 
} else { 
return '<a href="' .  $link . '" target="_blank"><img src="' .  $link . '" border="0" alt="' . $vbphrase['click_for_larger_image'] . '" style="max-width: 600px;" /><br><br>' . $vbphrase['click_for_larger_image'] . '</a>'; 
}


I can't manage to make the phrases work.

The line breaks are there but the phrase text is missing. I triple-checked the phrase names, they are correct. Even the version posted in https://vborg.vbsupport.ru/showthread.php?p=52 doesn't show the phrase in the alt-tag. Any hints ?

Djamil

Djamil 06-04-2006 12:53 PM

I found out myself. There's important information missing in Post 52. If you defined the phrases as global phrases (which seemed the appropriate way to me since there was no specific phrasetype mentioned to define them in) and want the phrases to show up, you must do the following:

FIND

Code:

function handle_bbcode_img_match($link)
        {

ADD AFTER

Code:

global $vbphrase;
Then the phrases will show up.

For further information please consult this chapter of the vB manual

Djamil


All times are GMT. The time now is 06:52 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.01484 seconds
  • Memory Usage 1,751KB
  • 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
  • (6)bbcode_code_printable
  • (1)bbcode_php_printable
  • (4)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
  • (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