vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Show Thread Enhancements - Dynamic Picture Resize for [IMG] tag (https://vborg.vbsupport.ru/showthread.php?t=157228)

xandizitxu 09-08-2007 10:38 PM

Quote:

Originally Posted by thincom2000 (Post 1334921)
Okay, here are the updates:
  • eliminated all file & CSS edits
  • added vBulletin Option to open in new window
  • added vBulletin Option for a "this image has been resized" message

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:
  • Added 3 plugins
  • Added 1 template (scroll to bottom for CSS)
  • Added 2 settings



This is why my site only has one plugin for each hook, with one line of code each. This include()s plugins saved in the file system. :) I think I halved load times by spending a week doing that.

Okay I installed your product xml, uninstalled the other and now I get this

Quote:

<div><div class="resizednote">This image has been resized for improved display.</div><img src="http://img249.imageshack.us/img249/7245/bscap 0015fb3.jpg" border="0" alt="" class="resizeimage" onload="resize_image(this, 'http://img249.imageshack.us/img249/7245/bscap0015 fb3.jpg', 424);" /></div>

TECK 09-09-2007 12:41 AM

Quote:

Originally Posted by pspmaster93 (Post 1335065)
can you include a readme guide for updating from the previous version?

thincom2000, I think is best for you to release the hack under your own version.
People will ask all the time for support on a piece of code that I did not make... Thanks.

NeutralizeR 09-09-2007 12:28 PM

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...

TECK 09-09-2007 03:48 PM

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.

NeutralizeR 09-09-2007 03:53 PM

Thanks for the detailed answer.

TECK 09-09-2007 04:14 PM

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.

thincom2000 09-09-2007 06:27 PM

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:

Originally Posted by xandizitxu (Post 1335072)
Okay I installed your product xml, uninstalled the other and now I get this

Please repost your issue in the other thread, and I will gladly tell you how to fix it, since this was my very first issue when I took on the task of pluginifying it as well.

TECK 09-09-2007 09:08 PM

Good decision, Ted. Congrats on the mod, BTW. :)

JohnnieOO 09-10-2007 06:24 PM

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

djdonx 09-10-2007 06:44 PM

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.


All times are GMT. The time now is 06:22 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
  • Page Generation 0.01231 seconds
  • Memory Usage 1,746KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete