![]() |
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. ;) |
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:
// ******************************************************* Code:
thumb_text = "Insert a thumbnail into your message"; |
How would I go about just getting my IMG tag to auto thumb every image?
I have my attachments like that already Thanks Larry |
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 |
Great hack. :D 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. |
Great Pikok. What is the code to place a thumb button by the quick reply in showtread template?
|
Thank you ... works in 2.3.0 also. Clicked install :D
|
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. |
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 |
I'm thinkin it has to do with the code in functions.php .... not sure though
|
i think its only jpg's that dont work, cuz gif does :|
|
I wish I had found this months ago...great hack Z :)
However, I think the install .txt file may have gotten trunked somehow. This is all I am getting: PHP Code:
|
It is the complete file. That's all you need to do. No need to add anything through the admin CP. ;)
|
Ok I am at a total loss here Zzed...are there any other hacks that this doesn't cooperate with with perhaps? Everything is set correctly but it still only shows the URL of the image I post for some reason.
Here is my test post: http://dev.ringofdestiny.com/vb/show...php?threadid=2 Here is the contents of that post: {thumb}http://205.214.94.176/~rod/images/emperor.jpg{/thumb} (with brackets of course) If you are really bored I will mail you the info for my dev board and you can take a look :) |
Quote:
My Email is: edwink@seebeyond.com |
Info is on its way Zzed. Thanks bud :)
|
Everything is working fine. ;)
|
:( .jpg's dont work for me either :'(
zzed do u have AIM or MSN?? |
Quote:
The dothumb() function tries to obtain the XY sizes for the picture and if it is not able to do it, it displays the URL for the picture... This is how you can debug your code: In functions.php Look for: PHP Code:
PHP Code:
If you want to bypass all the drama you can go the easy route and replace the function dothumb() with the following: PHP Code:
Let me know if this helps... |
|
Cool
nice hack Zzed thanks for that great one i try it right now :) |
i've got a little bug it works fine everywhere (post & signs)
exept for one member in his sign it displays only the link but if i put that pic in a post the thumb works :lick: i'v find the solution by hosting on my server & renaming the pic here is the original pic i have remove the % and change JPG in jpg http://membres.lycos.fr/seadoo1979/s...io%20sonny.JPG do you think that's normal ?? and thanks again for this great hack |
qwertzu, that only happens when getimagesize() can not determine the image height and width. :(
And thank you for your kind words. :) |
I can't get this to work! It still shows as the original image size. Is there something I'm missing or not doing right? vB 2.2.9
Example: http://www.tlplanet.com/forums/showt...?threadid=2023 |
Quote:
I registered and posted a reply to your thread. Check it out. :D |
I see that you made it work! Yes, I was using the [*img*] tag, that's the way I understood the hack to work. My mistake, sorry.
I guess my question now is, is there any way to make the IMG tag do this automatically? Thanks for the help! |
In functions.php:
Look for: PHP Code:
Code:
$bbcode = preg_replace("/img\]/i", "thumb]", $bbcode); |
Do I have to add [ in front of the /img\] and thumb]? Because when I tried it as you have it I received an error.
Parse error: parse error in /home/tlplanet/www/html/forums/admin/functions.php on line 640 Fatal error: Call to undefined function: vbdate() in /home/tlplanet/www/html/forums/admin/sessions.php on line 400 |
Hmm, I don't know why the PHP tag mutilated my preg_replace statement.
I have tried this on my board and it worked just fine. :) Code:
$bbcode = preg_replace("/img\]/i", "thumb]", $bbcode); |
I don't know what it was but I tried it again and now it's working! Thank You! You are the master!
Now the only problem I can see is the images in the signatures, they're linked now, with a border, even after I changed border=1 to 0. :D |
Quote:
Please give me a link to a thread containing an image in the sig. And I am so hurt that you deleted my replies... :laugh::banana: |
<a href="http://www.tlplanet.com/forums/showthread.php?threadid=2006" target="_blank">http://www.tlplanet.com/forums/showt...?threadid=2006</a>
Sorry about that, just part of the testing process |
That's because the image is 256x170 which is smaller than your 320x240 image resize. ;)
in dothumb() Replace this: Code:
if(($img_info[0] <= 80) and ($img_info[1] <= 60)) { Code:
if(($img_info[0] <= 80) and ($img_info[1] <= 60)) { |
I did that originally.
Forget it, I see, Duh, you added the border=0 Code:
// ###################### Start dothumb ####################### |
Cool. :)
|
Nope, still linked with border. I'm going to add border=\"0\" to every href tag! :)
Damn, still there. Got it! Needed to add border=0 to Code:
<img src=\"$code\" border=\"0\"></a>"; |
Quote:
Nope, just hit reload. ;) The border will go away. ;) |
OK, I'm done now, it's all good! Thanks for the quick helpful replies!
|
You're very welcome. :)
|
Quote:
Larry |
All times are GMT. The time now is 04:53 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|