vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Compress Forum Templates (Speed up your Forums & Save Bandwidth) (https://vborg.vbsupport.ru/showthread.php?t=79923)

Trigunflame 04-16-2005 09:46 AM

Quote:

Originally Posted by jcr
Okay hm, I have removed the reputation in the postbit, it is in the memberlist, things looks kinda strange over at my place.

Uncompressing, and then compressing again removed the whitespace between the reputation images :D

So everythings fine now?

Trigunflame 04-16-2005 09:48 AM

Quote:

Originally Posted by The Realist
This latest code does not work for me in IE, the one before worked ok. What Im getting now is my dropdown menues work ok but when I click the New Posts link nothing happens?

Owe well.

Before I was getting massive javascript errors in IE, thats the reason it was changed.

I'll try and contact you, and help you out.

jcr 04-16-2005 09:52 AM

Quote:

Originally Posted by Trigunflame
So everythings fine now?

Superb., just wanted to share the error in case someone meets it later :)

boeserwolf 04-16-2005 09:57 AM

Nice hack

Klick install

yours

Markus

Trigunflame 04-16-2005 10:15 AM

Quote:

Originally Posted by Trigunflame
Before I was getting massive javascript errors in IE, thats the reason it was changed.

I'll try and contact you, and help you out.

Update;

Contacted; Fixed problem

Notice:

Everyone use the new version, I was replacing tabs with '', which would cause some problems if in links; now its replaced with a single space ' '.

The Realist 04-16-2005 10:24 AM

Trigunflame is a gent and solved my problem :)

HOTM I say :)
Laters

The Realist 04-16-2005 10:28 AM

Another problem.

Clicked edit and my page is twice its size?

Not my day?

Trigunflame 04-16-2005 10:35 AM

Quote:

Originally Posted by The Realist
Another problem.

Clicked edit and my page is twice its size?

Not my day?

Screenshot :), and again Im not getting this problem on my test forums.

buro9 04-16-2005 10:36 AM

Had a nice problem relating to the footer template and the inline javascript.

It compressed to:
<script type="text/javascript"><!-- // There was a vbulletin comment here vBulletin_init(); // Initialize 'Active' Table Cells //activecells_init();//--></script>

The problem with that is that // is a line comment, and then there is no line break, so the whole javascript is commented out, and menu's do not get initialised, etc.

The result is that those swishy JavaScript drop down menus break.

You can fix this by updating your footer template to just have:
<script type="text/javascript">vBulletin_init();/script>

In place of the larger block. That does it for me :)

Aside from that minor problem, this hack is wonderful.

I'm going to go off and search for other places that might be impacted by this though... recommendation: Don't compress JavaScript at all... leave line breaks in.

Trigunflame 04-16-2005 10:38 AM

Quote:

Originally Posted by buro9
Had a nice problem relating to the footer template and the inline javascript.

It compressed to:
<script type="text/javascript"><!-- // There was a vbulletin comment here vBulletin_init(); // Initialize 'Active' Table Cells //activecells_init();//--></script>

The problem with that is that // is a line comment, and then there is no line break, so the whole javascript is commented out, and menu's do not get initialised, etc.

The result is that those swishy JavaScript drop down menus break.

You can fix this by updating your footer template to just have:
<script type="text/javascript">vBulletin_init();/script>

In place of the larger block. That does it for me :)

Aside from that minor problem, this hack is wonderful.

I'm going to go off and search for other places that might be impacted by this though... recommendation: Don't compress JavaScript at all... leave line breaks in.

Buro, did you try the new version? Mutli-Line javascript is left in its standard format short of tabs.

ie. using the updated version, my footer looks like this (Compressed Template):

http://narutotalk.org

HTML Code:

<script type="text/javascript">
<!--
 // Main vBulletin Javascript Initialization
 vBulletin_init();
 // Initialize 'Active' Table Cells
 //activecells_init();
//-->

</script></body> </html>


buro9 04-16-2005 10:42 AM

Nope, everything else is working fine... editors doing their job, popups where needed are working (attachments, i have a translate hack, buddy list, thread replies, etc).

So just that one very small adjustment... and frankly, for the benefit this hack gives I'd opt for the editing of the footer template over reducing the compression the hack does.

buro9 04-16-2005 10:43 AM

Quote:

Originally Posted by Trigunflame
Buro, did you try the new version? Mutli-Line javascript is left in its standard format short of tabs.

Hehe, maybe not :)

I'll upgrade now :)

buro9 04-16-2005 10:51 AM

It works, but I had to add a line break.

I'm not sure what version of footer I customised (most likely the vb3 beta one that I've been dragging through each update), but it had the <script block directly following the DST correction block:

</if><script

For some reason that I don't want to look into ;), it would not recognise that as a JS block and was compressing it.

If I moved the <script onto a new line like thus:
</if>
<script

Then it worked perfectly.

As I said though... the footer template is one I modified in vb a long time ago... so this is likely not an issue as viewing the original now shows that they are indeed on new lines already and thus work perfectly.

If anyone has old templates that they've modified though, they hopefully will read this and add the linebreak :)

boeserwolf 04-16-2005 10:53 AM

Hi

And here is the german translation for all german users:

Trigunflame 04-16-2005 11:12 AM

Update:

Removed support for inline javascript, all javascript stays line-per-line.
Removed support for inline styles, all style data stays line-per-line.

boeserwolf 04-16-2005 11:16 AM

