vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   New BB tag to do image thumbnails... (https://vborg.vbsupport.ru/showthread.php?t=50882)

Zzed 04-11-2003 09:16 PM

Quote:

Today at 03:05 PM Katman said this in Post #70
I don't know what it was but I tried it again and now it's working! Thank You! You are the master!

Now the only problem I can see is the images in the signatures, they're linked now, with a border, even after I changed border=1 to 0. :D

Thank you kind sir. :)

Please give me a link to a thread containing an image in the sig.

And I am so hurt that you deleted my replies... :laugh::banana:

Katman 04-11-2003 09:18 PM

<a href="http://www.tlplanet.com/forums/showthread.php?threadid=2006" target="_blank">http://www.tlplanet.com/forums/showt...?threadid=2006</a>

Sorry about that, just part of the testing process

Zzed 04-11-2003 09:25 PM

That's because the image is 256x170 which is smaller than your 320x240 image resize. ;)

in dothumb()

Replace this:
Code:

    if(($img_info[0] <= 80) and ($img_info[1] <= 60)) {
      $code = "<a href=\"$code\" target=\"_blank\"><img src=\"$code\"></a>";
    }

with this:
Code:

    if(($img_info[0] <= 80) and ($img_info[1] <= 60)) {
      $code = "<a href=\"$code\" target=\"_blank\" border=\"0\"><img src=\"$code\"></a>";
    }

Excpet that instead of 80 and 60 you would be using 320 and 240 in the if statement. ;)

Katman 04-11-2003 09:30 PM

I did that originally.

Forget it, I see, Duh, you added the border=0

Code:

// ###################### Start dothumb #######################
function dothumb($code) {

  $img_info = @getimagesize($code);
  if($img_info[0]) {
    if(($img_info[0] <= 320) and ($img_info[1] <= 240)) {
      $code = "<a href=\"$code\" target=\"_blank\"><img src=\"$code\"></a>";
    }
    else {
      $xratio = $img_info[0] / 320;
      $yratio = $img_info[1] / 240;
      $factor = $xratio;
      if($yratio > $xratio) {
        $factor = $yratio;
      }
      $xsize = intval($img_info[0] / $factor);
      $ysize = intval($img_info[1] / $factor);
      $code="<a href=\"$code\" target=\"_blank\"><img src=\"$code\" width=\"$xsize\" height=\"$ysize\" border=\"0\"></a><br><font size=\"-2\">(click for larger image)</font>";
    }
  }

  return($code);
}
// ###################### End dothumb #######################


Zzed 04-11-2003 09:34 PM

Cool. :)

Katman 04-11-2003 09:35 PM

Nope, still linked with border. I'm going to add border=\"0\" to every href tag! :)

Damn, still there.

Got it! Needed to add border=0 to
Code:

<img src=\"$code\" border=\"0\"></a>";

Zzed 04-11-2003 09:39 PM

Quote:

Today at 03:29 PM Katman said this in Post #76
Nope, still linked with border. I'm going to add border=\"0\" to every href tag! :)

Nope, just hit reload. ;) The border will go away. ;)

Katman 04-11-2003 09:40 PM

OK, I'm done now, it's all good! Thanks for the quick helpful replies!

Zzed 04-11-2003 09:47 PM

You're very welcome. :)

Larry@IOG 04-11-2003 09:59 PM

Quote:

Today at 05:57 PM Zzed said this in Post #69
Hmm, I don't know why the PHP tag mutilated my preg_replace statement.

I have tried this on my board and it worked just fine. :)

Code:

$bbcode =  preg_replace("/img\]/i", "thumb]", $bbcode);

Didnt work for me, showed the image as a link rather than a thumbnail


Larry


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