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 03-26-2003 10:00 PM

New BB tag to do image thumbnails...
 
This hack adds a new tag to your forums that will allow you to post images
in the form of a thumbnail.

The tag allows you to post pictures in the form of a thumbnail. Large images
can throw off the page, and the tag will scale the picture down to an 80x60
thumbnail preserving its original length and width ratio and turn it into a
hyperlink that you can click on and see the full image in a new browser window.
If the image being thumbnailed is smaller than 80x60, it will show up as is.

This tag is identical to the IMG tag. The new tag is THUMB

Tables affected: none
Templates affected: none
Files affected: admin/functions.php

Check out this link for a demo: http://www.ls1.com/forums/showthread...hreadid=276879

Note: This tag does not resize the actual picture. It just displays them at a smaller
scale. It will not help with bandwidth preservation.

Kars10 03-27-2003 06:52 PM

Very cool Zzed!!

Thanks for sharing.
Kars :)

Sebastian 03-27-2003 07:12 PM

Sorry! Due to high server loads, this forum and its contents are currently unavailable. Please try again in a few minutes.
Current server load is 17.

This forum will reopen when the server load drops below 15.

.......

Pady 03-27-2003 07:15 PM

excellent idea - great hack and easy to add too - well done

NuclioN 03-27-2003 07:31 PM

I've rainbowcode in it, how to replace it with this?

$bbcode=str_replace("{", "{", $bbcode); // stop people posting replacements in their posts
$bbcode=preg_replace("/(\[)(rainbow)(])(\r\n)*(.*)(\[\/rainbow\])/esiU", "dorainbow('\\5')", $bbcode);
return censortext($bbcode);

Zzed 03-27-2003 07:43 PM

Quote:

Today at 01:31 PM NuclioN said this in Post #5
I've rainbowcode in it, how to replace it with this?

$bbcode=str_replace("{", "{", $bbcode); // stop people posting replacements in their posts
$bbcode=preg_replace("/(\[)(rainbow)(])(\r\n)*(.*)(\[\/rainbow\])/esiU", "dorainbow('\\5')", $bbcode);
return censortext($bbcode);


Replace it with this:
PHP Code:

        $bbcode=str_replace("{""{"$bbcode); // stop people posting replacements in their posts
        
$bbcode=preg_replace("/\[thumb\](\r\n|\r|\n)*((http|https):\/\/([^;<>\(\)\"".iif($allowdynimg,"","!\*\?\&")."]+)|[a-z0-9\/\\\._\- ]+)\[\/thumb\]/esiU""dothumb('\\2')"$bbcode);
        
$bbcode=preg_replace("/(\[)(rainbow)(])(\r\n)*(.*)(\[\/rainbow\])/esiU""dorainbow('\\5')"$bbcode);

  return 
censortext($bbcode); 


Zzed 03-27-2003 07:49 PM

Thank you all for your kind words. https://vborg.vbsupport.ru/

Sebastian, I made VB.org visitors immune to the high load shutout. ;)

Intex 03-27-2003 07:50 PM

Nice hack Zzed :cool:. Will add to my install list.

colicab-d 03-27-2003 08:09 PM

how would i saw replace the image code with this? or even better add a THUMB button beside the IMG one?

VampireMan 03-27-2003 08:12 PM

very usefull feature, thanks. Clicks install ..


All times are GMT. The time now is 11:02 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.01375 seconds
  • Memory Usage 1,736KB
  • 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
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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