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)
-   -   [img] tag thumbnail maker. (https://vborg.vbsupport.ru/showthread.php?t=119489)

Blaine0002 06-23-2006 10:00 PM

[img] tag thumbnail maker.
 
This makes it so whenever you use the
PHP Code:

[img

bbcode, instead of a real picture it will post a thumbnail instead. when you click that thumbnail it will bring you to the actual image.


open includes/class_bbcode.php
find:
PHP Code:

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

replace with:
PHP Code:

        return '<a href="' .  $link '" target="_blank"><img border="0" width="250" alt="Thumbnail" src="' .  $link '" /></a>'


This will convert all images so they have a width of 250 and make them clickable to the original image. note: if you have a oblong image, the hight will stay preportionate so it may cause thumbnails to look strange, you can also specify a height but the thumbnails will not be preportionate. Change the width="250" to whatever you want :-)





Temp fix: (untill i get more time)
If you dont find that this is what you are looking for, try making a new bbcode with the following options

Title: thumbnail
Tag: imgt
Replacement:
PHP Code:

<a href="{param}" target="_blank"><img border="0" width="250" alt="Thumb resize." src="{param}" /></a

example: [php][imgt]http://img96.imageshack.us/img96/7499/gibraltar12804sx.jpg[/imgt][/php

then ad an image so people can use the imgt tag to make a thumbnail of only certain images.

yonglvnv 06-24-2006 05:20 AM

Cool, first to reply.
Installed and works great. Thanks. Only one issue. At default size of 250, smaller pics get increased to that minimum size, but no big deal. Mine's decreased to width of 100 to match the attachment size on my forum.

PabloAM 06-24-2006 08:10 AM

This resize in Vbadvanced news??

projectego 06-24-2006 08:21 AM

Nice idea, thanks. :)

bashy 06-24-2006 10:40 AM

Hi

Anyway to stop this making smaller images lager?

Blaine0002 06-24-2006 01:15 PM

im not sure, ill need to look into it a bit. thanks for the response guys :)

and yes they should resize in the news if you have enabled bbcode and images.

Snake 06-24-2006 01:30 PM

Great hack!

Thanks...

Qwest 06-24-2006 08:42 PM

Blaine002,

You need to change this to BETA!! Especially since this is a code modification.

1) As mentioned above it needs to not affect smaller images
2) It messes up people's signature images too!!


You need to work on this before it comes out of BETA.

RFViet 06-24-2006 11:55 PM

cool, let me try it !!
It would be nice if it is selectable forum

bashy 06-25-2006 08:38 AM

I have uninstalled this hack due to the smaller images being enlarged
I will be subscribed to the thread hoping that there is a fix for this :)

Blaine0002 06-25-2006 02:32 PM

Quote:

Originally Posted by Qwest
Blaine002,

You need to change this to BETA!! Especially since this is a code modification.

1) As mentioned above it needs to not affect smaller images
2) It messes up people's signature images too!!


You need to work on this before it comes out of BETA.

It does not need to be a beta, if people dont like what it does they do not need to use it. it does what it intends even if there are some side effects. I will be looking into a better version if i can figure out how.
i have a temporary fix i will post when i get back later today.

Zia 06-26-2006 09:40 AM

pretty good things to use :)

Elsie 06-29-2006 08:54 AM

i'll come back to this..... :)

Blaine0002 06-29-2006 01:41 PM

Added temp fix. Untill i get more time.

thedvs 07-18-2006 10:24 AM

do you have a solution yet?

Murty 07-20-2006 02:40 AM

I couldnt even find the bit of code in the class_bbcode.php that we were meant to find.

laxyy 07-29-2006 05:15 AM

cool man nice to recize i

Alantris 11-23-2006 04:56 PM

Good! How it works with 3.6.3 ?


All times are GMT. The time now is 05:50 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.01189 seconds
  • Memory Usage 1,752KB
  • 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
  • (4)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (18)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete