The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
New BB tag to do image thumbnails... Details »» | |||||||||||||||||||||||||
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. Show Your Support
|
Comments |
#42
|
||||
|
||||
That is the line number in an unmodified functions.php for version 2.2.9.
It is the last few lines of bbcodeparse2() function. Or if you search for the following line: // ###################### Start phphighlite ####################### and scroll up about 6-7 lines you will get there. |
#43
|
|||
|
|||
Quote:
In the "vbcode_buttons" template add this where you want the button to appear: Code:
<input type="button" class="bginput" value="THUMB" title="Insert Thumbnail" onclick="vbcode(this.form,'THUMB','http://')" onmouseover="stat('thumb')"> Code:
// ******************************************************* function vbcode(theform,vbcode,prompttext) { // insert [x]yyy[/x] style markup if ((normalmode(theform)) || (vbcode=="THUMB")) { inserttext = prompt(tag_prompt+"\n["+vbcode+"]xxx[/"+vbcode+"]",prompttext); if ((inserttext != null) && (inserttext != "")) theform.message.value += "["+vbcode+"]"+inserttext+"[/"+vbcode+"] "; } else { donotinsert = false; for (i = 0; i < tags.length; i++) { if (tags[i] == vbcode) donotinsert = true; } if (donotinsert) stat("already_open"); else { theform.message.value += "["+vbcode+"]"; arraypush(tags,vbcode); } } theform.message.focus(); } Code:
thumb_text = "Insert a thumbnail into your message"; |
#44
|
|||
|
|||
How would I go about just getting my IMG tag to auto thumb every image?
I have my attachments like that already Thanks Larry |
#45
|
|||
|
|||
Hi, this is cool hack.
I presume that I can change size of a thumbnail to my own prefference. So, for example, I might want to set image width to 600 max (so not to loose table formating), and any image larger that that would be scaled down to 600 pixels width, with the option to display original image size when clicked on appropriate link. If so, I will implement this hack immediately . Oh yes, I got to use this smiley :banana: . Ivan |
#46
|
||||
|
||||
Great hack. I'm using it very nicely in a gallery-type format.
Is there a way to cache the images after initial loading, by chance? Anyway, great hack and very useful. |
#47
|
||||
|
||||
Great Pikok. What is the code to place a thumb button by the quick reply in showtread template?
|
#48
|
|||
|
|||
Thank you ... works in 2.3.0 also. Clicked install
|
#49
|
|||
|
|||
is there a way to make it so when your posting people have the option to click the bbcode? Just like they do for [img] or [code]?
Hope this makes sense. Thanks. |
#50
|
||||
|
||||
yea, i also want that... like in the newthread, so your able to click a button, like the IMG button and HTML button
also.. a problem i have, is that not all the images work with [thumb] ... why is that? o_O |
#51
|
|||
|
|||
I'm thinkin it has to do with the code in functions.php .... not sure though
|
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|