1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.2 my php files are a mess....need to clean up

Discussion in 'Styling and Customization Questions' started by Echelon, Dec 30, 2013.

  1. Echelon

    Echelon Active Member


    Need help urgent ;-)

    too many white spaces in my php files [templates]

    how to fix this in a simple way?

    appreciate al the suggestions.

    you see....lots of white spaces


    realy needs to be like this

  2. katsulynx

    katsulynx Well-Known Member

    Set the forum to debug mode, open up the Template Modification System and add a new modification for every single template replacing whitespaces with nothing. Even though I don't see any need to do that as whitespace is just whitespace and the user normally doesn't see it anyway.
    Echelon likes this.
  3. Echelon

    Echelon Active Member

    so you mean......handwork ;-)
    is there no automatic solution?
  4. katsulynx

    katsulynx Well-Known Member

    Not that I know, as already said, it isn't required.
  5. Echelon

    Echelon Active Member

    according to some other specialist the whitespaces must be minimized. I'm stupid so i do what the experts tell me ;-)
  6. katsulynx

    katsulynx Well-Known Member

    Removing the whitespaces will save you a total of 10kb traffic per siteload. Removing a single avatar/image from the site saves equal or even more. As said most people won't even recognize because when they try to inspect your code, they will most likely do it with Firefox or Chrome and then normally open the code inspector, which removes the whitespaces automatically anyway.

    After all, every XenForo board is running with that much whitespace and I haven't seen a single one going down due to this. You're probably getting more serverload by removing it then by letting it be where it is.
    Echelon likes this.
  7. Echelon

    Echelon Active Member

    wow...incredible reply! I will forward this to my experts. Thanks a lot!
  8. katsulynx

    katsulynx Well-Known Member

    Sure. But to give them approvement: there sure was a time when you had to remove whitespaces due to "high traffic consumption", but by now, every industry nation and probably most of the rest of the world with internet connection is over that point where it needs to save every 10kb possible and if not, they probably won't visit forums anyway.

Share This Page