Would you please tell me what to change in the code, so that I can change it in the translation too?

Rambo 04-16-2005 11:18 AM

Hrm,

Here's a little problem with the latest version.

Trigunflame 04-16-2005 11:26 AM

Quote:

Originally Posted by Rambo
Hrm,

Here's a little problem with the latest version.

Ok, will try and contact; someone else is having same problem.

Trigunflame 04-16-2005 12:01 PM

Update:

Im workin on the solution, ive identied the problem as a special template.

Trigunflame 04-16-2005 12:11 PM

Update;

Finished, everyone use the newest version of the code.

Problem was a certain template that delt with fonts available from drop down menu, they were being compressed also, causing errors.

The Realist 04-16-2005 12:20 PM

Newest version 2.0 works a treat and congrats to Dusty for his hard work and great skills :)

Thanks M8

Rambo 04-16-2005 12:46 PM

Working properly now =D.

Thanks for the update, good stuff.

Trigunflame 04-16-2005 02:09 PM

Quote:

Originally Posted by Rambo
Working properly now =D.

Thanks for the update, good stuff.

Glad to hear.

boeserwolf 04-16-2005 03:11 PM

Hi

I also tried it out, and everything works perfect

Thank you

Markus

diettalk 04-16-2005 03:36 PM

2.0 works here too.

Trigunflame 04-16-2005 04:08 PM

Quote:

Originally Posted by diettalk
2.0 works here too.

Good :), hopefully no more patches will need to be added.

msimplay 04-16-2005 04:19 PM

i've removed the old white space stripper and installed this one instead its given me greater speed gains works good and thumbs up

Trigunflame 04-16-2005 05:16 PM

Quote:

Originally Posted by msimplay
i've removed the old white space stripper and installed this one instead its given me greater speed gains works good and thumbs up

That's good to know :)

Corriewf 04-16-2005 06:07 PM

Nice hack. My forums are so much faster.. GREAT JOB!

detalhe 04-16-2005 06:32 PM

I installed it but when I have the option to compress templates selected, I get this error on top of my sub-forum pages:

PHP Code:

Warningin_array(): Wrong datatype for second argument in /showthread.php on line 955

Warning
in_array(): Wrong datatype for second argument in /showthread.php on line 955

Warning
in_array(): Wrong datatype for second argument in /showthread.php on line 955

Warning
in_array(): Wrong datatype for second argument in /showthread.php on line 955

Warning
in_array(): Wrong datatype for second argument in /showthread.php on line 1705 

If I uncompress everything goes back to normal

:ermm:

Trigunflame 04-17-2005 12:20 AM

Quote:

Originally Posted by detalhe
I installed it but when I have the option to compress templates selected, I get this error on top of my sub-forum pages:

PHP Code:

Warningin_array(): Wrong datatype for second argument in /showthread.php on line 955

Warning
in_array(): Wrong datatype for second argument in /showthread.php on line 955

Warning
in_array(): Wrong datatype for second argument in /showthread.php on line 955

Warning
in_array(): Wrong datatype for second argument in /showthread.php on line 955

Warning
in_array(): Wrong datatype for second argument in /showthread.php on line 1705 

If I uncompress everything goes back to normal

:ermm:

Create a new style/template set, compress templates and check if you still get the same error; it may be something that you have customized.

vulture 04-17-2005 12:43 AM

Installed, but this quick hack from vbulletin.com no longer works:

http://www.vbulletin.com/forum/showthread.php?t=101600

Without compress: 1000 new posts
With compress: new posts

The figure just vanishes!

Trigunflame 04-17-2005 01:00 AM

Quote:

Originally Posted by vulture
Installed, but this quick hack from vbulletin.com no longer works:

http://www.vbulletin.com/forum/showthread.php?t=101600

Without compress: 1000 new posts
With compress: new posts

The figure just vanishes!

This was a problem in the earlier version of the hack, make sure you are using the absolute latest version of the code.

IE. Copy what I have up there now, and uncompress/recompress. If you still have a problem, contact me on

AIM: Trigunflame
MSN: Trigunflame@msn.com

Trigunflame 04-17-2005 01:45 AM

Update:

Everyone should update to latest script if they use php_include, the new version adds php_include_start and php_include_end to the bad templates array.

detalhe 04-17-2005 09:33 AM

Works great now, thanks!

uae 04-17-2005 11:35 AM

Works just fine, clicked install :)

Trigunflame 04-17-2005 11:36 AM

Quote:

Originally Posted by uae
Works just fine, clicked install :)

That's good to know :), vote for Backup Pro while you're at it XD :ninja:

Oblivion Knight 04-17-2005 12:11 PM

I made the switch from buro9's mod to yours (as per his advise!).

Everything seems to be working perfectly.. :)

Trigunflame 04-17-2005 01:38 PM

Update, Good News.

----------------------

Support for compressing phrases has been added; this will give additional page compression to certain pages that use multi-line phrases, such as user-cp/faq/ etc..

Also added support to both for removing the ascii \n that some templates/phrases have; give even more compression.

Enjoy !

Trigunflame 04-17-2005 01:49 PM

Bah Another Update:

Bug reported; Had to add editor_jsoptions_size to the Bad Templates array, it was causing problems selecting font size.


All times are GMT. The time now is 08:26 PM.

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.01499 seconds
  • Memory Usage 1,838KB
  • 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
  • (1)bbcode_html_printable
  • (2)bbcode_php_printable
  • (14)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
  • (40)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