![]() |
Quote:
Also, check out $bbcode->do_parse() and the other subsequently called functions, because it is entirely possible to accomplish this mod without using any file edits (which I'm sure everyone would like). I'll install it such on my site and post the code when I am done. |
Got it to work sorry! Forgot just to set the vBulletin Options!
Quote:
|
:)
I am a fan since HOMELITE for VB2 Definistely INSTALLED thanx TECK miss TECKWIZARD.com;) |
Quote:
Personally, I will never use this approach. Inserting the code directly is way faster then using it on a hook. Plus, you will need to use all kind of preg_replaces in order to isolate the link. I never understood why the hook obsession, they actually slow your server... a lot. Who cares if you edit the file and add a small piece of code. I challenge you to show me a better and faster way, compared to the code I made. If you win, I pay the beer... :) |
Okay, here are the updates:
In total, there may be 1 additional preg_replace, because the plugins bypass the original IMG bbcode handler. And the template is not eval'd on its own, keeping speed in mind. Changes to the product file:
Quote:
|
Quote:
A new teckwizards site will evolve... be prepared. |
Quote:
However this is a very good solution, for people who don't want to edit their files. Now, pay the beer! I'm in Montreal. :D |
Hey tech long time no chat :D, nice hack :D got a client been looking for something like this for his blog :D
|
Quote:
I suggested that to vBulletin team also, for their products. In Project Tools and Blog I replaced all their hook code with files. :) While doing some benchmarks to emulate 10,000 users hitting a server, the results were shockingly better, compared to the code left in hooks. Quote:
|
can you include a readme guide for updating from the previous version?
|
Quote:
Quote:
|
Quote:
People will ask all the time for support on a piece of code that I did not make... Thanks. |
You suggest making file edits instead of using plugins? (for all products - hacks)
Yeah, it'll be faster but it'll also take so many time when upgrading... |
It will take you 30min max to upgrade a heavy modified board... if you know what you are doing. Plus the difference between editing directly the files, compared to hooks usage, is huge. Even the vBulletin developers said that writing the code directly to files is way better then using the hooks. Then, even if you use only hooks, there is no guarantee the code will still work on the new vBulletin version, so you are stuck already. While editing the code by yourself, you learn about PHP and see exactly what it has to be done, in order to fix everything.
The hooks are for people who don't code or are lazy to learn few basics in PHP. Then, why do you want to download hacks if you don't want to learn anything? And how do you know that the plugins you just installed will not destroy your server? Don't take it on a bad way, I simply state the real facts: using hooks is slowing down your code execution. That is compared on real benchmarks. Plus, I bet you 1 million dollars, no (or very few) "hackers" will test their code with benchmarks... just to see how their hack will perform under heavy server stress. You have no idea how many bad hacks you can find here at vBulletin.org site. The code thincom2000 made is good from a technical point of vue. But what do you think it will execute faster: my 5 lines of code grouped in one location... or his 200 lines spread all over the hooks and templates? Many people don't realize how bad it is to load your board with a lot of hook inserted code. I'm totally against modifying your vBulletin board. I don't see any need to add a ton of hacks that will not do any good to your server performance. But if I'm forced to do it, I will definitely edit the vBulletin files. I deal with a lot of clients, like corporate people. I build their server from scratch, including the OS with my own RPM's (PHP, MySQL, etc.) and all the needed software for high performance machine/s. Then, when I install vBulletin, I will always recommend not to insert any hacks on it. |
Thanks for the detailed answer.
|
Thanks and let me state this one more time: thincom2000 did a very good job on the code modification. This has nothing to do with my comments listed above. It is just my personal opinion about using code in hooks.
|
For the ease of support and less confusion in this thread, I have taken TECK's suggestion and opened a support thread for the modified product file I posted earlier. The file is now only available in that thread.
https://vborg.vbsupport.ru/showthread.php?t=157428 Quote:
|
Good decision, Ted. Congrats on the mod, BTW. :)
|
OK, if I am reading this correctly, when installed this will resize pictures as they are uploaded from the user's computer but before being saved on the server? However, they must be attached and not installed with [img] tags? Am I reading this right?
Johnnie |
Johnnie,
When a user puts an image url in [IMG] tags, if the image is bigger than the size you have specified it will shrink the image and make the original image a link. Also, this works perfect for me. Installed. |
Quote:
|
JohnnieOO, this hack applies only to images that you insert using the [IMG] bbcode tag.
In other words, if your board width is set 1024px and the user inserts an image hosted on imageshack.us that has 1900px in width, it will break your design. My hack will automatically resize that image to load a specific width you desire, eliminating the ugly look your board will get from a very wide image. |
Installed, Thank you
|
Wonderful hack...Clicked Installed...
I saw in an earlier post, if enough people request it...you would make a code change to state the original image has been edited... You should actually include that code within your mod...as well as including the code to open the image in a new window...just like the vBulletin default image attachments already do. It only stands to reason that this would be the best way to go...convenient...and warranted. Again...thanks for the hack...Kudos! |
Does anyone know if theres a similar thing for avatars?
|
Quote:
Quote:
|
Yeh i dont just want something resized to fit a 400 x 400 box for example.
If their image is 1000 x 600 (ony an example) and they put it in their avatar I want it to keep the proportions but be smaller. So if i state the avatar size to be 400x400 max it would be resized to 400 x 240 If i just left it how it is in VB the image would be stretched to 400 x 400 and unless its a square image to start it looks messed up. |
Avatars are stored into database. They have nothing to do with the [IMG] tag. :)
|
Actually, you can configure vBulletin to store avatars (like attachments) in the file system. Thus, an IMG tag would be able to fetch said avatar.
|
Yeh my avatars are saved to folders along with all other images rather than having a huge database file.
|
Thanks for this Product!
I'ld like to suggest updating the readme.html CSS Main edit from "second text area" to "Page Background: Extra CSS Attributes" adding that the Main CSS is under the Style Manager might help newbies a bit too. I've installed this on my testvb and see it works for FireFox. On Safari (Mac OS X browser) the image looks squeezed (which I can live with, given the see full sized image option) and the css doesn't work correctly (which I probably can't live with) - http://s229.photobucket.com/albums/e...zeOnSafari.png |
TECK, great hack m8,
just wondering though, when the javascript detects a image is greater than specified, can't the link window be somehow set to say rel="lightbox" and then the final image opens up in a new lightbox window? EDIT: Never mind, i got the lightbox working with this code. Works brilliantly now. |
Hello! I have installed this and it works great, I only have on small problem. The image is not clickable to view the orginal. I am using IE7. Any help is appreciated. http://www.chattanoogans.com/forums/...ge-resize.html
Thanks! |
Sorry, try this post... http://www.chattanoogans.com/forums/...size-test.html
|
I have been looking or something like this, thanks for your work Teck
|
Quote:
Code:
obj.rel = 'lightbox'; |
Quote:
|
Quote:
thanks anyway. |
Hi Floren,
Just to let you know that this works on v 3.5.x with no changes apart from editing the product to remove the version dependancy. I works great. Only one thing I would request, as some others have requested, is to add a label/notice to let people know that it is a resized image. This is not urgent, but would be a great help for people who do not read announcements or bbcode descriptions. Thanks :) |
Wrong Thread sorry.
|
All times are GMT. The time now is 07:55 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:
|