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)

qwertzu 04-10-2003 10:18 AM

Cool
nice hack Zzed
thanks for that great one
i try it right now
:)

qwertzu 04-10-2003 10:49 AM

i've got a little bug it works fine everywhere (post & signs)
exept for one member in his sign it displays only the link but if i put that pic in a post the thumb works :lick:
i'v find the solution by hosting on my server & renaming the pic
here is the original pic i have remove the % and change JPG in jpg http://membres.lycos.fr/seadoo1979/s...io%20sonny.JPG
do you think that's normal ??

and thanks again for this great hack

Zzed 04-10-2003 07:21 PM

qwertzu, that only happens when getimagesize() can not determine the image height and width. :(

And thank you for your kind words. :)

Katman 04-11-2003 08:06 PM

I can't get this to work! It still shows as the original image size. Is there something I'm missing or not doing right? vB 2.2.9

Example:
http://www.tlplanet.com/forums/showt...?threadid=2023

Zzed 04-11-2003 08:28 PM

Quote:

Today at 02:00 PM Katman said this in Post #64
I can't get this to work! It still shows as the original image size. Is there something I'm missing or not doing right? vB 2.2.9

Example:
http://www.tlplanet.com/forums/showt...1965#post21965

You are using the wrong tag. Instead of IMG you need to use THUMB. ;)

I registered and posted a reply to your thread. Check it out. :D

Katman 04-11-2003 08:31 PM

I see that you made it work! Yes, I was using the [*img*] tag, that's the way I understood the hack to work. My mistake, sorry.

I guess my question now is, is there any way to make the IMG tag do this automatically?

Thanks for the help!

Zzed 04-11-2003 08:36 PM

In functions.php:
Look for:
PHP Code:

function bbcodeparse2($bbcode,$dohtml,$dobbimagecode,$dosmilies,$dobbcode)
// parses text for vB code, smilies and censoring

  
global $DB_site,$wordwrap,$allowdynimg$bbuserinfo;

  static 
$smilies,$bbcodes;
  global 
$regexcreated,$searcharray,$replacearray,$phpversionnum

Add the following directly below it:
Code:

$bbcode =  preg_replace("/img\]/i", "thumb]", $bbcode);
This will replace all your IMG tags with THUMB tags. ;)

Katman 04-11-2003 08:41 PM

Do I have to add [ in front of the /img\] and thumb]? Because when I tried it as you have it I received an error.

Parse error: parse error in /home/tlplanet/www/html/forums/admin/functions.php on line 640

Fatal error: Call to undefined function: vbdate() in /home/tlplanet/www/html/forums/admin/sessions.php on line 400

Zzed 04-11-2003 09:03 PM

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);

Katman 04-11-2003 09:11 PM

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


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.01221 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
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)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