Header Compression and the BuddyPress Fun Theme?

Hello,

I think this question is more for Richie_KS but I’ll take any help I can get. i am trying to add the Zlib compression php to the header as Sarah outlines in this blog post:

This works so nicely on my single WP sites and I know it would on my Buddypress site but my problem is that BP Fun’s load order is way different than a standard theme. If I do add this too the header php I get a load error.

Where can I put this compression php to help speed things up a bit on my site? Thanks!

Derek

  • Richie_KS
    • HummingBird

    does the zlib.compression work in bp-default theme?

    by adding the code in header.php before <DOC>

    did the your buddypress site host enable zlib.compression?

    most hosting disable this and you need to contact them to enable it.

    in any case try it with the bp default theme first, if it works then

    it must be the bp-fun theme problem..will update and track it down.

    Where can I put this compression php to help speed things up a bit on my site?

    – the same as your single wp installation i guess, in top of header.php.

    cheers

  • DerekBolden
    • WPMU DEV Initiate

    Thanks for getting back to me on this one. Richie yeah it works on the default theme without a problem. The exact error when I try to insert it in BP-Fun header.php is:

    Warning: ini_set() [ref.outcontrol]: Cannot change zlib.output_compression – headers already sent in

    I am wondering if it is something with the adminbar php that might load in before header.php ? I am just guessing here but please let me know what you find. Many thanks guys!

    Derek

    BTW Richie BP-Fun ROCKS!

  • Richie_KS
    • HummingBird

    hi Derek

    i think it had something to do with <?php include (TEMPLATEPATH . ‘/options.php’:wink:; ?> on top of the header.php

    did you put the code for compression before or after?

    move the <?php include (TEMPLATEPATH . ‘/options.php’:wink:; ?> to

    before <title>..like

    <?php include (TEMPLATEPATH . '/options.php'); ?>

    <title>

    =======

    </title>

    update here again ok

  • DerekBolden
    • WPMU DEV Initiate

    No dice man… Same error which is a real bummer because I get similar errors when I try to add a redirect code (for mobile phones). What loads in before the headers? Is it the admin bar? I can’t decipher what it could be.

    Frustrating…

    Thanks again for all your help.

  • Richie_KS
    • HummingBird

    mmm,,,the header may conflict with this code in theme-option.php and global-adminbar.php

    header(“Content-type: text/css”:wink:;

    did the problem also happen in bp-corp or bp-social theme….could

    you test it?

    i want to know if the header(“Content-type: text/css”:wink:; causing this issue as

    you said the default theme work ok right?

    tracking this topic for updates:slight_smile:

  • DerekBolden
    • WPMU DEV Initiate

    OK let me update you Richie I have tested the zlib code in the NEW BuddyPress 1.2 default theme header.php and it makes that install blazing fast! At this point I am just looking forward to a BP Fun BuddyPress 1.2 compatible theme so I can forgo any tweaks to this version.

    Can you tell me are you going to update BP FUN to be compatible with BuddyPress1.2?

  • Richie_KS
    • HummingBird

    yeap..we will be updating the dev bp theme to be compatible with bp 1.2 and also update to latest theme version for bp 1.1.

    if you had any chance, could you upload in zip the header.php with the zlib code attach here..i want to check if any placement code that cause this issue.

    cheers

  • DerekBolden
    • WPMU DEV Initiate

    That’s good to hear Richie and while I have your attention I want to tell you I use ALL of the unique options of BP FUN Including Member Privacy. Please, please don’t take any of those away. If you have to lose something I would have to say that I really do like what they are doing in the new default template to the adminbar. I have had an issue with the solid color bar conflicting with some of my users blog template picks. The new semi transparent bar does alleviate that quite a bit.

    Anyway thanks for helping me out with this one and here is the file you requested.

    Derek