Log in

View Full Version : [img] tag thumbnail maker.


Blaine0002
06-23-2006, 10:00 PM
This makes it so whenever you use the [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:
return '<img src="' . $link . '" border="0" alt="" />';
replace with:
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: <a href="{param}" target="_blank"><img border="0" width="250" alt="Thumb resize." src="{param}" /></a>
example: [php]http://img96.imageshack.us/img96/7499/gibraltar12804sx.jpg[/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
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 ?