vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   RealTime Template Compressor: Reduces page sizes, loads pages faster, saves Bandwidth (https://vborg.vbsupport.ru/showthread.php?t=56589)

Erwin 10-08-2003 10:01 AM

Quote:

Originally Posted by Logician
Erwin, I guess it should be possible to find the cause when you check the source code of such threads with and without the hack.

I'm not able to track/debug it because I have never experienced such a problem in the boards I have installed the hack. The only display problem I witnessed and reported in the FAQ is the page split links getting closer to eachother.

Yeah, I tried doing this but couldn't figure it out. :)

Princeton 10-20-2003 02:27 AM

I added this to a project I'm currently working on ... and I think it's great.

I modified the expression ...
$vartext = preg_replace ("'([\r\t\n])[\s]+'", "", $vartext);

this has been tested only on a non-public vb3 forum

it seems to compress more then the original (view attachment) and it doesn't remove the "space" between the ....

Logician 10-20-2003 09:34 AM

Quote:

Originally Posted by princeton
I added this to a project I'm currently working on ... and I think it's great.

I modified the expression ...
$vartext = preg_replace ("'([\r\t\n])[\s]+'", "", $vartext);

this has been tested only on a non-public vb3 forum

it seems to compress more then the original (view attachment) and it doesn't remove the "space" between the ....

Thanks for sharing the info. I haven't tested it yet but from the apperance it looks like it can be the cure for guys who are having visual problems. So after I tested it, I plan to add it to the hack code and make it user selectable inside the code so that everybody can select the compression method as they like.

But I'm confused how come it compresses more than my line as your line seems to remove successive spaces and my line removes them all. BTW it is also weird the original source sizes are different in your each screenshots (as if they belong to different pages?).. :)

Princeton 10-20-2003 01:43 PM

Currently, I have the compression as selectable by admin (in case of high server load).

I admit most of the compression is done in the <head> CSS section. ;) (I'm using vb3.)

Quote:

it is also weird the original source sizes are different in your each screenshots (as if they belong to different pages?).
hmm ... I have to re-check.

I must have minimized a block ... new screenshots attached.

MaDCaT75 10-30-2003 05:43 AM

I dont like the way this shrinks the page numbers in the thread list I.E. 1234 instead of 1 2 3 4

Rampag33 10-30-2003 06:33 AM

*** Installed ***

Thanks reloaded the first page and already see how much was saved, Thanks. Simple yet very very effective.

magnus 11-05-2003 02:07 PM

Quote:

Originally Posted by princeton
I added this to a project I'm currently working on ... and I think it's great.

I modified the expression ...
$vartext = preg_replace ("'([\r\t\n])[\s]+'", "", $vartext);

this has been tested only on a non-public vb3 forum

it seems to compress more then the original (view attachment) and it doesn't remove the "space" between the ....

Excellent! This fixed the spacing, plus increased compression. Thanks, princeton!

Princeton 11-05-2003 03:04 PM

Quote:

Originally Posted by magnus
Excellent! This fixed the spacing, plus increased compression. Thanks, princeton!

To implement this on your site you should remove all comments found within javascripts embedded in your templates. If you do not remove ... you will receive errors in pages with javascript embedded. For example, wywsiwyg editor will not function as it should.

To do this go into your ADMIN PANEL and do a search and replace for
Search for text:
<script type="text/javascript">
<!--

Replace with Text:
<script type="text/javascript">

Search for text:
//-->
</script>

Replace with:
</script>

You can also do this for <style> but it is not necessary as <style> will work when compressed.

If you think the comments are necessary think again ...
Comments are used to hide code from version 1 and 2 browsers. How many users do you think will visit your site with a 1 or 2 browser? And, if so, the site will not work as it should because they will not be able to interpret the javascript.

A condtional statement checking for browser version should be used to render or not render javascript. Why send javascript bytes that will not be utilized by browser?

dstruct2k 12-31-2003 06:14 AM

Broke too much of my spacing, and I don't have enough time to redo it all right now. Awesome idea though, I had a 3.6% save.

Maybe I'll give this other compression method a try one day.

Logician 12-31-2003 08:56 AM

Unfortunately the compression method of princeton creates problems in javascripts as he mentioned above. I confirmed that it compress better and fixes spacing problem but I believe trying to fix all javascripts in all templates is an headache so I prefer to use my compression method. Your call which one you want to use but make sure you fix your javascripts in princeton's method otherwise some features of your board (eg. smilies) will stop.

Frankly speaking I don't see spacing as a problem. It neither interferes with how board functions (it is just visual) nor hard to fix. I dont know how it will do if you have skins or something but in a default vb, it just affects page numbers which is very easy to fix with a one template edit.


All times are GMT. The time now is 07:26 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.01201 seconds
  • Memory Usage 1,745KB
  • 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
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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