![]() |
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. |
Very cool Zzed!!
Thanks for sharing. Kars :) |
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. ....... |
excellent idea - great hack and easy to add too - well done
|
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); |
Quote:
Replace it with this: PHP Code:
|
Thank you all for your kind words. https://vborg.vbsupport.ru/
Sebastian, I made VB.org visitors immune to the high load shutout. ;) |
Nice hack Zzed :cool:. Will add to my install list.
|
how would i saw replace the image code with this? or even better add a THUMB button beside the IMG one?
|
very usefull feature, thanks. Clicks install ..
|
Installing now. Great hack, my friend, as usual. ;)
Contact me later when you have time. |
I like it. I installed. The thing with using php for it though is if someone posts a corrupt URL for an image (non-existent or something) a php error flashes for a moment.
|
verys cool stuff.
|
Now how to add the vB code thumb button to the new reply vB code buttons.
|
Warning: getimagesize() [function.getimagesize]: HTTP request failed! HTTP/1.1 404 Not Found in /home/virtual/site3/fst/var/www/html/forums/admin/functions.php on line 972
Warning: getimagesize(http://www..com/users-images/2003/BeforeConcert8-vi.jpe) [function.getimagesize]: failed to create stream: Invalid argument in /home/virtual/site3/fst/var/www/html/forums/admin/functions.php on line 972 Warning: getimagesize() [function.getimagesize]: HTTP request failed! HTTP/1.1 404 Not Found in /home/virtual/site3/fst/var/www/html/forums/admin/functions.php on line 972 Warning: getimagesize(http://www..com/users-images/2003/Concert9-or.jpe) [function.getimagesize]: failed to create stream: Invalid argument in /home/virtual/site3/fst/var/www/html/forums/admin/functions.php on line 972 |
Those links are no good. I copied and pasted the URL in my browser and it says page not found...
|
found the problem
must add @ before getimagesize($code); but another problem is that in my postbit, if i use [thumb ] and [/thumb ] it display as my image link as text not thumbnail for example, [thumb]http://mydomain.com/image.jpg[/thumb] it will display as http://mydomain.com/image.jpg what is happen? |
That is because you have disabled the IMG tag for that particular forum. ;) You need to edit the forum properties in the Admin CP and allow IMG tags to be used. ;)
The tag behaves identical to the IMG tag and checks for IMG tag permissions per forum. |
no, i have enable img that for that forum...
i'm testing it by post a post with two pics, 1 use thumb and other use img, img does display, other display as text |
Hmm... Interesting. Can you give me the URL for the thread on your board?
|
<a href="http://www.tvseriesfans.com/forums/showthread.php?postid=45397#post45397" target="_blank">http://www.tvseriesfans.com/forums/s...5397#post45397</a>
u will see a link, that one was use thumb bbcode |
I get a page not found when I go to this URL: http://www.tvseriesfans.com/users-im...1101116021.jpg
|
i have image hotliking protection on my website
but anyway, i added thumb to other pix, and they all got the same problem. (note, changed my first pix to img) |
OK, I see. Let me look into this. :)
|
opps, i think i found the problem.... this code use { instead of [ for regular vbcode right?
but then again, it recognize my image as link after i submit, it add the [url ] tag between my link |
Quote:
Try and disable your mod-rewrite and see if this problem still exists or not. There seems to be a conflict between your web server and the function getimagesize(). The may require you to revise some of your rewrite rules. Also try the thumbnails with an image that is not on your server to see if it behaves correctly or not. |
Quote:
Your tags should look identical to this: [thumb]http://www.tvseriesfans.com/users-images/2003/2_28-3-326_2001101116021.jpg[/thumb] |
well, changed back...
|
zzed can you please tell me which lines the following are on? i have truble finding them, thanks:)
$bbcode=str_replace("{", "{", $bbcode); // stop people posting replacements in their posts return censortext($bbcode); // ###################### Start phphighlite ####################### thanks again if you can help me, it would be very much appritiated:) btw i am using the functions.php file:) |
Line 771. :)
|
If I use a url that isn't correct, I get a whole slew of errors. Try this and see if you get errors. [thumb]http://borg.gif[/thumb]. A member on my forums accidently typed this url incorrectly, and got errors.
|
Quote:
Try this and it will hide any errors. add @ before getimagesize($code); |
Quote:
|
Anytime, my friend. You are very welcome. ;)
|
Quote:
|
You've covered me more than once. Glad to return the favor. ;)
|
Nice one Zed. :)
*clicks install |
Good idea.
To get rid of the borders as linked images are bordered - add this to the <img src bits: border=0 :) |
Works like a charm!!
BTW: thanks Erwin for the "Border-Idea"... Kars :) |
Quote:
771 didnt show up with the same script:( |
All times are GMT. The time now is 04:48 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|